<?xml version="1.0" encoding="UTF-8"?>
<?xml-stylesheet type="text/xsl" media="screen" href="/~d/styles/rss2full.xsl"?><?xml-stylesheet type="text/css" media="screen" href="http://feeds.feedburner.com/~d/styles/itemcontent.css"?><rss 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/" xmlns:feedburner="http://rssnamespace.org/feedburner/ext/1.0" version="2.0">

<channel>
	<title>SquarePeg Systems</title>
	
	<link>http://squarepegsystems.com</link>
	<description>Open Source Experts In Omaha</description>
	<lastBuildDate>Tue, 19 Jan 2010 17:08:02 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.9.1</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<atom10:link xmlns:atom10="http://www.w3.org/2005/Atom" rel="self" type="application/rss+xml" href="http://feeds.feedburner.com/SquarepegSystems" /><feedburner:info uri="squarepegsystems" /><atom10:link xmlns:atom10="http://www.w3.org/2005/Atom" rel="hub" href="http://pubsubhubbub.appspot.com/" /><item>
		<title>One Year Later . . .</title>
		<link>http://feedproxy.google.com/~r/SquarepegSystems/~3/ygNMGPxyhOA/</link>
		<comments>http://squarepegsystems.com/2010/01/one-year-later/#comments</comments>
		<pubDate>Tue, 19 Jan 2010 17:08:02 +0000</pubDate>
		<dc:creator>mike</dc:creator>
				<category><![CDATA[company]]></category>
		<category><![CDATA[consulting]]></category>
		<category><![CDATA[one-year]]></category>
		<category><![CDATA[php]]></category>
		<category><![CDATA[python]]></category>

		<guid isPermaLink="false">http://squarepegsystems.com/?p=74</guid>
		<description><![CDATA[It&#8217;s now been one year ago when I put my shingle out on this website and created SP Information Systems, LLC, aka SquarePeg Systems.  It was an experiment after doing a year of somewhat consistent side-projects outside of my day job by taking a step forward and being, well, a bit more serious about it [...]]]></description>
			<content:encoded><![CDATA[<p>It&#8217;s now been one year ago when I put my shingle out on this website and created SP Information Systems, LLC, aka SquarePeg Systems.  It was an experiment after doing a year of somewhat consistent side-projects outside of my day job by taking a step forward and being, well, a bit more serious about it while still trying to maintain my day job and my family.</p>
<p>2009 was a memorable year for a lot of people, as it was for the Hostetler house for several reasons.  For my little LLC, though, it was all really good.  I was as busy as I wanted to be &#8212; usually busier.  One surprising thing was how busy I was &#8212; there were really no lulls yet I didn&#8217;t have to market myself at all.  My customers usually found me, or at least inquired about getting help from someone.</p>
<p>What did I do the most of?  Nothing. Or, really, everything.  Including:</p>
<ul>
<li>PHP</li>
<li>Django/Python</li>
<li>JavaScript</li>
<li>Networking</li>
<li>Linux Administration</li>
<li>SCO Administration</li>
<li>Window Vista</li>
<li>WordPress consulting</li>
<li>Web Design</li>
<li>Database Design</li>
<li>eCommerce</li>
<li>SEO</li>
</ul>
<p>I did more of some things than others, of course.  But I still dipped my toes into each and every thing on that list.  Amazing, huh?</p>
<p>Thanks for a great first year &#8212; the shingle it out. Let&#8217;s keep it going.</p>
<img src="http://feeds.feedburner.com/~r/SquarepegSystems/~4/ygNMGPxyhOA" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://squarepegsystems.com/2010/01/one-year-later/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		<feedburner:origLink>http://squarepegsystems.com/2010/01/one-year-later/</feedburner:origLink></item>
		<item>
		<title>Have Your Cake and Your PHP too.</title>
		<link>http://feedproxy.google.com/~r/SquarepegSystems/~3/vtmIg0b59VA/</link>
		<comments>http://squarepegsystems.com/2009/12/have-your-cake-and-your-php-too/#comments</comments>
		<pubDate>Mon, 07 Dec 2009 23:21:33 +0000</pubDate>
		<dc:creator>mike</dc:creator>
				<category><![CDATA[technology]]></category>
		<category><![CDATA[cakephp]]></category>
		<category><![CDATA[framework]]></category>
		<category><![CDATA[php]]></category>

		<guid isPermaLink="false">http://squarepegsystems.com/?p=66</guid>
		<description><![CDATA[I&#8217;ve never had a great love for PHP the Language. It seems like if someone wanted functionality into the core language, they just vomited it up inside the code base, submitted it, and it was accepted. They are trying to make this better in the core, but alas it&#8217;s still too easy to do dumb [...]]]></description>
			<content:encoded><![CDATA[<p>I&#8217;ve never had a great love for PHP the Language. It seems like if someone wanted functionality into the core language,<a title="A wrong solution to a problem." href="http://us.php.net/goto"> they just vomited it up inside the code base,</a> submitted it, and it was accepted. They are trying to make this better in the core, but alas it&#8217;s still too easy to do dumb things.  And let&#8217;s not get started <a href="http://www.phpfreaks.com/tutorial/php-security">on the security problems.</a></p>
<p>But PHP the Platform is much more interesting to me.  You can deploy PHP applications in just about any cheap web host solution.  Run it inside of Apache via mod_php or maybe under FastCGI &#8212; doesn&#8217;t matter.  It really is a write-once, run anywhere language.  And lots of big applications use it &#8212; WordPress, Joomla, osCommerce, etc. You may not like the Language, but since it is married to the Platform, the Language is here to say.</p>
<p>I&#8217;ve mucked with <a href="http://cakephp.org/">CakePHP </a>a time or two. It&#8217;s an interesting project to say the least.  It&#8217;s a web development framework a la Ruby on Rails or Django, but for PHP.  It strictly enforces<a href="http://en.wikipedia.org/wiki/Model%E2%80%93view%E2%80%93controller"> the MVC pattern</a>, which leans itself to more maintainable code.  But, unlike RoR or Django, the Views are not written in a whole new templating language, but in PHP itself, and it gives you the objects that have your data in it to display.</p>
<p>Another interesting thing about CakePHP is how it creates Models.  In RoR or Django, you create fields in Model objects and then run a script and it creates the database for you.  In CakePHP, you just name your model appropriately and, when CakePHP needs that Model, it does a <a href="http://dev.mysql.com/doc/refman/5.0/en/describe.html">DESCRIBE</a> on the table and populates the data points accordingly. This is good and bad &#8212; it means your database is the king. It also means that you have to follow strict set of conventions or configure everything in your Model object as to what is what.  This means that you could use CakePHP with any database structure &#8212; in theory.  More on conventions later.</p>
<p>Anyway, CakePHP has been in the back of my mind for a year or so (at least) when I got approached with an opportunity to do a POC of a simple CRUD application. The POC would be hosted on a cheapo shared hosting provider, so anything like Django or Rails was out.  So I dug out CakePHP and finished the POC.  When it was over, the customer liked it and we really discovered what he was after &#8212; and it wasn&#8217;t just a simple CRUD application anymore!  When we were specing it out and decided that the customer needed to get some high-quality, dedicated hosting, I asked if we wanted to write the real thing in Django or RoR.  It was decided no for the simple thing that PHP developers are much easier to find.  If I was unavailable and fixes were needed, they could easily find a PHP developer to do it.  Not necessarily so with Django and with RoR (though I think there are more RoR developers than Django, but there are still more PHP people out there!).</p>
<p>So I put CakePHP through some tests and am still using it.  Is it my favorite?  No &#8212; that&#8217;s still Django.  But it&#8217;s very livable, especially under the constraints I was in.  And, hey, it&#8217;s making PHP relatively painless to code in, and it&#8217;s not even making me feel dirty.</p>
<p>One thing nice about CakePHP is <a href="http://book.cakephp.org/view/108/The-CakePHP-Console">their console application,</a> although they don&#8217;t tell you about that until you are on page, like, 100 of their docs. There is no mention of it in their tutorial! Blech!  It&#8217;s pretty easy though:</p>
<pre class="brush: bash;">
cake bake &lt;name&gt;
</pre>
<p>which will bring up a menu and you choose Model, View, or Controller.  You can also do:</p>
<pre class="brush: bash;">
cake bake model &lt;name&gt;
cake bake view &lt;name&gt;
cake bake controller &lt;name&gt;
</pre>
<p><a href="http://www.webdevelopment2.com/cakephp-bake-baking-models-controllers-views-cakephp-12/">More information here.</a></p>
<p>One thing about CakePHP that bugs me (and, actually, it bugs me about RoR, too) is that the naming conventions aren&#8217;t conventions I would use.   <a href="http://book.cakephp.org/view/328/Cake-Conventions">I finally  found this page</a> which explains all the conventions in on place.  Also notice that it&#8217;s on the last page of their documentation.</p>
<p>This seems sort of a mixed review, but it&#8217;s not.  If you are working on a PHP application from scratch, it would behove you to at least look at CakePHP.  I like it &#8212; for PHP.  Would I rather be doing Django? Yes &#8212; but I can&#8217;t always be able to do that.  It&#8217;s good to have a framework on a ubiquitous, yet annoying,  language.</p>
<img src="http://feeds.feedburner.com/~r/SquarepegSystems/~4/vtmIg0b59VA" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://squarepegsystems.com/2009/12/have-your-cake-and-your-php-too/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		<feedburner:origLink>http://squarepegsystems.com/2009/12/have-your-cake-and-your-php-too/</feedburner:origLink></item>
		<item>
		<title>When PHP Simply Stops</title>
		<link>http://feedproxy.google.com/~r/SquarepegSystems/~3/5iTH160mpEc/</link>
		<comments>http://squarepegsystems.com/2009/08/when-php-simply-stops/#comments</comments>
		<pubDate>Fri, 14 Aug 2009 13:10:31 +0000</pubDate>
		<dc:creator>mike</dc:creator>
				<category><![CDATA[unix]]></category>
		<category><![CDATA[apache]]></category>
		<category><![CDATA[debian]]></category>
		<category><![CDATA[php5]]></category>
		<category><![CDATA[suhosin]]></category>

		<guid isPermaLink="false">http://squarepegsystems.com/?p=59</guid>
		<description><![CDATA[A lot of people have problems with PHP the language, but I&#8217;ve never come into this problem involving Apache PHP module before.
A long time customer got back in touch with me.  A web app he&#8217;s been working on was getting ready to go prime time and they ran a security audit on the server. That [...]]]></description>
			<content:encoded><![CDATA[<p>A lot of people have problems with PHP the language, but I&#8217;ve never come into this problem involving Apache PHP module before.</p>
<p>A long time customer got back in touch with me.  A web app he&#8217;s been working on was getting ready to go prime time and they ran a security audit on the server. That audit found several things wrong, and strongly recommended an upgrade to PHP 5.2.10.  As of this writing, PHP 5.2.10 was very new and Debian testing didn&#8217;t even have a package for it yet.  So I fiddled around and finally found did the right combination of <a href="http://wiki.debian.org/AptPinning">pinning </a>to install PHP 5.2.10 from unstable.  If you are thinking &#8220;Yikes!&#8221; then you are already ahead of me.</p>
<p>The next day, I get an email saying that their webapp just stops.  I get on and, sure enough, sometimes, randomly, you get a blank page.  Not a 404, 405, or another error &#8212; just a blank white page.  A reload it works fine.  I checked out <code>/var/log/apache2/error.log</code> and see tons of messages with the following:</p>
<pre>[notice] child pid 24483 exit signal Segmentation fault (11)
[notice] child pid 24485 exit signal Segmentation fault (11)
[notice] child pid 24481 exit signal Segmentation fault (11)
[notice] child pid 24489 exit signal Segmentation fault (11)</pre>
<p>Oh, that&#8217;s bad.   Playing around with it demonstrates that the seg fault happens when the page doesn&#8217;t show up &#8212; just like I thought.</p>
<p>Now I get into detective mode and try to figure out what the heck is going on.  I found <a href="http://www.dotdeb.org/">DotDeb</a>, which makes fresh Debian packages for older releases &#8212; like PHP 5.2.10!  But the installers of that package <a href="http://www.dotdeb.org/2009/06/25/php-5-2-10-packages-for-lennyetch-are-now-available/">was having the same problems I had</a>.  By careful reading, it seems that Debian installed at least part of the <a href="http://www.hardened-php.net/suhosin/">Suhosin </a>patch and that seems to be culprit.  Users commented that disabling it seemed to stop the seg faults &#8212; but how do you do that?</p>
<p>I looked at the configurations in <code>/etc/php5 </code> and there was a file in <code>conf.d</code> called <code>suhosin.ini</code>, but no mention of it in the main <code>apache2/php.ini</code> file (the main PHP config for Apache2). In a lark I moved<code> suhosin.ini </code>to <code>suhosin.ini.bad</code> and restarted Apache.   And the problem when away.  Like magic.</p>
<p>This is the problem when you are forced to always have the latest and greatest tools. And PHP is a hard one &#8212; you are always chasing your tail with it&#8217;s security.  But it really should &#8220;just work&#8221;.</p>
<img src="http://feeds.feedburner.com/~r/SquarepegSystems/~4/5iTH160mpEc" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://squarepegsystems.com/2009/08/when-php-simply-stops/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		<feedburner:origLink>http://squarepegsystems.com/2009/08/when-php-simply-stops/</feedburner:origLink></item>
		<item>
		<title>ZeeMedical.net is up and going</title>
		<link>http://feedproxy.google.com/~r/SquarepegSystems/~3/QhRiTUXipZA/</link>
		<comments>http://squarepegsystems.com/2009/07/zeemedical-net-is-up-and-going/#comments</comments>
		<pubDate>Wed, 29 Jul 2009 12:30:55 +0000</pubDate>
		<dc:creator>mike</dc:creator>
				<category><![CDATA[company]]></category>
		<category><![CDATA[ecommerce]]></category>
		<category><![CDATA[mysql]]></category>
		<category><![CDATA[opencart]]></category>
		<category><![CDATA[php]]></category>

		<guid isPermaLink="false">http://squarepegsystems.com/?p=52</guid>
		<description><![CDATA[After months of work, the Omaha franchise of  Zee Medical  is online at ZeeMedical.net.  Zee Medical specializes in first aid, safety equipment, and training  for large and small businesses. Chances are, you have seen their first aid kits in the break rooms of many offices (I know that I have).
Zee Medical&#8217;s traditional model is for customers to  phone [...]]]></description>
			<content:encoded><![CDATA[<p>After months of work, the Omaha franchise of  Zee Medical  is online at <a href="http://zeemedical.net/">ZeeMedical.net</a>.  Zee Medical specializes in first aid, safety equipment, and training  for large and small businesses. Chances are, you have seen their first aid kits in the break rooms of many offices (I know that I have).</p>
<p>Zee Medical&#8217;s traditional model is for customers to  phone or fax their order in, and Zee sends a van to the customer with the equipment  for delivery.  Some customers did not want the delivery person on site, but instead wanted to order supplies over the web and have them shipped to them.  I had done some other work for Zee in the past and they asked me to work on this effort with them.  This started out as an fairly straightforward ecommerce site, but interesting challenges got into our way:</p>
<ul>
<li>They already had a domain registered for email, but when trying to update information to the new webhost, the registrar was unresponsive about letting us in to update on information.  At the beginning they answered our requests, but after that we were ignored. Luckily, we were able to pick up the ZeeMedical.net domain and just go with that.</li>
<li>Zee wanted to start with their whole catalog &#8212; 1300+ products had to be imported with as many images matched up as possible.  They gave me a spreadsheet and I wrote several iterations of a Python script to convert the spreadsheet to SQL to be inserted into the ecommerce engine&#8217;s MySQL database.  Later, a separate script to insert each  matching image to each product was written as well.  This took a lot of time and some manual fixes as well.</li>
</ul>
<p>Because of the complexity of the import data and the fact that I wanted to get into the code and tweak some things, care had to be taken on what engine was chosen. I knew that Zee Medical didn&#8217;t want a lot of fancy features but just something basic. I looked at ZenCart and osCommerce, known workhorses of the PHP ecommerce world, but getting data imported and customizing the code to what I needed was going to be a nightmare.    After some searching I found <a href="http://www.opencart.com/">OpenCart </a>&#8211; clean code with a simple database and a good <a href="http://en.wikipedia.org/wiki/Model%E2%80%93view%E2%80%93controller">MVC </a>model.  The bad news was that it&#8217;s lack of maturity led to it&#8217;s own challenges.</p>
<p>These will be expanded upon in a later  post, but some of the bad points were:</p>
<ul>
<li>Lack of a plugin or module system. While there are some OpenCart &#8220;modules&#8221; available, the installation requires manually updating some of the main PHP files.  This is problematic when the plugin was written with one version of OpenCart and those files changed in subsequent versions.</li>
<li>OpenCart comes  with a long list of payment processors, but most of them are &#8220;in development&#8221; which means they were listed in the Admin interface but I wasn&#8217;t able to turn them on. I found someone that had a for-pay module for Authorize.Net that worked beautifully, so I just used that.  But I don&#8217;t think I should have had to.</li>
<li>No real documentation.  There was nothing I could give to Zee Medical so they could read and play around with the Admin side.</li>
<li>Some interface issues with the admin. Like no way to filter by category on the products, etc.  There is a primitive search facility that works well for what it is. But most of our pain comes from having over 1300 products to manage.</li>
<li>Two configuration files &#8212; one for the public store and one for the Admin site.  But the configs, however, were relatively the same!</li>
</ul>
<p>Did I like OpenCart at all?  Yes I did!  Here are some good points:</p>
<ul>
<li>Strict adherence to the MVC pattern.  This made tweaking the code and the templates extremely easy and cut down on side effects.  I did things in OpenCart I wouldn&#8217;t have dared to do in ZenCart.</li>
<li>The Reports and Mailing Info in the Admin side.  Although not required for what Zee Medical gave me when we started, they were a &#8220;wow&#8221; factor when I showed off the functionality.</li>
<li>I found that the site is rather fast.  Maybe leanness due to a fairly new codebase or maybe it shows how they well they implemented MVC, but it seems to load a lot faster than most basic ZenCart and osCommerce sites do.</li>
</ul>
<p>On a last note, I was again impressed by how good of a host  <a href="http://www.bluehost.com/track/squarepeg/CODE13">BlueHost</a> is. I was able to easily get into the database, fix code on the server, make backups, etc. through their well-implemented <a href="http://en.wikipedia.org/wiki/CPanel">cPanel</a>.  And the times we needed support they were timely and helpful to what we needed.</p>
<p>So again, let me introduce to you  <a href="http://zeemedical.net/">Zee Medical</a>, another satisfied customer of SquarePeg Systems!</p>
<img src="http://feeds.feedburner.com/~r/SquarepegSystems/~4/QhRiTUXipZA" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://squarepegsystems.com/2009/07/zeemedical-net-is-up-and-going/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		<feedburner:origLink>http://squarepegsystems.com/2009/07/zeemedical-net-is-up-and-going/</feedburner:origLink></item>
		<item>
		<title>How to Dance with Django</title>
		<link>http://feedproxy.google.com/~r/SquarepegSystems/~3/_oNXlxzaTdo/</link>
		<comments>http://squarepegsystems.com/2009/07/how-to-dance-with-django/#comments</comments>
		<pubDate>Fri, 17 Jul 2009 20:34:43 +0000</pubDate>
		<dc:creator>mike</dc:creator>
				<category><![CDATA[technology]]></category>
		<category><![CDATA[django]]></category>
		<category><![CDATA[python]]></category>

		<guid isPermaLink="false">http://squarepegsystems.com/?p=47</guid>
		<description><![CDATA[I&#8217;ve been helping 5Q Communications with some Django work in the past few weeks and will be continuing to work with them for a while.  I was excited when we started talking together  not just because of Django but because they have a lot of good ideas on how the web should work and how [...]]]></description>
			<content:encoded><![CDATA[<p>I&#8217;ve been helping <a href="http://www.5qcommunications.com/">5Q Communications</a> with some Django work in the past few weeks and will be continuing to work with them for a while.  I was excited when we started talking together  not just because of <a href="http://www.djangoproject.com/">Django </a>but because they have a lot of good ideas on how the web should work and how to properly treat clients.</p>
<p>I wasn&#8217;t new to Django but it had been a while since I have dug deep into it. More and better tools had been developed and I had to add things to my development/troubleshooting suite.  And so here is my list &#8212; some I have been using for a while, some 5Q told me about, and some I discovered on my own.</p>
<ol></ol>
<ul>
<li><a href="http://peak.telecommunity.com/DevCenter/EasyInstall">EasyInstall </a>&#8211; this makes installing Python packages so much easier.  Even if they don&#8217;t have their package on PyPi, you can download, uncompress it, and then it&#8217;s simply<code> easy_install directory_name</code></li>
<li><a href="http://pypi.python.org/pypi/virtualenv">VirtualEnv </a>&#8211; this is an absolute must, especially if you have different version of Django or other tools for different projects.   And, once you are in an VirtualEnv environment,  EasyInstall will install files to your Virtual Python library.</li>
<li><a href="http://ipython.scipy.org/moin/">iPython </a>&#8211;Installing this will give you the power of iPython when you run <code>manage.py shell</code>.  And you want that &#8212; you really do.</li>
<li><a href="http://code.google.com/p/django-logging/wiki/Overview">django-logging</a> &#8212; This is a wonderful little middleware that will put all your logging statements at the bottom of the web page.  With another option, it will log all the SQL that Django generates for the database, which was incrediably useful for what I was working on.</li>
<li><a href="http://south.aeracode.org/">south </a>&#8211; This gives you a lot of the power of Rails&#8217; migrations in Django.  It&#8217;s not 100% there yet, but it&#8217;s close. You can even see  <a href="http://south.aeracode.org/search?q=squarepegsys&amp;noquickjump=1&amp;ticket=on">my patches </a> that fix problems I had with it.</li>
<li><a href="http://www.betterthangrep.com">ack</a> &#8212; Not just for Django but for everything.  This grep replacement has become a requirement for any of my search-the-codebase tasks.</li>
</ul>
<ol></ol>
<img src="http://feeds.feedburner.com/~r/SquarepegSystems/~4/_oNXlxzaTdo" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://squarepegsystems.com/2009/07/how-to-dance-with-django/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		<feedburner:origLink>http://squarepegsystems.com/2009/07/how-to-dance-with-django/</feedburner:origLink></item>
		<item>
		<title>Setting Proxy Environment in UNIX</title>
		<link>http://feedproxy.google.com/~r/SquarepegSystems/~3/LO6OHiVAxU0/</link>
		<comments>http://squarepegsystems.com/2009/06/setting-proxy-environment-in-unix/#comments</comments>
		<pubDate>Mon, 08 Jun 2009 18:15:48 +0000</pubDate>
		<dc:creator>mike</dc:creator>
				<category><![CDATA[technology]]></category>
		<category><![CDATA[commandline]]></category>
		<category><![CDATA[linux]]></category>
		<category><![CDATA[proxy]]></category>
		<category><![CDATA[unix]]></category>

		<guid isPermaLink="false">http://squarepegsystems.com/?p=42</guid>
		<description><![CDATA[The easiest and best way to set proxy information on your Linux/Unix machine is with the http_proxy environment variable in your ~/.bashrc, ~/.zshrc, or whatever your favorite shell&#8217;s configuration file is.  Set it like this:
http://user:password@proxy-server:portnum
In my brief bit of experimentation, the follow important (to me, at least)  command-line tools use http_proxy:

wget
Python easy_install
curl

I&#8217;ve been a [...]]]></description>
			<content:encoded><![CDATA[<p>The easiest and best way to set proxy information on your Linux/Unix machine is with the <code>http_proxy</code> environment variable in your <code>~/.bashrc</code>,<code> ~/.zshrc</code>, or whatever your favorite shell&#8217;s configuration file is.  Set it like this:</p>
<pre class="brush: bash;">http://user:password@proxy-server:portnum</pre>
<p>In my brief bit of experimentation, the follow important (to me, at least)  command-line tools use <code>http_proxy</code>:</p>
<ol>
<li>wget</li>
<li>Python easy_install</li>
<li>curl</li>
</ol>
<p>I&#8217;ve been a Unix user for 14 years &#8212; why did I take me so long to figure this out?</p>
<img src="http://feeds.feedburner.com/~r/SquarepegSystems/~4/LO6OHiVAxU0" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://squarepegsystems.com/2009/06/setting-proxy-environment-in-unix/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		<feedburner:origLink>http://squarepegsystems.com/2009/06/setting-proxy-environment-in-unix/</feedburner:origLink></item>
		<item>
		<title>When Vista Forgets</title>
		<link>http://feedproxy.google.com/~r/SquarepegSystems/~3/9I801pr4DBk/</link>
		<comments>http://squarepegsystems.com/2009/04/when-vista-forgets/#comments</comments>
		<pubDate>Mon, 06 Apr 2009 20:57:22 +0000</pubDate>
		<dc:creator>mike</dc:creator>
				<category><![CDATA[technology]]></category>
		<category><![CDATA[windows]]></category>

		<guid isPermaLink="false">http://squarepegsystems.com/?p=37</guid>
		<description><![CDATA[Last Friday evening, I got the type of call that no one wants  to get &#8212; or make, for that matter.  It was a customer I hadn&#8217;t heard from in a while. Last time I was there I setup Windows Networking in their office. In other words, I made a Workgroup, folders to share their [...]]]></description>
			<content:encoded><![CDATA[<p>Last Friday evening, I got the type of call that no one wants  to get &#8212; or make, for that matter.  It was a customer I hadn&#8217;t heard from in a while. Last time I was there I setup Windows Networking in their office. In other words, I made a Workgroup, folders to share their documents, and a shared printer.  I also recommended Linux and Samba in the medium future too, instead of Vista.  Yes, they have Vista everywhere!</p>
<p>Well, this call was that they got a new wireless router and, as soon as they put it in, all the file sharing was disabled and they were no longer able to print.  Seemed strange to me, but we made a time for me to go over there and get things back to normal.</p>
<p>On Saturday morning, I asked them why they got a new router, since the other one was quite new.  They said it was because their laptops kept losing connections and someone advised them to get a new wireless router.  <a href="http://www.google.com/search?q=vista+dropping+wireless"> This is a known problem with Visa</a> and have a friend that is having this problem as I write this. He told me that the overall solution was to get a new router as well, and he searched exhaustively for another solution but nothing else has worked. Therefore, I knew they were on the right track.  And my customer correctly bought a Linksys, which is really the only brand of wireless router I will buy.</p>
<p>The first thing I did verify that the Internet was working (because if  the router isn&#8217;t routing, then that&#8217;s a big problem).  Then I logged  into their router to see if something silly was turned on by default that would prevent the machines from talking internally.  Nope, no problem there.</p>
<p>The domain/file server was working fine.  So I went to another workstation and it asked me for my user credentials (I made one user for all the file shares to make it easy on them).  Yep, it wouldn&#8217;t authenticate, even though I knew I was using the right password.  I went back to the domain server and updated the password on the common user &#8212; using the same password as before. Sure enough, that worked &#8212; now all machines could get to the shared folders.  Step One done.</p>
<p>The printer was harder to figure out.  I&#8217;m still not sure what happened, or why it worked, but this is how I got them going again.  From each client machine:</p>
<ol>
<li>Goto Start-&gt;Network-&gt;DomainName-&gt;Printers</li>
<li>Right-click on the printer in question and choose  &#8220;Sharing&#8221;</li>
<li>Vista will give some bogus message about &#8220;Installing Drivers&#8221; which it doesn&#8217;t even need to do, since the only thing that changed on the network was the router.</li>
<li>Print a test page.</li>
</ol>
<p>This worked fine on the workstations, but the laptops wanted to be a little more stubborn.  So I had to do this in addition to the above:</p>
<ol>
<li>Goto Start-&gt; Control Panel, then click &#8220;Classic View&#8221; on the left side.</li>
<li>Click Printers</li>
<li>You will see icons of all sorts of printers &#8212; there may be two printers that have the same name &#8212; one of which says &#8220;on ServerName.</li>
<li>Right-click on the  printer <strong>that does not say ServerName</strong> and then choose &#8220;Delete&#8221;. The icon won&#8217;t disappear but it will say &#8220;Deleted &#8212; Offline&#8221;</li>
<li>Now Right-click on the printer  <strong>that <em>does </em>say ServerName </strong> and then choose &#8220;Default&#8221;</li>
<li>Again, try a test page.</li>
</ol>
<p>And that worked!!</p>
<p>But why did Vista forget?  Why did a simple router change cause such confusion in the Workgroup sharing?  I really feel having a Linux/Samba machine as the domain server as well as the file and print server would have prevented this problem.</p>
<img src="http://feeds.feedburner.com/~r/SquarepegSystems/~4/9I801pr4DBk" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://squarepegsystems.com/2009/04/when-vista-forgets/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		<feedburner:origLink>http://squarepegsystems.com/2009/04/when-vista-forgets/</feedburner:origLink></item>
		<item>
		<title>An Easy Way To Speed Up Your WordPress Blog</title>
		<link>http://feedproxy.google.com/~r/SquarepegSystems/~3/mtto__pRsQY/</link>
		<comments>http://squarepegsystems.com/2009/03/an-easy-way-to-speed-up-your-wordpress-blog/#comments</comments>
		<pubDate>Sat, 28 Mar 2009 03:23:54 +0000</pubDate>
		<dc:creator>mike</dc:creator>
				<category><![CDATA[technology]]></category>
		<category><![CDATA[mysql]]></category>
		<category><![CDATA[wordpress]]></category>

		<guid isPermaLink="false">http://squarepegsystems.com/?p=26</guid>
		<description><![CDATA[I&#8217;ve been struggling with the speed of my WordPress blogs, both on my personal blog and here.  My web host for these two domains is notorious for bad MySQL implementations, but I knew that wasn&#8217;t my whole problem.  I tried to get WP Super Cache to solve some of these problems, but that didn&#8217;t quite [...]]]></description>
			<content:encoded><![CDATA[<p>I&#8217;ve been struggling with the speed of my WordPress blogs, both on<a href="http://mike.hostetlerhome.com/"> my personal blog</a> and here.  My web host for these two domains is notorious for bad MySQL implementations, but I knew that wasn&#8217;t my whole problem.  I tried to get <a href="http://wordpress.org/extend/plugins/wp-super-cache/">WP Super Cache </a>to solve some of these problems, but that didn&#8217;t quite do what I thought it should have.</p>
<p>I&#8217;ve been looking for ideas and found a little tweak here and a little tweak there but nothing really helped.   Tonight I was looking again and <a href="http://weblogtoolscollection.com/archives/2005/04/06/optimize-your-database/">found this </a>and I&#8217;m like, &#8220;You&#8217;ve got to be kidding me!&#8221;   It made perfect sense &#8212; I just never thought about it before.  To summarize the steps:</p>
<ol>
<li>Log into PhpMySqlAdmin.</li>
<li>Click on the database name on the left side.</li>
<li>On the right hand side,  your tables will be listed. Scroll all the way down and click on the  “Check all” link.</li>
<li>Make sure all database tables are checked and then from the dropdown next to it, carefully select “Optimize table”.</li>
<li>Click the &#8220;Go&#8221; button</li>
</ol>
<p>You can issue the <code>optimize</code> command from a MySQL prompt as well, but most web hosts will only give you PhpMySqlAdmin.</p>
<p>Having to do this makes perfect sense.  You&#8217;ve created your tables,  put data in them, and the WordPress has been doing query after query on them.  So now you have a pattern of usage and so MySQL could use that information to query the data more effectively.  <a href="http://dev.mysql.com/doc/refman/5.1/en/optimize-table.html">And that is what <code>optimize</code> is for,</a> especially since WordPress is fully of VARCHAR and TEXT columns.</p>
<p>So, if your WordPress blog is loading slow, you really try running <code>optimize</code> on the tables.</p>
<img src="http://feeds.feedburner.com/~r/SquarepegSystems/~4/mtto__pRsQY" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://squarepegsystems.com/2009/03/an-easy-way-to-speed-up-your-wordpress-blog/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		<feedburner:origLink>http://squarepegsystems.com/2009/03/an-easy-way-to-speed-up-your-wordpress-blog/</feedburner:origLink></item>
		<item>
		<title>Tweeting from the command-line</title>
		<link>http://feedproxy.google.com/~r/SquarepegSystems/~3/anqIcZUHy1c/</link>
		<comments>http://squarepegsystems.com/2009/03/tweeting-from-the-command-line/#comments</comments>
		<pubDate>Thu, 26 Mar 2009 20:38:44 +0000</pubDate>
		<dc:creator>mike</dc:creator>
				<category><![CDATA[unix]]></category>
		<category><![CDATA[command line]]></category>
		<category><![CDATA[twitter]]></category>

		<guid isPermaLink="false">http://squarepegsystems.com/?p=20</guid>
		<description><![CDATA[As you can see on the sidebar, I use Twitter.  I think it&#8217;s cool but I know that it took me a while to &#8220;get it&#8221; and I know many people who still don&#8217;t get it.  But I can&#8217;t explain what &#8220;it&#8221; is.
I tweet pretty much from the command line.  A simple google search will [...]]]></description>
			<content:encoded><![CDATA[<p>As you can see on the sidebar, I use Twitter.  I think it&#8217;s cool but I know that it took me a while to &#8220;get it&#8221; and I know many people who still don&#8217;t get it.  But I can&#8217;t explain what &#8220;it&#8221; is.</p>
<p>I tweet pretty much from the command line.  A simple google search will help you figure it out, but for the impatient, I do:</p>
<pre lang="bash">curl --basic --user username:passwd --data status="my update" \

http://twitter.com/statuses/update.xml</pre>
<p>Of course, I am not going to type that in every time.  This is too complicated for an alias.  A lot of people would then put this into a script, but I don&#8217;t like one or two loner scripts. I find functions much better for this kind of thing.  So this is in my <code>~/.aliases</code> file:</p>
<pre lang="bash">function tweet() {
curl --basic --user username:passwd --data status=\"$1\" \

http://twitter.com/statuses/update.xml

}</pre>
<p>The <code>$1</code> is where my status update would be.  So then I do:</p>
<pre lang="bash">tweet "this is my status"</pre>
<p>And then I get some XML back that confirmed my status change.</p>
<img src="http://feeds.feedburner.com/~r/SquarepegSystems/~4/anqIcZUHy1c" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://squarepegsystems.com/2009/03/tweeting-from-the-command-line/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		<feedburner:origLink>http://squarepegsystems.com/2009/03/tweeting-from-the-command-line/</feedburner:origLink></item>
		<item>
		<title>A company is born</title>
		<link>http://feedproxy.google.com/~r/SquarepegSystems/~3/eYJc_n7o-Io/</link>
		<comments>http://squarepegsystems.com/2009/01/company-born/#comments</comments>
		<pubDate>Tue, 20 Jan 2009 01:57:06 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[company]]></category>

		<guid isPermaLink="false">http://squarepegsystems.com/?p=1</guid>
		<description><![CDATA[Welcome to SquarePeg Systems!
This is a small consulting company that I have been thinking about for over ten years. The name in my head changed, what the company did changed, but it has always been in the back of my mind.  In the past year, different things have come together to tell me that this [...]]]></description>
			<content:encoded><![CDATA[<p>Welcome to SquarePeg Systems!</p>
<p>This is a small consulting company that I have been thinking about for over ten years. The name in my head changed, what the company did changed, but it has always been in the back of my mind.  In the past year, different things have come together to tell me that this idea of mine could work.</p>
<p>Feel free to look around what I&#8217;m talking about.  And please excuse the mess while things get set up here.</p>
<img src="http://feeds.feedburner.com/~r/SquarepegSystems/~4/eYJc_n7o-Io" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://squarepegsystems.com/2009/01/company-born/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		<feedburner:origLink>http://squarepegsystems.com/2009/01/company-born/</feedburner:origLink></item>
	</channel>
</rss>
