<?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>James Border &#187; Linux</title>
	<atom:link href="http://jamesborder.com/category/linux/feed/" rel="self" type="application/rss+xml" />
	<link>http://jamesborder.com</link>
	<description>Interactive/Mobile/iOS Developer</description>
	<lastBuildDate>Tue, 01 May 2012 21:31:23 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.2</generator>
		<item>
		<title>check for unread google emails from the command line</title>
		<link>http://jamesborder.com/2010/08/check-for-unread-google-emails-from-the-command-line/</link>
		<comments>http://jamesborder.com/2010/08/check-for-unread-google-emails-from-the-command-line/#comments</comments>
		<pubDate>Wed, 11 Aug 2010 05:55:50 +0000</pubDate>
		<dc:creator>me</dc:creator>
				<category><![CDATA[Linux]]></category>
		<category><![CDATA[Mac]]></category>

		<guid isPermaLink="false">http://jamesborder.com/?p=620</guid>
		<description><![CDATA[curl -u username &#8211;silent &#8220;https://mail.google.com/mail/feed/atom&#8221; &#124; perl -ne &#8216;print &#8220;\t&#8221; if //; print &#8220;$2\n&#8221; if /(.*)/;&#8217;]]></description>
			<content:encoded><![CDATA[<p>curl -u username &#8211;silent &#8220;https://mail.google.com/mail/feed/atom&#8221; | perl -ne &#8216;print &#8220;\t&#8221; if /<name>/; print &#8220;$2\n&#8221; if /<(title|name)>(.*)<\/\1>/;&#8217;</p>
]]></content:encoded>
			<wfw:commentRss>http://jamesborder.com/2010/08/check-for-unread-google-emails-from-the-command-line/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>ssh login goodness improved</title>
		<link>http://jamesborder.com/2010/08/ssh-login-goodness-improved/</link>
		<comments>http://jamesborder.com/2010/08/ssh-login-goodness-improved/#comments</comments>
		<pubDate>Wed, 11 Aug 2010 05:54:40 +0000</pubDate>
		<dc:creator>me</dc:creator>
				<category><![CDATA[Linux]]></category>
		<category><![CDATA[Mac]]></category>

		<guid isPermaLink="false">http://jamesborder.com/?p=618</guid>
		<description><![CDATA[cat ~/.ssh/id_rsa.pub &#124; ssh user@remotehost &#8216;cat >> ~/.ssh/authorized_keys&#8217; mmmmmmmm&#8230;..]]></description>
			<content:encoded><![CDATA[<p>cat ~/.ssh/id_rsa.pub | ssh user@remotehost &#8216;cat >> ~/.ssh/authorized_keys&#8217;</p>
<p>mmmmmmmm&#8230;.. </p>
]]></content:encoded>
			<wfw:commentRss>http://jamesborder.com/2010/08/ssh-login-goodness-improved/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Add PHP to HTML files with .htacess</title>
		<link>http://jamesborder.com/2010/07/add-php-to-html-files-with-htacess/</link>
		<comments>http://jamesborder.com/2010/07/add-php-to-html-files-with-htacess/#comments</comments>
		<pubDate>Thu, 01 Jul 2010 18:52:29 +0000</pubDate>
		<dc:creator>me</dc:creator>
				<category><![CDATA[Linux]]></category>
		<category><![CDATA[Mac]]></category>

		<guid isPermaLink="false">http://jamesborder.com/2010/07/add-php-to-html-files-with-htacess/</guid>
		<description><![CDATA[For web servers using PHP as apache module: AddType application/x-httpd-php .html .htm For web servers running PHP as CGI: AddHandler application/x-httpd-php .html .htm In case you wish to do the ASP mimick: For PHP as module: AddType application/x-httpd-php .asp OR For PHP as CGI: AddHandler application/x-httpd-php .asp]]></description>
			<content:encoded><![CDATA[<p>For web servers using PHP as apache module:</p>
<p>AddType application/x-httpd-php .html .htm</p>
<p>For web servers running PHP as CGI:</p>
<p>AddHandler application/x-httpd-php .html .htm </p>
<p>In case you wish to do the ASP mimick:</p>
<p>For PHP as module:</p>
<p>AddType application/x-httpd-php .asp</p>
<p>OR</p>
<p>For PHP as CGI:</p>
<p>AddHandler application/x-httpd-php .asp</p>
]]></content:encoded>
			<wfw:commentRss>http://jamesborder.com/2010/07/add-php-to-html-files-with-htacess/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Use htaccess to &#8220;hide&#8221; word press admin stuff</title>
		<link>http://jamesborder.com/2010/06/hide-word-press-admin-stuff/</link>
		<comments>http://jamesborder.com/2010/06/hide-word-press-admin-stuff/#comments</comments>
		<pubDate>Wed, 23 Jun 2010 02:32:04 +0000</pubDate>
		<dc:creator>me</dc:creator>
				<category><![CDATA[Linux]]></category>

		<guid isPermaLink="false">http://jamesborder.com/?p=566</guid>
		<description><![CDATA[# BEGIN WordPress RewriteEngine On RewriteBase / # replace ITSME with your own string # and yourdomain.com with well&#8230;. # Is this a request for wp-login? RewriteCond %{REQUEST_URI} ^/wp\-login\..* # Check for the secret word RewriteCond %{QUERY_STRING} .*ITSME=.* # Set a cookie, so that all future requests will be auto-authenticated RewriteRule ^.* /wp-admin/ [cookie=ITSME:true:.yourdomain.com:3600:/,R,L] # <a href='http://jamesborder.com/2010/06/hide-word-press-admin-stuff/'>[...]</a>]]></description>
			<content:encoded><![CDATA[<p># BEGIN WordPress<br />
<IfModule mod_rewrite.c><br />
RewriteEngine On<br />
RewriteBase /</p>
<p># replace ITSME with your own string<br />
# and yourdomain.com with well&#8230;.</p>
<p># Is this a request for wp-login?<br />
RewriteCond %{REQUEST_URI} ^/wp\-login\..*</p>
<p># Check for the secret word<br />
RewriteCond %{QUERY_STRING} .*ITSME=.*</p>
<p># Set a cookie, so that all future requests will be auto-authenticated<br />
RewriteRule ^.* /wp-admin/ [cookie=ITSME:true:.yourdomain.com:3600:/,R,L]</p>
<p># Is this a request to the admin?<br />
# comment out this line and you will be able to reach wp-login.php, but not anything in /wp-admin/ until you authenticate<br />
RewriteCond %{REQUEST_URI} ^/wp\-login\..* [OR]<br />
RewriteCond %{REQUEST_URI} ^/wp\-admin/.*<br />
RewriteCond %{HTTP_COOKIE} !\bITSME\b</p>
<p># Unathenticated, redirect to homepage with a disallowed indicator<br />
RewriteRule ^.* /404.php [R,L]</p>
<p>log in using:<br />
#http://www.yourdomain.com/wp-login.php?ITSME=true</p>
<p>RewriteCond %{REQUEST_FILENAME} !-f<br />
RewriteCond %{REQUEST_FILENAME} !-d<br />
RewriteRule . /index.php [L]</p>
<p></IfModule></p>
<p># END WordPress</p>
<p>see: http://www.mawhorter.net/web-development/securing-wordpress-a-passive-method-for-preventing-unauthorized-requests-to-wp-admin-and-wp-login-php for complete instructions.</p>
]]></content:encoded>
			<wfw:commentRss>http://jamesborder.com/2010/06/hide-word-press-admin-stuff/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Remove/Delete files based on mod date</title>
		<link>http://jamesborder.com/2010/06/removedelete-files-based-on-mod-date/</link>
		<comments>http://jamesborder.com/2010/06/removedelete-files-based-on-mod-date/#comments</comments>
		<pubDate>Tue, 22 Jun 2010 23:08:55 +0000</pubDate>
		<dc:creator>me</dc:creator>
				<category><![CDATA[Linux]]></category>

		<guid isPermaLink="false">http://jamesborder.com/?p=563</guid>
		<description><![CDATA[find /your/directory/here -mtime +90 -type f -exec rm -rf {} \; This command will do a search in /var/log for all files that were last modified 90 or more days ago and executes a recursive forced (-rf) remove (rm). The &#8220;{}&#8221; (curly braces) is the place holder for exec to use where it will put <a href='http://jamesborder.com/2010/06/removedelete-files-based-on-mod-date/'>[...]</a>]]></description>
			<content:encoded><![CDATA[<p>find /your/directory/here -mtime +90 -type f -exec rm -rf {} \;</p>
<p>This command will do a search in /var/log for all files that were last modified 90 or more days ago and executes a recursive forced (-rf) remove (rm). </p>
<p>The &#8220;{}&#8221; (curly braces) is the place holder for exec to use where it will put the name of the file, and the &#8220;\;&#8221; tells exec that&#8217;s the end of the statement. A a test replace the &#8220;rm -rf&#8221; with &#8220;ls -la&#8221; to get a list of all the files that would be removed.</p>
<p>But what if there is a directory you want to exclude from the search path?</p>
<p>find /your/directory/here -mtime +90 -type f ! -iwholename &#8220;*/Yo*&#8221; -exec rm -rf {} \;</p>
<p>In this case this I had a bunch of directories that were named Yo Bob, Yo Susie etc etc that needed to be skipped. That did it.</p>
]]></content:encoded>
			<wfw:commentRss>http://jamesborder.com/2010/06/removedelete-files-based-on-mod-date/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>sftp for wordpress</title>
		<link>http://jamesborder.com/2010/06/sftp-for-wordpress/</link>
		<comments>http://jamesborder.com/2010/06/sftp-for-wordpress/#comments</comments>
		<pubDate>Tue, 15 Jun 2010 05:50:23 +0000</pubDate>
		<dc:creator>me</dc:creator>
				<category><![CDATA[Linux]]></category>

		<guid isPermaLink="false">http://jamesborder.com/?p=561</guid>
		<description><![CDATA[wget http://surfnet.dl.sourceforge.net/sourceforge/libssh2/libssh2-1.0.tar.gz tar -zxvf libssh2-1.0.tar.gz cd libssh2-1.0/ (./configure, make all install) After you install libssh, remember to install the PECL module: pecl install -f ssh2 and modify your php.ini to include the following beneath Dynamic Extensions extension=ssh2.so You’ll probably need to restart Apache afterwards: /etc/init.d/apache2 restart]]></description>
			<content:encoded><![CDATA[<p>wget http://surfnet.dl.sourceforge.net/sourceforge/libssh2/libssh2-1.0.tar.gz<br />
tar -zxvf libssh2-1.0.tar.gz<br />
cd libssh2-1.0/<br />
(./configure, make all install)</p>
<p>After you install libssh, remember to install the PECL module:</p>
<p>pecl install -f ssh2<br />
and modify your php.ini to include the following beneath Dynamic Extensions</p>
<p>extension=ssh2.so<br />
You’ll probably need to restart Apache afterwards:</p>
<p>/etc/init.d/apache2 restart</p>
]]></content:encoded>
			<wfw:commentRss>http://jamesborder.com/2010/06/sftp-for-wordpress/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Checking Your BIND Config</title>
		<link>http://jamesborder.com/2010/06/checking-your-bind-config/</link>
		<comments>http://jamesborder.com/2010/06/checking-your-bind-config/#comments</comments>
		<pubDate>Wed, 09 Jun 2010 05:02:46 +0000</pubDate>
		<dc:creator>me</dc:creator>
				<category><![CDATA[Linux]]></category>

		<guid isPermaLink="false">http://jamesborder.com/?p=559</guid>
		<description><![CDATA[There are several small programs that are in the BIND package that allow integrity checking of the named configuration and zone files. These are great tools to maintain your sanity for testing purposes, as named can be quite particular about problems in the configuration and zone files. [bash]# named-checkconf /etc/ The most common errors for <a href='http://jamesborder.com/2010/06/checking-your-bind-config/'>[...]</a>]]></description>
			<content:encoded><![CDATA[<p>There are several small programs that are in the BIND package that allow integrity checking of the named configuration and zone files. These are great tools to maintain your sanity for testing purposes, as named can be quite particular about problems in the configuration and zone files.</p>
<p>[bash]# named-checkconf /etc/</p>
<p>The most common errors for misconfiguration in the named file are missing semicolons &#8220;;&#8221; after parameter settings.<br />
The zone file should be checked for format consistency, and should resemble the above example.com zone file (substitutions should be made for the domain and hosts being configured).</p>
<p>[bash]# named-checkzone -d example.com /var/named/data/master-example.com<br />
loading &#8220;example.com&#8221; from &#8220;/var/named/master-example.com&#8221; class &#8220;IN&#8221;<br />
zone example.com/IN: loaded serial 10<br />
OK</p>
<p>The reverse zone file should also be checked for any errors.<br />
[bash]# named-checkzone -d 1.168.192.in-addr.arpa /var/named/data/reverse-192.168.1<br />
loading &#8220;1.168.192.in-addr.arpa&#8221; from &#8220;/var/named/data/reverse-192.168.1&#8243; class &#8220;IN&#8221;<br />
zone 1.168.192.in-addr.arpa/IN: loaded serial 10</p>
<p>taken from:</p>
<p>http://www.brennan.id.au/08-Domain_Name_System_BIND.html</p>
]]></content:encoded>
			<wfw:commentRss>http://jamesborder.com/2010/06/checking-your-bind-config/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>PERL umask &#8211; get your 0777</title>
		<link>http://jamesborder.com/2010/06/perl-umask-get-your-0777/</link>
		<comments>http://jamesborder.com/2010/06/perl-umask-get-your-0777/#comments</comments>
		<pubDate>Mon, 07 Jun 2010 16:16:27 +0000</pubDate>
		<dc:creator>me</dc:creator>
				<category><![CDATA[Linux]]></category>

		<guid isPermaLink="false">http://jamesborder.com/?p=557</guid>
		<description><![CDATA[If perl is making your directories as 0755 even tho you&#8217;ve seriously told it 0777. Your umask is set to 0022. Change it to 0 to get perl to obey&#8230; my $umask = umask 0; mkpath(&#8220;$home/$FORM{userDir}&#8221;, 0, 0777) unless -d &#8220;$home/$FORM{userDir}&#8221;;]]></description>
			<content:encoded><![CDATA[<p>If perl is making your directories as 0755 even tho you&#8217;ve seriously told it 0777. Your <strong>umask</strong><em> is set to 0022.</p>
<p>Change it to 0 to get perl to obey&#8230;</p>
<p>my $umask = umask 0; </p>
<p>mkpath(&#8220;$home/$FORM{userDir}&#8221;, 0, 0777) unless -d &#8220;$home/$FORM{userDir}&#8221;;</p>
]]></content:encoded>
			<wfw:commentRss>http://jamesborder.com/2010/06/perl-umask-get-your-0777/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Change mod date with touch</title>
		<link>http://jamesborder.com/2010/06/change-mod-date-with-touch/</link>
		<comments>http://jamesborder.com/2010/06/change-mod-date-with-touch/#comments</comments>
		<pubDate>Wed, 02 Jun 2010 02:53:46 +0000</pubDate>
		<dc:creator>me</dc:creator>
				<category><![CDATA[Linux]]></category>

		<guid isPermaLink="false">http://jamesborder.com/?p=551</guid>
		<description><![CDATA[touch -t 05070915 somefile.txt The first four digits stand for May 7 (0507) and the last four (0915) the time, 9:15 in the morning.]]></description>
			<content:encoded><![CDATA[<p>touch -t 05070915 somefile.txt</p>
<p>The first four digits stand for May 7 (0507) and the last four (0915) the time, 9:15 in the morning.</p>
]]></content:encoded>
			<wfw:commentRss>http://jamesborder.com/2010/06/change-mod-date-with-touch/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>use htaccess to prevent hotlinked images</title>
		<link>http://jamesborder.com/2010/05/use-htaccess-to-prevent-hotlinked-images/</link>
		<comments>http://jamesborder.com/2010/05/use-htaccess-to-prevent-hotlinked-images/#comments</comments>
		<pubDate>Sat, 29 May 2010 06:21:49 +0000</pubDate>
		<dc:creator>me</dc:creator>
				<category><![CDATA[Apache]]></category>
		<category><![CDATA[Linux]]></category>

		<guid isPermaLink="false">http://jamesborder.com/?p=546</guid>
		<description><![CDATA[RewriteEngine on RewriteCond %{HTTP_REFERER} !^http://yoursite.com/.*$ [NC] RewriteCond %{HTTP_REFERER} !^http://yoursite.com$ [NC] RewriteCond %{HTTP_REFERER} !^http://www.yoursite.com/.*$ [NC] RewriteCond %{HTTP_REFERER} !^http://www.yoursite.com$ [NC] RewriteRule .*\.(jpg&#124;jpeg&#124;gif&#124;png&#124;bmp&#124;js&#124;css)$ &#8211; [F,NC]]]></description>
			<content:encoded><![CDATA[<p><IfModule mod_rewrite.c></p>
<p>RewriteEngine on  </p>
<p>RewriteCond %{HTTP_REFERER} !^http://yoursite.com/.*$      [NC]<br />
RewriteCond %{HTTP_REFERER} !^http://yoursite.com$      [NC]<br />
RewriteCond %{HTTP_REFERER} !^http://www.yoursite.com/.*$      [NC]<br />
RewriteCond %{HTTP_REFERER} !^http://www.yoursite.com$      [NC]<br />
RewriteRule .*\.(jpg|jpeg|gif|png|bmp|js|css)$ &#8211; [F,NC]</p>
<p></IfModule></p>
]]></content:encoded>
			<wfw:commentRss>http://jamesborder.com/2010/05/use-htaccess-to-prevent-hotlinked-images/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

