<?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>Les jeux sont faits&#187; Les Jeux Sont Faits</title>
	<atom:link href="http://www.mistcat.com/category/coding/feed" rel="self" type="application/rss+xml" />
	<link>http://www.mistcat.com</link>
	<description>Forsan miseros meliora sequentur</description>
	<lastBuildDate>Thu, 11 Feb 2010 03:19:15 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.9</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>Finding Replacing Filenames &amp; text inside files using perl</title>
		<link>http://www.mistcat.com/2009/finding-replacing-filenames-text-inside-files-using-perl</link>
		<comments>http://www.mistcat.com/2009/finding-replacing-filenames-text-inside-files-using-perl#comments</comments>
		<pubDate>Fri, 31 Jul 2009 16:26:43 +0000</pubDate>
		<dc:creator>Nate</dc:creator>
				<category><![CDATA[Coding]]></category>
		<category><![CDATA[Linux / Unix / CLI]]></category>

		<guid isPermaLink="false">http://www.mistcat.com/2009/finding-replacing-filenames-text-inside-files-using-perl</guid>
		<description><![CDATA[A few “Bash Tricks” for the peeps
First up: 
Find &#38; replace filenames
This finds file that match Somethinghtml.html and renames to Something.html (HTTP Track users will recognize these two examples as fixes to common naming problems when scraping a site.) Note you can change the mask of files searched by changing the find mask at the [...]]]></description>
			<content:encoded><![CDATA[<p>A few “Bash Tricks” for the peeps</p>
<p>First up: </p>
<h5>Find &amp; replace filenames</h5>
<p>This finds file that match Somethinghtml.html and renames to Something.html (HTTP Track users will recognize these two examples as fixes to common naming problems when scraping a site.) Note you can change the mask of files searched by changing the find mask at the end of the line. </p>
<p><font color="#0080ff"><strong>&lt;code&gt;</strong></font></p>
<p><font color="#0080ff"><strong>perl -p -i -e &#8217;s/(.*)html\.html/\1.html/g;&#8217; `find ./ -name &#8216;*.html&#8217;`</strong></font></p>
<p><font color="#0080ff"><strong>&lt;/code&gt;</strong></font></p>
<h5>Then Find &amp; Replace text inside of files:</h5>
<p>This finds things that have been incorrectly prefixed with dev.mistcat.com and removes that prefix so that this 2112.js file can load from a remote domain correctly.&#160; Note you can change the find mask at the beginning to restrict or un-restrict your searched files for text replacement.</p>
<p><font color="#0080c0"><strong>&lt;code&gt;</strong></font></p>
<p><font color="#0080c0"><strong>find . -name &#8216;*.html&#8217; | perl -pi -e &#8217;s/http:\/\/dev\.mistcat\.com\/(www\.dwin1\.com\/2112\.js)/http:\/\/\       <br />1/g;&#8217;</strong></font></p>
<p> <font color="#0080c0"><strong>&lt;/code&gt;</strong></font></p>
]]></content:encoded>
			<wfw:commentRss>http://www.mistcat.com/2009/finding-replacing-filenames-text-inside-files-using-perl/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Ubuntu Apache Tuning</title>
		<link>http://www.mistcat.com/2009/ubuntu-apache-tuning</link>
		<comments>http://www.mistcat.com/2009/ubuntu-apache-tuning#comments</comments>
		<pubDate>Tue, 28 Jul 2009 16:26:17 +0000</pubDate>
		<dc:creator>Nate</dc:creator>
				<category><![CDATA[Linux / Unix / CLI]]></category>
		<category><![CDATA[TechJunk]]></category>
		<category><![CDATA[The Standard Biz]]></category>

		<guid isPermaLink="false">http://www.mistcat.com/2009/ubuntu-apache-tuning</guid>
		<description><![CDATA[So I recently needed to do a little quick performance tuning at work on one of our ubuntu server installs.&#160; I’ve been using some of the wisdom found here to refresh myself on the basics, and I wrote a quick little one line awk script to give me the total amount of memory being used [...]]]></description>
			<content:encoded><![CDATA[<p>So I recently needed to do a little quick performance tuning at work on one of our ubuntu server installs.&#160; I’ve been using some of the wisdom <a href="http://www.devside.net/articles/apache-performance-tuning" target="_blank">found here</a> to refresh myself on the basics, and I wrote a quick little one line awk script to give me the total amount of memory being used by apache at any given time, and the average process size for apache at that moment as well.&#160; I figured someone else might get some use out of it and decided to post it: (the following should all be on one line, but hey)</p>
<p>&lt;code&gt;</p>
<p>ps -ylC apache2 &#8211;sort:rss | awk &#8216;{x += $8;y += 1} END {print &quot;Apache Memory Usage (MB): &quot;x/1024; pr    <br />int &quot;Average Process Size (MB): &quot;x/(y*1024)}&#8217;</p>
<p> &lt;/code&gt;
<p>&#160;</p>
<p>So the command ‘PS’ is going to give us process information for any process containing the apache2 text, I’m going to sort it by the physical/resident memory that process is taking up.&#160; I then feed that data into Awk and on Ubuntu, the 8th column in is the memory info.&#160; I then total that up in my x variable and total the number of processes in my y variable and then print those out nicely out to the terminal.&#160; (Incidentally you could use this in a cron job to create a sort of very ghetto/basic apache historical tracking if you wanted to see apache memory usage over time)</p>
<p>So as I understand it, your MaxClients setting in apache should follow this formula:</p>
<blockquote><p>MaxClients ≈ (RAM &#8211; size_all_other_processes)/(size_apache_process)</p>
</blockquote>
<p>So with my handy script you now have the size_apache_process variable, you probably know your boxes total ram, (‘free –m’ will tell you if you don’t know) and I’ve been estimating ‘size_all_other_processes’ as about 20% of total ram.&#160; It occurs to me that I could probably write a script to total up the size of all other processes as well, but I’ll have to investigate that a little bit…&#160; Anyhow it’s pretty quick to figure out a good MaxClients setting using this script!</p>
]]></content:encoded>
			<wfw:commentRss>http://www.mistcat.com/2009/ubuntu-apache-tuning/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Tricks of the CLI Trade</title>
		<link>http://www.mistcat.com/2007/tricks-of-the-cli-trade</link>
		<comments>http://www.mistcat.com/2007/tricks-of-the-cli-trade#comments</comments>
		<pubDate>Fri, 30 Nov 2007 03:29:43 +0000</pubDate>
		<dc:creator>Nate</dc:creator>
				<category><![CDATA[Linux / Unix / CLI]]></category>

		<guid isPermaLink="false">http://www.mistcat.com/2007/tricks-of-the-cli-trade/</guid>
		<description><![CDATA[Show just directories with pretty ls colors!
ls -ld */
Find in files cheap and dirty unix style!
find . -type f&#124; xargs grep 'some_string'
[Listening to: Wouldn't Believe It - The Get Up Kids - Guilt Show (3:47)]
]]></description>
			<content:encoded><![CDATA[<p><b>Show just directories with pretty ls colors!</b><br />
<code>ls -ld */</code></p>
<p><b>Find in files cheap and dirty unix style!</b><br />
<code>find . -type f| xargs grep 'some_string'</code></p>
<div class="media">[Listening to: Wouldn't Believe It - <a href="http://www.windowsmedia.com/mg/search.asp?srch=The+Get+Up+Kids">The Get Up Kids</a> - Guilt Show (3:47)]</div>
]]></content:encoded>
			<wfw:commentRss>http://www.mistcat.com/2007/tricks-of-the-cli-trade/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Subversion helper Bash Script</title>
		<link>http://www.mistcat.com/2006/subversion-helper-bash-script</link>
		<comments>http://www.mistcat.com/2006/subversion-helper-bash-script#comments</comments>
		<pubDate>Tue, 22 Aug 2006 18:12:59 +0000</pubDate>
		<dc:creator>Nate</dc:creator>
				<category><![CDATA[Coding]]></category>

		<guid isPermaLink="false">http://www.mistcat.com/?p=74</guid>
		<description><![CDATA[Sometimes repository names get long, and when you&#8217;re using subversion typing them all out can be a pain.  I wrote this quick bash helper script to make using subversion with one repository easier and quicker to use.

#!/bin/bash

MYREPOSITORY="http://myrepository.net/svn"

#Script requires USERNAME, REPOSITORY DIRECTORY, and COMMAND
MINPARAMS=3

if [ $# -lt "$MINPARAMS" ]
then
  echo "  Usage: ./msvn [...]]]></description>
			<content:encoded><![CDATA[<p>Sometimes repository names get long, and when you&#8217;re using subversion typing them all out can be a pain.  I wrote this quick bash helper script to make using subversion with one repository easier and quicker to use.</p>
<pre lang="bash">
#!/bin/bash

MYREPOSITORY="http://myrepository.net/svn"

#Script requires USERNAME, REPOSITORY DIRECTORY, and COMMAND
MINPARAMS=3

if [ $# -lt "$MINPARAMS" ]
then
  echo "  Usage: ./msvn username respository command"
  exit
fi

USERNAME=$1
REPOSITORY=$2
SVNCOMMAND=$3
shift
shift
shift
CPARAMS=$@

echo "`svn $SVNCOMMAND --username $USERNAME $MYREPOSITORY/$REPOSITORY $CPARAMS`"
</pre>
]]></content:encoded>
			<wfw:commentRss>http://www.mistcat.com/2006/subversion-helper-bash-script/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Rising Sun Tech</title>
		<link>http://www.mistcat.com/2005/rising-sun-tech</link>
		<comments>http://www.mistcat.com/2005/rising-sun-tech#comments</comments>
		<pubDate>Sat, 03 Dec 2005 16:40:07 +0000</pubDate>
		<dc:creator>Nate</dc:creator>
				<category><![CDATA[CSS/ HTML]]></category>
		<category><![CDATA[Da Web]]></category>

		<guid isPermaLink="false">http://www.mistcat.com/?p=19</guid>
		<description><![CDATA[Ever want to pretend someone in one of your pictures was in a spotlight, or sitting in the sun, or getting cooly backlit?  WELL NOW YOU CAN!!!!  The Amazing Facial Relighting Demo Software
]]></description>
			<content:encoded><![CDATA[<p>Ever want to pretend someone in one of your pictures was in a spotlight, or sitting in the sun, or getting cooly backlit?  WELL NOW YOU CAN!!!!  <a href="http://www.debevec.org/FaceDemo/">The Amazing Facial Relighting Demo Software</a></p>
]]></content:encoded>
			<wfw:commentRss>http://www.mistcat.com/2005/rising-sun-tech/feed</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Got Flash?</title>
		<link>http://www.mistcat.com/2005/got-flash</link>
		<comments>http://www.mistcat.com/2005/got-flash#comments</comments>
		<pubDate>Sat, 03 Dec 2005 16:38:23 +0000</pubDate>
		<dc:creator>Nate</dc:creator>
				<category><![CDATA[CSS/ HTML]]></category>

		<guid isPermaLink="false">http://www.mistcat.com/?p=18</guid>
		<description><![CDATA[Ever need some flossed out flash text effects but you&#8217;re a cute non profit woman on a budget?  Well Peep This
]]></description>
			<content:encoded><![CDATA[<p>Ever need some flossed out flash text effects but you&#8217;re a cute non profit woman on a budget?  Well <a href="http://www.flashkit.com/textfx/start.shtml">Peep This</a></p>
]]></content:encoded>
			<wfw:commentRss>http://www.mistcat.com/2005/got-flash/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Yo Scotty, that&#8217;s Flash!</title>
		<link>http://www.mistcat.com/2005/yo-scotty-thats-flash</link>
		<comments>http://www.mistcat.com/2005/yo-scotty-thats-flash#comments</comments>
		<pubDate>Sat, 03 Dec 2005 16:28:58 +0000</pubDate>
		<dc:creator>Nate</dc:creator>
				<category><![CDATA[CSS/ HTML]]></category>
		<category><![CDATA[Da Web]]></category>

		<guid isPermaLink="false">http://www.mistcat.com/?p=12</guid>
		<description><![CDATA[These guys are hard core
The Jerusalem Archaeological Park.  (And no it&#8217;s not just vowels!)
]]></description>
			<content:encoded><![CDATA[<p><a href="http://www.archpark.org.il/index.asp">These guys are hard core</a></p>
<p>The Jerusalem Archaeological Park.  (And no it&#8217;s not just vowels!)</p>
]]></content:encoded>
			<wfw:commentRss>http://www.mistcat.com/2005/yo-scotty-thats-flash/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Wget Tricks</title>
		<link>http://www.mistcat.com/2005/wget-tricks</link>
		<comments>http://www.mistcat.com/2005/wget-tricks#comments</comments>
		<pubDate>Wed, 10 Aug 2005 02:03:56 +0000</pubDate>
		<dc:creator>Nate</dc:creator>
				<category><![CDATA[Coding]]></category>
		<category><![CDATA[Linux / Unix / CLI]]></category>

		<guid isPermaLink="false">http://www.mistcat.com/?p=2</guid>
		<description><![CDATA[Tricks using the versitle WGET Command]]></description>
			<content:encoded><![CDATA[<p>Determine the Type &#038; Version of a webserver:<br />
      <code>wget -s -q -O - http://target.server.com | grep ^Server</code></p>
<p>Determine the total page size of a webpage including graphics and what not:<br />
     <code>wget -r -nv --level=0 --ignore-tags=a --delete-after https://www.domain.com/whatever</code></p>
]]></content:encoded>
			<wfw:commentRss>http://www.mistcat.com/2005/wget-tricks/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
