<?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>Sean O&#039;Donnell</title>
	<atom:link href="http://www.seanodonnell.com/wp/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.seanodonnell.com/wp</link>
	<description>Software and Systems Engineering</description>
	<lastBuildDate>Tue, 17 Apr 2012 09:08:29 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.1.1</generator>
		<item>
		<title>Replacing a hard-coded string within a codebase.</title>
		<link>http://www.seanodonnell.com/wp/replacing-a-hard-coded-string-within-a-codebase/</link>
		<comments>http://www.seanodonnell.com/wp/replacing-a-hard-coded-string-within-a-codebase/#comments</comments>
		<pubDate>Fri, 02 Mar 2012 22:32:12 +0000</pubDate>
		<dc:creator>Sean O'Donnell</dc:creator>
				<category><![CDATA[Linux]]></category>
		<category><![CDATA[Perl]]></category>
		<category><![CDATA[PHP]]></category>
		<category><![CDATA[Software]]></category>
		<category><![CDATA[bash]]></category>
		<category><![CDATA[perl]]></category>
		<category><![CDATA[php]]></category>

		<guid isPermaLink="false">http://www.seanodonnell.com/wp/?p=1838</guid>
		<description><![CDATA[Many times, developers find themselves stuck with no other option than to hard-code some specific string that will inevitably change as the code matures, or as the environment changes. We all try to avoid this as best as possible, some more than others, but in the end, everyone does it at some point. Most modern [...]]]></description>
			<content:encoded><![CDATA[<p>Many times, developers find themselves stuck with no other option than to hard-code some specific string that will inevitably change as the code matures, or as the environment changes. We all try to avoid this as best as possible, some more than others, but in the end, everyone does it at some point. </p>
<p>Most modern text editors and IDE interfaces provide a simple dialogue-based tool that allows us to click-on a few things, and perform such a trivial task. However, doing this from the command-line is an entirely different issue.</p>
<p>One of the most common approaches to this issue, is to throw some regular expressions at perl, and let ol&#8217; Aunt Perl do her job. </p>
<pre>find ./ -iname "*.php" -exec perl -pi -e 's/\/old\/tree\/path/\/new\/path\/tree/' {} \;</pre>
<p>The example above would replace the hard-coded string &#8220;/old/tree/path&#8221;, with the new hard-coded string &#8220;/new/path/tree/&#8221;, in all of your PHP files. </p>
<p>In many cases, that simple 1-line command runs faster, and is much easier to run than using the IDE/text-editor&#8217;s GUI find/replace dialogue. It&#8217;s also much sexier. ;-p</p>
]]></content:encoded>
			<wfw:commentRss>http://www.seanodonnell.com/wp/replacing-a-hard-coded-string-within-a-codebase/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Recursive PHP File Syntax Check</title>
		<link>http://www.seanodonnell.com/wp/recursive-php-file-syntax-check/</link>
		<comments>http://www.seanodonnell.com/wp/recursive-php-file-syntax-check/#comments</comments>
		<pubDate>Wed, 08 Feb 2012 10:11:24 +0000</pubDate>
		<dc:creator>Sean O'Donnell</dc:creator>
				<category><![CDATA[Linux]]></category>
		<category><![CDATA[PHP]]></category>
		<category><![CDATA[Software]]></category>

		<guid isPermaLink="false">http://www.seanodonnell.com/wp/?p=1757</guid>
		<description><![CDATA[If you want to quickly check your PHP code tree for Syntax Errors (using bash), you can run the following command(s): find ~/workspace/myproject -iname "*.php" -exec php -l {} \; &#124; grep -i "Errors.parsing" The command above will perform a syntax check on all .php files (recursively) within the &#8216;~/workspace/myproject&#8217; directory. This can be handy [...]]]></description>
			<content:encoded><![CDATA[<p>If you want to quickly check your PHP code tree for Syntax Errors (using bash), you can run the following command(s):</p>
<pre>
find ~/workspace/myproject -iname "*.php" -exec php -l {} \; | grep -i "Errors.parsing"
</pre>
<p>The command above will perform a syntax check on all .php files (recursively) within the &#8216;~/workspace/myproject&#8217; directory. This can be handy for code auditing, as well as debugging unfamiliar (and even familiar) code.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.seanodonnell.com/wp/recursive-php-file-syntax-check/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Harbanero Cajun Black Bean Ghost Pepper Bacon Chili</title>
		<link>http://www.seanodonnell.com/wp/seans-harbanero-cajun-black-bean-ghost-pepper-bacon-chili/</link>
		<comments>http://www.seanodonnell.com/wp/seans-harbanero-cajun-black-bean-ghost-pepper-bacon-chili/#comments</comments>
		<pubDate>Sun, 05 Feb 2012 08:05:41 +0000</pubDate>
		<dc:creator>Sean O'Donnell</dc:creator>
				<category><![CDATA[Bachelor Cooking/Recipes]]></category>
		<category><![CDATA[cooking]]></category>
		<category><![CDATA[crockpot]]></category>
		<category><![CDATA[recipes]]></category>

		<guid isPermaLink="false">http://www.seanodonnell.com/wp/?p=1747</guid>
		<description><![CDATA[I&#8217;ve been trying to perfect this recipe now for a few weeks. Recently, I picked-up some Cajun Seasoning and Ghost Peppers from Nicole&#8217;s Gourmet Foods, here in South Pasadena, CA. These (2) items were just what was lacking from my previous attempts to signify my recipe. Since it is &#8220;Super Bowl Sunday&#8221; tomorrow, and I [...]]]></description>
			<content:encoded><![CDATA[<p><img alt="" src="http://farm8.staticflickr.com/7018/6626747649_6462c682a4.jpg" title="Cajun Seasoning and Ghost Peppers" class="alignnone" width="500" height="500" /></p>
<p>I&#8217;ve been trying to perfect this recipe now for a few weeks. Recently, I picked-up some Cajun Seasoning and Ghost Peppers from <a href="http://www.nicolesgourmetfoods.com/">Nicole&#8217;s Gourmet Foods</a>, here in South Pasadena, CA. These (2) items were just what was lacking from my previous attempts to signify my recipe.</p>
<p>Since it is &#8220;Super Bowl Sunday&#8221; tomorrow, and I plan on hanging out w/ some (awesome) friends and enjoying a feast, I decided to make another round of home-cooked chili. </p>
<h2>Ingredients, Ingredients, Ingredients&#8230;</h2>
<p>Tonight&#8217;s crockpot mission is as follows:</p>
<p>* 1lbs Ground Beef (Sirloin)<br />
* 1lbs Thick-cut (uncured) Apple Wood Smoked Bacon<br />
* 1 Red Bell pepper<br />
* 1/2 Gold Onion<br />
* 4oz of Lager Beer (tonight: Spaten)<br />
* Seasoning: (1-2 tblspoon/ea) Cajun, Cumin, Chili Powder, Pepper, Salt, Beef Bouillon, and Smoked Paprika<br />
* 1 Garlic Clove (diced)<br />
* 1 12oz Can of Tomato Paste (8oz. should be fine, too)<br />
* 2 cans of Organic Black Beans (drained)<br />
* 1 diced Ghost Pepper<br />
* 2 tblspoon of Worcestershire Sauce<br />
* 2 tblspoon of Honey BBQ Sauce<br />
* 1 tblspoon of Habanero Sauce</p>
<h2>Putting it all together&#8230;</h2>
<p>The 1st step, is to open that beer, and take a big swig. Then, you&#8217;ll need to toss that bacon on a cooking sheet, and throw it in the oven (@425 degrees). While that bacon is cooking&#8230; chop-up the onion, bell pepper, garlic, and ghost pepper. Take another swig, you deserve it.</p>
<p>After about 15 minutes or so, flip the bacon, and then start cooking the ground beef until it&#8217;s browned. Once it&#8217;s browned, the bacon should also (or almost) be done. </p>
<p>* Degrease the bacon (paper towels), and drain any fluids from the browned (cooked) ground beef.<br />
* Toss all the beef in the crock pot. Dice-up the bacon, and toss it in.<br />
* Toss-in the diced onion, garlic, and ghost pepper.<br />
* Add a 1/2 bottle of beer (I used Spaten, this time).<br />
* Add the Tomato Paste and Black beans.<br />
* Add all the sauces and seasoning listed above.<br />
* Add water to around the top-level of the pile, and stir it up a bit.<br />
* Slow-cook on HIGH for 1 hour, then proceed to slow-cook on MEDIUM/LOW for approx 7-10 more hours.</p>
<blockquote><p>
<em><strong>UPDATE (02.12.2012):</strong> </p>
<p>This recipe came-out pretty darn good. My crockpot returned from the superbowl party completely empty.</p>
<p>I changed the ingredients (above) to suggest 12oz. of tomato paste, as the 6oz. can just didn&#8217;t quite get it thick enough. Everything else was pretty spot-on. Mmmm&#8230;. =)</p>
<p><strong>NOTES:</strong></p>
<p>You may want to check to see how spicy the meat is after about 4hrs. I had to add a bit more Worcestershire Sauce, as I put a bit more Habanero in that I had thought. It was pretty spicy, but I eventually got it just right. In other words, don&#8217;t be afraid to play around with the sauces until you get the taste just right! =)<br />
</em>
</p></blockquote>
<p>Enjoy!</p>
]]></content:encoded>
			<wfw:commentRss>http://www.seanodonnell.com/wp/seans-harbanero-cajun-black-bean-ghost-pepper-bacon-chili/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Using clusterssh (cssh) with aterm (instead of xterm) on Fedora Linux</title>
		<link>http://www.seanodonnell.com/wp/using-clusterssh-cssh-with-aterm/</link>
		<comments>http://www.seanodonnell.com/wp/using-clusterssh-cssh-with-aterm/#comments</comments>
		<pubDate>Tue, 01 Nov 2011 08:38:52 +0000</pubDate>
		<dc:creator>Sean O'Donnell</dc:creator>
				<category><![CDATA[Linux]]></category>
		<category><![CDATA[Software]]></category>

		<guid isPermaLink="false">http://www.seanodonnell.com/wp/?p=1667</guid>
		<description><![CDATA[I&#8217;m not sure about debian-based distros, but on Fedora, the default cssh configuration file (~/.csshrc) is configured to use xterm. Personally, I prefer aterm, but simply replacing the &#8216;terminal&#8217; value (alone) generates an error. You&#8217;ve also got to remove the preset &#8216;terminal_allow_send_events&#8217; values as well, as the preset flags only apply to xterm. # line(s) [...]]]></description>
			<content:encoded><![CDATA[<p>I&#8217;m not sure about debian-based distros, but on Fedora, the default cssh configuration file (~/.csshrc) is configured to use xterm. Personally, I prefer aterm, but simply replacing the &#8216;terminal&#8217; value (alone) generates an error. You&#8217;ve also got to remove the preset &#8216;terminal_allow_send_events&#8217; values as well, as the preset flags only apply to xterm.</p>
<pre>
# line(s) 30-31
terminal=/usr/bin/aterm
terminal_allow_send_events=
</pre>
<p>&#8220;&#8230;and that&#8217;s all I&#8217;ve got to say about that.&#8221;</p>
]]></content:encoded>
			<wfw:commentRss>http://www.seanodonnell.com/wp/using-clusterssh-cssh-with-aterm/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>WPA2 Wireless Encryption, WindowMaker, and Fedora 14&#8230;</title>
		<link>http://www.seanodonnell.com/wp/wpa2-wireless-encryption-windowmaker-and-fedora-14/</link>
		<comments>http://www.seanodonnell.com/wp/wpa2-wireless-encryption-windowmaker-and-fedora-14/#comments</comments>
		<pubDate>Wed, 11 May 2011 08:11:36 +0000</pubDate>
		<dc:creator>Sean O'Donnell</dc:creator>
				<category><![CDATA[Linux]]></category>
		<category><![CDATA[Software]]></category>
		<category><![CDATA[Encryption]]></category>
		<category><![CDATA[fedora]]></category>
		<category><![CDATA[wifi]]></category>
		<category><![CDATA[WindowMaker]]></category>
		<category><![CDATA[WPA2]]></category>

		<guid isPermaLink="false">http://www.seanodonnell.com/wp/?p=1546</guid>
		<description><![CDATA[I recently switched-back to using the WindowMaker Desktop Environment on my Fedora Linux Netbook. It&#8217;s currently running on the latest version of Fedora (14), and I&#8217;m using a Linksys/Cisco E3000 Wireless-N Router with WPA2 Encryption. Initially, before switching-back to WindowMaker, I was running the XFCE Desktop Environment, which provides a &#8216;panel&#8217;, normal &#8216;taskbars&#8217; and tools [...]]]></description>
			<content:encoded><![CDATA[<p>I recently switched-back to using the <a href="http://windowmaker.org/">WindowMaker Desktop Environment</a> on my <a href="http://www.fedoraproject.org/">Fedora Linux</a> Netbook. It&#8217;s currently running on the latest version of Fedora (14), and I&#8217;m using a <a href="http://www.linksysbycisco.com/EU/en/products/E3000">Linksys/Cisco E3000 Wireless-N Router</a> with WPA2 Encryption. </p>
<p>Initially, before switching-back to WindowMaker, I was running the <a href="http://www.xfce.org/">XFCE Desktop Environment</a>, which provides a &#8216;panel&#8217;, normal &#8216;taskbars&#8217; and tools that you&#8217;d expect a modern desktop environment to provide, unlike WindowMaker, which only provides a menu system (and is all I really need).</p>
<p>Since WindowMaker doesn&#8217;t use a panel like xfce, nor does it provide any quick tools to interact with the NetworkManager service in Fedora (which, quite frankly, sucks for wireless connections), I&#8217;ve decided to manually configure my Wireless Connection using wpa_supplicant as a service. </p>
<p><em>Keep in mind, my netbook doesn&#8217;t actually leave my house, so this may not be the most ideal solution, if it did.</em></p>
<h2>wpa_passphrase</h2>
<p>The 1st step is to generate your PSK/TKIP Key using wpa_passphrase, as &#8216;root&#8217;.</p>
<pre>su -
wpa_passphrase myessid mysecretkey >> /etc/wpa_supplicant/wpa_supplicant.conf</pre>
<p>The command above will generate your PSK key, as well as some basic configuration settings, and append it to the wpa_supplicant configuration file (/etc/wpa_supplicant/wpa_supplicant.conf).</p>
<h2>/etc/wpa_supplicant/wpa_supplicant.conf</h2>
<p>Now you&#8217;ll need to edit your wpa_supplicant.conf file so that it looks similar to the following, assuming you&#8217;re using WPA2 Authentication w/ a PSK/TKIP key. </p>
<pre>
ctrl_interface=/var/run/wpa_supplicant
ctrl_interface_group=wheel
ap_scan=1

network={
 ssid="sithnet"
 proto=WPA
 key_mgmt=WPA-PSK
 group=CCMP TKIP WEP104 WEP40
 psk=???yourkey???
 priority=1
}
</pre>
<h2>/etc/sysconfig/wpa_supplicant</h2>
<p>Now that wpa_supplicant is configured to connect to our WPA2 Encrypted Wireless Router, we&#8217;ll configure wpa_supplicant to run as a service. </p>
<pre>
INTERFACES="-iwlan0"
DRIVERS="-Dwext"
OTHER_ARGS="-f /var/log/wpa_supplicant.log -P /var/run/wpa_supplicant.pid"
</pre>
<h2>/etc/sysconfig/network-scripts/ifcfg-wlan0 </h2>
<p>The next step, is to configure the Wireless NIC (wlan0) to run using dhcp (automatically) when the OS boots. </p>
<pre>
DEVICE=wlan0
ONBOOT=yes
TYPE=Wireless
BOOTPROTO=dhcp
</pre>
<h2>Disable/Stop the NetworkManager service</h2>
<p>Good riddance!</p>
<pre>chkconfig NetworkManager off
service NetworkManager stop</pre>
<h2>Enable/Start the wpa_supplicant service</h2>
<p>Hey there, Sexy! ;-p</p>
<pre>chkconfig wpa_supplicant on
service wpa_supplicant start</pre>
<h2>Manual Connection Command(s)</h2>
<p>If you wish to disable auto-connection, simply mark &#8216;ONBOOT=no&#8217; in /etc/sysconfig/network-scripts/ifcfg-wlan0. You can then have full control of the connection establishment yourself, manually, using the following commands:</p>
<pre>ifconfig wlan0 up; iwconfig wlan0 essid myessid; dhclient wlan0</pre>
<p>As long as the wpa_supplicant service is properly configured and running, then that&#8217;s all you should have to do. You should be able to still use the formal &#8216;<em>service network start/stop/restart</em>&#8216; commands to do most of this work for you.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.seanodonnell.com/wp/wpa2-wireless-encryption-windowmaker-and-fedora-14/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>bitly.pl &#8211; A simple Perl API Client to the bit.ly URL-shortening Web Service</title>
		<link>http://www.seanodonnell.com/wp/bitly-pl-a-simple-perl-api-client-to-the-bit-ly-url-shortening-web-service/</link>
		<comments>http://www.seanodonnell.com/wp/bitly-pl-a-simple-perl-api-client-to-the-bit-ly-url-shortening-web-service/#comments</comments>
		<pubDate>Tue, 26 Apr 2011 21:56:01 +0000</pubDate>
		<dc:creator>Sean O'Donnell</dc:creator>
				<category><![CDATA[Perl]]></category>
		<category><![CDATA[bit.ly]]></category>
		<category><![CDATA[perl]]></category>

		<guid isPermaLink="false">http://www.seanodonnell.com/wp/?p=1465</guid>
		<description><![CDATA[This simple Perl script is a command-line interface to the bit.ly URL-shortening Web Service. Download/Install To use the bitly.pl script, do the following: wget http://www.seanodonnell.com/cvs.py/cvs/scripts/perl/bitly.pl chmod +x bitly.pl Edit the Configuration vim bitly.pl You&#8217;ll need to modify the $api_login and $api_key values, according to your account on bit.ly. Once you&#8217;ve configured the $api_login and $api_key [...]]]></description>
			<content:encoded><![CDATA[<p>This simple Perl script is a command-line interface to the <a href="http://bit.ly" target="_blank">bit.ly URL-shortening Web Service</a>. </p>
<h2>Download/Install</h2>
<p>To use the bitly.pl script, do the following:</p>
<pre>
wget <a href="http://www.seanodonnell.com/cvs.py/cvs/scripts/perl/bitly.pl">http://www.seanodonnell.com/cvs.py/cvs/scripts/perl/bitly.pl</a>
chmod +x bitly.pl
</pre>
<h2>Edit the Configuration</h2>
<pre>vim bitly.pl</pre>
<p>You&#8217;ll need to modify the $api_login and $api_key values, according to your account on bit.ly.</p>
<p>Once you&#8217;ve configured the $api_login and $api_key values correctly, you should be good to go.</p>
<h2>Execute</h2>
<p>Assuming that you&#8217;ve got your configuration properly defined, try executing the following command: </p>
<pre>./bitly.pl http://www.seanodonnell.com/code/?id=81</pre>
<p>&#8230;which <strong><em>*should*</em></strong> yield the following results:</p>
<pre>
url: http://www.seanodonnell.com/code/?id=81
bitly: http://bit.ly/9ijOoZ
</pre>
<p><em>I realize that there is a working <a href="http://search.cpan.org/~pjain/WWW-Shorten-Bitly-1.14/">WWW::Shorten::Bitly CPAN Module</a>, but in this case, I really don&#8217;t want to be bogged-down by CPAN dependencies, especially when it&#8217;s just a few lines of standard LWP functions. However, if you are integrating bit.ly beyond the scope of a simple shell command, then I do suggest using the <a href="http://search.cpan.org/~pjain/WWW-Shorten-Bitly-1.14/">WWW::Shorten::Bitly CPAN Module</a>, instead. It does provide a much nicer interface for such requirements.</em></p>
]]></content:encoded>
			<wfw:commentRss>http://www.seanodonnell.com/wp/bitly-pl-a-simple-perl-api-client-to-the-bit-ly-url-shortening-web-service/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Irssi, MySQL, and Perl &#8211; IRC Channel Logging (irssi_logs.pl)</title>
		<link>http://www.seanodonnell.com/wp/irssi-mysql-and-perl-irc-channel-logging-irssi_logs-pl/</link>
		<comments>http://www.seanodonnell.com/wp/irssi-mysql-and-perl-irc-channel-logging-irssi_logs-pl/#comments</comments>
		<pubDate>Fri, 15 Apr 2011 09:20:43 +0000</pubDate>
		<dc:creator>Sean O'Donnell</dc:creator>
				<category><![CDATA[Perl]]></category>
		<category><![CDATA[IRC]]></category>
		<category><![CDATA[irssi]]></category>
		<category><![CDATA[mysql]]></category>
		<category><![CDATA[perl]]></category>

		<guid isPermaLink="false">http://www.seanodonnell.com/wp/?p=1396</guid>
		<description><![CDATA[In my effort to move my code snippets to a public CVS repository, I&#8217;ve finally gotten a chance to move all my Perl/Irssi scripts. One script that I developed and use quite often, is the irssi_logs.pl script. Someone else wrote a similar, and probably more thourough implementation of such a script, but I was bored [...]]]></description>
			<content:encoded><![CDATA[<p>In my effort to move my code snippets to a public CVS repository, I&#8217;ve finally gotten a chance to move all my Perl/Irssi scripts.</p>
<p>One script that I developed and use quite often, is the irssi_logs.pl script. Someone else wrote a similar, and probably more thourough implementation of such a script, but I was bored and trying to grasp the Irssi Perl scripting environment, so I developed my own version.</p>
<p><a href="http://www.seanodonnell.com/cvs.py/cvs/scripts/perl/irssi/irssi_logs.pl?view=log">Download the latest Source Code via CVS</a></p>
<p>The current revision uses a MyISAM table engine, which will soon be replaced with a more modern version which uses InnoDB instead. More logging features will soon be added as well, including private messages, and dcc chat sessions as well.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.seanodonnell.com/wp/irssi-mysql-and-perl-irc-channel-logging-irssi_logs-pl/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Importing Data into MySQL using a Comma Separated File (.CSV)</title>
		<link>http://www.seanodonnell.com/wp/importing-data-into-mysql-using-a-comma-seperated-file-csv/</link>
		<comments>http://www.seanodonnell.com/wp/importing-data-into-mysql-using-a-comma-seperated-file-csv/#comments</comments>
		<pubDate>Mon, 11 Apr 2011 22:27:41 +0000</pubDate>
		<dc:creator>Sean O'Donnell</dc:creator>
				<category><![CDATA[MySQL]]></category>
		<category><![CDATA[batch processing]]></category>
		<category><![CDATA[csv]]></category>
		<category><![CDATA[mysql]]></category>

		<guid isPermaLink="false">http://www.seanodonnell.com/wp/?p=1388</guid>
		<description><![CDATA[One of the easier ways of importing bulk amounts of data into a MySQL Database table, instead of using INSERT queries, is to simply create a (.csv) Comma Separated File and running the LOAD DATA query in mysql. ~/myproject/users.csv The example file (users.csv) contains 3 rows and 3 columns worth of data which will be [...]]]></description>
			<content:encoded><![CDATA[<p>One of the easier ways of importing bulk amounts of data into a MySQL Database table, instead of using INSERT queries, is to simply create a (.csv) Comma Separated File and running the LOAD DATA query in mysql.</p>
<h2>~/myproject/users.csv</h2>
<p>The example file (users.csv) contains 3 rows and 3 columns worth of data which will be stored in our &#8216;users&#8217; database table. The columns in the csv file represent the following fields: fullname, city, and state.</p>
<p><strong>Example:</strong></p>
<pre><code>"Sean O\'Donnell","Los Angeles","CA"
"Bob Smith","Sacramento","CA"
"Rick Gunther","Queens","NY"</code></pre>
<p>In order to import this csv file data into MySQL, we&#8217;ll use a &#8216;LOAD DATA&#8217; query in mysql.</p>
<h2>load_users.sql</h2>
<p>The following SQL query./script would be used to load the csv file (above) into the mydb.users table.</p>
<pre><code>LOAD DATA LOCAL INFILE '~/myproject/users.csv' 
INTO TABLE mydb.users 
FIELDS TERMINATED BY ',' 
ENCLOSED BY '\'' 
LINES TERMINATED BY '\r\n' 
(fullname,city,state);</code></pre>
<p>This is an <a href="https://www.seanodonnell.com/code/?id=6">updated revision of an article in my old Code Snippets library</a>. Please update your links to point to this article, instead.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.seanodonnell.com/wp/importing-data-into-mysql-using-a-comma-seperated-file-csv/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Using &#8216;ifconfig&#8217; to configure multiple IP Addresses on a single NIC</title>
		<link>http://www.seanodonnell.com/wp/using-ifconfig-to-configure-multiple-ip-addresses-on-a-single-nic/</link>
		<comments>http://www.seanodonnell.com/wp/using-ifconfig-to-configure-multiple-ip-addresses-on-a-single-nic/#comments</comments>
		<pubDate>Sun, 10 Apr 2011 09:02:51 +0000</pubDate>
		<dc:creator>Sean O'Donnell</dc:creator>
				<category><![CDATA[Linux]]></category>
		<category><![CDATA[dhcp]]></category>
		<category><![CDATA[ip_forward]]></category>

		<guid isPermaLink="false">http://www.seanodonnell.com/wp/?p=1363</guid>
		<description><![CDATA[This simple example will demonstrate how to add multiple IP Addresses to one single ethernet Network Interface Card (NIC), on a computer running a Linux-based Operating System. Note: This is an updated revision of my old code snippets page, which will probably be replaced by this article. For example, let&#8217;s say I&#8217;m using 2 NICs [...]]]></description>
			<content:encoded><![CDATA[<p><img class="size-full wp-image-268 alignright" title="tux02" src="http://www.seanodonnell.com/wp/wp-content/uploads/2009/05/tux02.jpg" alt="" width="245" height="170" /> This simple example will demonstrate how to add multiple IP Addresses to one single ethernet Network Interface Card (NIC), on a computer running a Linux-based Operating System.</p>
<p>Note: <a href="https://www.seanodonnell.com/code/?id=2">This is an updated revision of my old code snippets page</a>, which will probably be replaced by this article.</p>
<p>For example, let&#8217;s say I&#8217;m using 2 NICs (eth0 and eth1), a cable modem (connected to eth0), and a 16-port ethernet switch (connected to eth1). I&#8217;m configuring it to act as a home-brewed Firewall/Router/Gateway for my home LAN. Let&#8217;s also assume that on this home LAN, I want to run 2 (or more) separate VLANS, from the same NIC, on the same (16-port) ethernet switch.</p>
<h2>eth0</h2>
<p>The 1st NIC (eth0) is connected directly to the WAN, and using DHCP Client (dhclient) to obtain the IP Address and subsequential routing information, and essential WAN connectivity.</p>
<h2>eth1</h2>
<p>The 2nd NIC (eth1) is running DHCP Server with ip_forwarding, essentially making the computer act as a (1)-Port Router, distributing connectivity to a 16-port ethernet switch.</p>
<p>I would also be configuring iptables in this scenario, but that is beside the point. To assign multiple IP addresses to eth1, we would modify the Interface Configuration (ifconfig), as seen below&#8230;</p>
<h2>ifconfig</h2>
<pre>#!/usr/bin/env bash

# assign 192.168.1.1 to eth1;
# default (primary) IP address for eth1
ifconfig eth1 192.168.1.1 netmask 255.255.255.0 &amp;
ifconfig eth1 up

# assign 192.168.1.100 to eth1:1;
# virtual (secondary) IP address for eth1
ifconfig eth1:1 192.168.1.100 netmask 255.255.255.0 &amp;
ifconfig eth1:1 up</pre>
<p><!-- Not shown here, is the DHCP Server configuration for eth1 and eth1:1. Since DHCP Server is configurable by subnet, and doesn't really restrict the configs to a physical NIC, you can play with this all day. You can even turn this situation into a multi-DMZ/VLAN network on a single NIC.</p>
<pre># assign 192.168.200.1 to eth1:2;
# This subnet will be used as our private LAN
ifconfig eth1:2 192.168.200.1 netmask 255.255.255.0 &amp;
ifconfig eth1:2 up

# assign 192.168.300.1 to eth1:3;
# This subnet will be used as our DMZ/VLAN
ifconfig eth1:3 192.168.300.1 netmask 255.255.255.0 &amp;
ifconfig eth1:3 up</pre>
<p>Now, that being said, the fact that you can do this kind of setup on a single NIC, is pretty awesome for a home network. Especially if you're a super geek and are testing all sorts of networked devices and other computers, etc. Running this type of setup, on a single NIC, would be bad in a production or 'enterprise' network environment, unless it's isolated to some VLAN for development/testing purposes.<br />
--> This is very handy for, say... configuring various Web Server Testing environments on a single machine, with a single NIC, with Apache configured to host multiple vhosts according to IP Address.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.seanodonnell.com/wp/using-ifconfig-to-configure-multiple-ip-addresses-on-a-single-nic/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>ssh-keygen.sh &#8211; Generate and Transfer your SSH Keys to Remote SSH Servers</title>
		<link>http://www.seanodonnell.com/wp/ssh-keygen-sh/</link>
		<comments>http://www.seanodonnell.com/wp/ssh-keygen-sh/#comments</comments>
		<pubDate>Fri, 08 Apr 2011 22:00:45 +0000</pubDate>
		<dc:creator>Sean O'Donnell</dc:creator>
				<category><![CDATA[Linux]]></category>
		<category><![CDATA[bash]]></category>
		<category><![CDATA[ssh]]></category>

		<guid isPermaLink="false">http://www.seanodonnell.com/wp/?p=1323</guid>
		<description><![CDATA[I&#8217;ve created the ssh-keygen.sh script in order to generate (-g) and/or transfer (-t) SSH keys to a remote system, from a single command. ./ssh-keygen.sh - An SSH Key Generator and Distribution Script Usage: ./ssh-keygen.sh [options] command Options: -l [login] ssh server login (default: nobody@localhost) -p [port] ssh port (default: 22) -d [dir] remote .ssh directory [...]]]></description>
			<content:encoded><![CDATA[<p>I&#8217;ve created the ssh-keygen.sh script in order to generate (-g) and/or transfer (-t) SSH keys to a remote system, from a single command. </p>
<pre>
./ssh-keygen.sh - An SSH Key Generator and Distribution Script

Usage:  ./ssh-keygen.sh [options] command

Options:

        -l [login]      ssh server login (default: nobody@localhost)
        -p [port]       ssh port (default: 22)
        -d [dir]        remote .ssh directory (default: .ssh)

Commands:

        -g      Generate and Transfer your keys
        -t      Transfer your keys (if existing)
        -h      Help Screen (this)

Copyright (c) 2011 Sean O'Donnell &lt;sean@seanodonnell.com&gt;
</pre>
<h2>Usage Instructions:</h2>
<ol>
<li>Download the script to your local file system:
<pre>wget <a href="http://www.seanodonnell.com/cvs.py/cvs/scripts/bash/ssh-keygen.sh">http://www.seanodonnell.com/cvs.py/cvs/scripts/bash/ssh-keygen.sh</a></li>
<li>Make the script executable:
<pre>chmod +x ssh-keygen.sh</pre>
</li>
<li>Generate and Transfer your SSH Keys to a Remote SSH Server:
<pre>./ssh-keygen.sh -l myname@myserver.net -g</pre>
</li>
<li>Transfer your (now existing) SSH Keys to other SSH Servers:
<pre>
./ssh-keygen.sh -l myname@myremoteserver1.net -t
./ssh-keygen.sh -l myname@myremoteserver2.net -t</pre>
</li>
</ol>
<p>I've recently made some changes regarding the types of Keys this script generates by default. This script currently supports the use of SSHv1 and/or SSHv2 RSA/DSA Encryption. The previous version of this script generated both by default, whereas in this current version, SSHv1 is disabled by default, but can be modified (within the script) to enable SSHv1 support. SSHv1 is generally only useful for legacy systems, which I have encountered, but the majority of modern systems most-likely have moved on to SSHv2. <em>Whether or not you use RSA and DSA, or just DSA, in SSHv2, is not yet distinguished by this script, nor differentiated, currently. I'll probably make this more customizable later.</em></p>
<p>If you have any problems running this script, please feel free to <a href="mailto:sean@seanodonnell.com">contact me</a>, or '/msg x0d' on <a href="irc://ircfreenode.net/">Freenode</a>.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.seanodonnell.com/wp/ssh-keygen-sh/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

