

<?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>Touch of Technology</title>
	<atom:link href="http://www.touchoftechnology.com/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.touchoftechnology.com</link>
	<description>A small discussion of programming, computers, and everything else</description>
	<lastBuildDate>Sun, 12 Feb 2012 04:29:43 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.1</generator>
		<item>
		<title>Selecting a running position of the returned row in MSSQL</title>
		<link>http://www.touchoftechnology.com/selecting-a-running-position-of-the-returned-row-in-mssql/</link>
		<comments>http://www.touchoftechnology.com/selecting-a-running-position-of-the-returned-row-in-mssql/#comments</comments>
		<pubDate>Mon, 06 Feb 2012 15:53:11 +0000</pubDate>
		<dc:creator>andrew</dc:creator>
				<category><![CDATA[Database]]></category>
		<category><![CDATA[MSSQL]]></category>
		<category><![CDATA[Advanced Queries]]></category>
		<category><![CDATA[database]]></category>
		<category><![CDATA[Database Management]]></category>
		<category><![CDATA[mssql]]></category>

		<guid isPermaLink="false">http://www.touchoftechnology.com/?p=395</guid>
		<description><![CDATA[For some reason this concept is hard to summarize in one line. Basically we&#8217;re looking to return how many rows are in the table before the row returned in the result. Sort of like what position the rows is in line. If we have a table like this: Row: 1,2,3 Row: 2,4,5 Row: 3,6,7 And [...]]]></description>
			<content:encoded><![CDATA[<p>For some reason this concept is hard to summarize in one line.  Basically we&#8217;re looking to return how many rows are in the table before the row returned in the result.  Sort of like what position the rows is in line.  If we have a table like this:</p>
<p>Row: 1,2,3<br />
Row: 2,4,5<br />
Row: 3,6,7</p>
<p>And we want to find out the position of row 2, then it&#8217;s fairly simple because the primary key will tell us what order it is.  However, if you delete row 1, then row 2 becomes the first row in line.  The following sql will tell you how many rows are left in the table before the row you&#8217;re returning.  This is joining on the same table, but you could expand it for count rows in another table.  In that case you wouldn&#8217;t need aliases.</p>
<div class='code'>
SELECT table1.*, (<br />
SELECT COUNT(*)<br />
FROM table  as table2<br />
  WHERE table12.pk_column< table1.pk_column<br />
) as rowsBefore<br />
  FROM table as table1<br />
  WHERE someConditionOnTable1
</div>
]]></content:encoded>
			<wfw:commentRss>http://www.touchoftechnology.com/selecting-a-running-position-of-the-returned-row-in-mssql/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Give Me Your Eyes</title>
		<link>http://www.touchoftechnology.com/give-me-your-eyes/</link>
		<comments>http://www.touchoftechnology.com/give-me-your-eyes/#comments</comments>
		<pubDate>Fri, 03 Feb 2012 16:35:48 +0000</pubDate>
		<dc:creator>andrew</dc:creator>
				<category><![CDATA[Opinion]]></category>
		<category><![CDATA[Brandon Heath]]></category>
		<category><![CDATA[Give Me Your Eyes]]></category>

		<guid isPermaLink="false">http://www.touchoftechnology.com/?p=389</guid>
		<description><![CDATA[I don&#8217;t usually browse around YouTube, but I was at a youth conference a few weeks ago and the speaker played this video. I had heard this song before, but I really never dove into the lyrics. Upon doing so, I think it&#8217;s a great song. It could be sung as a prayer or just [...]]]></description>
			<content:encoded><![CDATA[<p>I don&#8217;t usually browse around YouTube, but I was at a youth conference a few weeks ago and the speaker played this video.  I had heard this song before, but I really never dove into the lyrics.  Upon doing so, I think it&#8217;s a great song.  It could be sung as a prayer or just a reminder to take the time and don&#8217;t get into our clamshells when we see something that we could help with.  If we see things through the eyes of God, then how could we ignore some of the things we see every day?  There are some situations that we can&#8217;t handle, or don&#8217;t have time for, but there are others that we could easily help with, but we make an excuse for why we can&#8217;t.  If you&#8217;re in a situation that you can help with, and you really don&#8217;t have any hard deadlines for being somewhere on time, then I urge you to help!  </p>
<p><iframe width="560" height="315" src="http://www.youtube.com/embed/P5AkNqLuVgY" frameborder="0" allowfullscreen></iframe></p>
]]></content:encoded>
			<wfw:commentRss>http://www.touchoftechnology.com/give-me-your-eyes/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Adding a second hard drive in Ubuntu</title>
		<link>http://www.touchoftechnology.com/adding-a-second-hard-drive-in-ubuntu/</link>
		<comments>http://www.touchoftechnology.com/adding-a-second-hard-drive-in-ubuntu/#comments</comments>
		<pubDate>Thu, 12 Jan 2012 16:09:51 +0000</pubDate>
		<dc:creator>andrew</dc:creator>
				<category><![CDATA[Operating Systems]]></category>
		<category><![CDATA[Ubuntu]]></category>
		<category><![CDATA[Harddrives]]></category>

		<guid isPermaLink="false">http://www.touchoftechnology.com/?p=376</guid>
		<description><![CDATA[Adding drives in Ubuntu is fairly straightforward. When you install them, Ubuntu assigns them an sdX identifier, where X is a,b,c, etc. depending on how many drives you have installed. These instructions work with whatever number harddrive you&#8217;re installing, just change the b to whatever letter Ubuntu has assigned your new drive. &#160; &#160; &#160; [...]]]></description>
			<content:encoded><![CDATA[<p>Adding drives in Ubuntu is fairly straightforward. When you install them, Ubuntu assigns them an sdX identifier, where X is a,b,c, etc. depending on how many drives you have installed. These instructions work with whatever number harddrive you&#8217;re installing, just change the b to whatever letter Ubuntu has assigned your new drive.</p>
<div>&nbsp;</div>
<div>&nbsp;</div>
<div>&nbsp;</div>
<div>&nbsp;</div>
<div>&nbsp;</div>
<div>&nbsp;</div>
<h2>Steps:</h2>
<ol>
<li>Find out what your new drive is assigned.  You&#8217;ll see a drive with no details.  That should be your new drive.
<div class='code'>sudo fdisk -l</div>
</li>
<li>Start the formatting.
<div class='code'>sudo fdisk /dev/sdb</div>
<ol>
<li>Press u &#038; enter</li>
<li>Press n &#038; enter</li>
<li>Press p &#038; enter</li>
<li>Press 1 &#038; enter</li>
<li>Press enter</li>
<li>Press enter again</li>
<li>Press w &#038; enter</li>
</ol>
</li>
<li>Format the drive.  It will take some time especially with large drives.
<div class='code'>sudo mkfs -t ext3 /dev/sdb1</div>
<li>Create a mount point.
<div class='code'>sudo mkdir /path/to/newdrive</div>
</li>
<li>Put your new drive in /etc/fstab so that it will mount automatically.
<div class='code'>/dev/sdb1    /path/to/newdrive   ext3    defaults     0        2</div>
</li>
</li>
</ol>
]]></content:encoded>
			<wfw:commentRss>http://www.touchoftechnology.com/adding-a-second-hard-drive-in-ubuntu/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Creating a strong SSH key pair for file transfer without a password</title>
		<link>http://www.touchoftechnology.com/creating-a-strong-ssh-key-pair-for-file-transfer-without-a-password/</link>
		<comments>http://www.touchoftechnology.com/creating-a-strong-ssh-key-pair-for-file-transfer-without-a-password/#comments</comments>
		<pubDate>Thu, 12 Jan 2012 15:18:06 +0000</pubDate>
		<dc:creator>andrew</dc:creator>
				<category><![CDATA[Operating Systems]]></category>
		<category><![CDATA[Ubuntu]]></category>
		<category><![CDATA[Security]]></category>

		<guid isPermaLink="false">http://www.touchoftechnology.com/?p=374</guid>
		<description><![CDATA[Passwords really get in the way of scripts that have to automatically transfer files. They can also be annoying if you&#8217;re logging into the same machine all the time. If you create a key pair between two machines however, the account you created it for won&#8217;t have to provide a password when accessing the other [...]]]></description>
			<content:encoded><![CDATA[<p>Passwords really get in the way of scripts that have to automatically transfer files. They can also be annoying if you&#8217;re logging into the same machine all the time. If you create a key pair between two machines however, the account you created it for won&#8217;t have to provide a password when accessing the other machine. Note these are 1 way, meaning if you put computer A&#8217;s ssh key on computer B, A can log into B without a password, but B still needs a password to log into A.</p>
<p>Steps to set it up</p>
<ol>
<li>Create the Key Pair.  Just hit enter for all the options and it will put the files in the .ssh/ folder
<div class='code'>ssh-keygen -t rsa -b 4096</div>
</li>
<li>SSH the .pub file to machine B, the machine you want to be able to log into without a password.
<div class='code'>scp .ssh/id_rsa.pub user@192.168.1.B:</div>
</li>
<li>Append the contents of the .pub into the .ssh/authorized_keys file of machine B
<div class='code'>cat id_rsa.pub &gt;&gt; .ssh/authorized_keys</div>
</li>
</ol>
]]></content:encoded>
			<wfw:commentRss>http://www.touchoftechnology.com/creating-a-strong-ssh-key-pair-for-file-transfer-without-a-password/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Binding NIC cards in Ubuntu to create redundancy</title>
		<link>http://www.touchoftechnology.com/binding-nic-cards-in-ubuntu-to-create-redundancy/</link>
		<comments>http://www.touchoftechnology.com/binding-nic-cards-in-ubuntu-to-create-redundancy/#comments</comments>
		<pubDate>Wed, 11 Jan 2012 20:56:57 +0000</pubDate>
		<dc:creator>andrew</dc:creator>
				<category><![CDATA[Operating Systems]]></category>
		<category><![CDATA[Ubuntu]]></category>
		<category><![CDATA[IP Address]]></category>
		<category><![CDATA[IP Binding]]></category>
		<category><![CDATA[IP Bonding]]></category>
		<category><![CDATA[network]]></category>
		<category><![CDATA[networking]]></category>

		<guid isPermaLink="false">http://www.touchoftechnology.com/?p=371</guid>
		<description><![CDATA[If you have 2 network interfaces in Ubuntu, you may want to bind them together to create redundancy. If you bind two NICs together, 1 can be unplugged, or unavailable to the network and the IP address will still broadcast through the other NIC. So here&#8217;s how to do it in Ubuntu. Install ifenslave: sudo [...]]]></description>
			<content:encoded><![CDATA[<p>If you have 2 network interfaces in Ubuntu, you may want to bind them together to create redundancy.  If you bind two NICs together, 1 can be unplugged, or unavailable to the network and the IP address will still broadcast through the other NIC.  So here&#8217;s how to do it in Ubuntu.</p>
<p>Install ifenslave:</p>
<div class='code'>sudo apt-get install ifenslave</div>
<p>Add some settings into the /etc/modules file:  </p>
<div class='code'>echo &#8220;bonding mode=active-backup miimon=100 primary=eth0&#8243; >> /etc/modules</div>
<p>Note that &#8220;active-backup&#8221; means that the second NIC is not used unless the first becomes unavailable.  You can change this if load balancing traffic to the machine is your goal.</p>
<p>Finally change the /etc/network/interfaces file:</p>
<div class='code'># The primary network interface<br />
auto bond0<br />
iface bond0 inet static<br />
address 192.168.1.X1<br />
netmask 255.255.255.0<br />
gateway 192.168.1.1<br />
network 192.168.1.0<br />
broadcast 192.168.1.255<br />
post-up ifenslave bond0 eth0 eth1<br />
pre-down ifenslave -d bond0 eth0 eth1</p>
<p># The secondary network interface<br />
auto bond0:0<br />
iface bond0:0 inet static<br />
address 192.168.1.X2<br />
netmask 255.255.255.0<br />
network 192.168.1.0<br />
broadcast 192.168.1.255
</p></div>
<p>Note that I used different IP addresses for each NIC.  They both broadcast then, and the machine is available at X1 and X2 event though the NIC&#8217;s are bonded.</p>
<p>Restart your machine after you complete these changes.  I&#8217;ve had very little success having the changes be applied correctly any other way.  Once completed, you will be able to unplug either cable and still have your connection work.  When unplugging, there will be a slight delay while the other card takes over the connections.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.touchoftechnology.com/binding-nic-cards-in-ubuntu-to-create-redundancy/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Toshiba Thrive 10.1 Tablet</title>
		<link>http://www.touchoftechnology.com/toshiba-thrive-10-1-tablet/</link>
		<comments>http://www.touchoftechnology.com/toshiba-thrive-10-1-tablet/#comments</comments>
		<pubDate>Mon, 09 Jan 2012 02:22:31 +0000</pubDate>
		<dc:creator>andrew</dc:creator>
				<category><![CDATA[Opinion]]></category>

		<guid isPermaLink="false">http://www.touchoftechnology.com/?p=368</guid>
		<description><![CDATA[So I was walking through Staples the other day and I saw the Toshiba Thrive on display. It has a 10.1 inch screen so I decided to take a look. Priced at $400 I wasn&#8217;t expecting it to have the responsiveness of the ipad, but it really did. I would seriously put this on my [...]]]></description>
			<content:encoded><![CDATA[<p>So I was walking through Staples the other day and I saw the Toshiba Thrive on display.  It has a 10.1 inch screen so I decided to take a look.  Priced at $400 I wasn&#8217;t expecting it to have the responsiveness of the ipad, but it really did.  I would seriously put this on my possible list for tablets because of the price and responsiveness.  However, I hear that ipad may be putting out a model priced at the same range, so I may just wait a little longer and see if that rumor is true.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.touchoftechnology.com/toshiba-thrive-10-1-tablet/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Bill Gates does more good in the world</title>
		<link>http://www.touchoftechnology.com/bill-gates-does-more-good-in-the-world/</link>
		<comments>http://www.touchoftechnology.com/bill-gates-does-more-good-in-the-world/#comments</comments>
		<pubDate>Fri, 06 Jan 2012 01:57:17 +0000</pubDate>
		<dc:creator>andrew</dc:creator>
				<category><![CDATA[Opinion]]></category>
		<category><![CDATA[philanthropy]]></category>

		<guid isPermaLink="false">http://www.touchoftechnology.com/?p=366</guid>
		<description><![CDATA[Regardless of my tendency to shy away from Microsoft products, you can&#8217;t argue with the fact that Bill Gates isn&#8217;t sitting on his money doing nothing. He&#8217;s doing good things with it. Just look at the article below. He pitched in over 1 billion dollars to make this project work. That&#8217;s an incredible amount of [...]]]></description>
			<content:encoded><![CDATA[<p>Regardless of my tendency to shy away from Microsoft products, you can&#8217;t argue with the fact that Bill Gates isn&#8217;t sitting on his money doing nothing.  He&#8217;s doing good things with it.  Just look at the article below.  He pitched in over 1 billion dollars to make this project work.  That&#8217;s an incredible amount of money from 1 donor.  Because of his efforts, the lives saved are measured in hundreds of thousands.  It boggles the mind that he has that much money, but to just write out a check that saved hundreds of thousands of lives takes it a step further.  If someone told you that you could save hundreds of thousands of lives just by writing a check that&#8217;s a fraction of your worth, who wouldn&#8217;t jump on that opportunity?  Check out the article below for more details.</p>
<p><a href='http://www.forbes.com/sites/matthewherper/2011/11/02/the-second-coming-of-bill-gates/2/' target='_blank'>http://www.forbes.com/sites/matthewherper/2011/11/02/the-second-coming-of-bill-gates/2/</a></p>
]]></content:encoded>
			<wfw:commentRss>http://www.touchoftechnology.com/bill-gates-does-more-good-in-the-world/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Apache Password protecting a Directory</title>
		<link>http://www.touchoftechnology.com/apache-password-protecting-a-directory/</link>
		<comments>http://www.touchoftechnology.com/apache-password-protecting-a-directory/#comments</comments>
		<pubDate>Tue, 20 Dec 2011 21:45:45 +0000</pubDate>
		<dc:creator>andrew</dc:creator>
				<category><![CDATA[Apache]]></category>
		<category><![CDATA[Web Servers]]></category>
		<category><![CDATA[Apache2]]></category>
		<category><![CDATA[Security]]></category>

		<guid isPermaLink="false">http://www.touchoftechnology.com/?p=362</guid>
		<description><![CDATA[Password protecting a directory in Apache means that a username/password prompt will appear if someone trys to access any of the files in that directory, or that directory itself. They don&#8217;t have to do it every time they load a new page, if you for instance have an application in the directory, as it creates [...]]]></description>
			<content:encoded><![CDATA[<p>Password protecting a directory in Apache means that a username/password prompt will appear if someone trys to access any of the files in that directory, or that directory itself. They don&#8217;t have to do it every time they load a new page, if you for instance have an application in the directory, as it creates a session and saves the fact they authenticated themselves.</p>
<p>To set this up, add the following into your apache site. Most likely it will be the sites-available/default</p>
<div class="code">
&lt;Directory /path/to/directory/to/protect/&gt;<br />
AuthType Basic<br />
AuthName &#8220;restricted&#8221;<br />
AuthUserFile /path/to/auth/file/authfile.txt<br />
require valid-user<br />
&lt;Directory&gt;
</div>
<p>To explain the parts:</p>
<ul>
<li>Basic &#8211; Means that they have to put in a username/password. Or you could make a request with it in the URL.</li>
<li>AuthName &#8220;xxx&#8221; &#8211; This is just the name the user sees when they&#8217;re given the prompt. You can call it whatever you want.</li>
<li>AuthUserFile &#8211; This is a file with username and password pairs in it. You can set it up without a file like this, but I tend to use the files because you can store the files in a non web root directory. The username/password pairs have to encoded, so to make life easier, head of to <a href="http://www.thejackol.com/scripts/htpasswdgen.php" target="_blank">http://www.thejackol.com/scripts/htpasswdgen.php</a>. They have a great tool to generate the contents of the auth file.</li>
</ul>
]]></content:encoded>
			<wfw:commentRss>http://www.touchoftechnology.com/apache-password-protecting-a-directory/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Apache Redirect to Secure Link</title>
		<link>http://www.touchoftechnology.com/apache-redirect-to-secure-link/</link>
		<comments>http://www.touchoftechnology.com/apache-redirect-to-secure-link/#comments</comments>
		<pubDate>Tue, 20 Dec 2011 21:22:55 +0000</pubDate>
		<dc:creator>andrew</dc:creator>
				<category><![CDATA[Apache]]></category>
		<category><![CDATA[Web Servers]]></category>
		<category><![CDATA[Apache2]]></category>
		<category><![CDATA[htaccess]]></category>
		<category><![CDATA[rewrite rules]]></category>

		<guid isPermaLink="false">http://www.touchoftechnology.com/?p=360</guid>
		<description><![CDATA[If you have a directory that you want to force users into an SSL connection, the easiest way is to use a .htaccess file if your host allows it. The following will force any page to redirect to https:// if they aren&#8217;t on it already. RewriteEngine On RewriteCond %{HTTPS} off RewriteRule (.*) https://%{HTTP_HOST}%{REQUEST_URI} If you [...]]]></description>
			<content:encoded><![CDATA[<p>If you have a directory that you want to force users into an SSL connection, the easiest way is to use a .htaccess file if your host allows it.  The following will force any page to redirect to https:// if they aren&#8217;t on it already.</p>
<div class='code'>RewriteEngine On<br />
RewriteCond %{HTTPS} off<br />
RewriteRule (.*) https://%{HTTP_HOST}%{REQUEST_URI}
</div>
<p>If you want to exclude a directory or filename specifically, then just add in another rewrite condition as shown below.</p>
<div class='code'>RewriteEngine On<br />
RewriteCond %{HTTPS} off<br />
RewriteCond %{REQUEST_URI} !^/.*FullOrPartOfFileNameOrDirectoryHere.* [NC]<br />
RewriteRule (.*) https://%{HTTP_HOST}%{REQUEST_URI}
</div>
]]></content:encoded>
			<wfw:commentRss>http://www.touchoftechnology.com/apache-redirect-to-secure-link/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>MySQL Update Row if Key Exists</title>
		<link>http://www.touchoftechnology.com/mysql-insert-replace/</link>
		<comments>http://www.touchoftechnology.com/mysql-insert-replace/#comments</comments>
		<pubDate>Wed, 07 Dec 2011 23:46:02 +0000</pubDate>
		<dc:creator>andrew</dc:creator>
				<category><![CDATA[Database]]></category>
		<category><![CDATA[MySQL]]></category>
		<category><![CDATA[Advanced Queries]]></category>
		<category><![CDATA[database]]></category>

		<guid isPermaLink="false">http://www.touchoftechnology.com/?p=353</guid>
		<description><![CDATA[Many times you have to do a query before you do a write action to a database because you have to see whether or not a row exists for the data you want to put in. If it does exist, you&#8217;d then do another query that was an update, otherwise you&#8217;d have to do an [...]]]></description>
			<content:encoded><![CDATA[<p>Many times you have to do a query before you do a write action to a database because you have to see whether or not a row exists for the data you want to put in.  If it does exist, you&#8217;d then do another query that was an update, otherwise you&#8217;d have to do an insert.  Well if you want a quicker way, and you don&#8217;t need to use operators like &#8220;Update `column`+1&#8243;, then &#8220;REPLACE INTO&#8221; is the function for you.  It works exactly like an insert, except that if the primary key already exists, it overwrites the existing row.  Obviously you&#8217;ll want a primary key that&#8217;s stagnant and not an auto-incremented field, as you wouldn&#8217;t be passing the primary key to an auto-increment.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.touchoftechnology.com/mysql-insert-replace/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

