<?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>The Code Dojo &#187; Linux</title>
	<atom:link href="http://dojo.codegreene.com/category/linux/feed/" rel="self" type="application/rss+xml" />
	<link>http://dojo.codegreene.com</link>
	<description>The Code Dojo is the veritable repository of random musings from the development team at Code Greene.</description>
	<lastBuildDate>Fri, 20 Jan 2012 18:09:02 +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>Sendmail in Development Environment</title>
		<link>http://dojo.codegreene.com/2011/11/sendmail-in-development-environment/?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=sendmail-in-development-environment</link>
		<comments>http://dojo.codegreene.com/2011/11/sendmail-in-development-environment/#comments</comments>
		<pubDate>Fri, 11 Nov 2011 16:40:35 +0000</pubDate>
		<dc:creator>Brian</dc:creator>
				<category><![CDATA[Linux]]></category>
		<category><![CDATA[PHP]]></category>
		<category><![CDATA[Tools]]></category>
		<category><![CDATA[Web Development]]></category>
		<category><![CDATA[mail()]]></category>
		<category><![CDATA[PHP Functions]]></category>
		<category><![CDATA[sendmail]]></category>

		<guid isPermaLink="false">http://dojo.codegreene.com/?p=830</guid>
		<description><![CDATA[A few times in my career, I&#8217;ve had the need to test emailing in one form or another. I&#8217;ve also had the unfortunate experience of accidentally sending a test email to a real person. As you can imagine, this may cause confusion, embarrassment, lectures, and possibly the death of a small pixie or two. Fortunately, [...]]]></description>
			<content:encoded><![CDATA[<p>A few times in my career, I&#8217;ve had the need to test emailing in one form or another. I&#8217;ve also had the unfortunate experience of accidentally sending a test email to a real person. As you can imagine, this may cause confusion, embarrassment, lectures, and possibly the death of a small pixie or two. Fortunately, there IS a preventative measure you can take.</p>
<p>When it comes to mail() (as well as many other things), PHP prefers to delegate the heavy lifting to another piece of software: sendmail (or a sendmail compatible command-line mail transport agent). By default, PHP will call your sendmail binary, and pass it the entire message, after composing it from the headers and body supplied by the developer.</p>
<p>One of the side-benefits to this system is the ability to override PHP&#8217;s default, and seamlessly hook in your own sendmail-esque binary or script. My favorite parts of this hack, is that it doesn&#8217;t require a recompile of PHP or anything all too complicated, just a small change to your <strong>php.ini</strong> file.<span id="more-830"></span></p>
<p>So, without further delay, the magic:</p>
<p>In your php.ini file, change your sendmail path:</p>
<pre>sendmail_path=/usr/local/bin/trapmail</pre>
<p>And here&#8217;s what the script should have in it:</p>
<pre>you@devserver:~$ cat /usr/local/bin/trapmail
formail -R cc X-original-cc \
-R to X-original-to \
-R bcc X-original-bcc \
-f -A"To: devteam@example.com" \
| /usr/sbin/sendmail -t -i</pre>
<p>And what does this do? It traps all mail that would normally go OUT (say, to a customer), and instead, delivers it to devteam@example.com (with the original fields renamed for debugging purposes). Disaster avoided and pixies are forever in your debt!</p>
<p>Edit: Dont forget to make your trapmail script executable!</p>
]]></content:encoded>
			<wfw:commentRss>http://dojo.codegreene.com/2011/11/sendmail-in-development-environment/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Sharpening The Blades: Texture on the Web &amp; JavaScript Powering Linux</title>
		<link>http://dojo.codegreene.com/2011/10/sharpening-the-blades-texture-on-the-web-javascript-powering-linux/?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=sharpening-the-blades-texture-on-the-web-javascript-powering-linux</link>
		<comments>http://dojo.codegreene.com/2011/10/sharpening-the-blades-texture-on-the-web-javascript-powering-linux/#comments</comments>
		<pubDate>Tue, 25 Oct 2011 18:07:41 +0000</pubDate>
		<dc:creator>Master Sensei</dc:creator>
				<category><![CDATA[Browsers]]></category>
		<category><![CDATA[Design]]></category>
		<category><![CDATA[JavaScript]]></category>
		<category><![CDATA[Linux]]></category>
		<category><![CDATA[Tools]]></category>
		<category><![CDATA[Usability]]></category>
		<category><![CDATA[javascript]]></category>
		<category><![CDATA[Texture]]></category>
		<category><![CDATA[Web Texture]]></category>

		<guid isPermaLink="false">http://dojo.codegreene.com/?p=738</guid>
		<description><![CDATA[Mark, Art and The Web Texture I thought this was a nice article and analysis of Textures by Nick Petite. Though to many people texture may seem like a subtle thing we feel it is an important part of a website for creating the right mood. The thing that Nick points out is how much [...]]]></description>
			<content:encoded><![CDATA[<p><img class="size-full wp-image-740 alignright" style="border: 1px solid #444444; margin: 8px 0pt 20px 20px; padding: 2px;" title="art-texture" src="http://dojo.codegreene.com/wp-content/uploads/2011/10/art-texture.jpg" alt="Art and The Web Texture" width="100" height="100" /></p>
<p>Mark, <a href="http://thinkvitamin.com/art-and-the-web/art-and-the-web-texture/" target="_blank">Art and The Web Texture</a><br />
I thought this was a nice article and analysis of Textures by Nick Petite. Though to many people texture may seem like a subtle thing we feel it is an important part of a website for creating the right mood. The thing that Nick points out is how much more dynamic a website can seem once a more interesting texture is added. In web design, I personally really like the layered texture strategies because it helps to neutralize an otherwise potentially overbearing texture, Nick covers the gambit of options and provides some examples, check it out.</p>
<p><img class="alignright size-full wp-image-741" style="border: 1px solid #444444; margin: 8px 0pt 20px 20px; padding: 2px;" title="javascript-linux" src="http://dojo.codegreene.com/wp-content/uploads/2011/10/javascript-linux.jpg" alt="JavaScript Powers Linux In A Browser" width="100" height="100" />Brian, <a href="http://www.builderau.com.au/news/soa/JavaScript-powers-Linux-in-a-browser/0,339028227,339315250,00.htm" target="_blank">JavaScript Powers Linux In A Browser</a><br />
I get asked all the time &#8216;Why Linux?&#8217; and &#8216;How lightweight it is?&#8217;. My usual reply references how Ive seen a Linux web server run off a 2GB thumb drive, but this article trumps even that. With all the overhead the operating systems of today require, people usually assume a servers absolute minimum is even higher. Running Linux in a client-side script like this just blows my mind!</p>
]]></content:encoded>
			<wfw:commentRss>http://dojo.codegreene.com/2011/10/sharpening-the-blades-texture-on-the-web-javascript-powering-linux/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>hackUTOS &#8211; A Code Festival</title>
		<link>http://dojo.codegreene.com/2010/04/hackutos-a-code-festival/?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=hackutos-a-code-festival</link>
		<comments>http://dojo.codegreene.com/2010/04/hackutos-a-code-festival/#comments</comments>
		<pubDate>Fri, 16 Apr 2010 20:04:39 +0000</pubDate>
		<dc:creator>Master Sensei</dc:creator>
				<category><![CDATA[Business]]></category>
		<category><![CDATA[Food]]></category>
		<category><![CDATA[Fun]]></category>
		<category><![CDATA[Linux]]></category>
		<category><![CDATA[MySQL]]></category>
		<category><![CDATA[PHP]]></category>
		<category><![CDATA[Tools]]></category>
		<category><![CDATA[Web Development]]></category>
		<category><![CDATA[UTOS]]></category>

		<guid isPermaLink="false">http://dojo.codegreene.com/?p=613</guid>
		<description><![CDATA[A friend of ours sent us an email with some information about a cool event coming up called hackUTOS &#8211; A Code Festival. It looks pretty cool and it will be interesting to see what kind of things can be hacked and created at this event. For more information: Event Website Facebook Event Page]]></description>
			<content:encoded><![CDATA[<p><a href="http://dojo.codegreene.com/wp-content/uploads/2010/04/hackUTOS.png"><img class="alignright size-full wp-image-614" title="hackUTOS" src="http://dojo.codegreene.com/wp-content/uploads/2010/04/hackUTOS.png" alt="" width="293" height="158" /></a>A friend of ours sent us an email with some information about a cool event coming up called hackUTOS &#8211; A Code Festival. It looks pretty cool and it will be interesting to see what kind of things can be hacked and created at this event.</p>
<p>For more information:</p>
<p><a href="http://wiki.utos.org/Event:hackUTOS_-_A_Code_Festival" target="_blank">Event Website</a><br />
<a href="http://www.facebook.com/?sk=events#!/event.php?eid=114694361876524">Facebook Event Page</a></p>
]]></content:encoded>
			<wfw:commentRss>http://dojo.codegreene.com/2010/04/hackutos-a-code-festival/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Well-known problems with undocumented solutions</title>
		<link>http://dojo.codegreene.com/2010/03/well-known-problems-with-undocumented-solutions/?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=well-known-problems-with-undocumented-solutions</link>
		<comments>http://dojo.codegreene.com/2010/03/well-known-problems-with-undocumented-solutions/#comments</comments>
		<pubDate>Thu, 18 Mar 2010 16:23:02 +0000</pubDate>
		<dc:creator>Master Sensei</dc:creator>
				<category><![CDATA[Linux]]></category>
		<category><![CDATA[PHP]]></category>
		<category><![CDATA[Tools]]></category>
		<category><![CDATA[Web Development]]></category>
		<category><![CDATA[apache]]></category>
		<category><![CDATA[Coding]]></category>
		<category><![CDATA[FreeBSD]]></category>
		<category><![CDATA[google]]></category>
		<category><![CDATA[imap]]></category>
		<category><![CDATA[Open Source]]></category>
		<category><![CDATA[sysadmin]]></category>

		<guid isPermaLink="false">http://dojo.codegreene.com/?p=551</guid>
		<description><![CDATA[I just spent about an hour banging my head on a brick wall with the apparently well known &#8220;Unable to create selectable TCP socket&#8221; problem, which manifests itself most notably with failing imap_open() calls from PHP. It is related to fd_setsize and a frequent limit of 1024 open files (or at least selectable open files). [...]]]></description>
			<content:encoded><![CDATA[<p>I just spent about an hour banging my head on a brick wall with the apparently well known &#8220;Unable to create selectable TCP socket&#8221; problem, which manifests itself most notably with failing imap_open() calls from PHP. It is related to fd_setsize and a frequent limit of 1024 open files (or at least selectable open files). It is quite well documented that it is some kind of bug/shortcoming in the c-client libraries that underlie a lot of email-related stuff, particularly the UW suite of tools like uw-imap, pine, alpine, etc. as well as the IMAP extension in PHP. I love being able to go Google for answers and find a ton of related content. It is really annoying though when people have been talking about this bug for years, since at least early 2007, with very very few workable solutions posted, or even workarounds.</p>
<p>So, I&#8217;m going to do my part: I found a workaround that I think might work very well for a lot of people who run into this problem. It&#8217;s biggest advantage is that it is very very easy to try, and has almost no downside, even if it doesn&#8217;t work for your particular situation. In my case, I found that Apache did indeed have a lot of files open, including log files for all my VirtualHosts, all the libraries that httpd depends on, files from sites that are hosted there (though it seems to open and close those just fine), and a large buildup of hundreds of entries for /tmp that were open and apparently never got closed properly. In my case, the server in question has an uptime of over 2 years, and while &#8220;apachectl restart&#8221; runs at least daily for log rotation, it seems that doesn&#8217;t really close unused file descriptors. The workaround I discovered was running &#8220;apachectl stop&#8221; followed by &#8220;apachectl start&#8221; which fixed the problem completely for me, at least for the next year or two I hope. From over 1600 open files, after restarting Apache fully that way, it only reopened about 325 files. And the imap_open() calls started succeeding as they should.</p>
<p>One last thought before I hop off my soapbox: when you find an answer to a problem, and that answer was hard to find or was not well documented, do your part to remedy that for the next guy or girl to hit that problem, and post your solution somewhere that Google will find it. It makes the internet a better place for all of us, and makes us all more productive. Who knows, maybe down the road you&#8217;ll run into the same problem again yourself, and not remember how to solve it until you find your own post from years before, and it will be your own time you&#8217;ll save. I fully recognize that a lot of what I accomplish each day is based on work done by others that I have found and emulated, as they say, standing on the shoulders of giants. Each contribution to the body of human knowledge lets us reach that much higher, so when you can, add your bit and as we all do that, it adds up.</p>
]]></content:encoded>
			<wfw:commentRss>http://dojo.codegreene.com/2010/03/well-known-problems-with-undocumented-solutions/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Utah Open Source Conference (UTOSC) 2009 is coming!</title>
		<link>http://dojo.codegreene.com/2009/09/utah-open-source-conference-utosc-2009-is-coming/?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=utah-open-source-conference-utosc-2009-is-coming</link>
		<comments>http://dojo.codegreene.com/2009/09/utah-open-source-conference-utosc-2009-is-coming/#comments</comments>
		<pubDate>Thu, 17 Sep 2009 04:18:02 +0000</pubDate>
		<dc:creator>Master Sensei</dc:creator>
				<category><![CDATA[Fun]]></category>
		<category><![CDATA[Linux]]></category>
		<category><![CDATA[News]]></category>
		<category><![CDATA[FOSS]]></category>
		<category><![CDATA[FreeBSD]]></category>
		<category><![CDATA[Open Source]]></category>
		<category><![CDATA[UTOS]]></category>
		<category><![CDATA[UTOSC2009]]></category>

		<guid isPermaLink="false">http://dojo.codegreene.com/?p=314</guid>
		<description><![CDATA[I'm getting excited for the upcoming Utah Open Source Conference 2009, Thursday October 8 through Saturday October 10. It's hard to believe another year has gone by already. There are a ton of <a title="UTOSC 2009 Presentation Schedule" href="http://2009.utosc.com/presentation/schedule/" target="_blank">great speakers</a> and events that I anxiously await. Not to make light of the conference presentations, some of my favorite parts are the social events, like the Boardgame Bash at the end of the conference. For a bunch of geeks, we seem to be a pretty fun crowd, I think. I also love that the <a title="Utah Open Source Foundation" href="http://www.utos.org/" target="_blank">UTOS</a> folks take family seriously, and have family events on Saturday that are fun for the wife, kids, and other non-geek family members. There's a healthy focus on bringing new people, and less technical people, into the Open Source fold, which I think is great.]]></description>
			<content:encoded><![CDATA[<p><a href="http://attend.utosc.com"><img src="http://dl.utosc.com/09/badges/utosc2009_Speaker.png" alt="UTOSC 2009 Speaker" align="right"  style='margin-left: 20px;' /></a></p>
<p>I&#8217;m getting excited for the upcoming Utah Open Source Conference 2009, Thursday October 8 through Saturday October 10. It&#8217;s hard to believe another year has gone by already. There are a ton of <a title="UTOSC 2009 Presentation Schedule" href="http://2009.utosc.com/presentation/schedule/" target="_blank">great speakers</a> and events that I anxiously await. Not to make light of the conference presentations, some of my favorite parts are the social events, like the Boardgame Bash at the end of the conference. For a bunch of geeks, we seem to be a pretty fun crowd, I think. I also love that the <a title="Utah Open Source Foundation" href="http://www.utos.org/" target="_blank">UTOS</a> folks take family seriously, and have family events on Saturday that are fun for the wife, kids, and other non-geek family members. There&#8217;s a healthy focus on bringing new people, and less technical people, into the Open Source fold, which I think is great.</p>
<p>This year, as soon as submission of abstracts opened, I tossed in a presentation for the first idea that came to mind, which happened to be about one of my favorite open source platforms, FreeBSD. Lo and behold, after the voting and committee meetings were over, I was one left standing, so now I&#8217;ll be presenting <a title="Why FreeBSD is the Best Linux Distribution" href="http://2009.utosc.com/presentation/16/" target="_blank">&#8220;Why FreeBSD is the Best Linux Distro*&#8221;</a> at the conference. Of course, when I decided to run the risk of making a joke in a room full of highly technical purists, I knew I better use the asterisk and let them in on the joke: &#8220;* Yes, FreeBSD isn&#8217;t really a Linux Distro. It&#8217;s a different Operating System that has emulation for and binary compatibility with Linux and can run almost all the same programs.&#8221; Even though it isn&#8217;t really a Linux distribution, for me it serves the same purpose and I think it does a better job than the various Linux distributions I&#8217;ve experienced.</p>
<p>Anyway, early-bird discounts end on Saturday the 19th, and there are some 50% off coupon codes drifting around if you&#8217;re interested. There are codes you can get from speakers, any local Linux User Group (LUG), or other groups like <a title="Utah PHP Users" href="http://www.uphpu.org/" target="_blank">UPHPU</a>.</p>
]]></content:encoded>
			<wfw:commentRss>http://dojo.codegreene.com/2009/09/utah-open-source-conference-utosc-2009-is-coming/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
	</channel>
</rss>

