<?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>DAN FOLKES &#187; Linux</title>
	<atom:link href="http://danfolkes.com/category/code/linux/feed/" rel="self" type="application/rss+xml" />
	<link>http://danfolkes.com</link>
	<description>programmers blog</description>
	<lastBuildDate>Wed, 08 May 2013 18:29:17 +0000</lastBuildDate>
	<language>en-US</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.4.2</generator>
		<item>
		<title>Installing Diaspora on Ubuntu on VirtualBox</title>
		<link>http://danfolkes.com/2012/09/13/installing-diaspora-on-ubuntu-on-virtualbox/</link>
		<comments>http://danfolkes.com/2012/09/13/installing-diaspora-on-ubuntu-on-virtualbox/#comments</comments>
		<pubDate>Thu, 13 Sep 2012 20:12:13 +0000</pubDate>
		<dc:creator>dan</dc:creator>
				<category><![CDATA[Code]]></category>
		<category><![CDATA[Linux]]></category>
		<category><![CDATA[Software]]></category>
		<category><![CDATA[/script/server]]></category>
		<category><![CDATA[Apache]]></category>
		<category><![CDATA[Box]]></category>
		<category><![CDATA[bundle]]></category>
		<category><![CDATA[ca_file]]></category>
		<category><![CDATA[create]]></category>
		<category><![CDATA[db]]></category>
		<category><![CDATA[Diaspora]]></category>
		<category><![CDATA[diaspora.git]]></category>
		<category><![CDATA[exec]]></category>
		<category><![CDATA[headers]]></category>
		<category><![CDATA[image]]></category>
		<category><![CDATA[Install]]></category>
		<category><![CDATA[installing]]></category>
		<category><![CDATA[lamp]]></category>
		<category><![CDATA[mysql]]></category>
		<category><![CDATA[pod]]></category>
		<category><![CDATA[proxy proxy_balancer]]></category>
		<category><![CDATA[proxy_http]]></category>
		<category><![CDATA[rails_env]]></category>
		<category><![CDATA[rake]]></category>
		<category><![CDATA[rvm install]]></category>
		<category><![CDATA[script]]></category>
		<category><![CDATA[script server]]></category>
		<category><![CDATA[server]]></category>
		<category><![CDATA[ssh]]></category>
		<category><![CDATA[ssl]]></category>
		<category><![CDATA[SSLCertificateFile]]></category>
		<category><![CDATA[SSLCertificateKeyFile]]></category>
		<category><![CDATA[thin]]></category>
		<category><![CDATA[Ubuntu]]></category>
		<category><![CDATA[vdi]]></category>
		<category><![CDATA[Virtual]]></category>
		<category><![CDATA[Virtual Box]]></category>
		<category><![CDATA[VirtualBox]]></category>
		<category><![CDATA[VirtualHost]]></category>

		<guid isPermaLink="false">http://danfolkes.com/?p=1523</guid>
		<description><![CDATA[Installing Diaspora on Ubuntu on VirtualBox I wrote up a little howto on the Diaspora git hub: https://github.com/diaspora/diaspora/wiki/Installing-Diaspora-on-Ubuntu-on-VirtualBox<div class='yarpp-related-rss'>

Related posts:<ol>
<li><a href='http://danfolkes.com/2012/04/19/converting-a-magnet-link-into-a-torrent/' rel='bookmark' title='Converting a Magnet Link into a Torrent'>Converting a Magnet Link into a Torrent</a></li>
<li><a href='http://danfolkes.com/2011/01/26/ubuntu-samba-read-write-fstab-cifs-mount/' rel='bookmark' title='Ubuntu Samba &#8211; Read-Write-FSTAB-Cifs-Mount'>Ubuntu Samba &#8211; Read-Write-FSTAB-Cifs-Mount</a></li>
<li><a href='http://danfolkes.com/2009/03/03/started-using-git-scm-for-my-darkness-is-spreading/' rel='bookmark' title='Started Using Git SCM For my Darkness is Spreading'>Started Using Git SCM For my Darkness is Spreading</a></li>
</ol>
</div>
]]></description>
			<content:encoded><![CDATA[<p>Installing Diaspora on Ubuntu on VirtualBox</p>
<p>I wrote up a little howto on the Diaspora git hub:<br />
<a href="https://github.com/diaspora/diaspora/wiki/Installing-Diaspora-on-Ubuntu-on-VirtualBox">https://github.com/diaspora/diaspora/wiki/Installing-Diaspora-on-Ubuntu-on-VirtualBox</a></p>
<div class='yarpp-related-rss'>
<p>Related posts:<ol>
<li><a href='http://danfolkes.com/2012/04/19/converting-a-magnet-link-into-a-torrent/' rel='bookmark' title='Converting a Magnet Link into a Torrent'>Converting a Magnet Link into a Torrent</a></li>
<li><a href='http://danfolkes.com/2011/01/26/ubuntu-samba-read-write-fstab-cifs-mount/' rel='bookmark' title='Ubuntu Samba &#8211; Read-Write-FSTAB-Cifs-Mount'>Ubuntu Samba &#8211; Read-Write-FSTAB-Cifs-Mount</a></li>
<li><a href='http://danfolkes.com/2009/03/03/started-using-git-scm-for-my-darkness-is-spreading/' rel='bookmark' title='Started Using Git SCM For my Darkness is Spreading'>Started Using Git SCM For my Darkness is Spreading</a></li>
</ol></p>
</div>
]]></content:encoded>
			<wfw:commentRss>http://danfolkes.com/2012/09/13/installing-diaspora-on-ubuntu-on-virtualbox/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Sending Email with PHP, Gmail or Google Apps, Mail, and PEAR on Ubuntu</title>
		<link>http://danfolkes.com/2012/05/01/sending-email-with-php-gmail-or-google-apps-mail-and-pear-on-ubuntu/</link>
		<comments>http://danfolkes.com/2012/05/01/sending-email-with-php-gmail-or-google-apps-mail-and-pear-on-ubuntu/#comments</comments>
		<pubDate>Tue, 01 May 2012 16:40:42 +0000</pubDate>
		<dc:creator>dan</dc:creator>
				<category><![CDATA[Linux]]></category>
		<category><![CDATA[PHP]]></category>

		<guid isPermaLink="false">http://danfolkes.com/?p=1519</guid>
		<description><![CDATA[First Install Pear, Mail, Mail Mime, Net SMTP. Restart Apache: sudo apt-get install php-pear sudo pear install mail sudo pear install mail_mime sudo pear install Net_SMTP sudo /etc/init.d/apache2 restart Here is the PHP code I used to send an email: try &#123; require_once &#34;Mail.php&#34;; &#160; $from = &#34;from@example.com&#34;; $to = &#34;{$email}&#34;; $subject = &#34;Hi!&#34;; $body [...]<div class='yarpp-related-rss'>

Related posts:<ol>
<li><a href='http://danfolkes.com/2008/09/30/python-wunderground-todays-weather-to-email-sms-to-phone/' rel='bookmark' title='Python: Wunderground Todays Weather to Email SMS to Phone'>Python: Wunderground Todays Weather to Email SMS to Phone</a></li>
<li><a href='http://danfolkes.com/2010/03/31/php-gmail-imap-connection-with-database-insert/' rel='bookmark' title='PHP Gmail Imap Connection with Database Insert'>PHP Gmail Imap Connection with Database Insert</a></li>
<li><a href='http://danfolkes.com/2009/01/22/python-grab-email-from-gmail-and-insert-into-mysql-database/' rel='bookmark' title='Python: Grab Email from Gmail and Insert into MySql Database'>Python: Grab Email from Gmail and Insert into MySql Database</a></li>
</ol>
</div>
]]></description>
			<content:encoded><![CDATA[<p>First Install Pear, Mail, Mail Mime, Net SMTP.  Restart Apache:</p>

<div class="wp_syntax"><table><tr><td class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #c20cb9; font-weight: bold;">sudo</span> <span style="color: #c20cb9; font-weight: bold;">apt-get install</span> php-pear
<span style="color: #c20cb9; font-weight: bold;">sudo</span> pear <span style="color: #c20cb9; font-weight: bold;">install</span> mail
<span style="color: #c20cb9; font-weight: bold;">sudo</span> pear <span style="color: #c20cb9; font-weight: bold;">install</span> mail_mime
<span style="color: #c20cb9; font-weight: bold;">sudo</span> pear <span style="color: #c20cb9; font-weight: bold;">install</span> Net_SMTP
<span style="color: #c20cb9; font-weight: bold;">sudo</span> <span style="color: #000000; font-weight: bold;">/</span>etc<span style="color: #000000; font-weight: bold;">/</span>init.d<span style="color: #000000; font-weight: bold;">/</span>apache2 restart</pre></td></tr></table></div>

<p>Here is the PHP code I used to send an email:</p>

<div class="wp_syntax"><table><tr><td class="code"><pre class="php" style="font-family:monospace;">try <span style="color: #009900;">&#123;</span>
	<span style="color: #b1b100;">require_once</span> <span style="color: #0000ff;">&quot;Mail.php&quot;</span><span style="color: #339933;">;</span>
&nbsp;
	<span style="color: #000088;">$from</span> <span style="color: #339933;">=</span> <span style="color: #0000ff;">&quot;from@example.com&quot;</span><span style="color: #339933;">;</span>
	<span style="color: #000088;">$to</span> <span style="color: #339933;">=</span> <span style="color: #0000ff;">&quot;<span style="color: #006699; font-weight: bold;">{$email}</span>&quot;</span><span style="color: #339933;">;</span>
	<span style="color: #000088;">$subject</span> <span style="color: #339933;">=</span> <span style="color: #0000ff;">&quot;Hi!&quot;</span><span style="color: #339933;">;</span>
	<span style="color: #000088;">$body</span> <span style="color: #339933;">=</span> <span style="color: #0000ff;">&quot;Hi,<span style="color: #000099; font-weight: bold;">\n</span><span style="color: #000099; font-weight: bold;">\n</span>How are you?&quot;</span><span style="color: #339933;">;</span>
&nbsp;
	<span style="color: #000088;">$host</span> <span style="color: #339933;">=</span> <span style="color: #0000ff;">&quot;ssl://smtp.gmail.com&quot;</span><span style="color: #339933;">;</span>
	<span style="color: #000088;">$port</span> <span style="color: #339933;">=</span> <span style="color: #0000ff;">&quot;465&quot;</span><span style="color: #339933;">;</span>
	<span style="color: #000088;">$username</span> <span style="color: #339933;">=</span> <span style="color: #0000ff;">&quot;USERNAME@gmail.com&quot;</span><span style="color: #339933;">;</span> <span style="color: #666666; font-style: italic;">//This can also be a Google Apps account</span>
	<span style="color: #000088;">$password</span> <span style="color: #339933;">=</span> <span style="color: #0000ff;">&quot;PASSWORD&quot;</span><span style="color: #339933;">;</span>
&nbsp;
	<span style="color: #000088;">$headers</span> <span style="color: #339933;">=</span> <span style="color: #990000;">array</span> <span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'From'</span> <span style="color: #339933;">=&gt;</span> <span style="color: #000088;">$from</span><span style="color: #339933;">,</span>
	  <span style="color: #0000ff;">'To'</span> <span style="color: #339933;">=&gt;</span> <span style="color: #000088;">$to</span><span style="color: #339933;">,</span>
	  <span style="color: #0000ff;">'Subject'</span> <span style="color: #339933;">=&gt;</span> <span style="color: #000088;">$subject</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
	<span style="color: #000088;">$smtp</span> <span style="color: #339933;">=</span> <span style="color: #990000;">Mail</span><span style="color: #339933;">::</span><span style="color: #004000;">factory</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'smtp'</span><span style="color: #339933;">,</span>
	  <span style="color: #990000;">array</span> <span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'host'</span> <span style="color: #339933;">=&gt;</span> <span style="color: #000088;">$host</span><span style="color: #339933;">,</span>
		<span style="color: #0000ff;">'port'</span> <span style="color: #339933;">=&gt;</span> <span style="color: #000088;">$port</span><span style="color: #339933;">,</span>
		<span style="color: #0000ff;">'auth'</span> <span style="color: #339933;">=&gt;</span> <span style="color: #009900; font-weight: bold;">true</span><span style="color: #339933;">,</span>
		<span style="color: #0000ff;">'username'</span> <span style="color: #339933;">=&gt;</span> <span style="color: #000088;">$username</span><span style="color: #339933;">,</span>
		<span style="color: #0000ff;">'password'</span> <span style="color: #339933;">=&gt;</span> <span style="color: #000088;">$password</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
&nbsp;
	<span style="color: #000088;">$mail</span> <span style="color: #339933;">=</span> <span style="color: #000088;">$smtp</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">send</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$to</span><span style="color: #339933;">,</span> <span style="color: #000088;">$headers</span><span style="color: #339933;">,</span> <span style="color: #000088;">$body</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
&nbsp;
	<span style="color: #b1b100;">if</span> <span style="color: #009900;">&#40;</span>PEAR<span style="color: #339933;">::</span><span style="color: #004000;">isError</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$mail</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
	  <span style="color: #b1b100;">echo</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">&quot;&lt;p&gt;&quot;</span> <span style="color: #339933;">.</span> <span style="color: #000088;">$mail</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">getMessage</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span> <span style="color: #339933;">.</span> <span style="color: #0000ff;">&quot;&lt;/p&gt;&quot;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
	 <span style="color: #009900;">&#125;</span> <span style="color: #b1b100;">else</span> <span style="color: #009900;">&#123;</span>
	  <span style="color: #b1b100;">echo</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">&quot;&lt;p&gt;Message successfully sent!&lt;/p&gt;&quot;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
	 <span style="color: #009900;">&#125;</span>
<span style="color: #009900;">&#125;</span> catch <span style="color: #009900;">&#40;</span>Exception <span style="color: #000088;">$e</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
	<span style="color: #b1b100;">echo</span> <span style="color: #0000ff;">'Caught exception: '</span><span style="color: #339933;">,</span>  <span style="color: #000088;">$e</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">getMessage</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">,</span> <span style="color: #0000ff;">&quot;<span style="color: #000099; font-weight: bold;">\n</span>&quot;</span><span style="color: #339933;">;</span>
<span style="color: #009900;">&#125;</span></pre></td></tr></table></div>

<div class='yarpp-related-rss'>
<p>Related posts:<ol>
<li><a href='http://danfolkes.com/2008/09/30/python-wunderground-todays-weather-to-email-sms-to-phone/' rel='bookmark' title='Python: Wunderground Todays Weather to Email SMS to Phone'>Python: Wunderground Todays Weather to Email SMS to Phone</a></li>
<li><a href='http://danfolkes.com/2010/03/31/php-gmail-imap-connection-with-database-insert/' rel='bookmark' title='PHP Gmail Imap Connection with Database Insert'>PHP Gmail Imap Connection with Database Insert</a></li>
<li><a href='http://danfolkes.com/2009/01/22/python-grab-email-from-gmail-and-insert-into-mysql-database/' rel='bookmark' title='Python: Grab Email from Gmail and Insert into MySql Database'>Python: Grab Email from Gmail and Insert into MySql Database</a></li>
</ol></p>
</div>
]]></content:encoded>
			<wfw:commentRss>http://danfolkes.com/2012/05/01/sending-email-with-php-gmail-or-google-apps-mail-and-pear-on-ubuntu/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Minecraft &#8211; Script &#8211; Backup &#8211; Update Server &#8211; Restart</title>
		<link>http://danfolkes.com/2011/04/11/minecraft-script-backup-update-server-restart/</link>
		<comments>http://danfolkes.com/2011/04/11/minecraft-script-backup-update-server-restart/#comments</comments>
		<pubDate>Mon, 11 Apr 2011 23:57:12 +0000</pubDate>
		<dc:creator>dan</dc:creator>
				<category><![CDATA[Linux]]></category>

		<guid isPermaLink="false">http://danfolkes.com/?p=975</guid>
		<description><![CDATA[This is the script I use that will: Automatically backup minecraft map Automatically update minecraft server Automatically restart the server if it stops or dies #!/bin/bash while &#91; true &#93;; do # make md5 of current file for update check. md5sum minecraft_server.jar &#62; minecraft_server.jar.md5 wget -o updatelog.log -N --trust-server-names http://www.minecraft.net/download/minecraft_server.jar # display updated status if [...]<div class='yarpp-related-rss'>

Related posts:<ol>
<li><a href='http://danfolkes.com/2008/02/06/torrent-search/' rel='bookmark' title='Python Torrent Search and Download (TPB)'>Python Torrent Search and Download (TPB)</a></li>
<li><a href='http://danfolkes.com/2010/03/31/php-gmail-imap-connection-with-database-insert/' rel='bookmark' title='PHP Gmail Imap Connection with Database Insert'>PHP Gmail Imap Connection with Database Insert</a></li>
<li><a href='http://danfolkes.com/2012/03/23/how-to-remove-all-facebook-friends-script/' rel='bookmark' title='How to Remove All Facebook Friends &#8211; Script'>How to Remove All Facebook Friends &#8211; Script</a></li>
</ol>
</div>
]]></description>
			<content:encoded><![CDATA[<p>This is the script I use that will: </p>
<ul>
<li>Automatically backup minecraft map</li>
<li>Automatically update minecraft server</li>
<li>Automatically restart the server if it stops or dies</li>
</ul>

<div class="wp_syntax"><table><tr><td class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #666666; font-style: italic;">#!/bin/bash</span>
<span style="color: #000000; font-weight: bold;">while</span> <span style="color: #7a0874; font-weight: bold;">&#91;</span> <span style="color: #c20cb9; font-weight: bold;">true</span> <span style="color: #7a0874; font-weight: bold;">&#93;</span>; <span style="color: #000000; font-weight: bold;">do</span>
   <span style="color: #666666; font-style: italic;"># make md5 of current file for update check.</span>
   md5sum minecraft_server.jar <span style="color: #000000; font-weight: bold;">&gt;</span> minecraft_server.jar.md5
   <span style="color: #c20cb9; font-weight: bold;">wget</span> <span style="color: #660033;">-o</span> updatelog.log <span style="color: #660033;">-N</span> <span style="color: #660033;">--trust-server-names</span> http:<span style="color: #000000; font-weight: bold;">//</span>www.minecraft.net<span style="color: #000000; font-weight: bold;">/</span>download<span style="color: #000000; font-weight: bold;">/</span>minecraft_server.jar
   <span style="color: #666666; font-style: italic;"># display updated status</span>
   <span style="color: #000000; font-weight: bold;">if</span> md5sum <span style="color: #660033;">-c</span> <span style="color: #660033;">--status</span> minecraft_server.jar.md5 
   <span style="color: #000000; font-weight: bold;">then</span>
    <span style="color: #7a0874; font-weight: bold;">echo</span> <span style="color: #ff0000;">&quot;Server Up to Date.&quot;</span>
   <span style="color: #000000; font-weight: bold;">else</span>
    <span style="color: #7a0874; font-weight: bold;">echo</span> <span style="color: #ff0000;">&quot;Updated Server!&quot;</span>
   <span style="color: #000000; font-weight: bold;">fi</span>
   java <span style="color: #660033;">-Xmx1024M</span> <span style="color: #660033;">-Xms1024M</span> <span style="color: #660033;">-jar</span> minecraft_server.jar nogui
   rsync <span style="color: #660033;">-a</span> <span style="color: #660033;">--delete</span> <span style="color: #660033;">--progress</span> <span style="color: #000000; font-weight: bold;">/</span>home<span style="color: #000000; font-weight: bold;">/</span>dan<span style="color: #000000; font-weight: bold;">/</span>serv<span style="color: #000000; font-weight: bold;">/</span>minecraft<span style="color: #000000; font-weight: bold;">/</span>world <span style="color: #ff0000;">&quot;/home/dan/serv/minecraft/bak/world&quot;</span><span style="color: #000000; font-weight: bold;">`</span><span style="color: #7a0874; font-weight: bold;">eval</span> <span style="color: #c20cb9; font-weight: bold;">date</span> +<span style="color: #000000; font-weight: bold;">%</span>Y<span style="color: #000000; font-weight: bold;">%</span>m<span style="color: #000000; font-weight: bold;">%</span>d<span style="color: #000000; font-weight: bold;">`</span><span style="color: #ff0000;">&quot;&quot;</span>
<span style="color: #000000; font-weight: bold;">done</span></pre></td></tr></table></div>

<p>Code Explained: </p>
<p>This will put the server in an infinite loop.  You can kill it by hitting Control+C a couple times in a row.</p>

<div class="wp_syntax"><table><tr><td class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #000000; font-weight: bold;">while</span> <span style="color: #7a0874; font-weight: bold;">&#91;</span> <span style="color: #c20cb9; font-weight: bold;">true</span> <span style="color: #7a0874; font-weight: bold;">&#93;</span>; <span style="color: #000000; font-weight: bold;">do</span></pre></td></tr></table></div>

<p>This will make a hash of the current minecraft_server.jar and then download the newest copy using wget.</p>

<div class="wp_syntax"><table><tr><td class="code"><pre class="bash" style="font-family:monospace;">md5sum minecraft_server.jar <span style="color: #000000; font-weight: bold;">&gt;</span> minecraft_server.jar.md5
<span style="color: #c20cb9; font-weight: bold;">wget</span> <span style="color: #660033;">-o</span> updatelog.log <span style="color: #660033;">-N</span> <span style="color: #660033;">--trust-server-names</span> http:<span style="color: #000000; font-weight: bold;">//</span>www.minecraft.net<span style="color: #000000; font-weight: bold;">/</span>download<span style="color: #000000; font-weight: bold;">/</span>minecraft_server.jar</pre></td></tr></table></div>

<p>This will run minecraft in headless mode and with a limit on RAM.</p>

<div class="wp_syntax"><table><tr><td class="code"><pre class="bash" style="font-family:monospace;">java <span style="color: #660033;">-Xmx1024M</span> <span style="color: #660033;">-Xms1024M</span> <span style="color: #660033;">-jar</span> minecraft_server.jar nogui</pre></td></tr></table></div>

<p>This will create a backup of the minecraft world folder in a backup folder. You probably should work on this part.</p>

<div class="wp_syntax"><table><tr><td class="code"><pre class="bash" style="font-family:monospace;">rsync <span style="color: #660033;">-a</span> <span style="color: #660033;">--delete</span> <span style="color: #660033;">--progress</span> <span style="color: #000000; font-weight: bold;">/</span>path<span style="color: #000000; font-weight: bold;">/</span>to<span style="color: #000000; font-weight: bold;">/</span>minecraft<span style="color: #000000; font-weight: bold;">/</span>world <span style="color: #ff0000;">&quot;/path/to/minecraft/bak/world&quot;</span><span style="color: #000000; font-weight: bold;">`</span><span style="color: #7a0874; font-weight: bold;">eval</span> <span style="color: #c20cb9; font-weight: bold;">date</span></pre></td></tr></table></div>

<p>Well, hope this helps someone.  Have a good day.</p>
<div class='yarpp-related-rss'>
<p>Related posts:<ol>
<li><a href='http://danfolkes.com/2008/02/06/torrent-search/' rel='bookmark' title='Python Torrent Search and Download (TPB)'>Python Torrent Search and Download (TPB)</a></li>
<li><a href='http://danfolkes.com/2010/03/31/php-gmail-imap-connection-with-database-insert/' rel='bookmark' title='PHP Gmail Imap Connection with Database Insert'>PHP Gmail Imap Connection with Database Insert</a></li>
<li><a href='http://danfolkes.com/2012/03/23/how-to-remove-all-facebook-friends-script/' rel='bookmark' title='How to Remove All Facebook Friends &#8211; Script'>How to Remove All Facebook Friends &#8211; Script</a></li>
</ol></p>
</div>
]]></content:encoded>
			<wfw:commentRss>http://danfolkes.com/2011/04/11/minecraft-script-backup-update-server-restart/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Rsync &#8211; Speed Limit &#8211; Trickle &#8211; Slow</title>
		<link>http://danfolkes.com/2011/03/03/rsync-speed-limit-trickle-slow/</link>
		<comments>http://danfolkes.com/2011/03/03/rsync-speed-limit-trickle-slow/#comments</comments>
		<pubDate>Thu, 03 Mar 2011 16:25:58 +0000</pubDate>
		<dc:creator>dan</dc:creator>
				<category><![CDATA[Code]]></category>
		<category><![CDATA[Linux]]></category>
		<category><![CDATA[archive]]></category>
		<category><![CDATA[auvPe]]></category>
		<category><![CDATA[bandwidth]]></category>
		<category><![CDATA[decrease]]></category>
		<category><![CDATA[download]]></category>
		<category><![CDATA[increase]]></category>
		<category><![CDATA[KB/s]]></category>
		<category><![CDATA[Limit]]></category>
		<category><![CDATA[Limit Speed]]></category>
		<category><![CDATA[newer]]></category>
		<category><![CDATA[Rsync]]></category>
		<category><![CDATA[skip]]></category>
		<category><![CDATA[Slow]]></category>
		<category><![CDATA[Speed]]></category>
		<category><![CDATA[Speed Limit]]></category>
		<category><![CDATA[ssh]]></category>
		<category><![CDATA[Trickle]]></category>
		<category><![CDATA[upload]]></category>

		<guid isPermaLink="false">http://danfolkes.com/?p=864</guid>
		<description><![CDATA[Install rsync and trickle: sudo apt-get install rsync sudo apt-get install trickle Now you can run rsync: This will download at a limit of 80 KB/s from host: rsync -auvPe &#34;trickle -d 80 ssh&#34; user@host:/src/ /dst/ Explanation of Commands: -a, --archive archive mode; equals -rlptgoD &#40;no -H,-A,-X&#41; -u, --update skip files that are newer on [...]<div class='yarpp-related-rss'>

Related posts:<ol>
<li><a href='http://danfolkes.com/2012/05/01/sending-email-with-php-gmail-or-google-apps-mail-and-pear-on-ubuntu/' rel='bookmark' title='Sending Email with PHP, Gmail or Google Apps, Mail, and PEAR on Ubuntu'>Sending Email with PHP, Gmail or Google Apps, Mail, and PEAR on Ubuntu</a></li>
<li><a href='http://danfolkes.com/2011/04/11/minecraft-script-backup-update-server-restart/' rel='bookmark' title='Minecraft &#8211; Script &#8211; Backup &#8211; Update Server &#8211; Restart'>Minecraft &#8211; Script &#8211; Backup &#8211; Update Server &#8211; Restart</a></li>
<li><a href='http://danfolkes.com/2008/04/07/sshscpsftp-i-love-them-all/' rel='bookmark' title='SSH/SCP/SFTP I love them all.'>SSH/SCP/SFTP I love them all.</a></li>
</ol>
</div>
]]></description>
			<content:encoded><![CDATA[<p>Install rsync and trickle:</p>

<div class="wp_syntax"><table><tr><td class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #c20cb9; font-weight: bold;">sudo</span> <span style="color: #c20cb9; font-weight: bold;">apt-get install</span> rsync
<span style="color: #c20cb9; font-weight: bold;">sudo</span> <span style="color: #c20cb9; font-weight: bold;">apt-get install</span> trickle</pre></td></tr></table></div>

<p>Now you can run rsync:<br />
This will download at a limit of 80 KB/s from host:</p>

<div class="wp_syntax"><table><tr><td class="code"><pre class="bash" style="font-family:monospace;">rsync <span style="color: #660033;">-auvPe</span> <span style="color: #ff0000;">&quot;trickle -d 80 ssh&quot;</span> user<span style="color: #000000; font-weight: bold;">@</span>host:<span style="color: #000000; font-weight: bold;">/</span>src<span style="color: #000000; font-weight: bold;">/</span> <span style="color: #000000; font-weight: bold;">/</span>dst<span style="color: #000000; font-weight: bold;">/</span></pre></td></tr></table></div>

<p>Explanation of Commands:</p>

<div class="wp_syntax"><table><tr><td class="code"><pre class="bash" style="font-family:monospace;">-a, <span style="color: #660033;">--archive</span>               archive mode; equals <span style="color: #660033;">-rlptgoD</span> <span style="color: #7a0874; font-weight: bold;">&#40;</span>no -H,-A,-X<span style="color: #7a0874; font-weight: bold;">&#41;</span>
-u, <span style="color: #660033;">--update</span>                skip files that are newer on the receiver
-v, <span style="color: #660033;">--verbose</span>               increase verbosity
<span style="color: #660033;">-P</span>  <span style="color: #660033;">--progress</span>              show progress during transfer
-e, <span style="color: #660033;">--rsh</span>=COMMAND           specify the remote shell to use
trickle <span style="color: #660033;">-d</span> <span style="color: #000000;">80</span>  = <span style="color: #660033;">-d</span> rate    Limit the download bandwidth consumption to rate KB<span style="color: #000000; font-weight: bold;">/</span>s.</pre></td></tr></table></div>

<div class='yarpp-related-rss'>
<p>Related posts:<ol>
<li><a href='http://danfolkes.com/2012/05/01/sending-email-with-php-gmail-or-google-apps-mail-and-pear-on-ubuntu/' rel='bookmark' title='Sending Email with PHP, Gmail or Google Apps, Mail, and PEAR on Ubuntu'>Sending Email with PHP, Gmail or Google Apps, Mail, and PEAR on Ubuntu</a></li>
<li><a href='http://danfolkes.com/2011/04/11/minecraft-script-backup-update-server-restart/' rel='bookmark' title='Minecraft &#8211; Script &#8211; Backup &#8211; Update Server &#8211; Restart'>Minecraft &#8211; Script &#8211; Backup &#8211; Update Server &#8211; Restart</a></li>
<li><a href='http://danfolkes.com/2008/04/07/sshscpsftp-i-love-them-all/' rel='bookmark' title='SSH/SCP/SFTP I love them all.'>SSH/SCP/SFTP I love them all.</a></li>
</ol></p>
</div>
]]></content:encoded>
			<wfw:commentRss>http://danfolkes.com/2011/03/03/rsync-speed-limit-trickle-slow/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Ubuntu Samba &#8211; Read-Write-FSTAB-Cifs-Mount</title>
		<link>http://danfolkes.com/2011/01/26/ubuntu-samba-read-write-fstab-cifs-mount/</link>
		<comments>http://danfolkes.com/2011/01/26/ubuntu-samba-read-write-fstab-cifs-mount/#comments</comments>
		<pubDate>Wed, 26 Jan 2011 21:13:04 +0000</pubDate>
		<dc:creator>dan</dc:creator>
				<category><![CDATA[Linux]]></category>
		<category><![CDATA[/etc/fstab]]></category>
		<category><![CDATA[/etc/samba/smb.conf]]></category>
		<category><![CDATA[777]]></category>
		<category><![CDATA[allow]]></category>
		<category><![CDATA[chmod]]></category>
		<category><![CDATA[chown]]></category>
		<category><![CDATA[chown cifs]]></category>
		<category><![CDATA[Cifs]]></category>
		<category><![CDATA[folder]]></category>
		<category><![CDATA[FSTAB]]></category>
		<category><![CDATA[fstab cifs mount write]]></category>
		<category><![CDATA[fstab no cifs support]]></category>
		<category><![CDATA[guests]]></category>
		<category><![CDATA[invalid users = root]]></category>
		<category><![CDATA[Maverick]]></category>
		<category><![CDATA[Maverick Meerkat]]></category>
		<category><![CDATA[Meerkat]]></category>
		<category><![CDATA[Mount]]></category>
		<category><![CDATA[noatime]]></category>
		<category><![CDATA[password]]></category>
		<category><![CDATA[read]]></category>
		<category><![CDATA[read only = no]]></category>
		<category><![CDATA[read/write]]></category>
		<category><![CDATA[Samba]]></category>
		<category><![CDATA[Setup]]></category>
		<category><![CDATA[smb.conf]]></category>
		<category><![CDATA[smbd]]></category>
		<category><![CDATA[sudo apt-get install samba]]></category>
		<category><![CDATA[sudo mount -a]]></category>
		<category><![CDATA[Ubuntu]]></category>
		<category><![CDATA[username]]></category>
		<category><![CDATA[usershare]]></category>
		<category><![CDATA[usershare allow guests = yes]]></category>
		<category><![CDATA[valid users]]></category>
		<category><![CDATA[writable]]></category>
		<category><![CDATA[writable = yes]]></category>
		<category><![CDATA[write]]></category>

		<guid isPermaLink="false">http://danfolkes.com/?p=724</guid>
		<description><![CDATA[This is my current setup for my two Ubuntu 10.10 (Maverick Meerkat) boxes. One shares a read/write folder to the other. This is my setup. I think the key to this is having the same username on both computers having access to the files. You might have to run this on the the folder: sudo [...]<div class='yarpp-related-rss'>

Related posts:<ol>
<li><a href='http://danfolkes.com/2012/05/01/sending-email-with-php-gmail-or-google-apps-mail-and-pear-on-ubuntu/' rel='bookmark' title='Sending Email with PHP, Gmail or Google Apps, Mail, and PEAR on Ubuntu'>Sending Email with PHP, Gmail or Google Apps, Mail, and PEAR on Ubuntu</a></li>
<li><a href='http://danfolkes.com/2010/06/15/quick-n-easy-forms-authentication-web-conf/' rel='bookmark' title='Quick n Easy &#8211; Forms Authentication &#8211; Web.conf'>Quick n Easy &#8211; Forms Authentication &#8211; Web.conf</a></li>
<li><a href='http://danfolkes.com/2009/01/22/python-grab-email-from-gmail-and-insert-into-mysql-database/' rel='bookmark' title='Python: Grab Email from Gmail and Insert into MySql Database'>Python: Grab Email from Gmail and Insert into MySql Database</a></li>
</ol>
</div>
]]></description>
			<content:encoded><![CDATA[<p><img src="http://danfolkes.com/wp-content/uploads/2011/01/Samba-SMBd-FSTAB-Ubuntu.gif" alt="" title="Samba-SMBd-FSTAB-Ubuntu" width="373" height="297" class="alignnone size-full wp-image-727" /><br />
This is my current setup for my two Ubuntu 10.10 (Maverick Meerkat) boxes.  One shares a read/write folder to the other. This is my setup.  I think the key to this is having the same username on  both  computers having access to the files.</p>
<p>You might have to run this on the the folder:<br />
<strong>sudo chmod -R 777 /path/to/files</strong><br />
<strong>sudo chown -R usernameonbothcomputers:usernameonbothcomputers /path/to/files</strong></p>
<p>I installed samba by doing: <strong>sudo apt-get install samba</strong></p>
<p><strong>/etc/samba/smb.conf</strong> :  (on the computer serving the files)</p>

<div class="wp_syntax"><table><tr><td class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #7a0874; font-weight: bold;">&#91;</span>global<span style="color: #7a0874; font-weight: bold;">&#93;</span>
	workgroup = WORKGROUP
	server string = <span style="color: #000000; font-weight: bold;">%</span>h server <span style="color: #7a0874; font-weight: bold;">&#40;</span>Samba, Ubuntu<span style="color: #7a0874; font-weight: bold;">&#41;</span>
	dns proxy = no
&nbsp;
	interfaces = 127.0.0.0<span style="color: #000000; font-weight: bold;">/</span><span style="color: #000000;">8</span> eth0
	<span style="color: #7a0874; font-weight: bold;">bind</span> interfaces only = <span style="color: #c20cb9; font-weight: bold;">yes</span>
&nbsp;
	log <span style="color: #c20cb9; font-weight: bold;">file</span> = <span style="color: #000000; font-weight: bold;">/</span>var<span style="color: #000000; font-weight: bold;">/</span>log<span style="color: #000000; font-weight: bold;">/</span>samba<span style="color: #000000; font-weight: bold;">/</span>log.<span style="color: #000000; font-weight: bold;">%</span>m
	max log <span style="color: #c20cb9; font-weight: bold;">size</span> = <span style="color: #000000;">1000</span>
	syslog = <span style="color: #000000;">0</span>
&nbsp;
	panic action = <span style="color: #000000; font-weight: bold;">/</span>usr<span style="color: #000000; font-weight: bold;">/</span>share<span style="color: #000000; font-weight: bold;">/</span>samba<span style="color: #000000; font-weight: bold;">/</span>panic-action <span style="color: #000000; font-weight: bold;">%</span>d
	encrypt passwords = <span style="color: #c20cb9; font-weight: bold;">true</span>
	passdb backend = tdbsam
	obey pam restrictions = <span style="color: #c20cb9; font-weight: bold;">yes</span>
	unix password <span style="color: #c20cb9; font-weight: bold;">sync</span> = <span style="color: #c20cb9; font-weight: bold;">yes</span>
	<span style="color: #c20cb9; font-weight: bold;">passwd</span> program = <span style="color: #000000; font-weight: bold;">/</span>usr<span style="color: #000000; font-weight: bold;">/</span>bin<span style="color: #000000; font-weight: bold;">/</span><span style="color: #c20cb9; font-weight: bold;">passwd</span> <span style="color: #000000; font-weight: bold;">%</span>u
	<span style="color: #c20cb9; font-weight: bold;">passwd</span> chat = <span style="color: #000000; font-weight: bold;">*</span>Enter\snew\s<span style="color: #000000; font-weight: bold;">*</span>\spassword:<span style="color: #000000; font-weight: bold;">*</span> <span style="color: #000000; font-weight: bold;">%</span>n\n <span style="color: #000000; font-weight: bold;">*</span>Retype\snew\s<span style="color: #000000; font-weight: bold;">*</span>\spassword:<span style="color: #000000; font-weight: bold;">*</span> <span style="color: #000000; font-weight: bold;">%</span>n\n <span style="color: #000000; font-weight: bold;">*</span>password\supdated\ssuccessfully<span style="color: #000000; font-weight: bold;">*</span> .
	pam password change = <span style="color: #c20cb9; font-weight: bold;">yes</span>
&nbsp;
	guest account = nobody
	invalid <span style="color: #c20cb9; font-weight: bold;">users</span> = root
	usershare allow guests = <span style="color: #c20cb9; font-weight: bold;">yes</span>
&nbsp;
<span style="color: #7a0874; font-weight: bold;">&#91;</span>MyFiles<span style="color: #7a0874; font-weight: bold;">&#93;</span>
	path = <span style="color: #000000; font-weight: bold;">/</span>path<span style="color: #000000; font-weight: bold;">/</span>to<span style="color: #000000; font-weight: bold;">/</span>share
	writable = <span style="color: #c20cb9; font-weight: bold;">yes</span>
	<span style="color: #c20cb9; font-weight: bold;">read</span> only = no
	valid <span style="color: #c20cb9; font-weight: bold;">users</span> = usernameonbothcomputers</pre></td></tr></table></div>

<p><strong>sudo /etc/init.d/smbd reload</strong></p>
<p><strong>/etc/fstab</strong> :  (on the computer accessing the files)</p>

<div class="wp_syntax"><table><tr><td class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #000000; font-weight: bold;">//</span>SAMBASHAREsSERVERNAME<span style="color: #000000; font-weight: bold;">/</span>MyFiles <span style="color: #000000; font-weight: bold;">/</span>path<span style="color: #000000; font-weight: bold;">/</span>to<span style="color: #000000; font-weight: bold;">/</span><span style="color: #c20cb9; font-weight: bold;">mount</span> cifs <span style="color: #c20cb9; font-weight: bold;">users</span>,,noatime,<span style="color: #007800;">username</span>=usernameonbothcomputers,<span style="color: #007800;">password</span>=theuserspassword <span style="color: #000000;">0</span> <span style="color: #000000;">0</span></pre></td></tr></table></div>

<p>You should be able to run this to mount all things in your fstab:<br />
<strong>sudo mount -a </strong></p>
<div class='yarpp-related-rss'>
<p>Related posts:<ol>
<li><a href='http://danfolkes.com/2012/05/01/sending-email-with-php-gmail-or-google-apps-mail-and-pear-on-ubuntu/' rel='bookmark' title='Sending Email with PHP, Gmail or Google Apps, Mail, and PEAR on Ubuntu'>Sending Email with PHP, Gmail or Google Apps, Mail, and PEAR on Ubuntu</a></li>
<li><a href='http://danfolkes.com/2010/06/15/quick-n-easy-forms-authentication-web-conf/' rel='bookmark' title='Quick n Easy &#8211; Forms Authentication &#8211; Web.conf'>Quick n Easy &#8211; Forms Authentication &#8211; Web.conf</a></li>
<li><a href='http://danfolkes.com/2009/01/22/python-grab-email-from-gmail-and-insert-into-mysql-database/' rel='bookmark' title='Python: Grab Email from Gmail and Insert into MySql Database'>Python: Grab Email from Gmail and Insert into MySql Database</a></li>
</ol></p>
</div>
]]></content:encoded>
			<wfw:commentRss>http://danfolkes.com/2011/01/26/ubuntu-samba-read-write-fstab-cifs-mount/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>SSH/SCP/SFTP I love them all.</title>
		<link>http://danfolkes.com/2008/04/07/sshscpsftp-i-love-them-all/</link>
		<comments>http://danfolkes.com/2008/04/07/sshscpsftp-i-love-them-all/#comments</comments>
		<pubDate>Mon, 07 Apr 2008 15:55:23 +0000</pubDate>
		<dc:creator>dan</dc:creator>
				<category><![CDATA[Linux]]></category>
		<category><![CDATA[Software]]></category>

		<guid isPermaLink="false">http://danfolkes.com/index.php/2008/04/07/sshscpsftp-i-love-them-all/</guid>
		<description><![CDATA[I pretty much use ssh for everything. I use it mostly to connect to my home/web/this server and use it as an interface. The best program to use alongside ssh is screen. To install both ssh and screen, you may do this: sudo apt-get install ssh sudo apt-get install screen If I were good with [...]<div class='yarpp-related-rss'>

Related posts:<ol>
<li><a href='http://danfolkes.com/2011/03/03/rsync-speed-limit-trickle-slow/' rel='bookmark' title='Rsync &#8211; Speed Limit &#8211; Trickle &#8211; Slow'>Rsync &#8211; Speed Limit &#8211; Trickle &#8211; Slow</a></li>
<li><a href='http://danfolkes.com/2011/09/03/free-webcam-security-dorgem-winscp/' rel='bookmark' title='Free Webcam Security &#8211; Dorgem &#8211; WinSCP'>Free Webcam Security &#8211; Dorgem &#8211; WinSCP</a></li>
<li><a href='http://danfolkes.com/2011/01/26/ubuntu-samba-read-write-fstab-cifs-mount/' rel='bookmark' title='Ubuntu Samba &#8211; Read-Write-FSTAB-Cifs-Mount'>Ubuntu Samba &#8211; Read-Write-FSTAB-Cifs-Mount</a></li>
</ol>
</div>
]]></description>
			<content:encoded><![CDATA[<p><a href='http://danfolkes.com/wp-content/uploads/2008/04/ssh_binary_packet_alt.jpg' title='ssh_binary_packet_alt_sm.jpg'><img src='http://danfolkes.com/wp-content/uploads/2008/04/ssh_binary_packet_alt_sm.jpg' alt='ssh_binary_packet_alt_sm.jpg' /></a><br />
I pretty much use ssh for everything.  I use it mostly to connect to my home/web/this server and use it as an interface.  The best program to use alongside ssh is screen.</p>
<p>To install both ssh and screen, you may do this:</p>
<ol>
<li>sudo apt-get install ssh</li>
<li>sudo apt-get install screen</li>
</ol>
<p>If I were good with words, I would write a poem for ssh.  But alas, I am not.  So, you get the first page from the <a href="http://en.wikipedia.org/wiki/Secure_Shell">Wikipedia Entry</a>.</p>
<p>Secure Shell or SSH is a network protocol that allows data to be exchanged over a secure channel between two computers. Encryption provides confidentiality and integrity of data. SSH uses public-key cryptography to authenticate the remote computer and allow the remote computer to authenticate the user, if necessary.</p>
<p>Here are a few of the best SSH/SCP commands EVER:</p>
<ol>
<li>
ssh server.com
</li>
</ol>
<ol>
<li>
scp server.com:./ /home/local/downloadhere/
</li>
</ol>
<ul>Popular/Best SSH/SCP/Clients (mostly for windows, because linux usually already has tools built in.):</p>
<li>WinSCP</li>
<li>Putty</li>
<li>gFTP</li>
<li>the normal commands that come with Linux(ssh, scp)</li>
</ul>
<div class='yarpp-related-rss'>
<p>Related posts:<ol>
<li><a href='http://danfolkes.com/2011/03/03/rsync-speed-limit-trickle-slow/' rel='bookmark' title='Rsync &#8211; Speed Limit &#8211; Trickle &#8211; Slow'>Rsync &#8211; Speed Limit &#8211; Trickle &#8211; Slow</a></li>
<li><a href='http://danfolkes.com/2011/09/03/free-webcam-security-dorgem-winscp/' rel='bookmark' title='Free Webcam Security &#8211; Dorgem &#8211; WinSCP'>Free Webcam Security &#8211; Dorgem &#8211; WinSCP</a></li>
<li><a href='http://danfolkes.com/2011/01/26/ubuntu-samba-read-write-fstab-cifs-mount/' rel='bookmark' title='Ubuntu Samba &#8211; Read-Write-FSTAB-Cifs-Mount'>Ubuntu Samba &#8211; Read-Write-FSTAB-Cifs-Mount</a></li>
</ol></p>
</div>
]]></content:encoded>
			<wfw:commentRss>http://danfolkes.com/2008/04/07/sshscpsftp-i-love-them-all/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

<!-- Performance optimized by W3 Total Cache. Learn more: http://www.w3-edge.com/wordpress-plugins/

Page Caching using disk: enhanced

 Served from: danfolkes.com @ 2013-05-23 05:21:11 by W3 Total Cache -->