<?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>Matt&#039;s Technology Blog</title>
	<atom:link href="http://technology.mattrude.com/feed/" rel="self" type="application/rss+xml" />
	<link>http://technology.mattrude.com</link>
	<description>A simple log of my adventures in the technology world</description>
	<lastBuildDate>Sun, 21 Apr 2013 17:48:26 +0000</lastBuildDate>
	<language>en-US</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.6-beta3-24298</generator>
		<item>
		<title>Cgit download site</title>
		<link>http://technology.mattrude.com/2013/04/cgit-download-site/</link>
		<comments>http://technology.mattrude.com/2013/04/cgit-download-site/#comments</comments>
		<pubDate>Sun, 21 Apr 2013 16:17:35 +0000</pubDate>
		<dc:creator>Matt Rude</dc:creator>
				<category><![CDATA[Asides]]></category>
		<category><![CDATA[cgit]]></category>
		<category><![CDATA[Git]]></category>
		<category><![CDATA[Web server]]></category>

		<guid isPermaLink="false">http://technology.mattrude.com/?p=5906</guid>
		<description><![CDATA[Today I was working on a friends git repository when I noticed that the cgit website is down.  Thankfully I have a backup of the current repository if anyone needs it. CGIT repository CGIT repository readme file This mirror will &#8230; <a href="http://technology.mattrude.com/2013/04/cgit-download-site/">Continue reading <span class="meta-nav">&#8594;</span></a><a href="http://technology.mattrude.com/2013/04/cgit-download-site/">Cgit download site</a> is a post from; <a href="http://technology.mattrude.com/">Matt&#039;s Technology Blog</a> which is not allowed to be copied on other sites.]]></description>
				<content:encoded><![CDATA[<p>Today I was working on a friends git repository when I noticed that the cgit website is down.  Thankfully I have a backup of the current repository if anyone needs it.</p>
<ul>
<li><a title="CGIT repository" href="http://code.mattrude.com/mirror/cgit.git/" target="_blank"><span style="line-height: 15px;">CGIT repository</span></a></li>
<li><a title="CGIT ReadMe file" href="http://code.mattrude.com/mirror/cgit.git/about/" target="_blank">CGIT repository readme file</a></li>
</ul>
<p>This mirror will auto update if the repository comes back, but will also let you download and install cgit on your own server via the following command.</p>
<pre>git clone http://git.mattrude.com/mirror/cgit.git</pre>
<p>If you run into any problems with this mirror, please let me know in the comments.</p>
<a href="http://technology.mattrude.com/2013/04/cgit-download-site/">Cgit download site</a> is a post from; <a href="http://technology.mattrude.com/">Matt&#039;s Technology Blog</a> which is not allowed to be copied on other sites.]]></content:encoded>
			<wfw:commentRss>http://technology.mattrude.com/2013/04/cgit-download-site/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Chrome: Auto Connecting with a Client Certificate</title>
		<link>http://technology.mattrude.com/2013/04/autoselectcertificateforurls/</link>
		<comments>http://technology.mattrude.com/2013/04/autoselectcertificateforurls/#comments</comments>
		<pubDate>Sat, 13 Apr 2013 07:26:02 +0000</pubDate>
		<dc:creator>Matt Rude</dc:creator>
				<category><![CDATA[How-To's]]></category>
		<category><![CDATA[Chrome]]></category>
		<category><![CDATA[Public key certificate]]></category>
		<category><![CDATA[Registry Key]]></category>
		<category><![CDATA[Windows]]></category>
		<category><![CDATA[Windows 7]]></category>
		<category><![CDATA[Windows Registry]]></category>

		<guid isPermaLink="false">http://technology.mattrude.com/?p=5893</guid>
		<description><![CDATA[When using client certificates in Chrome, one of the great annoyances is that it prompts you each time you first go to the secured site per session.  This is of course preferred  as a security step to confirm you are connecting with the correct certificate, but &#8230; <a href="http://technology.mattrude.com/2013/04/autoselectcertificateforurls/">Continue reading <span class="meta-nav">&#8594;</span></a><a href="http://technology.mattrude.com/2013/04/autoselectcertificateforurls/">Chrome: Auto Connecting with a Client Certificate</a> is a post from; <a href="http://technology.mattrude.com/">Matt&#039;s Technology Blog</a> which is not allowed to be copied on other sites.]]></description>
				<content:encoded><![CDATA[<p>When using client certificates in Chrome, one of the great annoyances is that it prompts you each time you first go to the secured site per session.  This is of course preferred  as a security step to confirm you are connecting with the correct certificate, but you can also configure Chrome to use the certificate you selected for each site.</p>
<div id="attachment_5894" class="wp-caption alignright" style="width: 319px"><img class="size-full wp-image-5894  " alt="AutoSelectCertificateForUrls-1" src="http://technology.mattrude.com/wp-content/uploads/sites/2/2013/04/AutoSelectCertificateForUrls-1.png" width="309" height="289" /><p class="wp-caption-text">Note the added key&#8217;s &#8220;Google&#8221;, &#8220;Chrome&#8221;, &amp; &#8220;AutoSelectCertificateForUrls&#8221;</p></div>
<p>To accomplish this, in Windows 7, we will be adding a registry keys via <em>regedit.</em>  You will need to first open the Registry Editor by going to Start, then start typing in the lower search box &#8220;regedit&#8221;.  Once the registry editor is opened, you will need to create a <strong>Google</strong> key, <strong>Chrome</strong> Key, and a <strong>AutoSelectCertificateForUrls</strong> key so it vaguely looks like the following example. You may have many, many, many programs under SOFTWARE and Policies, just right mouse click on Policies and choose <strong>New</strong> then <strong>Key</strong>.</p>
<p>Next you need to add the values to the AutoSelectCertificateForUrls key.  Right mouse click on the large white space on the right side of the screen and choose <strong>New</strong>, then <strong>String</strong>. Name the new string <strong>1</strong> and add the following to the value:</p>
<pre>{"pattern":"https://example.com","filter":{"ISSUER":{"CN":"CertName"}}}</pre>
<p>Where <em>https://example.com</em> is the URL of the site you are accessing, and <em>CertName</em> is the CN name from the certificate you are using.</p>
<p>Once you are finished, it should look something like this.</p>
<p><img class="alignleft  wp-image-5895" alt="AutoSelectCertificateForUrls-2" src="http://technology.mattrude.com/wp-content/uploads/sites/2/2013/04/AutoSelectCertificateForUrls-2.png" width="713" height="88" /></p>
<a href="http://technology.mattrude.com/2013/04/autoselectcertificateforurls/">Chrome: Auto Connecting with a Client Certificate</a> is a post from; <a href="http://technology.mattrude.com/">Matt&#039;s Technology Blog</a> which is not allowed to be copied on other sites.]]></content:encoded>
			<wfw:commentRss>http://technology.mattrude.com/2013/04/autoselectcertificateforurls/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>WordPress: Allow Auto Updating</title>
		<link>http://technology.mattrude.com/2013/01/wordpress-auto-updating-plugins-themes/</link>
		<comments>http://technology.mattrude.com/2013/01/wordpress-auto-updating-plugins-themes/#comments</comments>
		<pubDate>Sun, 20 Jan 2013 18:45:34 +0000</pubDate>
		<dc:creator>Matt Rude</dc:creator>
				<category><![CDATA[How-To's]]></category>
		<category><![CDATA[Nginx]]></category>
		<category><![CDATA[Plugin]]></category>
		<category><![CDATA[Security]]></category>
		<category><![CDATA[Theme]]></category>
		<category><![CDATA[Ubuntu]]></category>
		<category><![CDATA[WordPress]]></category>
		<category><![CDATA[WordPress Plugin]]></category>

		<guid isPermaLink="false">http://technology.mattrude.com/?p=5806</guid>
		<description><![CDATA[When WordPress is properly locked down on your server, you are often unable to automatically update the plugins or themes on your site. The problems comes in when WordPress looks to see if it is able to write to the &#8230; <a href="http://technology.mattrude.com/2013/01/wordpress-auto-updating-plugins-themes/">Continue reading <span class="meta-nav">&#8594;</span></a><a href="http://technology.mattrude.com/2013/01/wordpress-auto-updating-plugins-themes/">WordPress: Allow Auto Updating</a> is a post from; <a href="http://technology.mattrude.com/">Matt&#039;s Technology Blog</a> which is not allowed to be copied on other sites.]]></description>
				<content:encoded><![CDATA[<p>When WordPress is properly locked down on your server, you are often unable to automatically update the plugins or themes on your site. The problems comes in when WordPress looks to see if it is able to write to the file system. Since it can&#8217;t modify it&#8217;s own files, it requests access to the FTP server running on your web-server. My sites NEVER have a FTP server running on them for simple security reasons, so updating via FTP is not an option.</p>
<p>Each of my sites are locked down with the below commands. The first line modifies the file system to allow only the <em>Owner</em> &amp; <em>Group</em> to have modify access to each file or directory. All other users only have read access. The second line changes all files and directories so to be owned by root and the root group. The 3rd line grants <em>owner</em> and <em>group</em> permissions to the user <em>www-data</em>; the <a title="Ubuntu" href="http://www.ubuntu.com/" target="_blank">Ubuntu</a> default webserver user.</p>
<pre>chmod -R ug=rwX,o=rX
chown -R root:root /var/www/example.com
chown -R www-data:www-data /var/www/example.com/wp-content/plugins \
/var/www/example.com/wp-content/themes /var/www/example.com/wp-content/upgrade \
/var/www/example.com/wp-content/uploads</pre>
<p>So now that your site is locked down, you can&#8217;t update the plugins or themes, well; that&#8217;s where this next part comes in.</p>
<div id="attachment_5809" class="wp-caption aligncenter" style="width: 540px"><img class="size-full wp-image-5809 " title="Error message when trying to update" alt="auto-update-fail" src="http://technology.mattrude.com/wp-content/uploads/sites/2/2013/01/auto-update-fail.png" width="530" height="383" /><p class="wp-caption-text">This is the error you will receive if your site is properly locked down, when you try to update a plugin or theme.</p></div>
<p>If you add the below lines to your wp-config.php file, it will tell WordPress to ignore checking it&#8217;s files to see if they are modifiable, and to just try updating the plugin or theme. This will allow you to update a plugin or theme by using the auto update method build directly into WordPress.</p>
<p>Add the following to your <strong>wp-config.php</strong> file, just above the <code>/* That's all, stop editing! Happy blogging. */</code> line.</p>
<pre>// Allow auto updating
define('FS_METHOD', 'direct');</pre>
<p>This change will not allow you to update WordPress Core as the webserver still dose not have access to modify the core files. I suggest you update via SVN or GIT on a nightly bases to ensure you always have the latest version of WordPress running.</p>
<a href="http://technology.mattrude.com/2013/01/wordpress-auto-updating-plugins-themes/">WordPress: Allow Auto Updating</a> is a post from; <a href="http://technology.mattrude.com/">Matt&#039;s Technology Blog</a> which is not allowed to be copied on other sites.]]></content:encoded>
			<wfw:commentRss>http://technology.mattrude.com/2013/01/wordpress-auto-updating-plugins-themes/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Nginx Status Graphs</title>
		<link>http://technology.mattrude.com/2012/12/nginx-status-graphs/</link>
		<comments>http://technology.mattrude.com/2012/12/nginx-status-graphs/#comments</comments>
		<pubDate>Sun, 23 Dec 2012 07:16:30 +0000</pubDate>
		<dc:creator>Matt Rude</dc:creator>
				<category><![CDATA[Perl]]></category>
		<category><![CDATA[graph]]></category>
		<category><![CDATA[Nginx]]></category>
		<category><![CDATA[perl]]></category>
		<category><![CDATA[rrdtools]]></category>
		<category><![CDATA[Ubuntu]]></category>

		<guid isPermaLink="false">http://technology.mattrude.com/?p=5763</guid>
		<description><![CDATA[Below is a simple script to build RRDtool. This script will only update the rrd databases and create graphs, but it will not the actually html site. This script expect to be put in your systems cron config set for &#8230; <a href="http://technology.mattrude.com/2012/12/nginx-status-graphs/">Continue reading <span class="meta-nav">&#8594;</span></a><a href="http://technology.mattrude.com/2012/12/nginx-status-graphs/">Nginx Status Graphs</a> is a post from; <a href="http://technology.mattrude.com/">Matt&#039;s Technology Blog</a> which is not allowed to be copied on other sites.]]></description>
				<content:encoded><![CDATA[<p>Below is a simple script to build <a title="RRDtools" href="http://oss.oetiker.ch/rrdtool/" target="_blank">RRDtool</a>. This script will only update the rrd databases and create graphs, but it will not the actually html site.</p>
<p>This script expect to be put in your systems cron config set for once a minute.</p>
<pre>*/01 * * * * perl /var/www/status.example.com/rrd_nginx.pl</pre>
<pre class="brush: perl; title: ; notranslate">#!/usr/bin/perl
use RRDs;
use LWP::UserAgent;
 
# define location of rrdtool databases
my $rrd = '/var/www/status.example.com/rrd';
# define location of images
my $img = '/var/www/status.example.com/images';
# define your nginx stats URL
my $URL = &quot;http://127.0.0.1/nginx_status&quot;;
 
my $HOST = &quot;milly&quot;;
 
my $ua = LWP::UserAgent-&gt;new(timeout =&gt; 30);
my $response = $ua-&gt;request(HTTP::Request-&gt;new('GET', $URL));
 
my $requests = 0;
my $total =  0;
my $reading = 0;
my $writing = 0;
my $waiting = 0;
 
foreach (split(/\n/, $response-&gt;content)) {
  $total = $1 if (/^Active connections:\s+(\d+)/);
  if ( /^Reading:\s+(\d+).*Writing:\s+(\d+).*Waiting:\s+(\d+)/ ) {
    $reading = $1;
    $writing = $2;
    $waiting = $3;
  }
  $requests = $3 if (/^\s+(\d+)\s+(\d+)\s+(\d+)/);
}
 
# if rrdtool database doesn't exist, create it
if (! -e &quot;$rrd/nginx-$HOST.rrd&quot;) {
  RRDs::create &quot;$rrd/nginx-$HOST.rrd&quot;,
    &quot;-s 60&quot;,
  &quot;DS:requests:COUNTER:90:0:60000&quot;,
	&quot;DS:total:ABSOLUTE:90:0:10000&quot;,
	&quot;DS:reading:ABSOLUTE:90:0:10000&quot;,
	&quot;DS:writing:ABSOLUTE:90:0:10000&quot;,
	&quot;DS:waiting:ABSOLUTE:90:0:10000&quot;,
	&quot;RRA:AVERAGE:0.5:1:1440&quot;,
	&quot;RRA:AVERAGE:0.5:5:288&quot;,
	&quot;RRA:AVERAGE:0.5:30:672&quot;,
	&quot;RRA:AVERAGE:0.5:120:732&quot;,
	&quot;RRA:AVERAGE:0.5:720:1460&quot;;
}
 
# insert values into rrd database
RRDs::update &quot;$rrd/nginx-$HOST.rrd&quot;,
  &quot;-t&quot;, &quot;requests:total:reading:writing:waiting&quot;,
  &quot;N:$requests:$total:$reading:$writing:$waiting&quot;;
 
# Generate graphs
CreateGraphs(&quot;hour&quot;);
CreateGraphs(&quot;day&quot;);
CreateGraphs(&quot;week&quot;);
CreateGraphs(&quot;month&quot;);
CreateGraphs(&quot;year&quot;);
 
#------------------------------------------------------------------------------
sub CreateGraphs($){
  my $period = shift;
  
  RRDs::graph &quot;$img/requests-$HOST-$period.png&quot;,
		&quot;-s -1$period&quot;,
		&quot;-t HTTP requests on nginx server $HOST.mattrude.com for the last $period&quot;,
		&quot;--lazy&quot;,
		&quot;-h&quot;, &quot;150&quot;, &quot;-w&quot;, &quot;700&quot;,
		&quot;-l 0&quot;,
		&quot;-a&quot;, &quot;PNG&quot;,
		&quot;-v requests/minute&quot;,
		&quot;DEF:requests=$rrd/nginx-$HOST.rrd:requests:AVERAGE&quot;,
        &quot;CDEF:request=requests,60,*&quot;,
		&quot;LINE2:request#336600:Requests&quot;,
        &quot;GPRINT:request:LAST:   Current\\: %5.1lf %s&quot;,
        &quot;GPRINT:request:MIN:  Min\\: %5.1lf %s&quot;,
        &quot;GPRINT:request:AVERAGE: Avg\\: %5.1lf %s&quot;,
        &quot;GPRINT:request:MAX:  Max\\: %5.1lf %s\\n&quot;,
 
		&quot;HRULE:0#000000&quot;;
  if ($ERROR = RRDs::error) { 
    print &quot;$0: unable to generate $period graph: $ERROR\n&quot;; 
  }
 
  RRDs::graph &quot;$img/connections-$HOST-$period.png&quot;,
		&quot;-s -1$period&quot;,
		&quot;-t HTTP requests on nginx server $HOST.mattrude.com for the last $period&quot;,
		&quot;--lazy&quot;,
		&quot;-h&quot;, &quot;150&quot;, &quot;-w&quot;, &quot;700&quot;,
		&quot;-l 0&quot;,
		&quot;-a&quot;, &quot;PNG&quot;,
		&quot;-v requests/minute&quot;,
		&quot;DEF:total=$rrd/nginx-$HOST.rrd:total:AVERAGE&quot;,
		&quot;DEF:reading=$rrd/nginx-$HOST.rrd:reading:AVERAGE&quot;,
		&quot;DEF:writing=$rrd/nginx-$HOST.rrd:writing:AVERAGE&quot;,
		&quot;DEF:waiting=$rrd/nginx-$HOST.rrd:waiting:AVERAGE&quot;,
        &quot;CDEF:totals=total,60,*&quot;,
        &quot;CDEF:readings=reading,60,*&quot;,
        &quot;CDEF:writings=writing,60,*&quot;,
        &quot;CDEF:waitings=waiting,60,*&quot;,
 
		&quot;LINE2:totals#336600:Total&quot;,
		&quot;GPRINT:totals:LAST:   Current\\: %5.1lf %S&quot;,
		&quot;GPRINT:totals:MIN:  Min\\: %5.1lf %S&quot;,
		&quot;GPRINT:totals:AVERAGE: Avg\\: %5.1lf %S&quot;,
		&quot;GPRINT:totals:MAX:  Max\\: %5.1lf %S\\n&quot;,
		
		&quot;LINE2:readings#0022FF:Reading&quot;,
		&quot;GPRINT:readings:LAST: Current\\: %5.1lf %S&quot;,
		&quot;GPRINT:readings:MIN:  Min\\: %5.1lf %S&quot;,
		&quot;GPRINT:readings:AVERAGE: Avg\\: %5.1lf %S&quot;,
		&quot;GPRINT:readings:MAX:  Max\\: %5.1lf %S\\n&quot;,
		
		&quot;LINE2:writings#FF0000:Writing&quot;,
		&quot;GPRINT:writings:LAST: Current\\: %5.1lf %S&quot;,
		&quot;GPRINT:writings:MIN:  Min\\: %5.1lf %S&quot;,
		&quot;GPRINT:writings:AVERAGE: Avg\\: %5.1lf %S&quot;,
		&quot;GPRINT:writings:MAX:  Max\\: %5.1lf %S\\n&quot;,
		
		&quot;LINE2:waitings#00AAAA:Waiting&quot;,
		&quot;GPRINT:waitings:LAST: Current\\: %5.1lf %S&quot;,
		&quot;GPRINT:waitings:MIN:  Min\\: %5.1lf %S&quot;,
		&quot;GPRINT:waitings:AVERAGE: Avg\\: %5.1lf %S&quot;,
		&quot;GPRINT:waitings:MAX:  Max\\: %5.1lf %S\\n&quot;,
 
		&quot;HRULE:0#000000&quot;;
  if ($ERROR = RRDs::error) { 
    print &quot;$0: unable to generate $period graph: $ERROR\n&quot;; 
  }
}</pre>
<p>Or via github: <a href="https://gist.github.com/mattrude/4362399" target="_blank">https://gist.github.com/4362399</a></p>
<a href="http://technology.mattrude.com/2012/12/nginx-status-graphs/">Nginx Status Graphs</a> is a post from; <a href="http://technology.mattrude.com/">Matt&#039;s Technology Blog</a> which is not allowed to be copied on other sites.]]></content:encoded>
			<wfw:commentRss>http://technology.mattrude.com/2012/12/nginx-status-graphs/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Disable Console Power Save on Ubuntu</title>
		<link>http://technology.mattrude.com/2012/09/disable-console-power-save-on-ubuntu/</link>
		<comments>http://technology.mattrude.com/2012/09/disable-console-power-save-on-ubuntu/#comments</comments>
		<pubDate>Sun, 16 Sep 2012 21:09:33 +0000</pubDate>
		<dc:creator>Matt Rude</dc:creator>
				<category><![CDATA[How-To's]]></category>
		<category><![CDATA[Ubuntu]]></category>
		<category><![CDATA[Console]]></category>
		<category><![CDATA[powersave]]></category>

		<guid isPermaLink="false">http://technology.mattrude.com/?p=5632</guid>
		<description><![CDATA[By default Ubuntu console turns off after about 15 minutes of no keyboard commands, regardless of what may be, being displayed at the time. Often it is useful to disable this &#8216;feature&#8217; on production servers to better monitor the activities &#8230; <a href="http://technology.mattrude.com/2012/09/disable-console-power-save-on-ubuntu/">Continue reading <span class="meta-nav">&#8594;</span></a><a href="http://technology.mattrude.com/2012/09/disable-console-power-save-on-ubuntu/">Disable Console Power Save on Ubuntu</a> is a post from; <a href="http://technology.mattrude.com/">Matt&#039;s Technology Blog</a> which is not allowed to be copied on other sites.]]></description>
				<content:encoded><![CDATA[<p>By default Ubuntu console turns off after about 15 minutes of no keyboard commands, regardless of what may be, being displayed at the time.  Often it is useful to disable this &#8216;feature&#8217; on production servers to better monitor the activities being sent to the console, such as errors and logs.</p>
<p>There are two methods of doing this, either per session, or for the whole system.</p>
<p>To disable it for only the current session log in as root run the following command:</p>
<pre>setterm -powersave off -blank 0</pre>
<p>To disable console blacking for all session on this server and to retain this change after reboot, you will need to start by installing the <code>console-tools</code> packet:</p>
<pre>apt-get install console-tools</pre>
<p>After you have the <code>console-tools</code> packet installed. To stop the screen blanking both the screen saver (<code>BLANK_TIME</code>) and the power management standby (<code>POWERDOWN_TIME</code>) settings need to be disabled. If these two settings are set to zero (0) in the file <code>/etc/console-tools/config</code> the features will be completely disabled.</p>
<p>Alternatively a local settings file called <code>/etc/console-tools/config.d/disable-blank-console</code> can be created containing the following two lines to achieve the same affect.</p>
<pre>POWERDOWN_TIME=0
BLANK_TIME=0</pre>
<p>Actually you can name the file anything you want so long as the name consists of only upper/lower case letters, numbers, underscores, and hyphens.</p>
<a href="http://technology.mattrude.com/2012/09/disable-console-power-save-on-ubuntu/">Disable Console Power Save on Ubuntu</a> is a post from; <a href="http://technology.mattrude.com/">Matt&#039;s Technology Blog</a> which is not allowed to be copied on other sites.]]></content:encoded>
			<wfw:commentRss>http://technology.mattrude.com/2012/09/disable-console-power-save-on-ubuntu/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Rackspace Cloud Backup on Ubuntu</title>
		<link>http://technology.mattrude.com/2012/08/rackspace-cloud-backup-on-ubuntu/</link>
		<comments>http://technology.mattrude.com/2012/08/rackspace-cloud-backup-on-ubuntu/#comments</comments>
		<pubDate>Tue, 14 Aug 2012 23:18:15 +0000</pubDate>
		<dc:creator>Matt Rude</dc:creator>
				<category><![CDATA[How-To's]]></category>
		<category><![CDATA[Ubuntu]]></category>
		<category><![CDATA[Backup]]></category>
		<category><![CDATA[Cloud computing]]></category>
		<category><![CDATA[Rackspace]]></category>
		<category><![CDATA[Rackspace Cloud]]></category>
		<category><![CDATA[Rackspace Cloud Files]]></category>

		<guid isPermaLink="false">http://technology.mattrude.com/?p=5640</guid>
		<description><![CDATA[Rackspace recently released their Cloud Backup to their normal user base. This service will store your files on Racksapce&#8217;s cloud file service.  You will need to install drivecloud app on your server before running your backups. To install the software, &#8230; <a href="http://technology.mattrude.com/2012/08/rackspace-cloud-backup-on-ubuntu/">Continue reading <span class="meta-nav">&#8594;</span></a><a href="http://technology.mattrude.com/2012/08/rackspace-cloud-backup-on-ubuntu/">Rackspace Cloud Backup on Ubuntu</a> is a post from; <a href="http://technology.mattrude.com/">Matt&#039;s Technology Blog</a> which is not allowed to be copied on other sites.]]></description>
				<content:encoded><![CDATA[<p>Rackspace recently released their Cloud Backup to their normal user base.</p>
<p>This service will store your files on Racksapce&#8217;s cloud file service.  You will need to install drivecloud app on your server before running your backups.</p>
<p>To install the software, run:</p>
<pre>sh -c 'wget -q "http://agentrepo.drivesrvr.com/debian/agentrepo.key" -O- | apt-key add -'
sh -c 'echo "deb [arch=amd64] http://agentrepo.drivesrvr.com/debian/ serveragent main" &gt; /etc/apt/sources.list.d/driveclient.list'
apt-get update; apt-get install driveclient</pre>
<p>You will need your username and API key to complete this step. To locate your API key, click the arrow next to your user name (at the top right of the Control Panel) and select API Keys. On the &#8220;API Access&#8221; page, click the Show Key button. Then, copy it to your clipboard.</p>
<p><em>Tip: This step will ask you to confirm that you want to overwrite your config file. Answer <strong>yes</strong>.</em></p>
<pre>driveclient --configure</pre>
<p>Start the Agent:</p>
<pre>service driveclient start
update-rc.d driveclient defaults</pre>
<p>After you have started the agent, go back to the <a href="https://mycloud.rackspace.com/accounts/?message=SESSION_EXPIRED" target="_blank">Rackspace Backup Admin</a> page to finish configuring your new setup.</p>
<a href="http://technology.mattrude.com/2012/08/rackspace-cloud-backup-on-ubuntu/">Rackspace Cloud Backup on Ubuntu</a> is a post from; <a href="http://technology.mattrude.com/">Matt&#039;s Technology Blog</a> which is not allowed to be copied on other sites.]]></content:encoded>
			<wfw:commentRss>http://technology.mattrude.com/2012/08/rackspace-cloud-backup-on-ubuntu/feed/</wfw:commentRss>
		<slash:comments>4</slash:comments>
		</item>
		<item>
		<title>The Right Way to Include a Plugin in a WordPress Theme : alexking.org</title>
		<link>http://technology.mattrude.com/2012/07/the-right-way-to-include-a-plugin-in-a-wordpress-theme-alexking-org/</link>
		<comments>http://technology.mattrude.com/2012/07/the-right-way-to-include-a-plugin-in-a-wordpress-theme-alexking-org/#comments</comments>
		<pubDate>Mon, 09 Jul 2012 16:18:08 +0000</pubDate>
		<dc:creator>Matt Rude</dc:creator>
				<category><![CDATA[How-To's]]></category>
		<category><![CDATA[alexking]]></category>
		<category><![CDATA[Plugin]]></category>
		<category><![CDATA[Theme]]></category>
		<category><![CDATA[WordPress Plugin]]></category>

		<guid isPermaLink="false">http://technology.mattrude.com/?p=5584</guid>
		<description><![CDATA[The Right Way to Include a Plugin in a WordPress Theme : alexking.org. Here&#8217;s the clean/correct way to add a plugin to your theme. The Right Way to Include a Plugin in a WordPress Theme : alexking.org is a post &#8230; <a href="http://technology.mattrude.com/2012/07/the-right-way-to-include-a-plugin-in-a-wordpress-theme-alexking-org/">Continue reading <span class="meta-nav">&#8594;</span></a><a href="http://technology.mattrude.com/2012/07/the-right-way-to-include-a-plugin-in-a-wordpress-theme-alexking-org/">The Right Way to Include a Plugin in a WordPress Theme : alexking.org</a> is a post from; <a href="http://technology.mattrude.com/">Matt&#039;s Technology Blog</a> which is not allowed to be copied on other sites.]]></description>
				<content:encoded><![CDATA[<p><a href="http://alexking.org/blog/2012/07/09/include-plugin-in-wordpress-theme">The Right Way to Include a Plugin in a WordPress Theme : alexking.org</a>.</p>
<p>Here&#8217;s the clean/correct way to add a plugin to your theme.</p>
<a href="http://technology.mattrude.com/2012/07/the-right-way-to-include-a-plugin-in-a-wordpress-theme-alexking-org/">The Right Way to Include a Plugin in a WordPress Theme : alexking.org</a> is a post from; <a href="http://technology.mattrude.com/">Matt&#039;s Technology Blog</a> which is not allowed to be copied on other sites.]]></content:encoded>
			<wfw:commentRss>http://technology.mattrude.com/2012/07/the-right-way-to-include-a-plugin-in-a-wordpress-theme-alexking-org/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>cgit Installed on a Ubuntu Nginx Server</title>
		<link>http://technology.mattrude.com/2012/07/cgit-installed-on-a-ubuntu-nginx-server/</link>
		<comments>http://technology.mattrude.com/2012/07/cgit-installed-on-a-ubuntu-nginx-server/#comments</comments>
		<pubDate>Mon, 09 Jul 2012 12:36:18 +0000</pubDate>
		<dc:creator>Matt Rude</dc:creator>
				<category><![CDATA[How-To's]]></category>
		<category><![CDATA[Apache]]></category>
		<category><![CDATA[Apache HTTP Server]]></category>
		<category><![CDATA[cgi script]]></category>
		<category><![CDATA[cgit]]></category>
		<category><![CDATA[Nginx]]></category>
		<category><![CDATA[spawn-fcgi]]></category>
		<category><![CDATA[Ubuntu]]></category>

		<guid isPermaLink="false">http://technology.mattrude.com/?p=5329</guid>
		<description><![CDATA[Installing spawn-fcgi To start out with, we need to install the Nginx and the other dependencies. apt-get install nginx fcgiwrap git Ok, here we go, lets start out by creating a place to play with source, I always build in &#8230; <a href="http://technology.mattrude.com/2012/07/cgit-installed-on-a-ubuntu-nginx-server/">Continue reading <span class="meta-nav">&#8594;</span></a><a href="http://technology.mattrude.com/2012/07/cgit-installed-on-a-ubuntu-nginx-server/">cgit Installed on a Ubuntu Nginx Server</a> is a post from; <a href="http://technology.mattrude.com/">Matt&#039;s Technology Blog</a> which is not allowed to be copied on other sites.]]></description>
				<content:encoded><![CDATA[<h2 id="section-1">Installing spawn-fcgi</h2>
<p>To start out with, we need to install the Nginx and the other dependencies.</p>
<pre>apt-get install nginx fcgiwrap git</pre>
<p>Ok, here we go, lets start out by creating a place to play with source, I always build in <em>/var/src/</em> but your welcome to do this anywhere you wish.</p>
<p><strong>/etc/sysconfig/spawn-fcgi:</strong></p>
<pre>
FCGI_SOCKET=/var/run/fcgiwrap.socket
FCGI_PROGRAM=/usr/local/sbin/fcgiwrap
FCGI_USER=nginx
FCGI_GROUP=nginx
FCGI_EXTRA_OPTIONS="-M 0700"
OPTIONS="-u $FCGI_USER -g $FCGI_GROUP -s $FCGI_SOCKET -S $FCGI_EXTRA_OPTIONS -F 1 -P /var/run/spawn-fcgi.pid -- $FCGI_PROGRAM"
</pre>
<h3 id="section-2">Configuring Nginx</h3>
<pre>
server {
    listen 80;
    server_name code.example.com;
    root /var/www/code.example.com;

    fastcgi_param    DOCUMENT_ROOT    /var/www/code.example.com;

    rewrite ^/secure/ https://code.example.com$request_uri permanent;

    location /cgit.css { expires 180d; }
    location /code-logo.png { expires 180d; }
    location /robots.txt { expires 180d; }

    # Serve static files
    location ~* ^.+.(css|png|ico)$ {
        root /var/www/code.example.com;
        expires 30d;
    }

    location / {
        #rewrite ^/([^?/]+/[^?]*)?(?:?(.*))?$ /cgit?url=$1&amp;$2 last;
        include         "fastcgi_params";
        fastcgi_pass    unix:/var/run/spawn-fcgi.socket;
        fastcgi_index   /;
        fastcgi_param   SCRIPT_FILENAME /var/www/code.example.com/cgit.cgi;
        fastcgi_param   PATH_INFO       $uri;
        fastcgi_param   QUERY_STRING    $args;
    }
}
</pre>
<a href="http://technology.mattrude.com/2012/07/cgit-installed-on-a-ubuntu-nginx-server/">cgit Installed on a Ubuntu Nginx Server</a> is a post from; <a href="http://technology.mattrude.com/">Matt&#039;s Technology Blog</a> which is not allowed to be copied on other sites.]]></content:encoded>
			<wfw:commentRss>http://technology.mattrude.com/2012/07/cgit-installed-on-a-ubuntu-nginx-server/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Using the Git Stash command</title>
		<link>http://technology.mattrude.com/2012/07/using-the-git-stash-command/</link>
		<comments>http://technology.mattrude.com/2012/07/using-the-git-stash-command/#comments</comments>
		<pubDate>Mon, 09 Jul 2012 02:16:02 +0000</pubDate>
		<dc:creator>Matt Rude</dc:creator>
				<category><![CDATA[How-To's]]></category>
		<category><![CDATA[Fedora]]></category>
		<category><![CDATA[Git]]></category>
		<category><![CDATA[How-To]]></category>
		<category><![CDATA[Ubuntu]]></category>

		<guid isPermaLink="false">http://technology.mattrude.com/?p=5493</guid>
		<description><![CDATA[The git stash command is used to store changes to a dirty git tree when pulling changes[ref]http://man.github.com/git/git-stash.html[/ref]. For example, if you are working on a repository, but are not ready to commit your changes, you may run. git stash This &#8230; <a href="http://technology.mattrude.com/2012/07/using-the-git-stash-command/">Continue reading <span class="meta-nav">&#8594;</span></a><a href="http://technology.mattrude.com/2012/07/using-the-git-stash-command/">Using the Git Stash command</a> is a post from; <a href="http://technology.mattrude.com/">Matt&#039;s Technology Blog</a> which is not allowed to be copied on other sites.]]></description>
				<content:encoded><![CDATA[<p>The git stash command is used to store changes to a dirty git tree when pulling changes[ref]<a href="http://man.github.com/git/git-stash.html" target="_blank">http://man.github.com/git/git-stash.html</a>[/ref].</p>
<p>For example, if you are working on a repository, but are not ready to commit your changes, you may run.</p>
<pre>git stash</pre>
<p>This will store the changes you have made since the last revision and allow you to start back fresh at the point of your last commit.</p>
<p>Once you are done, you may run</p>
<pre>git stash pip</pre>
<p>That will restore your repository back to where you were when you ran <code>git stash</code>.</p>
<a href="http://technology.mattrude.com/2012/07/using-the-git-stash-command/">Using the Git Stash command</a> is a post from; <a href="http://technology.mattrude.com/">Matt&#039;s Technology Blog</a> which is not allowed to be copied on other sites.]]></content:encoded>
			<wfw:commentRss>http://technology.mattrude.com/2012/07/using-the-git-stash-command/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>pingdom site status</title>
		<link>http://technology.mattrude.com/2012/07/pingdom-site-status/</link>
		<comments>http://technology.mattrude.com/2012/07/pingdom-site-status/#comments</comments>
		<pubDate>Mon, 02 Jul 2012 01:11:03 +0000</pubDate>
		<dc:creator>Matt Rude</dc:creator>
				<category><![CDATA[General]]></category>
		<category><![CDATA[network status]]></category>
		<category><![CDATA[pingdom]]></category>
		<category><![CDATA[stats]]></category>
		<category><![CDATA[status]]></category>

		<guid isPermaLink="false">http://technology.mattrude.com/?p=5557</guid>
		<description><![CDATA[Today I signed up for pingdom.com. Pingdom.com will continuously ping your site to confirm your site is up and will notify you when there is an outage.  They also give nice status of current speed and other useful information. They &#8230; <a href="http://technology.mattrude.com/2012/07/pingdom-site-status/">Continue reading <span class="meta-nav">&#8594;</span></a><a href="http://technology.mattrude.com/2012/07/pingdom-site-status/">pingdom site status</a> is a post from; <a href="http://technology.mattrude.com/">Matt&#039;s Technology Blog</a> which is not allowed to be copied on other sites.]]></description>
				<content:encoded><![CDATA[<p>Today I signed up for <a href="https://www.pingdom.com/" target="_blank">pingdom.com</a>. Pingdom.com will continuously ping your site to confirm your site is up and will notify you when there is an outage.  They also give nice status of current speed and other useful information.</p>
<p>They also provide a public status page, see mine at <a href="http://status.mattrude.com" target="_blank">status.mattrude.com</a> for this site.</p>
<div style='float: right'><a href="http://status.mattrude.com/596426"><img src="http://share.pingdom.com/banners/9b8dc669" alt="Response time Report for Website - technology.mattrude.com: Last 30 days" title="Response time Report for Website - technology.mattrude.com: Last 30 days" width="300" height="165" /></a>
</div>
<div style='float: left'>
<a href="http://status.mattrude.com/596426"><img src="http://share.pingdom.com/banners/d6b471a3" alt="Uptime Report for Website - technology.mattrude.com: Last 30 days" title="Uptime Report for Website - technology.mattrude.com: Last 30 days" width="300" height="165" /></a>
</div>
<a href="http://technology.mattrude.com/2012/07/pingdom-site-status/">pingdom site status</a> is a post from; <a href="http://technology.mattrude.com/">Matt&#039;s Technology Blog</a> which is not allowed to be copied on other sites.]]></content:encoded>
			<wfw:commentRss>http://technology.mattrude.com/2012/07/pingdom-site-status/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Git: Add all remote branches</title>
		<link>http://technology.mattrude.com/2012/05/git-add-all-branches/</link>
		<comments>http://technology.mattrude.com/2012/05/git-add-all-branches/#comments</comments>
		<pubDate>Mon, 21 May 2012 05:56:51 +0000</pubDate>
		<dc:creator>Matt Rude</dc:creator>
				<category><![CDATA[General]]></category>
		<category><![CDATA[Fedora]]></category>
		<category><![CDATA[Git]]></category>

		<guid isPermaLink="false">http://technology.mattrude.com/?p=5472</guid>
		<description><![CDATA[Adding each remote branch to a local git repository sometimes can be a pain. IF there are many, you have to repeat your self over and over. Here is a quick, copy and past drop into you console, way to &#8230; <a href="http://technology.mattrude.com/2012/05/git-add-all-branches/">Continue reading <span class="meta-nav">&#8594;</span></a><a href="http://technology.mattrude.com/2012/05/git-add-all-branches/">Git: Add all remote branches</a> is a post from; <a href="http://technology.mattrude.com/">Matt&#039;s Technology Blog</a> which is not allowed to be copied on other sites.]]></description>
				<content:encoded><![CDATA[<p>Adding each remote branch to a local git repository sometimes can be a pain.  IF there are many, you have to repeat your self over and over.  Here is a quick, copy and past drop into you console, way to add all the remote branches to your local repository.</p>
<pre>for b in `git remote show origin |grep tracked |awk '{print $1}'`
do
    LOCALBRANCH=`git branch |sed 's/* //g' |sed 's/  //g' |grep $b`
    if [ "$LOCALBRANCH" != "$b" ]; then
        git branch -t $b origin/$b
    fi
done</pre>
<p>Once your done, you should still be in your original branch were you started.  You will still need to update each branch by it self. You may also use something like <a href="https://github.com/aanand/git-up" target="_blank">git-up</a> to update all the branches at once.</p>
<a href="http://technology.mattrude.com/2012/05/git-add-all-branches/">Git: Add all remote branches</a> is a post from; <a href="http://technology.mattrude.com/">Matt&#039;s Technology Blog</a> which is not allowed to be copied on other sites.]]></content:encoded>
			<wfw:commentRss>http://technology.mattrude.com/2012/05/git-add-all-branches/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>WordPress:  Add footer text to feed posts</title>
		<link>http://technology.mattrude.com/2012/05/wordpress-add-footer-text-to-feed-posts/</link>
		<comments>http://technology.mattrude.com/2012/05/wordpress-add-footer-text-to-feed-posts/#comments</comments>
		<pubDate>Fri, 18 May 2012 15:15:47 +0000</pubDate>
		<dc:creator>Matt Rude</dc:creator>
				<category><![CDATA[How-To's]]></category>
		<category><![CDATA[RSS]]></category>
		<category><![CDATA[WordPress]]></category>

		<guid isPermaLink="false">http://technology.mattrude.com/?p=5460</guid>
		<description><![CDATA[Here&#8217;s a small code snippet for adding text to the bottom of each post in your rss feed. This will not affect the post content shown on your site. The below should be added to your themes function.php file. /******************************************************************************** &#8230; <a href="http://technology.mattrude.com/2012/05/wordpress-add-footer-text-to-feed-posts/">Continue reading <span class="meta-nav">&#8594;</span></a><a href="http://technology.mattrude.com/2012/05/wordpress-add-footer-text-to-feed-posts/">WordPress:  Add footer text to feed posts</a> is a post from; <a href="http://technology.mattrude.com/">Matt&#039;s Technology Blog</a> which is not allowed to be copied on other sites.]]></description>
				<content:encoded><![CDATA[<p>Here&#8217;s a small code snippet for adding text to the bottom of each post in your <a href="http://en.wikipedia.org/wiki/RSS">rss</a> feed.  This will not affect the post content shown on your site.</p>
<p>The below should be added to your themes <code>function.php</code> file.</p>
<pre>
/********************************************************************************
* Add Footer to RSS feed
*/

function mdr_postrss($content) {
    if(is_feed()){
        $site_name = get_bloginfo_rss('name');
        $post_title = get_the_title_rss();
        $home_url = home_url('/');
        $post_url = post_permalink();
        $content = $content.'&lt;a href="'.$post_url.'"&gt;'.$post_title.'&lt;/a&gt; is a post from: 
&lt;a href="'.$home_url.'"&gt;'.$site_name.'&lt;/a&gt; which is not allowed to be copied on other sites.';
    }
    return $content;
}
add_filter('the_excerpt_rss', 'mdr_postrss');
add_filter('the_content', 'mdr_postrss');
</pre>
<p>Or may be found on <a href="https://gist.github.com/mattrude/2758927" target="_blank">github</a>.</p>
<a href="http://technology.mattrude.com/2012/05/wordpress-add-footer-text-to-feed-posts/">WordPress:  Add footer text to feed posts</a> is a post from; <a href="http://technology.mattrude.com/">Matt&#039;s Technology Blog</a> which is not allowed to be copied on other sites.]]></content:encoded>
			<wfw:commentRss>http://technology.mattrude.com/2012/05/wordpress-add-footer-text-to-feed-posts/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Git: Configuring native git commit emails</title>
		<link>http://technology.mattrude.com/2012/05/configuring-native-git-commit-emails/</link>
		<comments>http://technology.mattrude.com/2012/05/configuring-native-git-commit-emails/#comments</comments>
		<pubDate>Sun, 13 May 2012 19:20:21 +0000</pubDate>
		<dc:creator>Matt Rude</dc:creator>
				<category><![CDATA[How-To's]]></category>
		<category><![CDATA[email]]></category>
		<category><![CDATA[Git]]></category>
		<category><![CDATA[scripts]]></category>

		<guid isPermaLink="false">http://technology.mattrude.com/?p=5451</guid>
		<description><![CDATA[To start out, move the post-receive.sample script from your git hooks directory to just plain post-receive like so: mv post-receive.sample post-receive Then in your git config file add the below, below any existing configuration items. Note, you will need to &#8230; <a href="http://technology.mattrude.com/2012/05/configuring-native-git-commit-emails/">Continue reading <span class="meta-nav">&#8594;</span></a><a href="http://technology.mattrude.com/2012/05/configuring-native-git-commit-emails/">Git: Configuring native git commit emails</a> is a post from; <a href="http://technology.mattrude.com/">Matt&#039;s Technology Blog</a> which is not allowed to be copied on other sites.]]></description>
				<content:encoded><![CDATA[<p>To start out, move the <em>post-receive.sample</em> script from your git <em>hooks</em> directory to just plain <em>post-receive</em> like so:</p>
<pre>mv post-receive.sample post-receive</pre>
<p>Then in your git <em>config</em> file add the below, below any existing configuration items.  <em>Note, you will need to change the URL and repository name (currently named &#8220;git-repository&#8221;) before this will work.</em></p>
<pre>[hooks]
        mailinglist = email@example.com
        emailprefix = "git-repository: "
        showrev = "t=%s; printf 'https://example.com/secure/?p=git-repoistory;a=commitdiff;h=%%s' $t; echo;echo; git show -C $t; echo;"</pre>
<p>And there you go, when you now push to the repository, you will receive an email send to &#8220;mailinglist&#8221; with the changes made in a nice diff and a link back to your main git repository site.</p>
<a href="http://technology.mattrude.com/2012/05/configuring-native-git-commit-emails/">Git: Configuring native git commit emails</a> is a post from; <a href="http://technology.mattrude.com/">Matt&#039;s Technology Blog</a> which is not allowed to be copied on other sites.]]></content:encoded>
			<wfw:commentRss>http://technology.mattrude.com/2012/05/configuring-native-git-commit-emails/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>WordPress Correct File Permissions</title>
		<link>http://technology.mattrude.com/2012/04/wordpress-correct-file-permissions/</link>
		<comments>http://technology.mattrude.com/2012/04/wordpress-correct-file-permissions/#comments</comments>
		<pubDate>Mon, 16 Apr 2012 22:37:35 +0000</pubDate>
		<dc:creator>Matt Rude</dc:creator>
				<category><![CDATA[How-To's]]></category>
		<category><![CDATA[Apache]]></category>
		<category><![CDATA[Apache HTTP Server]]></category>
		<category><![CDATA[chmod]]></category>
		<category><![CDATA[Filesystem permissions]]></category>
		<category><![CDATA[Nginx]]></category>
		<category><![CDATA[Permissions]]></category>
		<category><![CDATA[WordPress]]></category>

		<guid isPermaLink="false">http://technology.mattrude.com/?p=5421</guid>
		<description><![CDATA[To lock down the permissions on your WordPress install, from inside the WordPress site directory, run the below commands. chown -R root:root . chown -R nginx:nginx wp-content wp-admin/update.php wp-admin/update-core.php wp-admin/network/update.php wp-admin/network/update-core.php Note, the above command assumes you are running under &#8230; <a href="http://technology.mattrude.com/2012/04/wordpress-correct-file-permissions/">Continue reading <span class="meta-nav">&#8594;</span></a><a href="http://technology.mattrude.com/2012/04/wordpress-correct-file-permissions/">WordPress Correct File Permissions</a> is a post from; <a href="http://technology.mattrude.com/">Matt&#039;s Technology Blog</a> which is not allowed to be copied on other sites.]]></description>
				<content:encoded><![CDATA[<p>To lock down the permissions on your WordPress install, from inside the WordPress site directory, run the below commands.</p>
<pre>chown -R root:root .
chown -R nginx:nginx wp-content wp-admin/update.php wp-admin/update-core.php 
wp-admin/network/update.php wp-admin/network/update-core.php</pre>
<p><small><em>Note, the above command assumes you are running under Nginx, if you are under Apache, please run the 2nd command replacing nginx with apache</em></small></p>
<p>The above command will change all the files in your WordPress root to the ROOT user, then change only the needed files back to user your web server is running as. This will allow you to update themes &amp; plugins, and will also let you upload images, but you will not be able to update WordPress without changing the owner/group back to nginx on your WordPress root.</p>
<a href="http://technology.mattrude.com/2012/04/wordpress-correct-file-permissions/">WordPress Correct File Permissions</a> is a post from; <a href="http://technology.mattrude.com/">Matt&#039;s Technology Blog</a> which is not allowed to be copied on other sites.]]></content:encoded>
			<wfw:commentRss>http://technology.mattrude.com/2012/04/wordpress-correct-file-permissions/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>GoDaddy SSL Certificate with Nginx</title>
		<link>http://technology.mattrude.com/2012/04/godaddy-ssl-certificate-with-nginx/</link>
		<comments>http://technology.mattrude.com/2012/04/godaddy-ssl-certificate-with-nginx/#comments</comments>
		<pubDate>Sun, 15 Apr 2012 01:00:41 +0000</pubDate>
		<dc:creator>Matt Rude</dc:creator>
				<category><![CDATA[How-To's]]></category>
		<category><![CDATA[Certificate authority]]></category>
		<category><![CDATA[GoDaddy]]></category>
		<category><![CDATA[Nginx]]></category>
		<category><![CDATA[Public key certificate]]></category>
		<category><![CDATA[Public-key cryptography]]></category>

		<guid isPermaLink="false">http://technology.mattrude.com/?p=5396</guid>
		<description><![CDATA[Installing a SSL certificate from Go Daddy is a bit different then other providers.  With Go Daddy you must install a intermediate or chain certificate addition to your CA certificate. Nginx does not have a option, how Apache dose, for &#8230; <a href="http://technology.mattrude.com/2012/04/godaddy-ssl-certificate-with-nginx/">Continue reading <span class="meta-nav">&#8594;</span></a><a href="http://technology.mattrude.com/2012/04/godaddy-ssl-certificate-with-nginx/">GoDaddy SSL Certificate with Nginx</a> is a post from; <a href="http://technology.mattrude.com/">Matt&#039;s Technology Blog</a> which is not allowed to be copied on other sites.]]></description>
				<content:encoded><![CDATA[<p>Installing a SSL certificate from Go Daddy is a bit different then other providers.  With Go Daddy you must install a intermediate or chain certificate addition to your CA certificate. Nginx does not have a option, how Apache dose, for chain certificates. So to accomplish this, we look to the Nginx documentation:</p>
<blockquote><p>If intermediate certificates should be specified in addition to a primary certificate, they should be specified in the same file in the following order: the primary certificate comes first, then the intermediate certificates.[ref]<a href="http://nginx.org/en/docs/http/ngx_http_ssl_module.html#directives" target="_blank">Nginx Module ngx_http_ssl_module</a>[/ref]</p></blockquote>
<p>What that means is this.  Download your CA from with your private certificate from Go Daddy.  Next download the <code>gd_bundle.crt</code> from <a href="https://certs.godaddy.com/anonymous/repository.pki" target="_blank">https://certs.godaddy.com/anonymous/repository.seam</a>.</p>
<p>After you have download the <code>gd_bundle.crt</code> file, copy it to the same directory on your Nginx server and run something similar to:</p>
<pre>cat godaddy-ca.crt &gt; godaddy-chain.crt &amp;&amp; cat gd_bundle.crt &gt;&gt; godaddy-chain.crt</pre>
<p>Now just add this new certificate to your nginx.conf per normal</p>
<pre>ssl_certificate godaddy-chain.crt</pre>
<a href="http://technology.mattrude.com/2012/04/godaddy-ssl-certificate-with-nginx/">GoDaddy SSL Certificate with Nginx</a> is a post from; <a href="http://technology.mattrude.com/">Matt&#039;s Technology Blog</a> which is not allowed to be copied on other sites.]]></content:encoded>
			<wfw:commentRss>http://technology.mattrude.com/2012/04/godaddy-ssl-certificate-with-nginx/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Trac Installed on a Nginx Server</title>
		<link>http://technology.mattrude.com/2012/04/trac-installed-on-a-nginx-server/</link>
		<comments>http://technology.mattrude.com/2012/04/trac-installed-on-a-nginx-server/#comments</comments>
		<pubDate>Sat, 14 Apr 2012 23:03:56 +0000</pubDate>
		<dc:creator>Matt Rude</dc:creator>
				<category><![CDATA[How-To's]]></category>
		<category><![CDATA[Apache]]></category>
		<category><![CDATA[Apache HTTP Server]]></category>
		<category><![CDATA[Nginx]]></category>
		<category><![CDATA[Python]]></category>
		<category><![CDATA[Trac]]></category>

		<guid isPermaLink="false">http://technology.mattrude.com/?p=5382</guid>
		<description><![CDATA[Over the last few weeks I have been converting all my different sites from Apache to Nginx. The nice part of this plan is as I move on from system to system, each change over get&#8217;s easier then the last. &#8230; <a href="http://technology.mattrude.com/2012/04/trac-installed-on-a-nginx-server/">Continue reading <span class="meta-nav">&#8594;</span></a><a href="http://technology.mattrude.com/2012/04/trac-installed-on-a-nginx-server/">Trac Installed on a Nginx Server</a> is a post from; <a href="http://technology.mattrude.com/">Matt&#039;s Technology Blog</a> which is not allowed to be copied on other sites.]]></description>
				<content:encoded><![CDATA[<p>Over the last few weeks I have been converting all my different sites from <a title="Apache" href="http://en.wikipedia.org/wiki/Apache" rel="wikipedia">Apache</a> to <a title="Nginx" href="http://nginx.org/" rel="homepage">Nginx</a>. The nice part of this plan is as I move on from system to system, each change over get&#8217;s easier then the last.</p>
<p>This how-to will walk you threw how to instal Trac on a Nginx server.  The plan here is to proxy your trac site back to <a title="Trac Stand alone Server" href="http://trac.edgewall.org/wiki/TracStandalone">tracd</a> running server.  Only proxy the files that are not real and can not be served by nginx alone.</p>
<p>To start out, install python and some python tools to your server</p>
<pre>yum -y install python python-genshi python-setuptools 
subversion python-setuptools-devel</pre>
<p>Now you need to download and install trac from svn</p>
<pre>svn checkout http://svn.edgewall.org/repos/trac/trunk/ trac
cd trac</pre>
<p>After you have the current version, compile and install trac</p>
<pre>python ./setup.py install</pre>
<p>This how-to assumes you already have a working trac profile to host on this site.  If you do not already have a trac profile, please look at <code>trac-admin /path/to/websites/directory initenv</code>.</p>
<p>After you have trac installed, you need to start it.</p>
<pre>export TRAC_ENV_INDEX_TEMPLATE=/var/www/trac/projects_list_template.html
/usr/bin/python /usr/bin/tracd -d -p 3050 
--auth=*,/var/www/trac.example.com/projects/.htpasswd,trac.example.com 
--protocol=http -e /var/www/trac.example.com/projects</pre>
<p>And here&#8217;s a simple example Nginx config for your new trac setup.</p>
<pre>
   # trac.example.com
   upstream trac.example.com {
       server 127.0.0.1:3050;
   }
   
   server {
       listen 80;
       server_name trac.example.com;
       root /var/www/trac.example.com;
       
       location /html/ { 
       	expires 180d;
       }
       
       location /favicon.ico { }
       location /robots.txt { }
       
       location / {
               proxy_pass        http://trac.example.com;
               proxy_set_header  X-Real-IP  $remote_addr;
       }
   }</pre>
<a href="http://technology.mattrude.com/2012/04/trac-installed-on-a-nginx-server/">Trac Installed on a Nginx Server</a> is a post from; <a href="http://technology.mattrude.com/">Matt&#039;s Technology Blog</a> which is not allowed to be copied on other sites.]]></content:encoded>
			<wfw:commentRss>http://technology.mattrude.com/2012/04/trac-installed-on-a-nginx-server/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Custom 404 errors pages in Nginx</title>
		<link>http://technology.mattrude.com/2012/03/custom-404-errors-pages-in-nginx/</link>
		<comments>http://technology.mattrude.com/2012/03/custom-404-errors-pages-in-nginx/#comments</comments>
		<pubDate>Thu, 29 Mar 2012 02:45:43 +0000</pubDate>
		<dc:creator>Matt Rude</dc:creator>
				<category><![CDATA[How-To's]]></category>
		<category><![CDATA[How-To]]></category>
		<category><![CDATA[Nginx]]></category>

		<guid isPermaLink="false">http://technology.mattrude.com/?p=5369</guid>
		<description><![CDATA[Here&#8217;s a quick how-to on creating a custom 404 error page on a Nginx server. To display a single page for a site, add the below to your server&#8217;s config. The below config assumes /404.html is in the root of &#8230; <a href="http://technology.mattrude.com/2012/03/custom-404-errors-pages-in-nginx/">Continue reading <span class="meta-nav">&#8594;</span></a><a href="http://technology.mattrude.com/2012/03/custom-404-errors-pages-in-nginx/">Custom 404 errors pages in Nginx</a> is a post from; <a href="http://technology.mattrude.com/">Matt&#039;s Technology Blog</a> which is not allowed to be copied on other sites.]]></description>
				<content:encoded><![CDATA[<p>Here&#8217;s a quick how-to on creating a custom 404 error page on a Nginx server.</p>
<p>To display a single page for a site, add the below to your server&#8217;s config.  The below config assumes <em>/404.html</em> is in the root of the current site.</p>
<pre>server {
    ...
    error_page 404 /404.html;
    ...
}</pre>
<p>The error page it self doesn&#8217;t have to be anything special, just a clear message for the user to know that this page dose not exist.</p>
<a href="http://technology.mattrude.com/2012/03/custom-404-errors-pages-in-nginx/">Custom 404 errors pages in Nginx</a> is a post from; <a href="http://technology.mattrude.com/">Matt&#039;s Technology Blog</a> which is not allowed to be copied on other sites.]]></content:encoded>
			<wfw:commentRss>http://technology.mattrude.com/2012/03/custom-404-errors-pages-in-nginx/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>shopathome.com</title>
		<link>http://technology.mattrude.com/2012/03/shopathome-com/</link>
		<comments>http://technology.mattrude.com/2012/03/shopathome-com/#comments</comments>
		<pubDate>Tue, 27 Mar 2012 13:32:40 +0000</pubDate>
		<dc:creator>Matt Rude</dc:creator>
				<category><![CDATA[Asides]]></category>
		<category><![CDATA[virus]]></category>

		<guid isPermaLink="false">http://technology.mattrude.com/?p=5365</guid>
		<description><![CDATA[The shopathome.com tool bar is about a half a step from being a virus. Stay far away from it. It seems to auto install on users systems and dose not have a clean/easy way for it to be removed. That &#8230; <a href="http://technology.mattrude.com/2012/03/shopathome-com/">Continue reading <span class="meta-nav">&#8594;</span></a><a href="http://technology.mattrude.com/2012/03/shopathome-com/">shopathome.com</a> is a post from; <a href="http://technology.mattrude.com/">Matt&#039;s Technology Blog</a> which is not allowed to be copied on other sites.]]></description>
				<content:encoded><![CDATA[<p>The shopathome.com tool bar is about a half a step from being a virus. Stay far away from it.  It seems to auto install on users systems and dose not have a clean/easy way for it to be removed.  That site is not blocked on our corporate network.</p>
<a href="http://technology.mattrude.com/2012/03/shopathome-com/">shopathome.com</a> is a post from; <a href="http://technology.mattrude.com/">Matt&#039;s Technology Blog</a> which is not allowed to be copied on other sites.]]></content:encoded>
			<wfw:commentRss>http://technology.mattrude.com/2012/03/shopathome-com/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Gallery3 Installed on a Nginx Server</title>
		<link>http://technology.mattrude.com/2012/02/gallery3-installed-on-a-nginx-server/</link>
		<comments>http://technology.mattrude.com/2012/02/gallery3-installed-on-a-nginx-server/#comments</comments>
		<pubDate>Mon, 27 Feb 2012 02:09:38 +0000</pubDate>
		<dc:creator>Matt Rude</dc:creator>
				<category><![CDATA[How-To's]]></category>
		<category><![CDATA[.htaccess]]></category>
		<category><![CDATA[Apache]]></category>
		<category><![CDATA[Apache HTTP Server]]></category>
		<category><![CDATA[Fedora]]></category>
		<category><![CDATA[Gallery3]]></category>
		<category><![CDATA[Nginx]]></category>
		<category><![CDATA[php]]></category>
		<category><![CDATA[php-fpm]]></category>
		<category><![CDATA[Server]]></category>
		<category><![CDATA[Web server]]></category>

		<guid isPermaLink="false">http://technology.mattrude.com/?p=5280</guid>
		<description><![CDATA[A few months ago I converted my web cluster from Apache to Nginx. Initially I was only concerned with my WordPress sites as they get, by far the most traffic. Their conversion went well, with only very minor issues. Since &#8230; <a href="http://technology.mattrude.com/2012/02/gallery3-installed-on-a-nginx-server/">Continue reading <span class="meta-nav">&#8594;</span></a><a href="http://technology.mattrude.com/2012/02/gallery3-installed-on-a-nginx-server/">Gallery3 Installed on a Nginx Server</a> is a post from; <a href="http://technology.mattrude.com/">Matt&#039;s Technology Blog</a> which is not allowed to be copied on other sites.]]></description>
				<content:encoded><![CDATA[<p>A few months ago I converted my web cluster from <a class="zem_slink" title="Apache" href="http://en.wikipedia.org/wiki/Apache" rel="wikipedia">Apache</a> to <a class="zem_slink" title="Nginx" href="http://nginx.org/" rel="homepage">Nginx</a>. Initially I was only concerned with my <a href="http://technology.mattrude.com/2012/02/installing-wordpress-on-nginx/" title="Installing WordPress on Nginx" target="_blank">WordPress</a> sites as they get, by far the most traffic. Their conversion went well, with only very minor issues.</p>
<p>Since I was happy with the results, I moved to quickly to my <a href="http://technology.mattrude.com/2012/02/configuring-mediawiki-to-be-used-with-nginx/" title="MediaWiki Installed on a Nginx Server" target="_blank">MediaWiki</a> site. It’s conversion went very well and actually end up allowing the site to accept requests with and without index.php in them.</p>
<p>During this time, my other random sites, using odd or old software, was simply proxied back to the still running Apache install on my server. Using nginx&#8217;s proxy configuration, i was able to just change the port Apache listen on and left the old configurations as they were.  This allowed me to stay up, but didn&#8217;t give me any of the benefits of nginx.  Images from the my Gallery3 gallery were still being served from Apache, threw Nginx.</p>
<p>After getting everything working, I decided to start on Gallery3, since Gallery3 uses <em>.htaccess</em> files to secure images, I wasn&#8217;t sure how I would be able to go about this.  After some investigating I found that Gallery3 only uses the <em>.htaccess</em> files to block downloading of the actual images them self&#8217;s, the php pages are still secured threw normal permissions.</p>
<h2 id="section-1">Configuring Nginx</h2>
<p>Setting up Gallery3 under Nginx is pretty straightforward, when ignoring the .htaccess file talked about above.  As with all my Nginx setup&#8217;s, im using <a title="PHP-FPM (FastCGI Process Manager) is an alternative PHP FastCGI implementation." href="http://php-fpm.org/" target="_blank">php-fpm</a> via a UNIX sock.  Switching to a TCP connection (such as 127.0.0.0:8000), can be substituted with only minor tweaks.</p>
<p>To start out, create a new file in your nginx configuration directory, named <strong>gallery3.conf</strong>.  This file will be generic enough that you will be able to use it for any Gallery3 install on the server. Your site specific information will live in your main nginx.conf file.</p>
<p><strong>Create a new file named gallery3.conf, and copy the below into it:</strong></p>
<pre>location ~* .(js|css|png|jpg|jpeg|gif|ico|ttf)$ {
    expires 180d;
#    if_modified_since off;
#    add_header Last-Modified "";
}

if (!-e $request_filename) {
    rewrite ^/(.+)$ /index.php?kohana_uri=$1 last;
}

location /var/ {
    try_files $uri /index.php?kohana_uri=$2;
}

location = /downloadalbum/zip/album/1 {
    return 404;
}

location  ~* .php$ {
    include fastcgi_params;
    fastcgi_index  index.php;
    fastcgi_split_path_info ^(.+.php)(.*)$;
    fastcgi_param  SCRIPT_FILENAME  $document_root$fastcgi_script_name;
    fastcgi_param  PATH_INFO        $fastcgi_path_info;
    fastcgi_pass php;

    index index.php;

    if (-f $request_filename) {
        rewrite ^/var/albums/(.*)$ /file_proxy/$1 last;
        expires max;
        break;
    }

    if (!-e $request_filename) {
        rewrite ^/(.+)$ /index.php?kohana_uri=$1 last;
    }
}
</pre>
<p>Now you need to setup your new site in Nginx&#8217;s main config file.  Below is the most basic setup, it assumes you have a running Nginx server and are only adding this site to it.  Note the name of the server and the root location of the files needs to be updated.</p>
<p><strong>Added to nginx.conf:</strong></p>
<pre>server {
    listen 80;
    server_name gallery.example.com;
    root /var/www/gallery.example.com;
    include gallery3.conf;
}</pre>
<p>This next part really sucks and I wish there was a way around it, in your Gallery3 installation, go into <em>applications/config/config.php</em> and modify the &#8220;<em>index_page</em>&#8221; setting as shown below.</p>
<p><strong>application/config/config.php:</strong></p>
<pre>$config["index_page"] = "";</pre>
<p>What sucks about this is you will need to do it after <strong>EVERY UPDATE</strong>.  If after you update Gallery3 and you loose your style sheet and java scripts, this is why.</p>
<p>The config file should not live in a location that get&#8217;s updated automatically with new versions of software.</p>
<a href="http://technology.mattrude.com/2012/02/gallery3-installed-on-a-nginx-server/">Gallery3 Installed on a Nginx Server</a> is a post from; <a href="http://technology.mattrude.com/">Matt&#039;s Technology Blog</a> which is not allowed to be copied on other sites.]]></content:encoded>
			<wfw:commentRss>http://technology.mattrude.com/2012/02/gallery3-installed-on-a-nginx-server/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>MediaWiki Installed on a Nginx Server</title>
		<link>http://technology.mattrude.com/2012/02/configuring-mediawiki-to-be-used-with-nginx/</link>
		<comments>http://technology.mattrude.com/2012/02/configuring-mediawiki-to-be-used-with-nginx/#comments</comments>
		<pubDate>Wed, 15 Feb 2012 21:33:08 +0000</pubDate>
		<dc:creator>Matt Rude</dc:creator>
				<category><![CDATA[How-To's]]></category>
		<category><![CDATA[Apache]]></category>
		<category><![CDATA[Apache HTTP Server]]></category>
		<category><![CDATA[MediaWiki]]></category>
		<category><![CDATA[Nginx]]></category>
		<category><![CDATA[php]]></category>
		<category><![CDATA[php-fpm]]></category>

		<guid isPermaLink="false">http://technology.mattrude.com/?p=5265</guid>
		<description><![CDATA[Here is my quick guide to use MediaWiki on a Nginx server using php-fpm. There are many ways of doing this. I like pretty url&#8217;s, so this configuration will remove the index.php from the url. This is great, but it will &#8230; <a href="http://technology.mattrude.com/2012/02/configuring-mediawiki-to-be-used-with-nginx/">Continue reading <span class="meta-nav">&#8594;</span></a><a href="http://technology.mattrude.com/2012/02/configuring-mediawiki-to-be-used-with-nginx/">MediaWiki Installed on a Nginx Server</a> is a post from; <a href="http://technology.mattrude.com/">Matt&#039;s Technology Blog</a> which is not allowed to be copied on other sites.]]></description>
				<content:encoded><![CDATA[<p>Here is my quick guide to use <a title="MediaWiki is a free software open source wiki package written in PHP, originally for use on Wikipedia." href="http://www.mediawiki.org/wiki/MediaWiki" target="_blank">MediaWiki</a> on a <a title="Nginx HTTP Web Server" href="http://nginx.org/" target="_blank">Nginx</a> server using <a title="PHP-FPM (FastCGI Process Manager) is an alternative PHP FastCGI implementation." href="http://php-fpm.org/" target="_blank">php-fpm</a>.</p>
<p>There are many ways of doing this. I like pretty url&#8217;s, so this configuration will remove the <code>index.php</code> from the url. This is great, but it will <em>not</em> redirect links to index.php to the new none index.php links.  You also need to configure MediaWiki to <a href="http://www.mediawiki.org/wiki/Manual:Short_URL#URL_like_-_example.com.2FPage_title" target="_blank">use short urls</a>. Also, the below configuration <em>dose</em> assume your using Unix socket connections to php-fpm.</p>
<p>So here we go, inside your <code>http {</code> block, add the following.</p>
<p><strong>/etc/nginx/nginx.conf:</strong></p>
<pre>    server {
        listen 80;
        server_name wiki.example.com;
        root /var/www/wiki.example.com;
        include mediawiki.conf;
    }</pre>
<p><strong>/etc/nginx/mediawiki.conf:</strong></p>
<pre># MediaWiki Config
location ~ .htaccess {
        deny all;
}

location ~* /sitemaps/ {
        autoindex  on;
}

# Remote index.php from URI
rewrite ^/index.php/(.*) /$1  permanent;

location / {
        if (!-e $request_filename) {
                rewrite ^/([^?]*)(?:?(.*))? /index.php?title=$1&amp;$2 last;
        }
        if ($uri ~* ".(ico|css|js|gif|jpe?g|png)(?[0-9]+)?$") {
                expires max;
                break;
        }
}

location ~* .php$ {
        if (!-e $request_filename) {
                return 404;
        }

        include /etc/nginx/fastcgi_params;

        fastcgi_pass  unix:/var/run/php-fpm.socket;
        fastcgi_index index.php;

        fastcgi_param  SCRIPT_FILENAME  $document_root$fastcgi_script_name;
}</pre>
<p>If you only have a single wiki on your server, there&#8217;s really no reason to create a new mediawiki.conf file, but instead just add it to the server block.</p>
<a href="http://technology.mattrude.com/2012/02/configuring-mediawiki-to-be-used-with-nginx/">MediaWiki Installed on a Nginx Server</a> is a post from; <a href="http://technology.mattrude.com/">Matt&#039;s Technology Blog</a> which is not allowed to be copied on other sites.]]></content:encoded>
			<wfw:commentRss>http://technology.mattrude.com/2012/02/configuring-mediawiki-to-be-used-with-nginx/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Installing WordPress on Nginx</title>
		<link>http://technology.mattrude.com/2012/02/installing-wordpress-on-nginx/</link>
		<comments>http://technology.mattrude.com/2012/02/installing-wordpress-on-nginx/#comments</comments>
		<pubDate>Sun, 05 Feb 2012 19:53:34 +0000</pubDate>
		<dc:creator>Matt Rude</dc:creator>
				<category><![CDATA[How-To's]]></category>
		<category><![CDATA[Apache]]></category>
		<category><![CDATA[Apache HTTP Server]]></category>
		<category><![CDATA[Fedora]]></category>
		<category><![CDATA[Nginx]]></category>
		<category><![CDATA[php]]></category>
		<category><![CDATA[php-fpm]]></category>
		<category><![CDATA[Server]]></category>
		<category><![CDATA[Web server]]></category>
		<category><![CDATA[WordPress]]></category>

		<guid isPermaLink="false">http://technology.mattrude.com/?p=5178</guid>
		<description><![CDATA[I, like most people, started out by using Apache and really didn&#8217;t see anything wrong with it.  It&#8217;s relatively easy to setup, it&#8217;s used by most sites so support is a snap and a default and it&#8217;s already installed on &#8230; <a href="http://technology.mattrude.com/2012/02/installing-wordpress-on-nginx/">Continue reading <span class="meta-nav">&#8594;</span></a><a href="http://technology.mattrude.com/2012/02/installing-wordpress-on-nginx/">Installing WordPress on Nginx</a> is a post from; <a href="http://technology.mattrude.com/">Matt&#039;s Technology Blog</a> which is not allowed to be copied on other sites.]]></description>
				<content:encoded><![CDATA[<p>I, like most people, started out by using <a class="zem_slink" title="Apache" href="http://en.wikipedia.org/wiki/Apache" rel="wikipedia">Apache</a> and really didn&#8217;t see anything wrong with it.  It&#8217;s relatively easy to setup, it&#8217;s used by most sites so support is a snap and a default and it&#8217;s already installed on most distributions. The thing is, it&#8217;s slow, the easy of use is paid for by speed.</p>
<p>So this is where <a class="zem_slink" title="Nginx" href="http://nginx.org/" rel="homepage">Nginx</a> comes in.  Nginx is not the easiest software to setup.  It requires you to tell it what different file types you will be using and how to handle them.  It requires you to tell it where scripts live and where static files live.  It also requires you to use an external php server, such as <a class="zem_slink" title="FastCGI" href="http://en.wikipedia.org/wiki/FastCGI" rel="wikipedia">FastCGI</a>.</p>
<h2 id="section-1">PHP-FPM Setup</h2>
<p>Nginx does not provide FastCGI for you (FastCGI is what your <a class="zem_slink" title="Web server" href="http://en.wikipedia.org/wiki/Web_server" rel="wikipedia">web server</a> uses to interact with <a class="zem_slink" title="WordPress" href="http://wordpress.org" rel="homepage">WordPress</a>’s <acronym title="PHP: Hypertext Preprocessor"><a class="zem_slink" title="PHP" href="http://en.wikipedia.org/wiki/PHP" rel="wikipedia">PHP</a></acronym> code), so you’ve got to have a way to spawn your own FastCGI processes.</p>
<p>My preferred method is using of running FastCGI is with <a title="PHP-FPM (FastCGI Process Manager) is an alternative PHP FastCGI implementation." href="http://php-fpm.org/" target="_blank">php-fpm</a>.  Since I&#8217;m using <a class="zem_slink" title="Fedora (operating system)" href="http://fedoraproject.org/" rel="homepage">Fedora</a>, and there is a <a class="zem_slink" title="Yellowdog Updater, Modified" href="http://yum.baseurl.org/" rel="homepage">yum</a> packet already built for php-fpm, it&#8217;s quick and easy to install.</p>
<p>Installing php-fpm is pretty straightforward:</p>
<pre>yum install php-fpm</pre>
<p>After installing php-fpm you have to start it. The rpm for php-fpm installs the service script for you, you only need to enable starting at boot, and start the process.</p>
<pre>chkconfig php-fpm on
service php-fpm start</pre>
<h2 id="section-2">Nginx</h2>
<p>The next part is to install Nginx on your server.  This is as straightforward as installing php-fpm on Fedora, when using yum.</p>
<pre>yum install nginx</pre>
<p>Once Nginx is installed, you need to set it up to server your site.</p>
<h2 id="section-3">Configuring Nginx for WordPress</h2>
<p>So we now have the needed software installed, next we need to set it all up.  Below is the config for a standard, simple WordPress site named <em>example.com</em>.<br />
<strong>nginx.conf:</strong></p>
<pre>
http {
    include       /etc/nginx/mime.types;
    default_type  application/octet-stream;

    log_format  main  '$remote_addr - $remote_user [$time_local] $http_host "$request" '
                      '$status $body_bytes_sent "$http_referer" '
                      '"$http_user_agent" "$http_x_forwarded_for"';

    access_log  /var/log/nginx/access.log  main;
    sendfile        on;
    #tcp_nopush     on;
    rewrite_log     on;
    keepalive_timeout  5;
    index              index.php index.html index.htm;

    # Upstream to abstract backend connection(s) for PHP.
    upstream php {
        server unix:/var/run/php-fpm.socket;
    }

    server {
        listen 80;
        server_name example.com;
        server_name www.example.com;
        root /var/www/example.com;

        if ($http_host != "example.com") {
                rewrite ^ http://example.com$request_uri permanent;
        }

        include wordpress.conf;
    }
}
</pre>
<p><strong>wordpress.conf:</strong></p>
<pre>
# WordPress single blog rules.
# Designed to be included in any server {} block.

# Deny all attempts to access hidden files such as .htaccess, .htpasswd, .DS_Store (Mac).
location ~ /. {
        deny all;
        access_log off;
        log_not_found off;
}

# Deny access to any files with a .php extension in the uploads directory
location ~* ^/wp-content/uploads/.*.php$ {
        deny all;
        access_log off;
        log_not_found off;
}

# Deny access to any files with a .php extension in the uploads directory for multisite
location ~* /files/(.*).php$ {
        deny all;
        access_log off;
        log_not_found off;
}

# This order might seem weird - this is attempted to match last if rules below fail.
# http://wiki.nginx.org/HttpCoreModule
location / {
        try_files $uri $uri/ /index.php?$args;
}

# Add trailing slash to */wp-admin requests.
rewrite /wp-admin$ $scheme://$host$uri/ permanent;

# Directives to send expires headers and turn off 404 error logging.
location ~* .(js|css|png|jpg|jpeg|gif|ico|ttf)$ {
        expires 180d;
        log_not_found off;
}

# Pass all .php files onto a php-fpm/php-fcgi server.
location ~ .php$ {
        # Zero-day exploit defense.
        # http://forum.nginx.org/read.php?2,88845,page=3
        # Won't work properly (404 error) if the file is not stored on this server, which is entirely possible with php-fpm/php-fcgi.
        # Comment the 'try_files' line out if you set up php-fpm/php-fcgi on another machine.  And then cross your fingers that you won't get hacked.
        try_files $uri =404;

        fastcgi_split_path_info ^(.+.php)(/.+)$;
        #NOTE: You should have "cgi.fix_pathinfo = 0;" in php.ini

        include fastcgi_params;
        fastcgi_index index.php;
        fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
#       fastcgi_intercept_errors on;
        fastcgi_pass php;
}
</pre>
<a href="http://technology.mattrude.com/2012/02/installing-wordpress-on-nginx/">Installing WordPress on Nginx</a> is a post from; <a href="http://technology.mattrude.com/">Matt&#039;s Technology Blog</a> which is not allowed to be copied on other sites.]]></content:encoded>
			<wfw:commentRss>http://technology.mattrude.com/2012/02/installing-wordpress-on-nginx/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Change the maximum number of mailboxes being displayed in Exchange 2010</title>
		<link>http://technology.mattrude.com/2012/02/change-the-maximum-number-of-mailboxes-being-displayed-in-exchange-2010/</link>
		<comments>http://technology.mattrude.com/2012/02/change-the-maximum-number-of-mailboxes-being-displayed-in-exchange-2010/#comments</comments>
		<pubDate>Thu, 02 Feb 2012 14:03:19 +0000</pubDate>
		<dc:creator>Matt Rude</dc:creator>
				<category><![CDATA[How-To's]]></category>
		<category><![CDATA[Email box]]></category>
		<category><![CDATA[Exchange 2010]]></category>
		<category><![CDATA[Microsoft Exchange]]></category>
		<category><![CDATA[Microsoft Exchange Server]]></category>

		<guid isPermaLink="false">http://technology.mattrude.com/?p=5259</guid>
		<description><![CDATA[Microsoft&#8217;s Exchange Management Console is clearly far from a well designed system.  Sine things are put in such abnormal locations, it seems like I spend a good part of my time, just figuring out how to do something, I could &#8230; <a href="http://technology.mattrude.com/2012/02/change-the-maximum-number-of-mailboxes-being-displayed-in-exchange-2010/">Continue reading <span class="meta-nav">&#8594;</span></a><a href="http://technology.mattrude.com/2012/02/change-the-maximum-number-of-mailboxes-being-displayed-in-exchange-2010/">Change the maximum number of mailboxes being displayed in Exchange 2010</a> is a post from; <a href="http://technology.mattrude.com/">Matt&#039;s Technology Blog</a> which is not allowed to be copied on other sites.]]></description>
				<content:encoded><![CDATA[<p>Microsoft&#8217;s Exchange Management Console is clearly far from a well designed system.  Sine things are put in such abnormal locations, it seems like I spend a good part of my time, just figuring out how to do something, I could do in my sleep with a previous version.</p>
<p>On that note, here is how to change the maximum number of recipients to display while searching in Exchange Management Console.</p>
<ol>
<li>Open the <strong>Exchange Management Console</strong></li>
<li>Expand “<strong>Recipient Configuration</strong>“</li>
<li>Expand &#8220;<strong>Mailbox</strong>&#8220;</li>
<li>On the far right hand side, within the &#8220;<strong>Action</strong>&#8221; window, choose &#8220;<strong>Modify the Maximum Number of Recipients to Display</strong>&#8220;</li>
</ol>
<a href="http://technology.mattrude.com/2012/02/change-the-maximum-number-of-mailboxes-being-displayed-in-exchange-2010/">Change the maximum number of mailboxes being displayed in Exchange 2010</a> is a post from; <a href="http://technology.mattrude.com/">Matt&#039;s Technology Blog</a> which is not allowed to be copied on other sites.]]></content:encoded>
			<wfw:commentRss>http://technology.mattrude.com/2012/02/change-the-maximum-number-of-mailboxes-being-displayed-in-exchange-2010/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Setting up CGIT to show root directories only</title>
		<link>http://technology.mattrude.com/2012/01/setting-up-cgit-to-show-root-directories-only/</link>
		<comments>http://technology.mattrude.com/2012/01/setting-up-cgit-to-show-root-directories-only/#comments</comments>
		<pubDate>Mon, 09 Jan 2012 00:42:48 +0000</pubDate>
		<dc:creator>Matt Rude</dc:creator>
				<category><![CDATA[How-To's]]></category>
		<category><![CDATA[Alias]]></category>
		<category><![CDATA[Apache]]></category>
		<category><![CDATA[Apache HTTP Server]]></category>
		<category><![CDATA[cgi script]]></category>
		<category><![CDATA[cgit]]></category>
		<category><![CDATA[Git]]></category>
		<category><![CDATA[repositories]]></category>
		<category><![CDATA[script cgi]]></category>
		<category><![CDATA[Source code]]></category>
		<category><![CDATA[Uniform Resource Locator]]></category>
		<category><![CDATA[virtualhost]]></category>
		<category><![CDATA[Web browser]]></category>
		<category><![CDATA[Web Design and Development]]></category>

		<guid isPermaLink="false">http://technology.mattrude.com/?p=5214</guid>
		<description><![CDATA[CGIT is a nice, quick, and easy way of displaying git repositories. After much fighting I figured out how to allow CGIT to display URLs such as http://code.example.com/repository.git (the git is optional). Below is the Apache config for code.example.com: Setting &#8230; <a href="http://technology.mattrude.com/2012/01/setting-up-cgit-to-show-root-directories-only/">Continue reading <span class="meta-nav">&#8594;</span></a><a href="http://technology.mattrude.com/2012/01/setting-up-cgit-to-show-root-directories-only/">Setting up CGIT to show root directories only</a> is a post from; <a href="http://technology.mattrude.com/">Matt&#039;s Technology Blog</a> which is not allowed to be copied on other sites.]]></description>
				<content:encoded><![CDATA[<p><a title="cgit" href="http://hjemli.net/git/cgit/" target="_blank">CGIT</a> is a nice, quick, and easy way of displaying <a title="git" href="http://git-scm.com/" target="_blank">git</a> repositories. After much fighting I figured out how to allow CGIT to display <a class="zem_slink" title="Uniform Resource Locator" href="http://en.wikipedia.org/wiki/Uniform_Resource_Locator" rel="wikipedia">URLs</a> such as <em>http://code.example.com/repository.git</em> (the git is optional).</p>
<p>Below is the <a title="Apache HTTP Server" href="http://httpd.apache.org/" target="_blank">Apache</a> config for code.example.com:</p>
<pre class="brush: xml; title: ; notranslate">
&lt;VirtualHost *:80&gt;
    ServerName code.example.com
    DocumentRoot /var/www/code.example.com
    CustomLog logs/code.example.com.access_log combined
    ErrorLog logs/code.example.com.error_log
    SetEnv CGIT_CONFIG          /var/www/code.example.com/cgitrc
    Alias /cgit.css             /var/www/code.example.com/cgit.css
    Alias /cgit.png             /var/www/code.example.com/cgit.png
    Alias /favicon.ico          /var/www/code.example.com/favicon.ico
    Alias /robots.txt           /var/www/code.example.com/robots.txt
    Alias /                     /var/www/code.example.com/cgit.cgi/
    &lt;Directory /var/www/code.example.com&gt;
      Options Indexes FollowSymLinks
      Options +ExecCGI
      Order allow,deny
      Allow from all
      AddHandler cgi-script .cgi
      DirectoryIndex cgit.cgi
    &lt;/Directory&gt;
&lt;/VirtualHost&gt;
</pre>
<a href="http://technology.mattrude.com/2012/01/setting-up-cgit-to-show-root-directories-only/">Setting up CGIT to show root directories only</a> is a post from; <a href="http://technology.mattrude.com/">Matt&#039;s Technology Blog</a> which is not allowed to be copied on other sites.]]></content:encoded>
			<wfw:commentRss>http://technology.mattrude.com/2012/01/setting-up-cgit-to-show-root-directories-only/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Compressing PNG file for the web</title>
		<link>http://technology.mattrude.com/2011/12/compressing-png-file-for-the-web/</link>
		<comments>http://technology.mattrude.com/2011/12/compressing-png-file-for-the-web/#comments</comments>
		<pubDate>Thu, 29 Dec 2011 16:09:57 +0000</pubDate>
		<dc:creator>Matt Rude</dc:creator>
				<category><![CDATA[How-To's]]></category>
		<category><![CDATA[egrep]]></category>
		<category><![CDATA[images on the web]]></category>
		<category><![CDATA[images web]]></category>
		<category><![CDATA[optipng]]></category>
		<category><![CDATA[png]]></category>
		<category><![CDATA[png files]]></category>
		<category><![CDATA[website]]></category>
		<category><![CDATA[WordPress]]></category>

		<guid isPermaLink="false">http://mattrudetech.wordpress.com/?p=5166</guid>
		<description><![CDATA[When using images on the web, it&#8217;s impotent to use the smallest file you can for your needs. This doesn&#8217;t mean you should use a image that is smaller then the size you wish to display it at, but to &#8230; <a href="http://technology.mattrude.com/2011/12/compressing-png-file-for-the-web/">Continue reading <span class="meta-nav">&#8594;</span></a><a href="http://technology.mattrude.com/2011/12/compressing-png-file-for-the-web/">Compressing PNG file for the web</a> is a post from; <a href="http://technology.mattrude.com/">Matt&#039;s Technology Blog</a> which is not allowed to be copied on other sites.]]></description>
				<content:encoded><![CDATA[<p>When using images on the web, it&#8217;s impotent to use the smallest file you can for your needs. This doesn&#8217;t mean you should use a image that is smaller then the size you wish to display it at, but to optimize it for the web and not send more then is needed.</p>
<p>With this goal, here is a quick way of optimizing all <a title="Portable Network Graphics" href="http://en.wikipedia.org/wiki/Portable_Network_Graphics" target="_blank">PNG</a> files in a set of directories using <a href="http://optipng.sourceforge.net/" target="_blank">optipng</a>.</p>
<pre>for a in `find /var/www/wordpress/ |egrep '*.png$'`
do
    /usr/bin/optipng $a
done</pre>
<p>Don&#8217;t worry if you already have some images that are already optimized, optipng will just skip them.</p>
<a href="http://technology.mattrude.com/2011/12/compressing-png-file-for-the-web/">Compressing PNG file for the web</a> is a post from; <a href="http://technology.mattrude.com/">Matt&#039;s Technology Blog</a> which is not allowed to be copied on other sites.]]></content:encoded>
			<wfw:commentRss>http://technology.mattrude.com/2011/12/compressing-png-file-for-the-web/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>RoundCube: Error No [604]</title>
		<link>http://technology.mattrude.com/2011/12/roundcube-error-no-604/</link>
		<comments>http://technology.mattrude.com/2011/12/roundcube-error-no-604/#comments</comments>
		<pubDate>Sat, 17 Dec 2011 19:07:55 +0000</pubDate>
		<dc:creator>Matt Rude</dc:creator>
				<category><![CDATA[General]]></category>
		<category><![CDATA[config options]]></category>
		<category><![CDATA[configured]]></category>
		<category><![CDATA[Fedora]]></category>
		<category><![CDATA[memcache]]></category>
		<category><![CDATA[Memcached]]></category>
		<category><![CDATA[RoundCube]]></category>
		<category><![CDATA[session data]]></category>
		<category><![CDATA[yum]]></category>

		<guid isPermaLink="false">http://mattrudetech.wordpress.com/?p=5163</guid>
		<description><![CDATA[I recently had a client who moved RoundCube to a new server. Since the move they are receiving the below error when they go to their webmail site. SERVICE CURRENTLY NOT AVAILABLE! Error No. [604] After much digging and searching, &#8230; <a href="http://technology.mattrude.com/2011/12/roundcube-error-no-604/">Continue reading <span class="meta-nav">&#8594;</span></a><a href="http://technology.mattrude.com/2011/12/roundcube-error-no-604/">RoundCube: Error No [604]</a> is a post from; <a href="http://technology.mattrude.com/">Matt&#039;s Technology Blog</a> which is not allowed to be copied on other sites.]]></description>
				<content:encoded><![CDATA[<p style="text-align:left">I recently had a client who moved <a title="Roundcube" href="http://roundcube.net/" target="_blank">RoundCube</a> to a new server.  Since the move they are receiving the below error when they go to their webmail site.</p>
<p style="text-align:center">SERVICE CURRENTLY NOT AVAILABLE!<br />
Error No. [604]</p>
<p style="text-align:left">After much digging and searching, I wasn&#8217;t coming up with much. I finely started walking threw the config file seeing what was enabled and were the different config options were pointing.  After some digging I found they had <a title="memcached" href="http://memcached.org/" target="_blank">memcache</a> configured for session data.  The <a title="php-pecl-memcache" href="http://pecl.php.net/package/memcache" target="_blank">php-pecl-memcache</a> module wasn&#8217;t installed.  I installed the module via yum, as it was a Fedora system using the below command.</p>
<pre>yum install php-pecl-memcache</pre>
<p>Since the config was still pointing at the running memcache server, the site came back up and is now working well again.</p>
<a href="http://technology.mattrude.com/2011/12/roundcube-error-no-604/">RoundCube: Error No [604]</a> is a post from; <a href="http://technology.mattrude.com/">Matt&#039;s Technology Blog</a> which is not allowed to be copied on other sites.]]></content:encoded>
			<wfw:commentRss>http://technology.mattrude.com/2011/12/roundcube-error-no-604/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Custom WordPress Cron Intervals</title>
		<link>http://technology.mattrude.com/2011/12/custom-wordpress-cron-intervals/</link>
		<comments>http://technology.mattrude.com/2011/12/custom-wordpress-cron-intervals/#comments</comments>
		<pubDate>Thu, 15 Dec 2011 01:45:49 +0000</pubDate>
		<dc:creator>Matt Rude</dc:creator>
				<category><![CDATA[General]]></category>
		<category><![CDATA[array]]></category>
		<category><![CDATA[cron]]></category>
		<category><![CDATA[hook]]></category>
		<category><![CDATA[interval]]></category>
		<category><![CDATA[intervals]]></category>
		<category><![CDATA[WordPress]]></category>

		<guid isPermaLink="false">http://technology.mattrude.com/?p=5160</guid>
		<description><![CDATA[Here’s how to have WordPress code execute on a different schedule than the default intervals of hourly, twicedaily, and daily. This specific example is for weekly execution. Taken from Viper007Bond&#8216;s post on How To Create Custom WordPress Cron Intervals. Custom &#8230; <a href="http://technology.mattrude.com/2011/12/custom-wordpress-cron-intervals/">Continue reading <span class="meta-nav">&#8594;</span></a><a href="http://technology.mattrude.com/2011/12/custom-wordpress-cron-intervals/">Custom WordPress Cron Intervals</a> is a post from; <a href="http://technology.mattrude.com/">Matt&#039;s Technology Blog</a> which is not allowed to be copied on other sites.]]></description>
				<content:encoded><![CDATA[<p>Here’s how to have WordPress code execute on a different schedule than the default intervals of <code>hourly</code>, <code>twicedaily</code>, and <code>daily</code>. This specific example is for weekly execution.</p>
<pre class="brush: php; title: ; notranslate">
&lt;?php

// Add a new interval of a week
// See http://codex.wordpress.org/Plugin_API/Filter_Reference/cron_schedules
add_filter( 'cron_schedules', 'myprefix_add_weekly_cron_schedule' );
function myprefix_add_weekly_cron_schedule( $schedules ) {
	$schedules['weekly'] = array(
		'interval' =&gt; 604800, // 1 week in seconds
		'display'  =&gt; __( 'Once Weekly' ),
	);

	return $schedules;
}

// Schedule an action if it's not already scheduled
if ( ! wp_next_scheduled( 'myprefix_my_cron_action' ) ) {
	wp_schedule_event( time(), 'weekly', 'myprefix_my_cron_action' );
}

// Hook into that action that'll fire weekly
add_action( 'myprefix_my_cron_action', 'myprefix_function_to_run' );
function myprefix_function_to_run() {
	// Add some code here
}

?&gt;
</pre>
<p><em><br />
Taken from <a title="Viper007Bond" href="http://www.viper007bond.com" target="_blank">Viper007Bond</a>&#8216;s post on <a title="How To Create Custom WordPress Cron Intervals" href="http://www.viper007bond.com/2011/12/14/how-to-create-custom-wordpress-cron-intervals/" target="_blank">How To Create Custom WordPress Cron Intervals</a>.</em></p>
<a href="http://technology.mattrude.com/2011/12/custom-wordpress-cron-intervals/">Custom WordPress Cron Intervals</a> is a post from; <a href="http://technology.mattrude.com/">Matt&#039;s Technology Blog</a> which is not allowed to be copied on other sites.]]></content:encoded>
			<wfw:commentRss>http://technology.mattrude.com/2011/12/custom-wordpress-cron-intervals/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Admin Bar API changes for 3.3</title>
		<link>http://technology.mattrude.com/2011/12/admin-bar-api-changes-for-3-3/</link>
		<comments>http://technology.mattrude.com/2011/12/admin-bar-api-changes-for-3-3/#comments</comments>
		<pubDate>Wed, 07 Dec 2011 13:34:24 +0000</pubDate>
		<dc:creator>Matt Rude</dc:creator>
				<category><![CDATA[Asides]]></category>
		<category><![CDATA[Admin Bar]]></category>
		<category><![CDATA[api]]></category>
		<category><![CDATA[nacin]]></category>
		<category><![CDATA[Release 3.3]]></category>
		<category><![CDATA[WordPress]]></category>

		<guid isPermaLink="false">http://technology.mattrude.com/?p=5153</guid>
		<description><![CDATA[Andrew Nacin wrote up a nice explanation on the changes to the WordPress Admin Bar API with the release of WordPress 3.3. Admin Bar API changes for 3.3 is a post from; Matt&#039;s Technology Blog which is not allowed to &#8230; <a href="http://technology.mattrude.com/2011/12/admin-bar-api-changes-for-3-3/">Continue reading <span class="meta-nav">&#8594;</span></a><a href="http://technology.mattrude.com/2011/12/admin-bar-api-changes-for-3-3/">Admin Bar API changes for 3.3</a> is a post from; <a href="http://technology.mattrude.com/">Matt&#039;s Technology Blog</a> which is not allowed to be copied on other sites.]]></description>
				<content:encoded><![CDATA[<p><a href="http://nacin.com/" target="_blank">Andrew Nacin</a> wrote up a nice explanation on the <a href="http://make.wordpress.org/core/2011/12/07/admin-bar-api-changes-in-3-3/" target="_blank">changes to the WordPress Admin Bar API</a> with the release of WordPress 3.3.</p>
<a href="http://technology.mattrude.com/2011/12/admin-bar-api-changes-for-3-3/">Admin Bar API changes for 3.3</a> is a post from; <a href="http://technology.mattrude.com/">Matt&#039;s Technology Blog</a> which is not allowed to be copied on other sites.]]></content:encoded>
			<wfw:commentRss>http://technology.mattrude.com/2011/12/admin-bar-api-changes-for-3-3/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Uploading files to Rackspace Cloud Files via the SWIFT uploader</title>
		<link>http://technology.mattrude.com/2011/12/uploading-files-to-rackspace-cloud-files-via-the-swift-uploader/</link>
		<comments>http://technology.mattrude.com/2011/12/uploading-files-to-rackspace-cloud-files-via-the-swift-uploader/#comments</comments>
		<pubDate>Wed, 07 Dec 2011 13:20:49 +0000</pubDate>
		<dc:creator>Matt Rude</dc:creator>
				<category><![CDATA[How-To's]]></category>
		<category><![CDATA[Python]]></category>
		<category><![CDATA[Computer file]]></category>
		<category><![CDATA[File Management]]></category>
		<category><![CDATA[Programming]]></category>
		<category><![CDATA[Rackspace Cloud Files]]></category>
		<category><![CDATA[Uploading and downloading]]></category>

		<guid isPermaLink="false">http://technology.mattrude.com/?p=5141</guid>
		<description><![CDATA[Rackspace Cloud Files is a simple way of backing up or storing files in the cloud.  There is no limit to the amount of data stored in the cloud, as each Gigabyte is billed at 15¢ a GB per month. &#8230; <a href="http://technology.mattrude.com/2011/12/uploading-files-to-rackspace-cloud-files-via-the-swift-uploader/">Continue reading <span class="meta-nav">&#8594;</span></a><a href="http://technology.mattrude.com/2011/12/uploading-files-to-rackspace-cloud-files-via-the-swift-uploader/">Uploading files to Rackspace Cloud Files via the SWIFT uploader</a> is a post from; <a href="http://technology.mattrude.com/">Matt&#039;s Technology Blog</a> which is not allowed to be copied on other sites.]]></description>
				<content:encoded><![CDATA[<p>Rackspace <a href="http://www.rackspace.com/cloud/files/" target="_blank">Cloud Files</a> is a simple way of backing up or storing files in the cloud.  There is no limit to the amount of data stored in the cloud, as each Gigabyte is billed at 15¢ a GB per month.</p>
<h3 id="section-1">Downloading the needed software</h3>
<p>To upload files, you will need the <a href="http://bazaar.launchpad.net/~ttx/swift/1.4.0/view/head:/bin/st" target="_blank">SWIFT</a> script written in python.</p>
<p>First start out by downloading the SWIFT script, named <em>st</em>.</p>
<pre>wget http://bazaar.launchpad.net/~ttx/swift/1.4.0/download/head:/st.py-20100712220340-zzyjabj9xczdm4cg-15/st</pre>
<p>You now need to make this file executable:</p>
<pre>chmod 755 st</pre>
<h3 id="section-2">Using the SWIFT uploader</h3>
<p>To list the containers in your account:</p>
<pre>./st -s -q -A https://auth.api.rackspacecloud.com/v1.0 
-U  -K  list</pre>
<p>Once you find the <a class="zem_slink" title="Containerization" href="http://en.wikipedia.org/wiki/Containerization" rel="wikipedia">container</a> you would like to use, you may then list the contents of that container as well.</p>
<pre>./st -s -q -A https://auth.api.rackspacecloud.com/v1.0 
-U  -K  list container</pre>
<p><em>Note, if you do not have a container setup yet, you may create one during the upload process.</em></p>
<a href="http://technology.mattrude.com/2011/12/uploading-files-to-rackspace-cloud-files-via-the-swift-uploader/">Uploading files to Rackspace Cloud Files via the SWIFT uploader</a> is a post from; <a href="http://technology.mattrude.com/">Matt&#039;s Technology Blog</a> which is not allowed to be copied on other sites.]]></content:encoded>
			<wfw:commentRss>http://technology.mattrude.com/2011/12/uploading-files-to-rackspace-cloud-files-via-the-swift-uploader/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Configuring WordPress to use Memcached</title>
		<link>http://technology.mattrude.com/2011/11/configuring-wordpress-to-use-memcached/</link>
		<comments>http://technology.mattrude.com/2011/11/configuring-wordpress-to-use-memcached/#comments</comments>
		<pubDate>Fri, 18 Nov 2011 03:28:54 +0000</pubDate>
		<dc:creator>Matt Rude</dc:creator>
				<category><![CDATA[How-To's]]></category>
		<category><![CDATA[Cache]]></category>
		<category><![CDATA[Fedora]]></category>
		<category><![CDATA[Memcached]]></category>
		<category><![CDATA[MySQL]]></category>
		<category><![CDATA[php]]></category>
		<category><![CDATA[Programming]]></category>
		<category><![CDATA[Server]]></category>
		<category><![CDATA[Source code]]></category>
		<category><![CDATA[SQL]]></category>
		<category><![CDATA[WordPress]]></category>

		<guid isPermaLink="false">http://technology.mattrude.com/?p=5074</guid>
		<description><![CDATA[When using WordPress self hosted software it&#8217;s generally a good idea to cache as much as possible.  Object Caching allows you store parts of the pages in memory for quicker retrieval, since the server will not need to look as much up from &#8230; <a href="http://technology.mattrude.com/2011/11/configuring-wordpress-to-use-memcached/">Continue reading <span class="meta-nav">&#8594;</span></a><a href="http://technology.mattrude.com/2011/11/configuring-wordpress-to-use-memcached/">Configuring WordPress to use Memcached</a> is a post from; <a href="http://technology.mattrude.com/">Matt&#039;s Technology Blog</a> which is not allowed to be copied on other sites.]]></description>
				<content:encoded><![CDATA[<p>When using <a class="zem_slink" title="WordPress" href="http://wordpress.org/" rel="homepage">WordPress</a> self hosted software it&#8217;s generally a good idea to cache as much as possible.  <a class="zem_slink" title="Object Cache" href="http://en.wikipedia.org/wiki/Cache" rel="wikipedia">Object Caching</a> allows you store parts of the pages in memory for quicker retrieval, since the server will not need to look as much up from the <a class="zem_slink" title="SQL" href="http://www.iso.org/iso/catalogue_detail.htm?csnumber=45498" rel="homepage">SQL database</a>.</p>
<h3 id="section-1">Installing the needed parts</h3>
<p>To start out, you will need to have <a title="memcached" href="http://www.memcached.org/" target="_blank">memcached</a> installed on your server. If your using <a class="zem_slink" title="Fedora (operating system)" href="http://fedoraproject.org/" rel="homepage" target="_blank">Fedora</a>, you may install memcached via <a class="zem_slink" title="Yellowdog Updater, Modified" href="http://yum.baseurl.org/" rel="homepage">Yum</a> as follows.</p>
<pre>yum -y install memcached php-pecl-memcached perl-Cache-Memcached</pre>
<h3 id="section-2">Configuring memcached</h3>
<p>After installing memcached you need to configure it. If working in Fedora, and using the Yum install as talked about above, you will need to change the memcached confuration by modifying it&#8217;s <em>sysconfig</em> file located at <em>/etc/sysconfig/memcached</em>.</p>
<p>A default configuration may look like this.</p>
<pre>PORT="11211"
USER="memcached"
MAXCONN="1024"
CACHESIZE="64"
OPTIONS="-l 127.0.0.1"</pre>
<p>If you would like to share this memcached server with other webservers, change the address from 127.0.0.1 to the server&#8217;s actual address.</p>
<p>To set memcached to start automatically when the server get&#8217;s rebooted, run:</p>
<pre>chkconfig memcached on</pre>
<p>And of course, don&#8217;t for get to start it</p>
<pre>service memcached start</pre>
<h3 id="section-3">Configuring WordPress</h3>
<p>After memcached is installed, you need to configure the WordPress side.</p>
<p>Next you should install the <a title="Memcached Object Cache WordPress Plugin" href="http://wordpress.org/extend/plugins/memcached/" target="_blank">Memcached Object Cache</a> plugin, but be careful, this is not a normal plugin.  <strong>You should not activate this plugin as you would with a normal plugin</strong>, but instead download it as you normally would, but then you need to copy the <em>object-cache.php</em> file to your <em>wp-content</em> folder.</p>
<p>From the root of your WordPress install, run the following:</p>
<pre>cp wp-content/plugins/memcached/object-cache.php wp-content/</pre>
<p>Now we need to configure WordPress to use the memcached server. Add the following near the end of your <em>wp-config.php</em> file.</p>
<pre class="brush: php; title: ; notranslate">
global $memcached_servers;
$memcached_servers = array('default' =&gt; array('127.0.0.1:11211'));
</pre>
<p>Note that were using the same server and port (127.0.0.1:11211) as was configured above while we were setting up memcached.</p>
<h3 id="section-4">Checking in on memcached</h3>
<p>Memcached is one of those things that just sort of runs. There&#8217;s not much direct feed back, besides the speed difference on your site.</p>
<p>One quick way is <a title="memcache-top" href="http://code.google.com/p/memcache-top/" target="_blank">memcache-top</a>. memcache-top will show you the current status of your memcached server.</p>
<p>To install, run the following.</p>
<pre class="brush: plain; title: ; notranslate">
wget http://memcache-top.googlecode.com/files/memcache-top-v0.6
chmod +x memcache-top-v0.6
./memcache-top-v0.6
</pre>
<p>Running <em>./memcache-top-v0.6</em> will assumed the default configuration we used here.</p>
<a href="http://technology.mattrude.com/2011/11/configuring-wordpress-to-use-memcached/">Configuring WordPress to use Memcached</a> is a post from; <a href="http://technology.mattrude.com/">Matt&#039;s Technology Blog</a> which is not allowed to be copied on other sites.]]></content:encoded>
			<wfw:commentRss>http://technology.mattrude.com/2011/11/configuring-wordpress-to-use-memcached/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Grant Full Control to a user&#8217;s mailbox in Exchange 2010</title>
		<link>http://technology.mattrude.com/2011/11/grant-full-control-to-a-users-mailbox-in-exchange-2010/</link>
		<comments>http://technology.mattrude.com/2011/11/grant-full-control-to-a-users-mailbox-in-exchange-2010/#comments</comments>
		<pubDate>Wed, 02 Nov 2011 20:35:05 +0000</pubDate>
		<dc:creator>Matt Rude</dc:creator>
				<category><![CDATA[How-To's]]></category>
		<category><![CDATA[Email box]]></category>
		<category><![CDATA[Exchange 2010]]></category>
		<category><![CDATA[Mailbox]]></category>
		<category><![CDATA[Microsoft Exchange]]></category>
		<category><![CDATA[Microsoft Exchange Server]]></category>
		<category><![CDATA[Microsoft Outlook]]></category>
		<category><![CDATA[User (computing)]]></category>

		<guid isPermaLink="false">http://technology.mattrude.com/?p=5030</guid>
		<description><![CDATA[To grant full control to a diffrent user&#8217;s mailbox in Exchange 2010, you will need to use the Microsoft Exchange Management Console.  After this change has been made, have the user close Outlook and reopen it, the mailbox should show &#8230; <a href="http://technology.mattrude.com/2011/11/grant-full-control-to-a-users-mailbox-in-exchange-2010/">Continue reading <span class="meta-nav">&#8594;</span></a><a href="http://technology.mattrude.com/2011/11/grant-full-control-to-a-users-mailbox-in-exchange-2010/">Grant Full Control to a user&#8217;s mailbox in Exchange 2010</a> is a post from; <a href="http://technology.mattrude.com/">Matt&#039;s Technology Blog</a> which is not allowed to be copied on other sites.]]></description>
				<content:encoded><![CDATA[<p>To grant full control to a diffrent user&#8217;s mailbox in <a class="zem_slink" title="Microsoft Exchange Server" href="http://en.wikipedia.org/wiki/Microsoft_Exchange_Server" rel="wikipedia">Exchange 2010</a>, you will need to use the Microsoft Exchange Management Console.  After this change has been made, have the user close <a class="zem_slink" title="Microsoft Outlook" href="http://en.wikipedia.org/wiki/Microsoft_Outlook" rel="wikipedia">Outlook</a> and reopen it, the mailbox should show in the left hand side, without you having to manually add it to Outlook.</p>
<p>Below will allow another user to &#8216;Send As&#8217; the first user and read/modify the their mail.</p>
<ol>
<li>Open the <strong>Exchange Management Console</strong></li>
<li>Expand &#8220;<strong>Recipient Configuration</strong>&#8220;</li>
<li>Right mouse click on &#8220;<strong>Mailbox</strong>&#8221; and choose find from the list.</li>
<li>Find the user you would like to grant permissions for (<em>ie: the mailbox of the user who will have the messages sent at</em>).</li>
<li>Right mouse click on the user and choose &#8220;<strong>Manage Full Access Permissions</strong>&#8220;</li>
<li>Add the user who will be able to send as the first user to this list.</li>
</ol>
<div><span class="Apple-style-span" style="font-size:14px;line-height:23px">The mailbox should automatically now show in Outlook after it has been restarted.</span></div>
<a href="http://technology.mattrude.com/2011/11/grant-full-control-to-a-users-mailbox-in-exchange-2010/">Grant Full Control to a user&#8217;s mailbox in Exchange 2010</a> is a post from; <a href="http://technology.mattrude.com/">Matt&#039;s Technology Blog</a> which is not allowed to be copied on other sites.]]></content:encoded>
			<wfw:commentRss>http://technology.mattrude.com/2011/11/grant-full-control-to-a-users-mailbox-in-exchange-2010/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Importing a Subversion repo into Git</title>
		<link>http://technology.mattrude.com/2011/10/importing-a-svn-repo-into-git/</link>
		<comments>http://technology.mattrude.com/2011/10/importing-a-svn-repo-into-git/#comments</comments>
		<pubDate>Fri, 14 Oct 2011 01:41:17 +0000</pubDate>
		<dc:creator>Matt Rude</dc:creator>
				<category><![CDATA[How-To's]]></category>
		<category><![CDATA[awk print]]></category>
		<category><![CDATA[Git]]></category>
		<category><![CDATA[remotes]]></category>
		<category><![CDATA[repack]]></category>
		<category><![CDATA[Subversion]]></category>
		<category><![CDATA[svn]]></category>
		<category><![CDATA[svn import]]></category>

		<guid isPermaLink="false">http://technology.mattrude.com/?p=5017</guid>
		<description><![CDATA[To import a svn repo create a new git repo and run Then once your done, repack it. SVN Branches If you wish to also map your branches, you may run something like the following SVN Tags From a checked &#8230; <a href="http://technology.mattrude.com/2011/10/importing-a-svn-repo-into-git/">Continue reading <span class="meta-nav">&#8594;</span></a><a href="http://technology.mattrude.com/2011/10/importing-a-svn-repo-into-git/">Importing a Subversion repo into Git</a> is a post from; <a href="http://technology.mattrude.com/">Matt&#039;s Technology Blog</a> which is not allowed to be copied on other sites.]]></description>
				<content:encoded><![CDATA[<p>To import a svn repo create a new git repo and run</p>
<pre class="brush: bash; title: ; notranslate">git svn clone http://svn.foo.com/svn/project/ project -s</pre>
<p>Then once your done, repack it.</p>
<pre class="brush: bash; title: ; notranslate">git gc project/</pre>
<h3 id="section-1">SVN Branches</h3>
<p>If you wish to also map your branches, you may run something like the following</p>
<pre class="brush: bash; title: ; notranslate">
for a in `cat .git/packed-refs |grep remotes |grep -v pack-refs |grep -v tags |grep -v trunk |grep -v '@'|awk '{print $2}'`
 do
   b=`echo &quot;$a&quot; |sed 's/// /g' |awk '{print $3}'`
   git branch -t $b $a
 done
</pre>
<h3 id="section-2">SVN Tags</h3>
<p>From a checked out SVN directory, the following will give you a list of all the users in the SVN log. You will still need to updated this list before you may use it.</p>
<pre class="brush: bash; title: ; notranslate">
for a in `cat .git/packed-refs |grep remotes |grep tags |grep -v '@' |awk '{print $2}'`
 do
   b=`echo &quot;$a&quot; |sed 's/// /g' |awk '{print $4}'`
   echo &quot;creating tag $b&quot;
   git tag -a $b -m &quot;Converting SVN tag to GIT tag&quot; $a
   sleep 5
 done
</pre>
<h3 id="section-3">SVN Authors list</h3>
<pre class="brush: bash; title: ; notranslate">
#!/usr/bin/env bash
authors=$(svn log -q | grep -e '^r' | awk 'BEGIN { FS = &quot;|&quot; } ; { print $2 }' | sort | uniq)
for author in ${authors}; do
   echo &quot;${author} = ${author} &quot;;
done
</pre>
<p>Once you have your list built, need to add it to your .git config. I store my authors file in the .git directory.</p>
<pre class="brush: bash; title: ; notranslate">
[svn]
     authorsfile = .git/authors
</pre>
<h3 id="section-4">GIT/SVN Notes</h3>
<ul>
<li><a href="http://blog.tsunanet.net/2007/07/learning-git-svn-in-5min.html" target="_blank">http://tsunanet.blogspot.com/2007/07/learning-git-svn-in-5min.html</a></li>
<li>http://djwonk.com/blog/2008/05/09/cleanly-import-svn-repository-into-git/</li>
</ul>
<a href="http://technology.mattrude.com/2011/10/importing-a-svn-repo-into-git/">Importing a Subversion repo into Git</a> is a post from; <a href="http://technology.mattrude.com/">Matt&#039;s Technology Blog</a> which is not allowed to be copied on other sites.]]></content:encoded>
			<wfw:commentRss>http://technology.mattrude.com/2011/10/importing-a-svn-repo-into-git/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Git: Creating a new user for git secure remote push</title>
		<link>http://technology.mattrude.com/2011/10/git-creating-a-new-user-for-git-secure-remote-push/</link>
		<comments>http://technology.mattrude.com/2011/10/git-creating-a-new-user-for-git-secure-remote-push/#comments</comments>
		<pubDate>Fri, 14 Oct 2011 01:16:12 +0000</pubDate>
		<dc:creator>Matt Rude</dc:creator>
				<category><![CDATA[How-To's]]></category>
		<category><![CDATA[Git]]></category>
		<category><![CDATA[kelsey]]></category>
		<category><![CDATA[running start]]></category>
		<category><![CDATA[sourcecode]]></category>
		<category><![CDATA[SSH]]></category>
		<category><![CDATA[usr bin]]></category>

		<guid isPermaLink="false">http://technology.mattrude.com/?p=5013</guid>
		<description><![CDATA[Here&#8217;s a quick how-to to create a new user for git. The assumes you already have a functioning secure git server already running. Start out by creating the user, note were changing the shell to git&#8217;s own git-shell. After the &#8230; <a href="http://technology.mattrude.com/2011/10/git-creating-a-new-user-for-git-secure-remote-push/">Continue reading <span class="meta-nav">&#8594;</span></a><a href="http://technology.mattrude.com/2011/10/git-creating-a-new-user-for-git-secure-remote-push/">Git: Creating a new user for git secure remote push</a> is a post from; <a href="http://technology.mattrude.com/">Matt&#039;s Technology Blog</a> which is not allowed to be copied on other sites.]]></description>
				<content:encoded><![CDATA[<p>Here&#8217;s a quick how-to to create a new user for git. The assumes you already have a functioning secure git server already running.</p>
<p>Start out by creating the user, note were changing the shell to git&#8217;s own <em>git-shell</em>.</p>
<pre class="brush: bash; title: ; notranslate">
adduser -b /home/git -g git -m -s /usr/bin/git-shell kelsey -p
</pre>
<p>After the user is created, create a openssh key for the new user.</p>
<pre class="brush: bash; title: ; notranslate">
mkdir /home/git/kelsey/.ssh
ssh-keygen -n kelsey -t dsa -f kelsey/.ssh/id_dsa
</pre>
<p>And lastly secure the directory back down.</p>
<pre class="brush: bash; title: ; notranslate">
chown -R kelsey:kelsey /home/git/kelsey
chmod -R u=rwX,go-rwx /home/git/kelsey/.ssh
chmod +rw /home/git/kelsey/.ssh/id_dsa.pub
</pre>
<p>Kelsey will now be able to push git updates to her branches.</p>
<a href="http://technology.mattrude.com/2011/10/git-creating-a-new-user-for-git-secure-remote-push/">Git: Creating a new user for git secure remote push</a> is a post from; <a href="http://technology.mattrude.com/">Matt&#039;s Technology Blog</a> which is not allowed to be copied on other sites.]]></content:encoded>
			<wfw:commentRss>http://technology.mattrude.com/2011/10/git-creating-a-new-user-for-git-secure-remote-push/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Configuring Cisco Devices To Use An NTP Server</title>
		<link>http://technology.mattrude.com/2011/10/configuring-cisco-devices-to-use-an-ntp-server/</link>
		<comments>http://technology.mattrude.com/2011/10/configuring-cisco-devices-to-use-an-ntp-server/#comments</comments>
		<pubDate>Mon, 10 Oct 2011 22:30:27 +0000</pubDate>
		<dc:creator>Matt Rude</dc:creator>
				<category><![CDATA[How-To's]]></category>
		<category><![CDATA[cisco]]></category>
		<category><![CDATA[hardware clock]]></category>
		<category><![CDATA[NTP]]></category>
		<category><![CDATA[ntp server]]></category>
		<category><![CDATA[ntp servers]]></category>
		<category><![CDATA[periodic intervals]]></category>
		<category><![CDATA[software clock]]></category>

		<guid isPermaLink="false">http://technology.mattrude.com/?p=4999</guid>
		<description><![CDATA[You can use NTP to synchronize time on a variety of devices including networking equipment. I have included the necessary NTP commands for a variety of Cisco Systems products because it is one of the most popular manufacturers of networking &#8230; <a href="http://technology.mattrude.com/2011/10/configuring-cisco-devices-to-use-an-ntp-server/">Continue reading <span class="meta-nav">&#8594;</span></a><a href="http://technology.mattrude.com/2011/10/configuring-cisco-devices-to-use-an-ntp-server/">Configuring Cisco Devices To Use An NTP Server</a> is a post from; <a href="http://technology.mattrude.com/">Matt&#039;s Technology Blog</a> which is not allowed to be copied on other sites.]]></description>
				<content:encoded><![CDATA[<p>You can use NTP to synchronize time on a variety of devices including networking equipment. I have included the necessary NTP commands for a variety of Cisco Systems products because it is one of the most popular manufacturers of networking equipment and would feature in the overall architectures of many home office/small office (SOHO) environments and corporate departments.</p>
<h3 id="section-1">Cisco IOS</h3>
<p>To make your router synchronize with NTP servers with IP addresses 192.168.1.100 and 192.168.1.201, use the commands:</p>
<pre class="brush: bash; title: ; notranslate">
ciscorouter&gt; enable
password: *********
ciscorouter# config t
ciscorouter(config)# ntp update-calendar
ciscorouter(config)# ntp server 192.168.1.100
ciscorouter(config)# ntp server 192.168.1.201
ciscorouter(config)# exit
ciscorouter# wr mem
</pre>
<p>The ntp server command forms a server association with another system, and ntp update-calendar configures the system to update its hardware clock from the software clock at periodic intervals.</p>
<h3 id="section-2">CATOS</h3>
<p>To make your router synchronize with NTP servers with IP addresses 192.168.1.100 and 192.168.1.201, use the commands:</p>
<pre class="brush: bash; title: ; notranslate">
ciscoswitch&gt; enable
password: *********
ciscoswitch# set ntp client enable
ciscoswitch# ntp server 192.168.1.100
ciscoswitch# ntp server 192.168.1.201
ciscoswitch# exit
</pre>
<p>The ntp server command forms a server association with another system, and set ntp client enable activates the NTP client.</p>
<a href="http://technology.mattrude.com/2011/10/configuring-cisco-devices-to-use-an-ntp-server/">Configuring Cisco Devices To Use An NTP Server</a> is a post from; <a href="http://technology.mattrude.com/">Matt&#039;s Technology Blog</a> which is not allowed to be copied on other sites.]]></content:encoded>
			<wfw:commentRss>http://technology.mattrude.com/2011/10/configuring-cisco-devices-to-use-an-ntp-server/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Git Commit eMail Notifications</title>
		<link>http://technology.mattrude.com/2011/10/git-commit-email-notifications-2/</link>
		<comments>http://technology.mattrude.com/2011/10/git-commit-email-notifications-2/#comments</comments>
		<pubDate>Sun, 09 Oct 2011 16:55:30 +0000</pubDate>
		<dc:creator>Matt Rude</dc:creator>
				<category><![CDATA[PHP]]></category>
		<category><![CDATA[Scripts]]></category>
		<category><![CDATA[email]]></category>
		<category><![CDATA[Git]]></category>
		<category><![CDATA[Postfix]]></category>
		<category><![CDATA[Postfix (software)]]></category>
		<category><![CDATA[Ruby]]></category>

		<guid isPermaLink="false">http://technology.mattrude.com/?p=4998</guid>
		<description><![CDATA[Git&#8217;s Native eMail Notifier From the repository you wish to send email on commits. Git Commit Notifier This &#8216;plugin&#8217; will allow you to send an email every time a commit is committed to the repository. You may use this on &#8230; <a href="http://technology.mattrude.com/2011/10/git-commit-email-notifications-2/">Continue reading <span class="meta-nav">&#8594;</span></a><a href="http://technology.mattrude.com/2011/10/git-commit-email-notifications-2/">Git Commit eMail Notifications</a> is a post from; <a href="http://technology.mattrude.com/">Matt&#039;s Technology Blog</a> which is not allowed to be copied on other sites.]]></description>
				<content:encoded><![CDATA[<h2 id="section-1">Git&#8217;s Native eMail Notifier</h2>
<p>From the repository you wish to send email on commits.</p>
<pre class="brush: bash; title: ; notranslate">
cd .git/hooks
mv post-receive post-receive.bkp
ln -s /usr/share/git-core/contrib/hooks/post-receive-email post-receive git config hooks.mailinglist &quot;mailinglist@example.com&quot;
git config hooks.emailprefix &quot;[SUBJECT PREFIX] &quot; # note the trailing space </pre>
<h2 id="section-2">Git Commit Notifier</h2>
<p>This &#8216;plugin&#8217; will allow you to send an email every time a commit is committed to the repository. You may use this on the central repository to keep everyone following the project up to date.</p>
<ul>
<li>The source may also be downloaded at <a href="https://github.com/bitboxer/git-commit-notifier">http://github.com/bitboxer/git-commit-notifier</a></li>
</ul>
<p>To use this plugin, you first need to compile the script, then add the config information to each repository you wish to use it on.</p>
<h3 id="section-3">To Install Git Commit Notifier</h3>
<p>On <a href="http://fedoraproject.org">Fedora</a> 12 you first need to install Ruby and a few other dependencies. After you download the needed dependencies, you may compile the script.
<pre class="brush: bash; title: ; notranslate">
yum -y install ruby ruby-devel rubygems hpricot rubygem-hpricott
gem install git-commit-notifier
</pre>
<h3 id="section-4">To Configure Git Commit Notifier</h3>
<p>In your repository&#8217;s <code>.git/hooks</code> folder or if it&#8217;s a &#8220;bare&#8221; repository, just the hooks folder. Create a file named<br />
<code>post-receive</code> with the following content.</p>
<pre class="brush: bash; title: ; notranslate">
#!/bin/sh
git-commit-notifier ../git-commit-notifier.yml
</pre>
<p>Once you have saved the file, you need to make it executable.
<pre class="brush: bash; title: ; notranslate">
chmod 775 post-receive
</pre>
<p>After you have made the hook executable, check up one directory to the repository&#8217;s .git directory. From here you need to create and modify your git-commit-notifier&#8217;s config file. Start out by creating a file named <code>git-commit-notifier.yml</code>, and copy the below config to it.</p>
<h3 id="section-5">Git Commit Notifier Config File</h3>
<pre class="brush: bash; title: ; notranslate">
# The recipient for the commit:
mailinglist: developers@example.com

# set to true if you want to ignore empty merge messages
ignore_merge: false

# Optional parameter for the subject-line of the mail
# emailprefix: GIT

# Decorate files with link to a webview. Possible values: none or gitweb link_files: none

# select the delivery method: smtp or sendmail
delivery_method: sendmail

# settings for the smtp server
smtp_server:
address: localhost
port: 25
domain: localhost
user_name: user@localhost
password: password
authentication: plain
enable_tls: false

# settings for sendmail
sendmail_options:
location: /usr/sbin/sendmail
arguments: -i -t

# If link_files is set to &quot;gitweb&quot;, you need to configure the path to your gitweb
# instance and the project name.
gitweb:
path: &lt;a href=&quot;http://developerserver/path_to_gitweb&quot;&gt;http://developerserver/path_to_gitweb&lt;/a&gt;
project: test.git
</pre>
<a href="http://technology.mattrude.com/2011/10/git-commit-email-notifications-2/">Git Commit eMail Notifications</a> is a post from; <a href="http://technology.mattrude.com/">Matt&#039;s Technology Blog</a> which is not allowed to be copied on other sites.]]></content:encoded>
			<wfw:commentRss>http://technology.mattrude.com/2011/10/git-commit-email-notifications-2/feed/</wfw:commentRss>
		<slash:comments>5</slash:comments>
		</item>
		<item>
		<title>WordPress Sitemap Generator Plugin</title>
		<link>http://technology.mattrude.com/2011/10/wordpress-sitemap-generator-plugin-2/</link>
		<comments>http://technology.mattrude.com/2011/10/wordpress-sitemap-generator-plugin-2/#comments</comments>
		<pubDate>Fri, 07 Oct 2011 18:08:02 +0000</pubDate>
		<dc:creator>Matt Rude</dc:creator>
				<category><![CDATA[Plugins]]></category>
		<category><![CDATA[WordPress]]></category>
		<category><![CDATA[Site Management]]></category>
		<category><![CDATA[website]]></category>
		<category><![CDATA[WordPress Plugin]]></category>

		<guid isPermaLink="false">http://technology.mattrude.com/?p=3165</guid>
		<description><![CDATA[This plugin will create a sitemap for your WordPress site (http://example.com/sitemap.xml). This was originally created for a multi-site setup, but it works fine on a single site install as well. There is no &#8216;User Interface&#8217; to speak of with this &#8230; <a href="http://technology.mattrude.com/2011/10/wordpress-sitemap-generator-plugin-2/">Continue reading <span class="meta-nav">&#8594;</span></a><a href="http://technology.mattrude.com/2011/10/wordpress-sitemap-generator-plugin-2/">WordPress Sitemap Generator Plugin</a> is a post from; <a href="http://technology.mattrude.com/">Matt&#039;s Technology Blog</a> which is not allowed to be copied on other sites.]]></description>
				<content:encoded><![CDATA[<p>This plugin will create a sitemap for your WordPress site (<code>http://example.com/sitemap.xml</code>). This was originally created for a multi-site setup, but it works fine on a single site install as well. There is no &#8216;User Interface&#8217; to speak of with this plugin, just drop in place.</p>
<p>You may also download this code via it&#8217;s <a href="https://github.com/mattrude/wp-plugin-sitemap-generator">github repository</a>:</p>
<ul>
<li>Version: <a href="http://technology.mattrude.com/wp-content/uploads/sites/2/2011/10/sitemap-generator.v1.0.zip">1.0</a></li>
</ul>
<p>First, create a file named <code>sitemap-generator.php</code> in your <code>mu-plugins</code> directory, (or your <code>plugins</code> directory if your using a single install WordPress setup) and past the below into it.</p>
<pre class="brush: php; title: ; notranslate">
&lt;?php
/*
Plugin Name: Sitemap Generator
Plugin URI: http://technology.mattrude.com/2011/10/07/wordpress-sitemap-generator-plugin/
Description: Automatic generate standard XML sitemap (http://example.com/sitemap.xml) that supports the protocol including Google, Yahoo, MSN, Ask.com, and others. No files stored on your disk, the sitemap.xml file is generate as needed, like your feeds.
Version: 1.0
Author: Matt Rude
Author URI: http://mattrude.com/
*/

function sitemap_flush_rules() {
        global $wp_rewrite;
        $wp_rewrite-&amp;gt;flush_rules();
}

add_action('init', 'sitemap_flush_rules');

function xml_feed_rewrite($wp_rewrite) {
        $feed_rules = array(
                '.*sitemap.xml$' =&amp;gt; 'index.php?feed=sitemap'
        );

        $wp_rewrite-&amp;gt;rules = $feed_rules + $wp_rewrite-&amp;gt;rules;
}

add_filter('generate_rewrite_rules', 'xml_feed_rewrite');

function do_feed_sitemap() {
        $template_dir = dirname(__FILE__) . '/templates';
        load_template( $template_dir . '/feed-sitemap.php' );
}

add_action('do_feed_sitemap', 'do_feed_sitemap', 10, 1);

?&gt;
</pre>
<p>Next, create a new directory named <code>templates</code> and past the below in a file named <code>feed-sitemap.php</code> in it.</p>
<pre class="brush: php; title: ; notranslate">
&lt;?php
/*
Plugin Name: Sitemap Generator
Plugin URI: http://technology.mattrude.com/projects/sitemap-wp-plugin/
Description: Automatic generate standard XML sitemap (http://example.com/sitemap.xml) that supports the protocol including Google, Yahoo, MSN, Ask.com, and others. No files stored on your disk, the sitemap.xml file is generate as needed, like your feeds.
Version: 1.1
Author: Matt Rude
Author URI: http://mattrude.com/
*/

function sitemap_flush_rules() {
        global $wp_rewrite;
        $wp_rewrite-&gt;flush_rules();
}

add_action('init', 'sitemap_flush_rules');

function sitemap_no_trailing_slash( $redirect_url ) {
    if ( is_feed() &amp;&amp; strpos( $redirect_url, 'sitemap.xml/' ) !== FALSE )
		return;

    return $redirect_url;
}
add_filter( 'redirect_canonical', 'sitemap_no_trailing_slash' );

function xml_feed_rewrite($wp_rewrite) {
        $feed_rules = array(
                '.*sitemap.xml$' =&gt; 'index.php?feed=sitemap'
        );

        $wp_rewrite-&gt;rules = $feed_rules + $wp_rewrite-&gt;rules;
}

add_filter('generate_rewrite_rules', 'xml_feed_rewrite');

function do_feed_sitemap() {
        $template_dir = dirname(__FILE__) . '/templates';
        load_template( $template_dir . '/feed-sitemap.php' );
}

add_action('do_feed_sitemap', 'do_feed_sitemap', 10, 1);

?&gt;
</pre>
<p>Next, create a new directory named <code>templates</code> and past the below in a file named <code>feed-sitemap.php</code> in it.</p>
<pre class="brush: php; title: ; notranslate">
&lt;?php
/**
 * XML Sitemap Feed Template for displaying XML Sitemap Posts feed.
 */

//header('Content-Type: text/xml; charset=' . get_option('blog_charset'), true);

echo '&lt;?xml version=&quot;1.0&quot; encoding=&quot;'.get_option('blog_charset').'&quot;?'.'&gt;'; ?&gt;

&lt;urlset xmlns=&quot;http://www.sitemaps.org/schemas/sitemap/0.9&quot;
        xmlns:image=&quot;http://www.google.com/schemas/sitemap-image/1.1&quot;&gt;

        &lt;!-- Main Site --&gt;

        &lt;url&gt;
                &lt;loc&gt;&lt;?php bloginfo_rss('url') ?&gt;&lt;/loc&gt;
                &lt;lastmod&gt;&lt;?php echo mysql2date('Y-m-dTH:i:sZ', get_lastpostmodified('GMT'), false); ?&gt;&lt;/lastmod&gt;
                &lt;changefreq&gt;daily&lt;/changefreq&gt;
                &lt;priority&gt;0.8&lt;/priority&gt;
        &lt;/url&gt;

        &lt;!-- Site Pages --&gt;

&lt;?php
        $args = array(
                'post_type' =&gt; 'page',
                'numberposts' =&gt; 100,
                'status' =&gt; 'publish',
                'orderby' =&gt; 'date',
                'order' =&gt; 'DESC'
        );
        $post_ids = get_posts($args);

        if ($post_ids) {
                foreach ($post_ids as $post) { ?&gt;
        &lt;url&gt;
                &lt;loc&gt;&lt;?php the_permalink_rss() ?&gt;&lt;/loc&gt;
                &lt;lastmod&gt;&lt;?php echo mysql2date('Y-m-dTH:i:sZ', get_post_time('Y-m-d H:i:s', true), false); ?&gt;&lt;/lastmod&gt;
                &lt;changefreq&gt;monthly&lt;/changefreq&gt;
                &lt;priority&gt;0.7&lt;/priority&gt;
        &lt;/url&gt;
&lt;?php
 } }
?&gt;

        &lt;!-- Site Posts --&gt;

&lt;?php
        $args = array(
                'post_type' =&gt; 'post',
                'numberposts' =&gt; 100,
                'post_status' =&gt; 'publish',
                'orderby' =&gt; 'date',
                'order' =&gt; 'DESC'
        );
        $post_ids = get_posts($args);

        if ($post_ids) {
                foreach ($post_ids as $post) { ?&gt;
        &lt;url&gt;
                &lt;loc&gt;&lt;?php the_permalink_rss() ?&gt;&lt;/loc&gt;
                &lt;lastmod&gt;&lt;?php echo mysql2date('Y-m-dTH:i:sZ', get_post_time('Y-m-d H:i:s', true), false); ?&gt;&lt;/lastmod&gt;
                &lt;changefreq&gt;monthly&lt;/changefreq&gt;
                &lt;priority&gt;0.5&lt;/priority&gt;
&lt;?php
        $args2 = array(
                'post_type' =&gt; 'attachment',
                'numberposts' =&gt; 200,
                'post_parent' =&gt; $post-&gt;ID,
                'post_mime_type' =&gt; 'image',
                'orderby' =&gt; 'date',
                'order' =&gt; 'DESC'
        );
        $images = get_posts($args2);
        if ($images) {
                foreach ($images as $post) { ?&gt;
                &lt;image:image&gt;
                        &lt;image:loc&gt;&lt;?php echo wp_get_attachment_url(); ?&gt;&lt;/image:loc&gt;
&lt;?php if ( !empty($post-&gt;post_excerpt) ) echo '                 &lt;image:caption&gt;' . esc_html($post-&gt;post_excerpt, 1) . '&lt;/image:caption&gt;
'; ?&gt;
                        &lt;image:title&gt;&lt;?php echo esc_html($post-&gt;post_title, 1) ?&gt;&lt;/image:title&gt;
                &lt;/image:image&gt;
&lt;?php } } ?&gt;
        &lt;/url&gt;
&lt;?php
                }
        }
?&gt;
&lt;/urlset&gt;
</pre>
<a href="http://technology.mattrude.com/2011/10/wordpress-sitemap-generator-plugin-2/">WordPress Sitemap Generator Plugin</a> is a post from; <a href="http://technology.mattrude.com/">Matt&#039;s Technology Blog</a> which is not allowed to be copied on other sites.]]></content:encoded>
			<wfw:commentRss>http://technology.mattrude.com/2011/10/wordpress-sitemap-generator-plugin-2/feed/</wfw:commentRss>
		<slash:comments>5</slash:comments>
		</item>
		<item>
		<title>WordPress: Disabling Plugin Stylesheet</title>
		<link>http://technology.mattrude.com/2011/10/disabling-plugin-stylesheet-2/</link>
		<comments>http://technology.mattrude.com/2011/10/disabling-plugin-stylesheet-2/#comments</comments>
		<pubDate>Fri, 07 Oct 2011 17:45:39 +0000</pubDate>
		<dc:creator>Matt Rude</dc:creator>
				<category><![CDATA[Plugins]]></category>
		<category><![CDATA[WordPress]]></category>
		<category><![CDATA[Cascading Style Sheets]]></category>
		<category><![CDATA[Hypertext Transfer Protocol]]></category>
		<category><![CDATA[JavaScript]]></category>
		<category><![CDATA[Publishers]]></category>
		<category><![CDATA[Tools]]></category>
		<category><![CDATA[WordPress Plugin Directory]]></category>

		<guid isPermaLink="false">http://devel.mattrude.com/?p=38</guid>
		<description><![CDATA[You must have seen that WordPress plugins can slow your site down with additional HTTP Requests such as adding their own stylesheet. For advanced users, who are adding custom styles for the announcement, you do not need to have an &#8230; <a href="http://technology.mattrude.com/2011/10/disabling-plugin-stylesheet-2/">Continue reading <span class="meta-nav">&#8594;</span></a><a href="http://technology.mattrude.com/2011/10/disabling-plugin-stylesheet-2/">WordPress: Disabling Plugin Stylesheet</a> is a post from; <a href="http://technology.mattrude.com/">Matt&#039;s Technology Blog</a> which is not allowed to be copied on other sites.]]></description>
				<content:encoded><![CDATA[<p>You must have seen that WordPress plugins can slow your site down with additional HTTP Requests such as adding their own stylesheet. For advanced users, who are adding custom styles for the announcement, you do not need to have an additional HTTP request for a useless stylesheet. Then add the following function in your theme’s <em>functions.php</em> file:</p>
<pre class="brush: php; title: ; notranslate">
&lt;?php
add_action( 'wp_print_styles', 'my_deregister_styles', 100 );
    function my_deregister_styles() {
    wp_deregister_style( 'ninja-annc-css' );
}
?&gt;
</pre>
<a href="http://technology.mattrude.com/2011/10/disabling-plugin-stylesheet-2/">WordPress: Disabling Plugin Stylesheet</a> is a post from; <a href="http://technology.mattrude.com/">Matt&#039;s Technology Blog</a> which is not allowed to be copied on other sites.]]></content:encoded>
			<wfw:commentRss>http://technology.mattrude.com/2011/10/disabling-plugin-stylesheet-2/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Origo a 3D printer for everyone</title>
		<link>http://technology.mattrude.com/2011/09/4978/</link>
		<comments>http://technology.mattrude.com/2011/09/4978/#comments</comments>
		<pubDate>Sat, 24 Sep 2011 19:33:47 +0000</pubDate>
		<dc:creator>Matt Rude</dc:creator>
				<category><![CDATA[General]]></category>

		<guid isPermaLink="false">http://technology.mattrude.com/2011/09/24/4978/</guid>
		<description><![CDATA[Origo a 3D printer for everyone is a post from; Matt&#039;s Technology Blog which is not allowed to be copied on other sites.<a href="http://technology.mattrude.com/2011/09/4978/">Origo a 3D printer for everyone</a> is a post from; <a href="http://technology.mattrude.com/">Matt&#039;s Technology Blog</a> which is not allowed to be copied on other sites.]]></description>
				<content:encoded><![CDATA[<a href="http://technology.mattrude.com/2011/09/4978/">Origo a 3D printer for everyone</a> is a post from; <a href="http://technology.mattrude.com/">Matt&#039;s Technology Blog</a> which is not allowed to be copied on other sites.]]></content:encoded>
			<wfw:commentRss>http://technology.mattrude.com/2011/09/4978/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Dovecot v2.1+ Statistics</title>
		<link>http://technology.mattrude.com/2011/09/dovecot-v2-1-statistics/</link>
		<comments>http://technology.mattrude.com/2011/09/dovecot-v2-1-statistics/#comments</comments>
		<pubDate>Fri, 23 Sep 2011 22:46:22 +0000</pubDate>
		<dc:creator>Matt Rude</dc:creator>
				<category><![CDATA[How-To's]]></category>
		<category><![CDATA[Dovecot]]></category>
		<category><![CDATA[email]]></category>
		<category><![CDATA[Internet Message Access Protocol]]></category>
		<category><![CDATA[Internet Protocol]]></category>
		<category><![CDATA[Mail]]></category>
		<category><![CDATA[SQL]]></category>
		<category><![CDATA[Stat (Unix)]]></category>
		<category><![CDATA[Statistics]]></category>
		<category><![CDATA[User (computing)]]></category>

		<guid isPermaLink="false">http://technology.mattrude.com/?p=4936</guid>
		<description><![CDATA[There are different &#8220;zoom levels&#8221; you may use to view the following statistics: command: Per-IMAP command session: Per IMAP/POP3 connection user: Per user (all of user&#8217;s sessions summed up) domain: Per domain (all of domain&#8217;s users summed up) ip: Per &#8230; <a href="http://technology.mattrude.com/2011/09/dovecot-v2-1-statistics/">Continue reading <span class="meta-nav">&#8594;</span></a><a href="http://technology.mattrude.com/2011/09/dovecot-v2-1-statistics/">Dovecot v2.1+ Statistics</a> is a post from; <a href="http://technology.mattrude.com/">Matt&#039;s Technology Blog</a> which is not allowed to be copied on other sites.]]></description>
				<content:encoded><![CDATA[<p>There are different &#8220;zoom levels&#8221; you may use to view the following <a class="zem_slink" title="Statistics" href="http://en.wikipedia.org/wiki/Statistics" rel="wikipedia">statistics</a>:</p>
<ul>
<li>command: Per-<a class="zem_slink" title="Internet Message Access Protocol" href="http://en.wikipedia.org/wiki/Internet_Message_Access_Protocol" rel="wikipedia">IMAP</a> command</li>
<li>session: Per IMAP/POP3 connection</li>
<li>user: Per user (all of user&#8217;s sessions summed up)</li>
<li>domain: Per domain (all of domain&#8217;s users summed up)</li>
<li>ip: Per IP address (all sessions from the IP summed up)</li>
</ul>
<h3 id="section-1">Basic Configuration</h3>
<pre class="brush: php; title: ; notranslate">mail_plugins = $mail_plugins stats
protocol imap {
  mail_plugins = $mail_plugins imap_stats
}
plugin {
  # how often to session statistics
  stats_refresh = 30 secs
  # track per-IMAP command statistics
  stats_track_cmds = yes
}</pre>
<h3></h3>
<p>You&#8217;ll also need to give enough permissions for mail processes to be able to write to stats-mail fifo. For example if you use a single &#8220;vmail&#8221; user for mail access:</p>
<h3></h3>
<pre class="brush: php; title: ; notranslate">service stats {
  fifo_listener stats-mail {
    user = vmail
    mode = 0600
  }
}</pre>
<h2 id="section-2">Statistics gathered</h2>
<p>Statistics gathered using the <tt>getrusage()</tt> system call:</p>
<ul>
<li>user_cpu: User CPU (seconds.microseconds)</li>
<li>sys_cpu: System CPU (seconds.microseconds)</li>
<li>min_faults: Minor page faults (page reclaims)</li>
<li>maj_faults: Major page faults</li>
<li>vol_cs: Voluntary context switches</li>
<li>invol_cs: Involuntary context switches</li>
<li>disk_input: Number of bytes read from disk</li>
<li>disk_output: Number of bytes written to disk</li>
</ul>
<p>The disk_input and disk_output attempt to count the actual read/write bytes to physical disk, so e.g. reads from OS&#8217;s cache aren&#8217;t counted. Note that not all operating systems and filesystem support this, instead they simply show these values always as 0.</p>
<p>Statistics gathered by Dovecot&#8217;s lib-storage internally:</p>
<ul>
<li>lookup_path: Number of open() and stat() calls (i.e. &#8220;path lookups&#8221;)</li>
<li>lookup_attr: Number of stat() and <a class="zem_slink" title="Stat (Unix)" href="http://en.wikipedia.org/wiki/Stat_%28Unix%29" rel="wikipedia">fstat</a>() calls</li>
<li>read_count: Number of read() calls for message data (e.g. index files not counted)</li>
<li>read_bytes: Number of message bytes read()</li>
<li>cache_hits: Number of cache hits from <tt>dovecot.index.cache</tt> file</li>
</ul>
<p><span class="Apple-style-span" style="font-size:14px;line-height:23px"><br />
</span></p>
<a href="http://technology.mattrude.com/2011/09/dovecot-v2-1-statistics/">Dovecot v2.1+ Statistics</a> is a post from; <a href="http://technology.mattrude.com/">Matt&#039;s Technology Blog</a> which is not allowed to be copied on other sites.]]></content:encoded>
			<wfw:commentRss>http://technology.mattrude.com/2011/09/dovecot-v2-1-statistics/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Remotely Reboot Windows with VBS</title>
		<link>http://technology.mattrude.com/2011/09/remotely-reboot-windows-with-a-vbs-script/</link>
		<comments>http://technology.mattrude.com/2011/09/remotely-reboot-windows-with-a-vbs-script/#comments</comments>
		<pubDate>Tue, 13 Sep 2011 03:23:31 +0000</pubDate>
		<dc:creator>Matt Rude</dc:creator>
				<category><![CDATA[Scripts]]></category>
		<category><![CDATA[VBScript]]></category>
		<category><![CDATA[Windows]]></category>
		<category><![CDATA[Windows XP]]></category>

		<guid isPermaLink="false">http://technology.mattrude.com/?p=4971</guid>
		<description><![CDATA[Remotely Reboot Windows with VBS is a post from; Matt&#039;s Technology Blog which is not allowed to be copied on other sites.<a href="http://technology.mattrude.com/2011/09/remotely-reboot-windows-with-a-vbs-script/">Remotely Reboot Windows with VBS</a> is a post from; <a href="http://technology.mattrude.com/">Matt&#039;s Technology Blog</a> which is not allowed to be copied on other sites.]]></description>
				<content:encoded><![CDATA[<pre class="brush: plain; title: ; notranslate">
|==========================================================================
|
| COMMENT: Remotely reboots a PC.  May use machine name or IP address.
|
|==========================================================================

On Error Resume Next
mname = InputBox(&quot;Enter Machine Name&quot;, &quot;Reboot Machine&quot;)
If Len(mname) = 0 Then Wscript.Quit

if Msgbox(&quot;Are you sure you want to reboot machine &quot; &amp; mname, vbYesNo, &quot;Reboot Machine&quot;) = vbYes then

Set OpSysSet = GetObject(&quot;winmgmts:{impersonationLevel=impersonate,(RemoteShutdown)}//&quot; &amp; mname).ExecQuery(&quot;select * from Win32_OperatingSystem where Primary=true&quot;)
for each OpSys in OpSysSet
OpSys.Reboot()
next
end if
</pre>
<a href="http://technology.mattrude.com/2011/09/remotely-reboot-windows-with-a-vbs-script/">Remotely Reboot Windows with VBS</a> is a post from; <a href="http://technology.mattrude.com/">Matt&#039;s Technology Blog</a> which is not allowed to be copied on other sites.]]></content:encoded>
			<wfw:commentRss>http://technology.mattrude.com/2011/09/remotely-reboot-windows-with-a-vbs-script/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Dovecot&#8217;s Quota Plugin</title>
		<link>http://technology.mattrude.com/2011/09/dovecots-quota-plugin/</link>
		<comments>http://technology.mattrude.com/2011/09/dovecots-quota-plugin/#comments</comments>
		<pubDate>Mon, 05 Sep 2011 14:57:49 +0000</pubDate>
		<dc:creator>Matt Rude</dc:creator>
				<category><![CDATA[Notes]]></category>
		<category><![CDATA[Data Definition Language]]></category>
		<category><![CDATA[Dovecot]]></category>
		<category><![CDATA[MySQL]]></category>
		<category><![CDATA[Plugin]]></category>
		<category><![CDATA[Postfix (software)]]></category>
		<category><![CDATA[SQL]]></category>
		<category><![CDATA[SQLite]]></category>

		<guid isPermaLink="false">http://technology.mattrude.com/?p=4943</guid>
		<description><![CDATA[The below assumes your using mdbox so dirsize or dict:sql will be the fastest. Since we already have sql setup, were going to go with that. Enabling the Quota Plugin The dovecot-dict-mysql.conf file should containe something like this And lastly, add the &#8230; <a href="http://technology.mattrude.com/2011/09/dovecots-quota-plugin/">Continue reading <span class="meta-nav">&#8594;</span></a><a href="http://technology.mattrude.com/2011/09/dovecots-quota-plugin/">Dovecot&#8217;s Quota Plugin</a> is a post from; <a href="http://technology.mattrude.com/">Matt&#039;s Technology Blog</a> which is not allowed to be copied on other sites.]]></description>
				<content:encoded><![CDATA[<p>The below assumes your using <strong><a href="http://wiki2.dovecot.org/MailboxFormat/dbox" target="_blank">mdbox</a> </strong>so dirsize or dict:sql will be the fastest. Since we already have sql setup, were going to go with that.</p>
<p><strong>Enabling the Quota Plugin</strong></p>
<pre class="brush: plain; title: ; notranslate">mail_plugins = $mail_plugins quota

protocol imap {
  # Space separated list of plugins to load (default is global mail_plugins).
  mail_plugins = $mail_plugins imap_quota
}

plugin {
  # SQL backend:
  quota = dict:User quota::proxy::quota
  quota_rule = *:storage=1024M:messages=100000
  quota_rule2 = Trash:storage=+20%%
  quota_rule3 = Junk:storage=+20%%
}dict {
  quota = mysql:/etc/dovecot/dovecot-dict-mysql.conf
}</pre>
<p>The dovecot-dict-mysql.conf file should containe something like this</p>
<pre class="brush: plain; title: ; notranslate">connect = host=localhost dbname=postfix user=postfix password=postfix
map {
  pattern = priv/quota/storage
  table = quota
  username_field = username
  value_field = bytes
}
map {
  pattern = priv/quota/messages
  table = quota
  username_field = username
  value_field = messages
}</pre>
<p>And lastly, add the following table to your email servers database in <a class="zem_slink" title="MySQL" href="http://www.mysql.com" rel="homepage">mySQL</a>.</p>
<pre class="brush: plain; title: ; notranslate">CREATE TABLE quota (
  username varchar(100) not null,
  bytes bigint not null default 0,
  messages integer not null default 0,
  primary key (username)
);</pre>
<ul>
<li><strong><a href="http://wiki2.dovecot.org/Quota" rel="nofollow">http://wiki2.dovecot.org/Quota</a></strong></li>
</ul>
<a href="http://technology.mattrude.com/2011/09/dovecots-quota-plugin/">Dovecot&#8217;s Quota Plugin</a> is a post from; <a href="http://technology.mattrude.com/">Matt&#039;s Technology Blog</a> which is not allowed to be copied on other sites.]]></content:encoded>
			<wfw:commentRss>http://technology.mattrude.com/2011/09/dovecots-quota-plugin/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Doveadm Notes</title>
		<link>http://technology.mattrude.com/2011/09/doveadm-notes/</link>
		<comments>http://technology.mattrude.com/2011/09/doveadm-notes/#comments</comments>
		<pubDate>Mon, 05 Sep 2011 14:48:12 +0000</pubDate>
		<dc:creator>Matt Rude</dc:creator>
				<category><![CDATA[Notes]]></category>
		<category><![CDATA[administration utility]]></category>
		<category><![CDATA[Dovecot]]></category>
		<category><![CDATA[inbox]]></category>
		<category><![CDATA[Mail]]></category>
		<category><![CDATA[mailboxes]]></category>
		<category><![CDATA[quota status]]></category>
		<category><![CDATA[SQLite]]></category>
		<category><![CDATA[trash folder]]></category>

		<guid isPermaLink="false">http://technology.mattrude.com/?p=4940</guid>
		<description><![CDATA[Dovecot&#8216;s administration utility can be used to manage various parts of Dovecot, as well as access users&#8217; mailboxes. Here&#8217;s a list of some commonly used commands. Show all messages older then 30 days in user matt&#8217;s Inbox doveadm search -u matt &#8230; <a href="http://technology.mattrude.com/2011/09/doveadm-notes/">Continue reading <span class="meta-nav">&#8594;</span></a><a href="http://technology.mattrude.com/2011/09/doveadm-notes/">Doveadm Notes</a> is a post from; <a href="http://technology.mattrude.com/">Matt&#039;s Technology Blog</a> which is not allowed to be copied on other sites.]]></description>
				<content:encoded><![CDATA[<p><strong><a class="zem_slink" title="Dovecot (software)" href="http://www.dovecot.org" rel="homepage">Dovecot</a>&#8216;s administration utility</strong> can be used to manage various parts of Dovecot, as well as access users&#8217; mailboxes. Here&#8217;s a list of some commonly used commands.</p>
<ul>
<li><strong>Show all messages older then 30 days in user matt&#8217;s Inbox</strong></li>
</ul>
<pre>doveadm search -u matt mailbox INBOX savedbefore 30d</pre>
<ul>
<li><strong>Expunge (delete) all messages older then 7 days in matt&#8217;s Trash folder</strong></li>
</ul>
<pre>doveadm expunge -u matt mailbox Trash savedbefore 7d</pre>
<ul>
<li><strong>List current quota status for a user (-u) or all users (-A)</strong></li>
</ul>
<pre>doveadm quota get -u matt</pre>
<a href="http://technology.mattrude.com/2011/09/doveadm-notes/">Doveadm Notes</a> is a post from; <a href="http://technology.mattrude.com/">Matt&#039;s Technology Blog</a> which is not allowed to be copied on other sites.]]></content:encoded>
			<wfw:commentRss>http://technology.mattrude.com/2011/09/doveadm-notes/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Building a WordPress Cloud, Cluster Setup</title>
		<link>http://technology.mattrude.com/2011/09/building-a-wordpress-cloud-cluster-setup/</link>
		<comments>http://technology.mattrude.com/2011/09/building-a-wordpress-cloud-cluster-setup/#comments</comments>
		<pubDate>Mon, 05 Sep 2011 01:57:33 +0000</pubDate>
		<dc:creator>Matt Rude</dc:creator>
				<category><![CDATA[General]]></category>
		<category><![CDATA[load balancing]]></category>
		<category><![CDATA[MySQL]]></category>
		<category><![CDATA[Rackspace]]></category>
		<category><![CDATA[Rackspace Cloud]]></category>
		<category><![CDATA[Servers]]></category>
		<category><![CDATA[Site Management]]></category>
		<category><![CDATA[Web server]]></category>
		<category><![CDATA[WordPress]]></category>

		<guid isPermaLink="false">http://technology.mattrude.com/?p=4909</guid>
		<description><![CDATA[This how-to will explain how to build a WordPress site on 2, 3, or more Rackspace cloud servers, with full load-balancing and redundancy. To accomplish this, you will setup multiple web-servers and one or more mySQL servers, behind two Rackspace cloud load-balancers. One load-balancer will server all you &#8230; <a href="http://technology.mattrude.com/2011/09/building-a-wordpress-cloud-cluster-setup/">Continue reading <span class="meta-nav">&#8594;</span></a><a href="http://technology.mattrude.com/2011/09/building-a-wordpress-cloud-cluster-setup/">Building a WordPress Cloud, Cluster Setup</a> is a post from; <a href="http://technology.mattrude.com/">Matt&#039;s Technology Blog</a> which is not allowed to be copied on other sites.]]></description>
				<content:encoded><![CDATA[<p>This how-to will explain how to build a <a class="zem_slink" title="WordPress" href="http://wordpress.org" rel="homepage">WordPress</a> site on 2, 3, or more <a class="zem_slink" title="Rackspace Cloud" href="http://www.rackspace.com/cloud/" rel="homepage">Rackspace cloud</a> servers, with full load-balancing and redundancy.</p>
<p>To accomplish this, you will setup multiple <a class="zem_slink" title="Web server" href="http://en.wikipedia.org/wiki/Web_server" rel="wikipedia">web-servers</a> and one or more <a class="zem_slink" title="MySQL" href="http://www.mysql.com" rel="homepage">mySQL</a> servers, behind two Rackspace cloud <a class="zem_slink" title="Load balancing (computing)" href="http://en.wikipedia.org/wiki/Load_balancing_%28computing%29" rel="wikipedia">load-balancers</a>. One load-balancer will <a class="zem_slink" title="Server (computing)" href="http://en.wikipedia.org/wiki/Server_%28computing%29" rel="wikipedia">server</a> all you normal user <a class="zem_slink" title="Internet traffic" href="http://en.wikipedia.org/wiki/Internet_traffic" rel="wikipedia">internet traffic</a> from all the web-servers.  The other load-balancer will server only your secured traffic to your admin sites (Dashboard) from a single, master, server.  You will then set WordPress to only server the admins sites threw a secure connections, this way all uploads will be saved to a single server and may be distributed from there. This also insures that you will be able to see the newly uploaded file, even before it has a chance to propagate to the other servers. The flaw with this configuration is that if the Master server goes down, no posts may be created until the issue is resolved.</p>
<h3 id="section-1">The Setup</h3>
<p>There are meny different ways we can accomplish this.  Here I am going to show a two server setup, but you can easily expand this into as many servers as you wish.</p>
<ul>
<li>Server1 &#8211; Master Database Server, Master Web Server</li>
<li>Server2 &#8211; Slave Database Server, Slave Web Server or only Slave Web Server</li>
</ul>
<h3 id="section-2">Building Server1</h3>
<p>Server1 is our main server, if Server2+went down, the site would still be fully up, just slower.</p>
<p>This How-To assumes your using Fedora hosts for these setup&#8217;s.  To start out, we need Apache, php, mySQL installed on the server.</p>
<a href="http://technology.mattrude.com/2011/09/building-a-wordpress-cloud-cluster-setup/">Building a WordPress Cloud, Cluster Setup</a> is a post from; <a href="http://technology.mattrude.com/">Matt&#039;s Technology Blog</a> which is not allowed to be copied on other sites.]]></content:encoded>
			<wfw:commentRss>http://technology.mattrude.com/2011/09/building-a-wordpress-cloud-cluster-setup/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Setting time on Windows XP via NTP</title>
		<link>http://technology.mattrude.com/2011/06/setting-time-on-windows-xp-via-ntp/</link>
		<comments>http://technology.mattrude.com/2011/06/setting-time-on-windows-xp-via-ntp/#comments</comments>
		<pubDate>Wed, 22 Jun 2011 02:32:34 +0000</pubDate>
		<dc:creator>Matt Rude</dc:creator>
				<category><![CDATA[How-To's]]></category>
		<category><![CDATA[Microsoft]]></category>
		<category><![CDATA[Microsoft Knowledge Base]]></category>
		<category><![CDATA[Microsoft Windows]]></category>
		<category><![CDATA[Network Time Protocol]]></category>
		<category><![CDATA[NTP]]></category>
		<category><![CDATA[Time Server]]></category>
		<category><![CDATA[Windows Registry]]></category>
		<category><![CDATA[Windows XP]]></category>

		<guid isPermaLink="false">http://technology.mattrude.com/?p=4276</guid>
		<description><![CDATA[Windows XP has a built-in timesynchronization feature that&#8217;s designed to automaticallysynchronize your computer&#8217;s clock with an Internet time server on aregular basis. To access this feature, double-click the clock inthe notification area of the taskbar. From the Date And TimeProperties &#8230; <a href="http://technology.mattrude.com/2011/06/setting-time-on-windows-xp-via-ntp/">Continue reading <span class="meta-nav">&#8594;</span></a><a href="http://technology.mattrude.com/2011/06/setting-time-on-windows-xp-via-ntp/">Setting time on Windows XP via NTP</a> is a post from; <a href="http://technology.mattrude.com/">Matt&#039;s Technology Blog</a> which is not allowed to be copied on other sites.]]></description>
				<content:encoded><![CDATA[<p>Windows XP has a built-in timesynchronization feature that&#8217;s designed to automaticallysynchronize your computer&#8217;s clock with an Internet time server on aregular basis. To access this feature, double-click the clock inthe notification area of the taskbar. From the Date And TimeProperties dialog box, select Internet Time. Make sure that theAutomatically Synchronize With An Internet Time Server check box isselected.</p>
<p>The Server drop-down list contains two timeservers: Microsoft&#8217;s time server at time.windows.com and the U.S.government&#8217;s atomic clock at time.nist.gov.</p>
<p>While you can manually type the name of anytime server that uses the Simple Network Time Protocol (SNTP) inthe Server text box, it&#8217;s more convenient to add time servers tothe list. However, this feature is available only onstand-alone Windows XP systems or systems that are a part of aworkgroup; it is not available on Windows XP Professional systemsthat are a part of a domain. Here&#8217;s how to add time servers:</p>
<ol>
<li>Launch the Registry Editor (Regedit.exe).</li>
<li>Go to <code>HKEY_LOCAL_MACHINESOFTWAREMicrosoftWindowsCurrentVersionDateTimeServers</code></li>
<li>Right-click the Servers key, and select New | String value.</li>
<li>Name the value 3, and press [Enter] twice to access the Edit StringValue dialog box.</li>
<li>Type the address of the SNTP time server in the Value Data textbox, and click OK.</li>
<li>Repeat Steps 3 through 5 for each additional SNTP time server youwant to add, incrementing the value name each time: 4, 5, 6, and soon.</li>
<li>Close the Registry Editor.</li>
</ol>
<p>For a list of acceptable SNTP time servers, see <a href="http://support.microsoft.com/default.aspx?scid=kb;EN-US;q262680">Microsoft Knowledge Base article Q262680</a>.</p>
<a href="http://technology.mattrude.com/2011/06/setting-time-on-windows-xp-via-ntp/">Setting time on Windows XP via NTP</a> is a post from; <a href="http://technology.mattrude.com/">Matt&#039;s Technology Blog</a> which is not allowed to be copied on other sites.]]></content:encoded>
			<wfw:commentRss>http://technology.mattrude.com/2011/06/setting-time-on-windows-xp-via-ntp/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Setting Windows 7 to update from a network time server</title>
		<link>http://technology.mattrude.com/2011/06/setting-windows-7-to-update-from-a-network-time-server/</link>
		<comments>http://technology.mattrude.com/2011/06/setting-windows-7-to-update-from-a-network-time-server/#comments</comments>
		<pubDate>Thu, 16 Jun 2011 18:25:25 +0000</pubDate>
		<dc:creator>Matt Rude</dc:creator>
				<category><![CDATA[How-To's]]></category>
		<category><![CDATA[Command Prompt]]></category>
		<category><![CDATA[Command-line interface]]></category>
		<category><![CDATA[Graphical user interface]]></category>
		<category><![CDATA[Network Time Protocol]]></category>
		<category><![CDATA[Time Server]]></category>
		<category><![CDATA[Windows 7]]></category>

		<guid isPermaLink="false">http://technology.mattrude.com/?p=4256</guid>
		<description><![CDATA[If you have an issue with your system clock losing time, you’ve probably had to go and re-sync your clock with the internet time servers. The problem is that there are just way too many clicks required to get to &#8230; <a href="http://technology.mattrude.com/2011/06/setting-windows-7-to-update-from-a-network-time-server/">Continue reading <span class="meta-nav">&#8594;</span></a><a href="http://technology.mattrude.com/2011/06/setting-windows-7-to-update-from-a-network-time-server/">Setting Windows 7 to update from a network time server</a> is a post from; <a href="http://technology.mattrude.com/">Matt&#039;s Technology Blog</a> which is not allowed to be copied on other sites.]]></description>
				<content:encoded><![CDATA[<p>If you have an issue with your system clock losing time, you’ve probably had to go and re-sync your clock with the internet time servers. The problem is that there are just way too many clicks required to get to the right screen, so the command line is much simpler.</p>
<p>Note that you can partially solve this issue by changing the time server you are using or increasing the intervals between time checks, but there are some instances where you’ll just want to quickly sync the time manually.</p>
<p><strong>Sync Clock the Slow GUI Way</strong></p>
<p>First you’ll have to right-click on the clock and choose “Adjust Date/Time”</p>
<p><img class="alignnone size-full wp-image-4257" title="win7_TS-1" src="http://technology.mattrude.com/wp-content/uploads/sites/2/2011/06/win7_TS-1.png" alt="" width="264" height="287" /></p>
<p>Then you select the Internet Time tab, and click the Change Settings button…</p>
<p><img class="alignnone size-full wp-image-4268" title="win7_TS-2" src="http://technology.mattrude.com/wp-content/uploads/sites/2/2011/06/win7_TS-21.png" alt="" width="505" height="502" /></p>
<p>After the UAC prompt you can finally click the “Update now” button to tell the computer to resync.</p>
<p><img class="alignnone size-full wp-image-4269" title="win7_TS-3" src="http://technology.mattrude.com/wp-content/uploads/sites/2/2011/06/win7_TS-31.png" alt="" width="480" height="296" /></p>
<p>That’s a lot of steps… but check out how simple it is from the command line.</p>
<p><strong>Sync Clock from Command Line</strong></p>
<p>Simply open an administrative mode command prompt (right-click, Run as administrator), and then type in the following command:</p>
<pre>w32tm /resync</pre>
<p><img class="alignnone size-full wp-image-4270" title="win7_TS-4" src="http://technology.mattrude.com/wp-content/uploads/sites/2/2011/06/win7_TS-41.png" alt="" width="532" height="170" /></p>
<p>And now your clock is sync’d. If you want proof, you could check the time settings panel again.</p>
<p><img class="alignnone size-full wp-image-4271" title="win7_TS-5" src="http://technology.mattrude.com/wp-content/uploads/sites/2/2011/06/win7_TS-51.png" alt="" width="440" height="82" /></p>
<a href="http://technology.mattrude.com/2011/06/setting-windows-7-to-update-from-a-network-time-server/">Setting Windows 7 to update from a network time server</a> is a post from; <a href="http://technology.mattrude.com/">Matt&#039;s Technology Blog</a> which is not allowed to be copied on other sites.]]></content:encoded>
			<wfw:commentRss>http://technology.mattrude.com/2011/06/setting-windows-7-to-update-from-a-network-time-server/feed/</wfw:commentRss>
		<slash:comments>4</slash:comments>
		</item>
		<item>
		<title>Outlook crashes when printing</title>
		<link>http://technology.mattrude.com/2011/06/outlook-crashes-when-printing/</link>
		<comments>http://technology.mattrude.com/2011/06/outlook-crashes-when-printing/#comments</comments>
		<pubDate>Wed, 01 Jun 2011 19:25:59 +0000</pubDate>
		<dc:creator>Matt Rude</dc:creator>
				<category><![CDATA[How-To's]]></category>
		<category><![CDATA[Microsoft]]></category>
		<category><![CDATA[Microsoft Outlook]]></category>
		<category><![CDATA[Microsoft Windows]]></category>
		<category><![CDATA[User (computing)]]></category>
		<category><![CDATA[Windows XP]]></category>

		<guid isPermaLink="false">http://technology.mattrude.com/?p=4261</guid>
		<description><![CDATA[Outlook keeps its printing style settings in a file called OutlPrnt. You can run into several issues like these hangs and crashes when the file gets corrupted. On multiple occasions I’ve also seen messages been printed in right-to-left format instead &#8230; <a href="http://technology.mattrude.com/2011/06/outlook-crashes-when-printing/">Continue reading <span class="meta-nav">&#8594;</span></a><a href="http://technology.mattrude.com/2011/06/outlook-crashes-when-printing/">Outlook crashes when printing</a> is a post from; <a href="http://technology.mattrude.com/">Matt&#039;s Technology Blog</a> which is not allowed to be copied on other sites.]]></description>
				<content:encoded><![CDATA[<p>Outlook keeps its printing style settings in a file called OutlPrnt. You can run into several issues like these hangs and crashes when the file gets corrupted. On multiple occasions I’ve also seen messages been printed in right-to-left format instead of left-to-right due to OutlPrnt corruptions.</p>
<p>You can recover from this by renaming the OutlPrnt file to .old when Outlook is closed. You can find the file here;</p>
<p><strong>Windows Vista and Windows 7</strong><br />
C:Users%username%AppDataRoamingMicrosoftOutlook</p>
<p><strong>Windows XP</strong><br />
C:Documents and Settings%username%Application DataMicrosoftOutlook</p>
<a href="http://technology.mattrude.com/2011/06/outlook-crashes-when-printing/">Outlook crashes when printing</a> is a post from; <a href="http://technology.mattrude.com/">Matt&#039;s Technology Blog</a> which is not allowed to be copied on other sites.]]></content:encoded>
			<wfw:commentRss>http://technology.mattrude.com/2011/06/outlook-crashes-when-printing/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Active Directory Saved Queries</title>
		<link>http://technology.mattrude.com/2011/05/active-directory-saved-queries/</link>
		<comments>http://technology.mattrude.com/2011/05/active-directory-saved-queries/#comments</comments>
		<pubDate>Mon, 09 May 2011 19:03:05 +0000</pubDate>
		<dc:creator>Matt Rude</dc:creator>
				<category><![CDATA[How-To's]]></category>
		<category><![CDATA[Access Providers]]></category>
		<category><![CDATA[Active Directory]]></category>
		<category><![CDATA[Computers and Internet]]></category>
		<category><![CDATA[Microsoft Windows]]></category>
		<category><![CDATA[Multi-user]]></category>
		<category><![CDATA[User (computing)]]></category>

		<guid isPermaLink="false">http://technology.mattrude.com/?p=4238</guid>
		<description><![CDATA[Locked Out Users (objectCategory=Person)(objectClass=User)(lockoutTime&#62;=1) Dial In Access (&#38;(&#38;(&#38;(&#38;(objectCategory=person)(objectClass=user)(msNPAllowDialin=TRUE))))) Disabled User Accounts (&#38;(objectCategory=person)(objectClass=user)(userAccountControl:1.2.840.113556.1.4.803:=2)) No Expiring Accounts (&#38;(objectCategory=person)(objectClass=user) (userAccountControl:1.2.840.113556.1.4.803:=65536)) Active Accounts (&#38;(&#38;(objectCategory=person)(objectClass=user) (!userAccountControl:1.2.840.113556.1.4.803:=2))) Hidden Mailboxes (&#38;(objectCategory=person)(objectClass=user)(msExchHideFromAddressLists=TRUE)) Active Directory Saved Queries is a post from; Matt&#039;s Technology Blog which is not allowed to &#8230; <a href="http://technology.mattrude.com/2011/05/active-directory-saved-queries/">Continue reading <span class="meta-nav">&#8594;</span></a><a href="http://technology.mattrude.com/2011/05/active-directory-saved-queries/">Active Directory Saved Queries</a> is a post from; <a href="http://technology.mattrude.com/">Matt&#039;s Technology Blog</a> which is not allowed to be copied on other sites.]]></description>
				<content:encoded><![CDATA[<p><strong>Locked Out Users</strong></p>
<pre>(objectCategory=Person)(objectClass=User)(lockoutTime&gt;=1)</pre>
<p><strong>Dial In  Access</strong></p>
<pre>(&amp;(&amp;(&amp;(&amp;(objectCategory=person)(objectClass=user)(msNPAllowDialin=TRUE)))))</pre>
<p><strong>Disabled User Accounts</strong></p>
<pre>(&amp;(objectCategory=person)(objectClass=user)(userAccountControl:1.2.840.113556.1.4.803:=2))</pre>
<p><strong>No Expiring Accounts</strong></p>
<pre>(&amp;(objectCategory=person)(objectClass=user)
(userAccountControl:1.2.840.113556.1.4.803:=65536))</pre>
<p><strong>Active Accounts</strong></p>
<pre>(&amp;(&amp;(objectCategory=person)(objectClass=user)
(!userAccountControl:1.2.840.113556.1.4.803:=2)))</pre>
<p><strong>Hidden Mailboxes</strong></p>
<pre>(&amp;(objectCategory=person)(objectClass=user)(msExchHideFromAddressLists=TRUE))</pre>
<a href="http://technology.mattrude.com/2011/05/active-directory-saved-queries/">Active Directory Saved Queries</a> is a post from; <a href="http://technology.mattrude.com/">Matt&#039;s Technology Blog</a> which is not allowed to be copied on other sites.]]></content:encoded>
			<wfw:commentRss>http://technology.mattrude.com/2011/05/active-directory-saved-queries/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>How to Disable the System Beep in Windows 7</title>
		<link>http://technology.mattrude.com/2011/05/how-to-disable-the-system-beep-in-windows-7/</link>
		<comments>http://technology.mattrude.com/2011/05/how-to-disable-the-system-beep-in-windows-7/#comments</comments>
		<pubDate>Mon, 09 May 2011 13:55:03 +0000</pubDate>
		<dc:creator>Matt Rude</dc:creator>
				<category><![CDATA[How-To's]]></category>
		<category><![CDATA[Device Manager]]></category>
		<category><![CDATA[Microsoft Management Console]]></category>
		<category><![CDATA[Microsoft Windows]]></category>
		<category><![CDATA[Personal computer]]></category>
		<category><![CDATA[Windows]]></category>

		<guid isPermaLink="false">http://technology.mattrude.com/?p=4235</guid>
		<description><![CDATA[Click on Start and right click on My Computer. Choose Manage from the menu to open the Computer Management window. In the left hand pane, expand the group labeled System Tools and click on Device Manager. Not all devices in &#8230; <a href="http://technology.mattrude.com/2011/05/how-to-disable-the-system-beep-in-windows-7/">Continue reading <span class="meta-nav">&#8594;</span></a><a href="http://technology.mattrude.com/2011/05/how-to-disable-the-system-beep-in-windows-7/">How to Disable the System Beep in Windows 7</a> is a post from; <a href="http://technology.mattrude.com/">Matt&#039;s Technology Blog</a> which is not allowed to be copied on other sites.]]></description>
				<content:encoded><![CDATA[<p>Click on Start and right click on My Computer. Choose Manage from the menu to open the Computer Management window.</p>
<p><a href="http://technology.mattrude.com/2011/05/how-to-disable-the-system-beep-in-windows-7/disable-beep-1/" rel="attachment wp-att-4245"><img class="alignnone size-full wp-image-4245" title="disable-beep-1" src="http://technology.mattrude.com/wp-content/uploads/sites/2/2011/05/disable-beep-11.png" alt="" width="524" height="354" /></a></p>
<p>In the left hand pane, expand the group labeled System Tools and click on <strong>Device Manager</strong>.</p>
<p><a href="http://technology.mattrude.com/2011/05/how-to-disable-the-system-beep-in-windows-7/disable-beep-2/" rel="attachment wp-att-4246"><img class="alignnone size-full wp-image-4246" title="disable-beep-2" src="http://technology.mattrude.com/wp-content/uploads/sites/2/2011/05/disable-beep-21.png" alt="" width="304" height="304" /></a></p>
<p>Not all devices in your PC are displayed in the Device Manager window by default. Some devices are hidden so you need to tell Window 7 to display the hidden devices. On the menu bar, click on <strong>View-&gt;Show Hidden Devices</strong>.</p>
<p><a href="http://technology.mattrude.com/2011/05/how-to-disable-the-system-beep-in-windows-7/disable-beep-3/" rel="attachment wp-att-4248"><img class="alignnone size-full wp-image-4248" title="disable-beep-3" src="http://technology.mattrude.com/wp-content/uploads/sites/2/2011/05/disable-beep-31.png" alt="" width="354" height="254" /></a></p>
<p>Back on the Computer Management window, locate and click on a group labeled Non-Plug and Play Drivers. Here you will find a long list of non-plug and play devices connected to your computer and recognized by Windows 7. Locate an item labeled Beep, right click on it, and select Properties from the menu.</p>
<p><a href="http://technology.mattrude.com/2011/05/how-to-disable-the-system-beep-in-windows-7/disable-beep-4/" rel="attachment wp-att-4249"><img class="alignnone size-full wp-image-4249" title="disable-beep-4" src="http://technology.mattrude.com/wp-content/uploads/sites/2/2011/05/disable-beep-41.png" alt="" width="354" height="154" /></a></p>
<p>On the Beep Properties window, click the Driver tab and change the Startup Type to Disabled.</p>
<p><a href="http://technology.mattrude.com/2011/05/how-to-disable-the-system-beep-in-windows-7/disable-beep-5/" rel="attachment wp-att-4250"><img class="alignnone size-full wp-image-4250" title="disable-beep-5" src="http://technology.mattrude.com/wp-content/uploads/sites/2/2011/05/disable-beep-51.png" alt="" width="418" height="465" /></a></p>
<p>Click the <strong>OK </strong>button and restart Windows 7. From now on, you will no longer be annoyed by the occasional system beep from within your PC’s case. If you ever have need for the system beep again, follow the instructions above but change the Startup Type to System instead. Then, your internal speaker will continue to function normally with Windows 7<br />
Once the only sound of which PCs were capable, a computer’s internal speaker is now only a diagnostic tool to troubleshoot PCs with hardware errors. Using the Windows 7 Device Manager window, you can disable the System Beep and stop those annoying beeps from within your computer’s case.<br />
This is a much better solution than removing the speaker from within your PC since you or another troubleshooter may need it diagnose some computer errors.</p>
<a href="http://technology.mattrude.com/2011/05/how-to-disable-the-system-beep-in-windows-7/">How to Disable the System Beep in Windows 7</a> is a post from; <a href="http://technology.mattrude.com/">Matt&#039;s Technology Blog</a> which is not allowed to be copied on other sites.]]></content:encoded>
			<wfw:commentRss>http://technology.mattrude.com/2011/05/how-to-disable-the-system-beep-in-windows-7/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>SQLite basics</title>
		<link>http://technology.mattrude.com/2011/05/sqlite-basics/</link>
		<comments>http://technology.mattrude.com/2011/05/sqlite-basics/#comments</comments>
		<pubDate>Sun, 08 May 2011 19:01:51 +0000</pubDate>
		<dc:creator>Matt Rude</dc:creator>
				<category><![CDATA[General]]></category>
		<category><![CDATA[Database]]></category>
		<category><![CDATA[Null (SQL)]]></category>
		<category><![CDATA[Select (SQL)]]></category>
		<category><![CDATA[SQL]]></category>
		<category><![CDATA[SQLite]]></category>
		<category><![CDATA[Tools]]></category>

		<guid isPermaLink="false">http://technology.mattrude.com/?p=4229</guid>
		<description><![CDATA[Using SQLite To open a SQLite database. sqlite3 /path/to/database/file Show the tables in a database .tables To Exit SQLite .quit PHP &#38; SQLite Connect to the database try{ $dbHandle = new PDO('sqlite:/var/www/lighttpd/noc/emailserver_stat.sqlite'); }catch( PDOException $exception ){ echo "Can NOT connect &#8230; <a href="http://technology.mattrude.com/2011/05/sqlite-basics/">Continue reading <span class="meta-nav">&#8594;</span></a><a href="http://technology.mattrude.com/2011/05/sqlite-basics/">SQLite basics</a> is a post from; <a href="http://technology.mattrude.com/">Matt&#039;s Technology Blog</a> which is not allowed to be copied on other sites.]]></description>
				<content:encoded><![CDATA[<h2 id="section-1">Using SQLite</h2>
<ul>
<li><strong>To open a SQLite database.</strong></li>
</ul>
<pre>sqlite3 /path/to/database/file</pre>
<ul>
<li><strong>Show the tables in a database</strong></li>
</ul>
<pre>.tables</pre>
<ul>
<li><strong>To Exit SQLite</strong></li>
</ul>
<pre>.quit</pre>
<h2 id="section-2">PHP &amp; SQLite</h2>
<h3 id="section-3">Connect to the database</h3>
<pre>try{
$dbHandle = new PDO('sqlite:/var/www/lighttpd/noc/emailserver_stat.sqlite');
}catch( PDOException $exception ){
echo "Can NOT connect to database";
die($exception-&gt;getMessage());
}</pre>
<h3 id="section-4">Create a table if it doesn&#8217;t exist</h3>
<pre>$sqlCreateTable = 'CREATE TABLE status (date date NOT NULL default '0000-00-00', item varchar(255) NOT NULL, value varchar(255) NOT NULL)';
$dbHandle-&gt;exec($sqlCreateTable);</pre>
<h3 id="section-5">List the conent of a table</h3>
<pre>$search_date = "2009-02-11";
$sqlGetView = 'SELECT * FROM status WHERE date = "'.$search_date.'"';
$result = $dbHandle-&gt;query($sqlGetView);
echo "&lt;table border='1'&gt;";
 while ($entry = $result-&gt;fetch()) {
    echo "&lt;tr&gt;&lt;td&gt; " . $entry['value'] . "&lt;/td&gt;&lt;td&gt;" . $entry['item']. "&lt;/td&gt;&lt;/tr&gt;";
 } echo "&lt;/table&gt;";</pre>
<h3 id="section-6">Display a single value from a table</h3>
<pre>$search_date = "2009-02-11";
$sqlGetView = 'SELECT value FROM status WHERE item = 'connections' AND date = "'.$search_date.'"';
$result = $dbHandle-&gt;query($sqlGetView);
$pageView = $result-&gt;fetch();
$connections = $pageView['value'];

echo "$search_date
";
echo 'Number Of Connections: '.$connections.'
';</pre>
<a href="http://technology.mattrude.com/2011/05/sqlite-basics/">SQLite basics</a> is a post from; <a href="http://technology.mattrude.com/">Matt&#039;s Technology Blog</a> which is not allowed to be copied on other sites.]]></content:encoded>
			<wfw:commentRss>http://technology.mattrude.com/2011/05/sqlite-basics/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Configuring Spamassassin (MySQL &amp; Virtual Users)</title>
		<link>http://technology.mattrude.com/2011/05/configuring-spamassassin-mysql-virtual-users/</link>
		<comments>http://technology.mattrude.com/2011/05/configuring-spamassassin-mysql-virtual-users/#comments</comments>
		<pubDate>Sat, 07 May 2011 18:05:10 +0000</pubDate>
		<dc:creator>Matt Rude</dc:creator>
				<category><![CDATA[How-To's]]></category>
		<category><![CDATA[MySQL]]></category>
		<category><![CDATA[Postfix]]></category>
		<category><![CDATA[Postfix (software)]]></category>
		<category><![CDATA[Preference]]></category>
		<category><![CDATA[SpamAssassin]]></category>
		<category><![CDATA[Spamd]]></category>
		<category><![CDATA[SQL]]></category>
		<category><![CDATA[Table (database)]]></category>
		<category><![CDATA[User (computing)]]></category>

		<guid isPermaLink="false">http://technology.mattrude.com/?p=4218</guid>
		<description><![CDATA[With this setup you will be saving the user preferences and bayes tokens in a MySQL data source. But, while scanning a message if spamd is unable to connect to the server specified in user_scores_dsn (below) or an error occurs when querying &#8230; <a href="http://technology.mattrude.com/2011/05/configuring-spamassassin-mysql-virtual-users/">Continue reading <span class="meta-nav">&#8594;</span></a><a href="http://technology.mattrude.com/2011/05/configuring-spamassassin-mysql-virtual-users/">Configuring Spamassassin (MySQL &amp; Virtual Users)</a> is a post from; <a href="http://technology.mattrude.com/">Matt&#039;s Technology Blog</a> which is not allowed to be copied on other sites.]]></description>
				<content:encoded><![CDATA[<p>With this setup you will be saving the user preferences and bayes tokens in a <a title="MySQL" href="http://wiki.mattrude.com/MySQL">MySQL</a> data source. But, while scanning a message if spamd is unable to connect to the server specified in user_scores_dsn (below) or an error occurs when querying the SQL server then spam checking will not be performed on that message.</p>
<p>First we need to build the database table. You may download mine below.</p>
<ul>
<li><strong><a title="Spamassassin.sql" href="http://wiki.mattrude.com/images/7/7a/Spamassassin.sql">SpamAssassin Bayes tables</a></strong></li>
<li><strong><a title="Spamassassin userpref.sql" href="http://wiki.mattrude.com/images/a/a7/Spamassassin_userpref.sql">Spamassassin User Preferences table</a></strong></li>
</ul>
<p>Then import the file into the spamassassin table on your <a title="MySQL" href="http://wiki.mattrude.com/MySQL">MySQL</a> server.</p>
<pre>wget <a href="http://wiki.mattrude.com/images/7/7a/Spamassassin.sql" rel="nofollow">http://wiki.mattrude.com/images/7/7a/Spamassassin.sql</a>
wget <a href="http://wiki.mattrude.com/images/a/a7/Spamassassin_userpref.sql" rel="nofollow">http://wiki.mattrude.com/images/a/a7/Spamassassin_userpref.sql</a>
mysql -h localhost -u postfix -ppostfix spamassassin &lt; Spamassassin.sql
mysql -h localhost -u postfix -ppostfix spamassassin &lt; Spamassassin_userpref.sql</pre>
<p>To set the version number in the database, run the following.</p>
<pre>echo "INSERT INTO bayes_global_vars VALUES ('VERSION','3');" |mysql -u postfix -ppostfix spamassassin
INSERT INTO userpref (username, preference, value, prefid) VALUES ('@GLOBAL',  'required_score', '5.0', NULL);
INSERT INTO userpref (username, preference, value, prefid) VALUES ('@GLOBAL',  'rewrite_header Subject', '[SPAM]', NULL);
INSERT INTO userpref (username, preference, value, prefid) VALUES ('@GLOBAL',  'rewrite_header Subject', '1', NULL);
INSERT INTO userpref (username, preference, value, prefid) VALUES ('@GLOBAL',  'report_safe', '1', NULL);
INSERT INTO userpref (username, preference, value, prefid) VALUES ('@GLOBAL',  'trusted_networks', '192.168.1.0/24', NULL);
INSERT INTO userpref (username, preference, value, prefid) VALUES ('@GLOBAL',  'use_bayes', '1', NULL);
INSERT INTO userpref (username, preference, value, prefid) VALUES ('@GLOBAL',  'bayes_auto_learn', '1', NULL);
INSERT INTO userpref (username, preference, value, prefid) VALUES ('@GLOBAL',  'skip_rbl_checks', '0', NULL);
INSERT INTO userpref (username, preference, value, prefid) VALUES ('@GLOBAL',  'use_razor2', '1', NULL);
INSERT INTO userpref (username, preference, value, prefid) VALUES ('@GLOBAL',  'use_pyzor', '1', NULL);
INSERT INTO userpref (username, preference, value, prefid) VALUES ('@GLOBAL',  'ok_locales', '1', NULL);</pre>
<p>Now setup the configuration.</p>
<ul>
<li><strong>/etc/mail/spamassassin/local.cf</strong></li>
</ul>
<pre>required_score                  5.0
rewrite_header Subject          [SPAM]
trusted_networks                192.168.1.0/24
report_safe                     1
use_bayes                       1
bayes_auto_learn                1
skip_rbl_checks                 0
use_razor2                      1
use_pyzor                       1
ok_languages                    en

rewrite_header Subject
user_scores_dsn                 DBI:mysql:spamassassin:localhost
user_scores_sql_username        postfix
user_scores_sql_password        postfix
auto_whitelist_factory          Mail::SpamAssassin::SQLBasedAddrList
user_awl_dsn                    DBI:mysql:spamassassin:localhost
user_awl_sql_table              awl
user_awl_sql_username           postfix
user_awl_sql_password           postfix
bayes_store_module              Mail::SpamAssassin::BayesStore::MySQL
bayes_sql_dsn                   DBI:mysql:spamassassin:localhost
bayes_sql_username              postfix
bayes_sql_password              postfix</pre>
<p>The spamd server will not pay attention to SQL preferences by default, even with user_scores_dsn set in the config files. You must startup spamd with the proper options (ie -q or -Q). If the user_scores_dsn option does not exist, SpamAssassin will not attempt to use SQL for retrieving users&#8217; preferences.</p>
<p>SpamAssassin needs to be ran with the options similar to this:</p>
<pre>/usr/bin/spamd -d -x -q -Q -u nobody -r /var/run/spamd.pid</pre>
<p>I believe the best way of doing this is modify your <strong>/etc/init.d/spamassassin</strong> init file and change <strong>SPAMDOPTIONS</strong> to:</p>
<pre>SPAMDOPTIONS="-d -m5 -x -q -Q -u nobody"</pre>
<p><em>make sure <strong>/etc/sysconfig/spamassassin</strong> dosn&#8217;t override your settings run the below command to confirm spamassassin is running correctly</em></p>
<pre>ps -eaf |grep spamd</pre>
<a href="http://technology.mattrude.com/2011/05/configuring-spamassassin-mysql-virtual-users/">Configuring Spamassassin (MySQL &amp; Virtual Users)</a> is a post from; <a href="http://technology.mattrude.com/">Matt&#039;s Technology Blog</a> which is not allowed to be copied on other sites.]]></content:encoded>
			<wfw:commentRss>http://technology.mattrude.com/2011/05/configuring-spamassassin-mysql-virtual-users/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Postfix mySQL to SQLite export/import scripts</title>
		<link>http://technology.mattrude.com/2011/05/postfix-mysql-to-sqlite-exportimport-scripts/</link>
		<comments>http://technology.mattrude.com/2011/05/postfix-mysql-to-sqlite-exportimport-scripts/#comments</comments>
		<pubDate>Fri, 06 May 2011 15:41:41 +0000</pubDate>
		<dc:creator>Matt Rude</dc:creator>
				<category><![CDATA[Bash]]></category>
		<category><![CDATA[Scripts]]></category>
		<category><![CDATA[Data Definition Language]]></category>
		<category><![CDATA[Database]]></category>
		<category><![CDATA[Microsoft SQL Server]]></category>
		<category><![CDATA[SQL]]></category>
		<category><![CDATA[SQLite]]></category>
		<category><![CDATA[Tools]]></category>
		<category><![CDATA[Unique key]]></category>

		<guid isPermaLink="false">http://technology.mattrude.com/?p=4187</guid>
		<description><![CDATA[postfixdb-export.sh: #/bin/bash TMPDIR=/tmp/postfix_sqlite DATABASENAME=postfix.sqlite MYSQLDATABASE=postfix MYSQLUSER=postfix MYSQLPASS=postfix HTTPDIR=/var/www/mail.mattrude.com/noc if [ ! -e $TMPDIR ]; then mkdir -p $TMPDIR chmod a+w $TMPDIR else chmod a+w $TMPDIR fi if [ ! -e $HTTPDIR ]; then mkdir -p $HTTPDIR rm -rf $TMPDIR/csv_md5check.md5 else &#8230; <a href="http://technology.mattrude.com/2011/05/postfix-mysql-to-sqlite-exportimport-scripts/">Continue reading <span class="meta-nav">&#8594;</span></a><a href="http://technology.mattrude.com/2011/05/postfix-mysql-to-sqlite-exportimport-scripts/">Postfix mySQL to SQLite export/import scripts</a> is a post from; <a href="http://technology.mattrude.com/">Matt&#039;s Technology Blog</a> which is not allowed to be copied on other sites.]]></description>
				<content:encoded><![CDATA[<p><strong>postfixdb-export.sh:</strong></p>
<pre>#/bin/bash
TMPDIR=/tmp/postfix_sqlite
DATABASENAME=postfix.sqlite
MYSQLDATABASE=postfix
MYSQLUSER=postfix
MYSQLPASS=postfix
HTTPDIR=/var/www/mail.mattrude.com/noc

if [ ! -e $TMPDIR ]; then
 mkdir -p $TMPDIR
 chmod a+w $TMPDIR
else
 chmod a+w $TMPDIR
fi

if [ ! -e $HTTPDIR ]; then
 mkdir -p $HTTPDIR
 rm -rf $TMPDIR/csv_md5check.md5
else
 if [ ! -e $HTTPDIR/$DATABASENAME.gpg ]; then
  rm -rf $TMPDIR/csv_md5check.md5
 fi
fi

rm -rf $TMPDIR/alias.csv $TMPDIR/domain.csv $TMPDIR/mailbox.csv
echo "SELECT * FROM alias
INTO OUTFILE '$TMPDIR/alias.csv'
FIELDS TERMINATED BY '|'
LINES TERMINATED BY 'n'" |mysql $MYSQLDATABASE

echo "SELECT * FROM domain
INTO OUTFILE '$TMPDIR/domain.csv'
FIELDS TERMINATED BY '|'
LINES TERMINATED BY 'n'" |mysql $MYSQLDATABASE

echo "SELECT * FROM mailbox
INTO OUTFILE '$TMPDIR/mailbox.csv'
FIELDS TERMINATED BY '|'
LINES TERMINATED BY 'n'" |mysql $MYSQLDATABASE

if [ -e $TMPDIR/csv_md5check.md5 ]; then
 MD5STATUS=`md5sum -c $TMPDIR/csv_md5check.md5 |grep -v ".csv: OK" |wc -l` 2&gt;&amp;1
else
 MD5STATUS=999
fi

if [ $MD5STATUS != '0' ]; then
 rm -rf $TMPDIR/$DATABASENAME $TMPDIR/$DATABASENAME.md5 $TMPDIR/schema.txt
 md5sum $TMPDIR/*.csv &gt; $TMPDIR/csv_md5check.md5
 echo "Database $MYSQLDATABASE is being updated"
 echo "
 CREATE TABLE alias (
  address varchar(255) NOT NULL,
  goto text NOT NULL,
  domain varchar(255) NOT NULL,
  created datetime NOT NULL default '0000-00-00 00:00:00',
  modified datetime NOT NULL default '0000-00-00 00:00:00',
  active tinyint(1) NOT NULL default '1');

 CREATE TABLE domain (
  domain varchar(255) NOT NULL,
  description varchar(255) NOT NULL,
  aliases int(10) NOT NULL default '0',
  mailboxes int(10) NOT NULL default '0',
  maxquota bigint(20) NOT NULL default '0',
  quota bigint(20) NOT NULL default '0',
  transport varchar(255) NOT NULL,
  backupmx tinyint(1) NOT NULL default '0',
  created datetime NOT NULL default '0000-00-00 00:00:00',
  modified datetime NOT NULL default '0000-00-00 00:00:00',
  active tinyint(1) NOT NULL default '1' );

 CREATE TABLE mailbox (
  username varchar(255) NOT NULL,
  password varchar(255) NOT NULL,
  name varchar(255) NOT NULL,
  maildir varchar(255) NOT NULL,
  mailstore varchar(255) NOT NULL default 'mdbox:',
  quota bigint(20) NOT NULL default '0',
  domain varchar(255) NOT NULL,
  created datetime NOT NULL default '0000-00-00 00:00:00',
  modified datetime NOT NULL default '0000-00-00 00:00:00',
  quota_usage varchar(255),
  quota_usage_date varchar(255),
  active tinyint(1) NOT NULL default '1',
  local_part varchar(255) NOT NULL );
 " &gt; $TMPDIR/schema.txt

 echo ".read $TMPDIR/schema.txt" |sqlite3 $TMPDIR/$DATABASENAME
 echo ".import $TMPDIR/alias.csv alias" |sqlite3 $TMPDIR/$DATABASENAME
 echo ".import $TMPDIR/domain.csv domain" |sqlite3 $TMPDIR/$DATABASENAME
 echo ".import $TMPDIR/mailbox.csv mailbox" |sqlite3 $TMPDIR/$DATABASENAME

 rm -rf $HTTPDIR/$DATABASENAME $HTTPDIR/$DATABASENAME.gpg $HTTPDIR/$DATABASENAME.sig
 cp $TMPDIR/$DATABASENAME $HTTPDIR/$DATABASENAME
 cd $HTTPDIR/
 gpg -b $DATABASENAME
 gpg -se -r E2E70CD8 -r D2FAA865 -r 6503BE11 $DATABASENAME
 rm -f $HTTPDIR/$DATABASENAME
 #md5sum $DATABASENAME &gt; $DATABASENAME.md5
 #bzip2 $DATABASENAME
 #ssh odin.mattrude.com /home/matt/bin/sbin/postfix_sqlite_import.sh
fi</pre>
<p><strong>postfixdb-import.sh:</strong></p>
<pre>#/bin/bash
DBNAME=postfix.sqlite
DBDIR=/etc/postfix/database
URL=https://mail.mattrude.com/noc/postfix.sqlite
TMPDIR=/tmp/$DBNAME
LOGDIR=$TMPDIR

if [ ! -e $DBDIR ]; then
 mkdir -p $DBDIR
 chmod 700 $DBDIR
 chown 0:0 $DBDIR
fi

if [ ! -e $TMPDIR ]; then
 mkdir -p $TMPDIR
fi

if [ ! -e $LOGDIR ]; then
 mkdir -p $LOGDIR
fi

rm -rf $LOGDIR/postfix_import*.log $TMPDIR/$DBNAME.sig $DBDIR/$DBNAME.sig
wget --no-check-certificate -P $DBDIR $URL.sig &gt; $LOGDIR/postfix_import_sig_download.log  2&gt;&amp;1
SIGDOWNLOAD=$?

if [ $SIGDOWNLOAD != 0 ]; then
 echo "Did not download file $URL.sig; The host may be down or too busy."
 echo "Here is the download log:"
 cat $LOGDIR/postfix_import_sig_download.log
 echo ""
 echo "exiting script"
 exit 1
fi

cd $DBDIR
gpg --verify $DBNAME.sig &gt; /dev/null 2&gt;&amp;1
MD5STATUS=`echo $?`
if [ $MD5STATUS != '0' ]; then
 echo "Update needed, downloading updated $DBNAME."
 cd $TMPDIR
 rm -f $TMPDIR/$DBNAME.sig
 mv $DBDIR/$DBNAME.sig $TMPDIR/$DBNAME.sig
 rm -rf $TMPDIR/$DBNAME.gpg
 wget --no-check-certificate -P $TMPDIR $URL.gpg &gt; $LOGDIR/postfix_import_download.log 2&gt;&amp;1
 if [ -e $TMPDIR/$DBNAME.gpg ]; then
  cd $TMPDIR
  gpg $TMPDIR/$DBNAME.gpg &gt;&gt; $LOGDIR/postfix_import_download.log 2&gt;&amp;1
  echo "sig test 2"
  ls -lh
  gpg --verify $DBNAME.sig &gt; /dev/null 2&gt;&amp;1
  SIGTEST=`echo $?`
  if [ $SIGTEST == '0' ]; then
   cd $DBDIR
   echo "Database file $DBNAME.gpg was successfully downloaded"
   ARCHIVEDATE=`date +%Y%m%d_%H%M`
   mv $DBDIR/$DBNAME $DBDIR/$DBNAME.$ARCHIVEDATE
   mv $TMPDIR/$DBNAME $DBDIR/$DBNAME
   bzip2 $DBDIR/$DBNAME.$ARCHIVEDATE
   chown 0:0 $DBDIR/$DBNAME
   chmod 666 $DBDIR/$DBNAME
   if [ -e $DBDIR/$DBNAME ]; then
    cd $DBDIR
    cp $TMPDIR/$DBNAME.sig $DBDIR/$DBNAME.sig
    MD5TEST2=`gpg --verify $DBNAME.sig |grep -v "gpg: Good signature" |wc -l`
    if [ $MD5TEST2 = '0' ]; then
     echo "$DBNAME was updated successfully!"
     rm -rf $DBDIR/$DBNAME.sig
    else
     echo "$DBNAME was downloaded successfully but the downloaded file dose not match the signature file."
     exit 1
    fi
   else
    echo "$DBNAME was not copied to the database location ($DBDIR)."
    exit 1
   fi
  else
   echo "Database $DBNAME was not updated, the signature check failed."
   echo "Here's the Signature Check Log:"
   cd $TMPDIR
   gpg --verify $DBNAME.sig
   rm -rf $TMPDIR/$DBNAME*
  fi
 else
  echo "Database $DBNAME was not updated, file was not downloaded."
  echo ""
  echo "Here's the download log:"
  cat $LOGDIR/postfix_import_download.log
  rm -rf $TMPDIR/$DBNAME*
  rm -rf $DBDIR/$DBNAME.sig
 fi
fi
rm -rf $TMPDIR/$DBNAME.sig $DBDIR/$DBNAME.sig</pre>
<a href="http://technology.mattrude.com/2011/05/postfix-mysql-to-sqlite-exportimport-scripts/">Postfix mySQL to SQLite export/import scripts</a> is a post from; <a href="http://technology.mattrude.com/">Matt&#039;s Technology Blog</a> which is not allowed to be copied on other sites.]]></content:encoded>
			<wfw:commentRss>http://technology.mattrude.com/2011/05/postfix-mysql-to-sqlite-exportimport-scripts/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
