<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>Mark Alan Evans &#187; Uncategorized</title>
	<atom:link href="http://www.markalanevans.com/category/uncategorized/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.markalanevans.com</link>
	<description>Coder by Day, Entrepreneur by Night.</description>
	<lastBuildDate>Fri, 20 Jan 2012 02:20:43 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.1.3</generator>
		<item>
		<title>Upgrade Centos 5.5 / RHEL 5.5 ImageMagick from 6.2 to 6.7</title>
		<link>http://www.markalanevans.com/2012/01/19/upgrade-centos-5-5-rhel-5-5-imagemagick-from-6-2-to-6-7/</link>
		<comments>http://www.markalanevans.com/2012/01/19/upgrade-centos-5-5-rhel-5-5-imagemagick-from-6-2-to-6-7/#comments</comments>
		<pubDate>Fri, 20 Jan 2012 02:05:46 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://www.markalanevans.com/2012/01/19/upgrade-centos-5-5-rhel-5-5-imagemagick-from-6-2-to-6-7/</guid>
		<description><![CDATA[We where running RHEL 5.5 and many of the new resize / background features where not available in image Magick 6.2. So we needed to upgraded. convert -version wget http://www.imagemagick.org/download/linux/CentOS/x86_64/ImageMagick-devel-6.7.4-7.x86_64.rpm wget http://www.imagemagick.org/download/linux/CentOS/x86_64/ImageMagick-6.7.4-7.x86_64.rpm sudo yum install ImageMagick-devel-6.7.4-7.x86_64.rpm ImageMagick-6.7.4-7.x86_64.rpm convert -version That is all there is to it. Then exclude ImageMagick from being updated http://www.cyberciti.biz/faq/redhat-centos-linux-yum-update-exclude-packages/ [main] cachedir=/var/cache/yum [...]]]></description>
			<content:encoded><![CDATA[<p>We where running RHEL 5.5 and many of the new resize / background features where not available in image Magick 6.2. 
So we needed to upgraded.</p>

<pre><code>convert -version
wget http://www.imagemagick.org/download/linux/CentOS/x86_64/ImageMagick-devel-6.7.4-7.x86_64.rpm
wget http://www.imagemagick.org/download/linux/CentOS/x86_64/ImageMagick-6.7.4-7.x86_64.rpm
sudo yum install ImageMagick-devel-6.7.4-7.x86_64.rpm ImageMagick-6.7.4-7.x86_64.rpm
convert -version
</code></pre>

<p>That is all there is to it.</p>

<p>Then exclude ImageMagick from being updated </p>

<p><a href="http://www.cyberciti.biz/faq/redhat-centos-linux-yum-update-exclude-packages/">http://www.cyberciti.biz/faq/redhat-centos-linux-yum-update-exclude-packages/</a></p>

<pre><code>[main]
cachedir=/var/cache/yum
keepcache=0
debuglevel=2
logfile=/var/log/yum.log
distroverpkg=redhat-release
tolerant=1
exactarch=1
obsoletes=1
gpgcheck=1
plugins=1
exclude=ImageMagick* &lt;--important line to add
</code></pre>

<h3>References</h3>

<p>Learned about yum installing rpm&#8217;s from here</p>

<p><a href="https://github.com/Snorby/snorby/wiki/CentOS-5.5-64bit-by-RISC427">https://github.com/Snorby/snorby/wiki/CentOS-5.5-64bit-by-RISC427</a></p>
]]></content:encoded>
			<wfw:commentRss>http://www.markalanevans.com/2012/01/19/upgrade-centos-5-5-rhel-5-5-imagemagick-from-6-2-to-6-7/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Change path for _www user on OSx for Apache</title>
		<link>http://www.markalanevans.com/2012/01/19/change-path-for-_www-user-on-osx-for-apache/</link>
		<comments>http://www.markalanevans.com/2012/01/19/change-path-for-_www-user-on-osx-for-apache/#comments</comments>
		<pubDate>Thu, 19 Jan 2012 21:14:20 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://www.markalanevans.com/2012/01/19/change-path-for-_www-user-on-osx-for-apache/</guid>
		<description><![CDATA[While trying to use wget and image magic on my mac via a call to apache, calls to exec where failing when doing exec($cmd = 'wget '. escapeshellarg($remote_url) .' -O '. escapeshellarg($local_path) .' 2&#62;&#38;1', $out, $status); I fix this by changing the path for my _www user. mate /System/Library/LaunchDaemons/org.apache.httpd.plist and &#60;key&#62;EnvironmentVariables&#60;/key&#62; &#60;dict&#62; &#60;key&#62;PATH&#60;/key&#62; &#60;string&#62;/usr/bin:/bin:/usr/sbin:/sbin:/usr/local/bin&#60;/string&#62; &#60;/dict&#62; [...]]]></description>
			<content:encoded><![CDATA[<p>While trying to use wget and image magic on my mac via a call to apache, </p>

<p>calls to exec where failing when doing </p>

<pre><code>exec($cmd = 'wget '. escapeshellarg($remote_url) .' -O '. escapeshellarg($local_path) .' 2&gt;&amp;1', $out, $status);
</code></pre>

<p>I fix this by changing the path for my _www user.</p>

<pre><code>mate /System/Library/LaunchDaemons/org.apache.httpd.plist
</code></pre>

<p>and </p>

<pre><code>&lt;key&gt;EnvironmentVariables&lt;/key&gt;
&lt;dict&gt;
    &lt;key&gt;PATH&lt;/key&gt;
    &lt;string&gt;/usr/bin:/bin:/usr/sbin:/sbin:/usr/local/bin&lt;/string&gt;
&lt;/dict&gt;
</code></pre>

<p>Restarting apache i can no make calls to wget and git.<span id="more-527"></span>Main entry continued</p>
]]></content:encoded>
			<wfw:commentRss>http://www.markalanevans.com/2012/01/19/change-path-for-_www-user-on-osx-for-apache/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Installing Selenium Webdriver on Ubuntu 11</title>
		<link>http://www.markalanevans.com/2011/11/01/installing-selenium-webdriver-on-ubuntu-11/</link>
		<comments>http://www.markalanevans.com/2011/11/01/installing-selenium-webdriver-on-ubuntu-11/#comments</comments>
		<pubDate>Tue, 01 Nov 2011 22:28:59 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://www.markalanevans.com/2011/11/01/installing-selenium-webdriver-on-ubuntu-11/</guid>
		<description><![CDATA[Start by installing rvm. Dealing with ruby on a linux system without it is a nightmare. RVM &#8211; Install $ bash &#60; &#60;(curl -s https://raw.github.com/wayneeseguin/rvm/master/binscripts/rvm-installer) Install zlib rvm pkg install zlib You may also need to install zlib. aptitude install zlib1g-dev or apt-get install zlib1g zlib1g-dev zlibc Upgrade to the latest version of Ruby. rvm [...]]]></description>
			<content:encoded><![CDATA[<p>Start by installing rvm. Dealing with ruby on a linux system without it is a nightmare.</p>

<p><a href="http://beginrescueend.com/">RVM &#8211; Install</a></p>

<pre><code>$ bash &lt; &lt;(curl -s https://raw.github.com/wayneeseguin/rvm/master/binscripts/rvm-installer)
</code></pre>

<p>Install zlib</p>

<pre><code>rvm pkg install zlib
</code></pre>

<p>You may also need to install zlib.</p>

<pre><code>aptitude install zlib1g-dev
</code></pre>

<p>or </p>

<pre><code>apt-get install zlib1g zlib1g-dev zlibc
</code></pre>

<p>Upgrade to the latest version of Ruby.</p>

<pre><code>rvm install 1.9.2 --with-zlib-dir=$rvm_path/usr --with-openssl-dir=$rvm_path/usr
</code></pre>

<p>Not doing the above resulted in:</p>

<pre><code>    ERROR:  Loading command: update (LoadError)
        no such file to load -- zlib
    ERROR:  While executing gem ... (NameError)
        uninitialized constant Gem::Commands::UpdateCommand
</code></pre>

<p>Set Ruby 1.9.2 to be the default version</p>

<pre><code>rvm --default use 1.9.2
</code></pre>

<p>Update the System so it has knowledge of all the gems etc.</p>

<pre><code>rvm gem update --system
</code></pre>

<p>Install Selenium Web Driver<span id="more-503"></span>gem install selenium-webdriver</p>

<h3>Resources</h3>

<ul>
<li><a href="http://rubygems.org/gems/selenium-webdriver">http://rubygems.org/gems/selenium-webdriver</a></li>
<li><a href="http://stackoverflow.com/questions/769496/ubuntu-noob-rails-install-fails-on-zlib">http://stackoverflow.com/questions/769496/ubuntu-noob-rails-install-fails-on-zlib</a></li>
<li><a href="http://redmine.ruby-lang.org/issues/1090">http://redmine.ruby-lang.org/issues/1090</a></li>
<li><a href="http://buddylindsey.com/no-such-file-to-load-zlib-solution/">http://buddylindsey.com/no-such-file-to-load-zlib-solution/</a></li>
<li><a href="https://rvm.beginrescueend.com/packages/zlib/">https://rvm.beginrescueend.com/packages/zlib/</a></li>
</ul>
]]></content:encoded>
			<wfw:commentRss>http://www.markalanevans.com/2011/11/01/installing-selenium-webdriver-on-ubuntu-11/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Network Manager Overrides resolve.cnf</title>
		<link>http://www.markalanevans.com/2011/11/01/setting-up-ubuntu-name-servers/</link>
		<comments>http://www.markalanevans.com/2011/11/01/setting-up-ubuntu-name-servers/#comments</comments>
		<pubDate>Tue, 01 Nov 2011 21:28:24 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://www.markalanevans.com/2011/11/01/setting-up-ubuntu-name-servers/</guid>
		<description><![CDATA[Problem: Ubuntu Rackspace cloud server can&#8217;t access internet via firefox or ping. This occurs after install ubuntu desktop on a rackspace cloud server. Solution: Temporary fix: modify resolve.cnf `sudo vi /etc/resolve.cnf` ` nameserver 173.203.4.8 nameserver 173.203.4.9 ` Permanent fix: disable network-manager or configure it to default set needed name servers.Main entry continued]]></description>
			<content:encoded><![CDATA[<h3>Problem:</h3>

<p>Ubuntu Rackspace cloud server can&#8217;t access internet via firefox or ping. 
This occurs after install ubuntu desktop on a rackspace cloud server.</p>

<h3>Solution:</h3>

<p>Temporary fix: modify resolve.cnf</p>

<pre><code>`sudo vi /etc/resolve.cnf` 

`   nameserver 173.203.4.8
    nameserver 173.203.4.9
`
</code></pre>

<p>Permanent fix: disable network-manager or configure it to default set needed name servers.<span id="more-499"></span>Main entry continued</p>
]]></content:encoded>
			<wfw:commentRss>http://www.markalanevans.com/2011/11/01/setting-up-ubuntu-name-servers/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Installing VNC on an Ubuntu Server</title>
		<link>http://www.markalanevans.com/2011/11/01/installing-vnc-on-an-ubuntu-server/</link>
		<comments>http://www.markalanevans.com/2011/11/01/installing-vnc-on-an-ubuntu-server/#comments</comments>
		<pubDate>Tue, 01 Nov 2011 16:37:07 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://www.markalanevans.com/2011/11/01/installing-vnc-on-an-ubuntu-server/</guid>
		<description><![CDATA[We at NetPlenish are starting to use Selenium more and more, and we are doing it in the &#8220;cloud&#8221;. One of the first things i wanted to do was be able to watch my tests run on the system. So I needed to install VNC and ubuntu Desktop. Its very strait forward. Login as root. [...]]]></description>
			<content:encoded><![CDATA[<p>We at <a href="http://www.netplenish.com">NetPlenish</a> are starting to use Selenium more and more, and we are doing it in the &#8220;cloud&#8221;.
One of the first things i wanted to do was be able to watch my tests run on the system. So I needed to install VNC and ubuntu Desktop.</p>

<p>Its very strait forward. </p>

<p>Login as root.</p>

<pre><code>`sudo su -`
</code></pre>

<p>Update the apt-get</p>

<pre><code>`apt-get update`
</code></pre>

<p>Install ubuntu desktop</p>

<pre><code>`apt-get install ubuntu-desktop`
</code></pre>

<p>I picked gnome for my display manager.</p>

<pre><code>`apt-get install gdm`
</code></pre>

<p>Update xserver to work with the new gui.</p>

<pre><code>`dpkg-reconfigure xserver-xorg`&lt;span id="more-466"&gt;&lt;/span&gt;Startup GDM

`/etc/init.d/gdm start`
</code></pre>

<p>Install the TightVNCServer</p>

<pre><code>`apt-get install tightnvcserver`
</code></pre>

<p>Create a config file for gnome &amp; VNC sessions
    Create a file called  &#8216;xstartup&#8217; and placed it in ~/.vnc
    make the file executable</p>

<pre><code>`chmod +x xstartup`

`
unset SESSION_MANAGER
exec /etc/x11/xinit/xinitrc

# Fix keyboard maping so that you don't have to deal with asdf bug.
# https://bugs.launchpad.net/ubuntu/+source/control-center/+bug/108928
export XKL_XMODMAP_DISABLE=1

xsetroot -solid grey
vncconfig -iconic &amp;
xterm -geomtetry 1024x768 -ls -title "$VNCDESKTOP Desktop" &amp;
exec gnome-session
`
</code></pre>

<p>Make this file  &#8220;/etc/x11/xinit/xinitrc&#8221; executable.</p>

<pre><code>`chmod +x /etc/x11/xinit/xinitrc`
</code></pre>

<p>Restart the server and run vnc </p>

<pre><code>`vncserver :1`

1 is the display number.  
</code></pre>

<p>If you want to stop the vnc server kill it.</p>

<pre><code>`vncserver -kill :1`
</code></pre>

<p>Open up port 5901 for VNC in your firewall.</p>

<p>If by default you reject all in your IP Tables do:</p>

<pre><code>`iptables -A INPUT -p tcp --destination-port 5901`
</code></pre>

<p>If by default you all all in your IP Tables do:</p>

<pre><code>`iptables -A INPUT -p tcp --destination-port 5901`
</code></pre>

<p>Since I am on a mac, I chose <a href="http://www.jinx.de/JollysFastVNC.html">Jolly Fast VNC </a> so that I could connect to the VNC server.</p>

<p><img src="http://www.markalanevans.com/wp-content/uploads/2011/11/connect_to_vnc.jpg" alt="Connect to vnc" /></p>

<p>I then needed to stop the &#8220;d&#8221; key from minimizing all the windows.
<img src="http://www.markalanevans.com/wp-content/uploads/2011/11/stop_d_key_from_minimizing_windows.jpg" alt="Stop D Key From minimizing windows." /></p>

<h3>References</h3>

<ul>
<li><p><a href="http://superuser.com/questions/220164/how-to-stop-the-d-key-from-minimizing-all-windows-in-ubuntu-10-10-when-connect">Stop the D Key</a></p></li>
<li><p><a href="http://odinhg.wordpress.com/2009/07/11/installing-vnc-server-on-ubuntu-server/">Install VNC Server</a></p></li>
<li><a href="http://blog.yclian.com/2007/12/3-solutions-to-gnomevnc-keyboard.html">Fix Keyboard Mappiing</a></li>
</ul>
]]></content:encoded>
			<wfw:commentRss>http://www.markalanevans.com/2011/11/01/installing-vnc-on-an-ubuntu-server/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>GIT Repo in Bash Prompt OSX</title>
		<link>http://www.markalanevans.com/2011/08/16/git-repo-in-bash-prompt-osx/</link>
		<comments>http://www.markalanevans.com/2011/08/16/git-repo-in-bash-prompt-osx/#comments</comments>
		<pubDate>Tue, 16 Aug 2011 20:36:13 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://www.markalanevans.com/2011/08/16/git-repo-in-bash-prompt-osx/</guid>
		<description><![CDATA[Description: OSX Git Prompt &#8211; make your git repo prompts look pretty Thief: Mark Evans: Location: http://asemanfar.com/Current-Git-Branch-in-Bash-Prompt c_cyan=`tput setaf 6` c_red=`tput setaf 1` c_green=`tput setaf 2` c_sgr0=`tput sgr0` parse_git_branch (){ if git rev-parse --git-dir &#62;/dev/null 2&#62;&#38;1 then gitver=$(git branch 2&#62;/dev/null&#124; sed -n '/^\*/s/^\* //p') else return 0 fi echo -e $gitver } branch_color (){ if [...]]]></description>
			<content:encoded><![CDATA[<p>Description: OSX Git Prompt &#8211; make your git repo prompts look pretty</p>

<pre><code>Thief: Mark Evans:
Location: http://asemanfar.com/Current-Git-Branch-in-Bash-Prompt
c_cyan=`tput setaf 6`
c_red=`tput setaf 1`
c_green=`tput setaf 2`
c_sgr0=`tput sgr0`
parse_git_branch (){
    if git rev-parse --git-dir &gt;/dev/null 2&gt;&amp;1
    then
        gitver=$(git branch 2&gt;/dev/null| sed -n '/^\*/s/^\* //p')
    else
        return 0
    fi
    echo -e $gitver
}
branch_color (){
    if git rev-parse --git-dir &gt;/dev/null 2&gt;&amp;1
    then
        color=""
    if git diff --quiet 2&gt;/dev/null &gt;&amp;2 
    then
        color="${c_green}"
    else
        color=${c_red}
    fi
    else
        return 0
    fi
    echo -ne $color
}

#Branch First
#PS1='[\[$(branch_color)\]$(parse_git_branch)\[${c_sgr0}\]] \u@\[${c_red}\]\w\[${c_sgr0}\]: '
#Branch Last
PS1=' \u@\[${c_red}\]\w\[${c_sgr0}\]: [\[$(branch_color)\]$(parse_git_branch)\[${c_sgr0}\]]'&lt;span id="more-423"&gt;&lt;/span&gt;Main entry continued
</code></pre>
]]></content:encoded>
			<wfw:commentRss>http://www.markalanevans.com/2011/08/16/git-repo-in-bash-prompt-osx/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

