<?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>Linux How-Tos and Indie Rock by seanp2k.com &#187; Computers</title>
	<atom:link href="http://seanp2k.com/category/computers/feed/" rel="self" type="application/rss+xml" />
	<link>http://seanp2k.com</link>
	<description>Linux Tips, Tricks, Hacks, Snarky commentary, and Indie Rock all at seanp2k.com</description>
	<lastBuildDate>Tue, 09 Feb 2010 15:10:38 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.0</generator>
		<item>
		<title>Spyware removal &#8211; Google search redirectors</title>
		<link>http://seanp2k.com/2009/12/spyware-removal-google-search-redirectors/</link>
		<comments>http://seanp2k.com/2009/12/spyware-removal-google-search-redirectors/#comments</comments>
		<pubDate>Thu, 10 Dec 2009 03:45:30 +0000</pubDate>
		<dc:creator>sean</dc:creator>
				<category><![CDATA[Computers]]></category>

		<guid isPermaLink="false">http://seanp2k.com/?p=101</guid>
		<description><![CDATA[I recently go some spyware through Google&#8217;s Chrome browser. I had disabled AVG 9 in hopes of getting Mass Effect to run longer than 30 minutes without crashing (to no avail). Anyway, I was doing something on the internet somewhere and I saw the evil AntiVirus2009 window pop up and the icon in my system [...]]]></description>
			<content:encoded><![CDATA[<p>I recently go some spyware through Google&#8217;s Chrome browser.  I had disabled AVG 9 in hopes of getting Mass Effect to run longer than 30 minutes without crashing (to no avail).</p>
<p>Anyway, I was doing something on the internet somewhere and I saw the evil AntiVirus2009 window pop up and the icon in my system tray.  I knew the next few hours would be packed with fun!</p>
<p><strong>The key, I found, was to completely clear all of the cookies from all of my browsers (FireFox, Internet Explorer, MineField, Opera, Chrome, Chromium, and Iron).  This fixed the link redirection issue.</strong></p>
<p>Here are the free projects that let me eventually remove all the crap from Windows XP:<br />
1.) Ultimate Boot CD.  I loaded it and ran EZ PC Fix to clear my temp files and recycler. http://www.ubcd4win.com/index.htm<br />
2.) Malware Bytes: http://www.malwarebytes.org/<br />
3.) SpyBot SD: http://www.safer-networking.org/en/index.html<br />
4.) AutoRuns: http://technet.microsoft.com/en-us/sysinternals/bb963902.aspx<br />
5.) Hijack This: http://free.antivirus.com/hijackthis/<br />
6.) LSPFix: http://www.cexx.org/lspfix.htm<br />
7.) WinSockXP fix: http://www.snapfiles.com/get/winsockxpfix.html<br />
8.) Fixwareout: Source unknown, can be found at <a href="http://ip2k.com/tools">http://ip2k.com/tools</a><br />
9.) Dial-A-Fix: http://wiki.lunarsoft.net/wiki/Dial-a-fix<br />
10.) Windows Installer CleanUp Utility (to remove broken MSI packages): http://support.microsoft.com/kb/290301</p>
<p>I have the hard-to-find stuff mirrored <a href="http://ip2k.com/tools">here ( http://ip2k.com/tools )</a> so it never gets lost</p>
]]></content:encoded>
			<wfw:commentRss>http://seanp2k.com/2009/12/spyware-removal-google-search-redirectors/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Update your Motrola Droid to Android 2.0.1</title>
		<link>http://seanp2k.com/2009/12/update-your-motrola-droid-to-android-2-0-1/</link>
		<comments>http://seanp2k.com/2009/12/update-your-motrola-droid-to-android-2-0-1/#comments</comments>
		<pubDate>Thu, 10 Dec 2009 03:35:29 +0000</pubDate>
		<dc:creator>sean</dc:creator>
				<category><![CDATA[Computers]]></category>
		<category><![CDATA[Technology]]></category>
		<category><![CDATA[2.0.1]]></category>
		<category><![CDATA[android]]></category>
		<category><![CDATA[android software]]></category>
		<category><![CDATA[android update]]></category>
		<category><![CDATA[droid]]></category>
		<category><![CDATA[firmware]]></category>
		<category><![CDATA[firmware upgrade]]></category>
		<category><![CDATA[motorola]]></category>
		<category><![CDATA[update android]]></category>

		<guid isPermaLink="false">http://seanp2k.com/?p=102</guid>
		<description><![CDATA[1.) Download the update file from http://ip2k.com/droid_2-0-1.zip 2.) rename the file &#8220;update.zip&#8221; 3.) Upload the zip file (do NOT extract it, leave it zipped!) to the root of your MicroSD card (not in any folders, just on the root of the card) 4.) You needed to pull the battery in your Droid to get the [...]]]></description>
			<content:encoded><![CDATA[<p>1.) Download the update file from <a href="http://ip2k.com/droid_2-0-1.zip">http://ip2k.com/droid_2-0-1.zip</a><br />
2.) rename the file &#8220;update.zip&#8221;<br />
3.) Upload the zip file (do NOT extract it, leave it zipped!) to the root of your MicroSD card (not in any folders, just on the root of the card)<br />
4.) You needed to pull the battery in your Droid to get the card out, so replace the card and open the keyboard.<br />
5.) Hold the &#8220;x&#8221; key on the Droid&#8217;s keyboard and power it on.  Continue holding &#8220;x&#8221; until you see a triangle with an exclamation point.<br />
6.) Release the &#8220;x&#8221; key.  Simultaneous press the &#8220;volume up&#8221; and &#8220;camera shutter&#8221; buttons.  A menu should pop up.<br />
7.) Using the D-Pad, select to update the system software from the update.zip file.<br />
8.) The update will take a few minutes.  During this time, do NOT pull the battery or attempt to turn off the phone.  Doing so may corrupt the firmware on your device and render it unbootable.<br />
9.) Once the update is complete, select &#8220;Reboot system now&#8221;.  Enjoy!</p>
<p>This was written based on the original article at <a href="http://www.phonearena.com/htmls/Want-to-manually-update-your-Motorola-DROIDs-software-Heres-how.-article-comments-a_8232-p_2.html">http://www.phonearena.com/htmls/Want-to-manually-update-your-Motorola-DROIDs-software-Heres-how.-article-comments-a_8232-p_2.html</a><br />
md5sum of orig file (and my mirror):  3af35446905040a3123ec09195299596</p>
]]></content:encoded>
			<wfw:commentRss>http://seanp2k.com/2009/12/update-your-motrola-droid-to-android-2-0-1/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Apple losing enterprise credability</title>
		<link>http://seanp2k.com/2009/11/apple-losing-enterprise-credability/</link>
		<comments>http://seanp2k.com/2009/11/apple-losing-enterprise-credability/#comments</comments>
		<pubDate>Sun, 01 Nov 2009 12:51:21 +0000</pubDate>
		<dc:creator>sean</dc:creator>
				<category><![CDATA[Computers]]></category>
		<category><![CDATA[Technology]]></category>
		<category><![CDATA[apple]]></category>
		<category><![CDATA[dead]]></category>
		<category><![CDATA[dying]]></category>
		<category><![CDATA[error]]></category>
		<category><![CDATA[hardware encryption]]></category>
		<category><![CDATA[hardware encryption error]]></category>
		<category><![CDATA[iphone]]></category>
		<category><![CDATA[iphone 3g]]></category>
		<category><![CDATA[iphone 3g hardware encryption]]></category>
		<category><![CDATA[iphone 3G S]]></category>
		<category><![CDATA[iphone 3GS]]></category>
		<category><![CDATA[iphone OS 3]]></category>
		<category><![CDATA[iphone OS 3.1]]></category>
		<category><![CDATA[ipod touch]]></category>
		<category><![CDATA[ipod touch 2g]]></category>
		<category><![CDATA[ipod touch 3g]]></category>
		<category><![CDATA[time capsule]]></category>
		<category><![CDATA[time capsule dead]]></category>
		<category><![CDATA[time capsule dying]]></category>
		<category><![CDATA[time capsule error]]></category>
		<category><![CDATA[time capsule issue]]></category>
		<category><![CDATA[time machine]]></category>

		<guid isPermaLink="false">http://seanp2k.com/?p=95</guid>
		<description><![CDATA[Safari 4 has known issues with showing just a white screen randomly. There are many threads on the Apple support forums regarding this, here is an exmaple: http://discussions.apple.com/thread.jspa?messageID=9785751 . Personally, I use Google Chrome which is also a WebKit-based browser and I&#8217;ve never had an issue. It seems that with the iPhone encryption issues ( [...]]]></description>
			<content:encoded><![CDATA[<p>Safari 4 has known issues with showing just a white screen randomly.  There are <a href="http://discussions.apple.com/forum.jspa?forumID=876&#038;start=0">many threads</a> on the Apple support forums regarding this, <a href="">here</a> is an exmaple: http://discussions.apple.com/thread.jspa?messageID=9785751 .  Personally, I use Google Chrome which is also a WebKit-based browser and I&#8217;ve never had an issue.  </p>
<p>It seems that with the iPhone encryption issues ( http://www.broadbandreports.com/forum/r22999133-iPhone-31-breaks-Exchange-Sync-for-pre3GS-phones , and even on the new 3GS: http://arstechnica.com/apple/news/2009/07/new-iphone-hardware-encryption-not-even-close-to-hack-proof.ars ), the Snow Leopard data loss issues ( http://news.cnet.com/8301-31021_3-10373064-260.html ), and Time Capsules dying early ( http://gizmodo.com/5379865/are-apple-time-capsules-short-lived , http://timecapsuledead.org/ ) Apple doesn&#8217;t have it&#8217;s software development in line just quite yet.</p>
<p>With all these issues, it&#8217;s no surprise that at least a few people feel the same as this columnist: &#8220;I suspect that Apple has set back its enterprise cause several years, if not permanently.&#8221; ( http://www.itbusiness.ca/it/client/en/home/News.asp?id=54536&#038;PageMem=2 )</p>
]]></content:encoded>
			<wfw:commentRss>http://seanp2k.com/2009/11/apple-losing-enterprise-credability/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>If sites resolve to server, print URLs</title>
		<link>http://seanp2k.com/2009/09/if-sites-resolve-to-server-print-urls/</link>
		<comments>http://seanp2k.com/2009/09/if-sites-resolve-to-server-print-urls/#comments</comments>
		<pubDate>Sat, 19 Sep 2009 21:58:51 +0000</pubDate>
		<dc:creator>sean</dc:creator>
				<category><![CDATA[Computers]]></category>
		<category><![CDATA[Linux]]></category>
		<category><![CDATA[awk]]></category>
		<category><![CDATA[bash]]></category>
		<category><![CDATA[do while]]></category>
		<category><![CDATA[grep]]></category>
		<category><![CDATA[loop]]></category>
		<category><![CDATA[magento]]></category>
		<category><![CDATA[scripting]]></category>

		<guid isPermaLink="false">http://seanp2k.com/?p=91</guid>
		<description><![CDATA[UPDATED: now works with most apache installs and is more portable / useful: http://ip2k.com/sitelist.sh This bash script combines many useful little tricks that you may be interested in even if you don&#8217;t need the whole thing. Some include: - Print a list of IPs on the linux system - Print a list of websites hosted [...]]]></description>
			<content:encoded><![CDATA[<p>UPDATED: now works with most apache installs and is more portable / useful:</p>
<p>http://ip2k.com/sitelist.sh</p>
<p>This bash script combines many useful little tricks that you may be interested in even if you don&#8217;t need the whole thing.  Some include:</p>
<p>- Print a list of IPs on the linux system<br />
- Print a list of websites hosted on the server that match a certain pattern (app = Magento in this case)<br />
- Looping</p>
<p><code><br />
trap sorry INT<br />
#Two levels of debugging, 1 and 2.  1 shows just pings, 2 shows everything.<br />
dbg=0</p>
<p>function prnt {<br />
        echo -e "\e[1;36m[ $1 ]\e[00m"<br />
}</p>
<p>function prntok {<br />
        echo -e "\e[1;32m[ $1 ]\e[00m"<br />
}</p>
<p>sorry ()<br />
{<br />
        prnt "Caught SIGINT, cleaning up..."<br />
        if [ -f tempfile ]; then<br />
                rm -rf tempfile<br />
                prntok "Found and removed tempfile, exiting now"<br />
        else<br />
                prntok "tempfile not found, exiting..."<br />
        fi<br />
        exit 1<br />
}</p>
<p>function getip {<br />
ping -c1 -W1 -q $1 | grep PING | awk '{print $3}' |tr -d \(\)<br />
}</p>
<p>iplist="$(ifconfig | grep 'inet addr' | awk '{print $2}' | tr -d [a-z,:] | grep -v '127.0.0.1')"<br />
echo > tempfile<br />
for ip in $iplist; do<br />
echo $ip >> tempfile<br />
done</p>
<p>sites="$(awk '$1 == "ServerName" { print $2 }' /etc/httpd/conf.d/vhost_* | uniq)"</p>
<p>for site in $sites; do<br />
        if [ $dbg -gt 0 ]; then<br />
                prnt "DEBUG: Pinging $site..."<br />
        fi</p>
<p>        siteip=$(getip $site)<br />
        ison=$(grep -c $siteip tempfile)</p>
<p>        if [ $dbg -gt 1 ]; then<br />
                prntok "DEBUG: siteip = $siteip"<br />
        fi</p>
<p>        if [ $ison = 1 ]; then<br />
                if [ $dbg -gt 1 ]; then<br />
                        prntok "DEBUG: $site found!"<br />
                fi</p>
<p>                echo "http://$site"<br />
        else<br />
                if [ $dbg -gt 1 ]; then<br />
                        prnt "DEBUG: $site not found"<br />
                fi</p>
<p>        fi</p>
<p>done</p>
<p>rm -rf tempfile<br />
exit 0<br />
</code></p>
]]></content:encoded>
			<wfw:commentRss>http://seanp2k.com/2009/09/if-sites-resolve-to-server-print-urls/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>QMail restart script</title>
		<link>http://seanp2k.com/2009/08/qmail-restart-script/</link>
		<comments>http://seanp2k.com/2009/08/qmail-restart-script/#comments</comments>
		<pubDate>Sun, 23 Aug 2009 13:51:25 +0000</pubDate>
		<dc:creator>sean</dc:creator>
				<category><![CDATA[Computers]]></category>
		<category><![CDATA[Linux]]></category>
		<category><![CDATA[bash]]></category>
		<category><![CDATA[clamav]]></category>
		<category><![CDATA[clamd]]></category>
		<category><![CDATA[cpanel]]></category>
		<category><![CDATA[freshclam]]></category>
		<category><![CDATA[interworx]]></category>
		<category><![CDATA[interworx-cp]]></category>
		<category><![CDATA[iworx]]></category>
		<category><![CDATA[qmail]]></category>
		<category><![CDATA[script]]></category>
		<category><![CDATA[scripting]]></category>
		<category><![CDATA[spamassassin]]></category>
		<category><![CDATA[spamd]]></category>

		<guid isPermaLink="false">http://seanp2k.com/?p=88</guid>
		<description><![CDATA[I oversee a few hundred Linux-based systems, and >99% of them run the typical QMail / ClamAV / SpamAssassin stack. I personally think QMail sucks, but I have written a script that usually fixes most issues (stuck queue, delayed mail, other strange issues). You could easily edit this to be compatible with cPanel-based servers, but [...]]]></description>
			<content:encoded><![CDATA[<p>I oversee a few hundred Linux-based systems, and >99% of them run the typical QMail / ClamAV / SpamAssassin stack.  I personally think QMail sucks, but I have written a script that usually fixes most issues (stuck queue, delayed mail, other strange issues).  You could easily edit this to be compatible with cPanel-based servers, but as it stands it&#8217;s written for InterWorx-CP and servers without a control-panel system.  Note that this needs BASH to run and won&#8217;t work properly due to the way the counter is incremented in regular POSIX &#8216;sh&#8217;.</p>
<p>Link: http://seanp2k.com/m.sh<br />
<more><br />
It is below:<br />
<code><br />
#!/bin/bash<br />
# ----- BEING DECLARE FUNCTIONS -----</p>
<p># prnt - formats and echos input<br />
function prnt {<br />
        echo -e "\e[1;32m[ $1 ]\e[00m"<br />
}</p>
<p># killproc - uses pidof to find process name then tries to kill COUNTER number of times.<br />
# Accepts $1 as process name and $2 as $<br />
PROCNAME=""</p>
<p>function killproc {<br />
        procname=$1<br />
        counter=0<br />
        pids="$(pidof "$procname")"<br />
        while [ "$pids" ] &#038;&#038; ((counter++ < $2)); do<br />
                if [ $counter -eq $2 ]; then<br />
                        echo -e "\e[1;31m[ Couldn't kill $procname, tried $2 times.  PID is $pids ]\e[00m"<br />
                else<br />
                        # -----  DEBUGGING - uncomment next line -----<br />
                         # ps -elf | grep -i $procname<br />
                        for pid in $pids; do<br />
                                echo -e "\e[1;36m[ $procname killed, PID $pid, try $counter/$2 ]\e[00m"<br />
                                pkill -9 $pid<br />
                        done<br />
                sleep 1<br />
                pids="$(pidof "$procname")"<br />
                echo<br />
                fi<br />
        done<br />
}</p>
<p># ----- END DECLARE FUNCTIONS -----<br />
# ----- BEING MAIN SUB -----</p>
<p>prnt "Reset local and remote delivery concurrency limits"<br />
echo 200 > /var/qmail/control/concurrencylocal<br />
echo 200 > /var/qmail/control/concurrencyincoming<br />
echo 200 > /var/qmail/control/concurrencyremote</p>
<p>prnt "Restart InterWorx-CP"<br />
/etc/init.d/iworx restart</p>
<p>prnt "Restart ClamAV &#038; SpamAssassin"<br />
/etc/init.d/clamd stop<br />
/etc/init.d/spamassassin stop</p>
<p>killproc spamd 5<br />
killproc clamd 5</p>
<p>/etc/init.d/clamd start<br />
/etc/init.d/spamassassin start<br />
prnt "Restart POP3"<br />
/etc/init.d/pop3 restart</p>
<p>prnt "Restart POP3-SSL"<br />
/etc/init.d/pop3-ssl restart</p>
<p>prnt "Restart IMAP4"<br />
/etc/init.d/imap4 restart</p>
<p>prnt "Restart IMAP4-SSL"<br />
/etc/init.d/imap4-ssl restart</p>
<p>prnt "Restart SMTP"</p>
<p>svc -d /service/send /service/smtp /service/smtp2<br />
/etc/init.d/smtp stop<br />
/etc/init.d/smtp status</p>
<p>if [ "$(pidof qmail-send)" ]; then<br />
        counter=11<br />
        echo -en "\e[1;32m[ Waiting for SMTP to stop: "<br />
        while [ "$(pidof qmail-send)" ] &#038;&#038; ((counter-- > 0)); do<br />
                echo -n "$counter.."<br />
                sleep 1<br />
        done<br />
        echo -e " ]\e[00m"<br />
fi</p>
<p>/etc/init.d/smtp status<br />
svc -k /service/send<br />
killproc qmail-send 5<br />
prnt "Force-send qmail message queue"<br />
svc -u /service/send<br />
svc -a /service/send<br />
svc -u /service/smtp /service/smtp2<br />
/etc/init.d/smtp start<br />
prnt "Please ensure that SMTP and send are up"<br />
/etc/init.d/smtp status<br />
/var/qmail/bin/qmqtool -s<br />
# ----- END MAIN SUB -----<br />
exit 0;</p>
<p></code></p>
]]></content:encoded>
			<wfw:commentRss>http://seanp2k.com/2009/08/qmail-restart-script/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Crappy Youtube Clone scripts and direct download links</title>
		<link>http://seanp2k.com/2009/07/vidiscript-phpmotion-ostube-clipbucket-direct-download-links/</link>
		<comments>http://seanp2k.com/2009/07/vidiscript-phpmotion-ostube-clipbucket-direct-download-links/#comments</comments>
		<pubDate>Sat, 11 Jul 2009 16:27:09 +0000</pubDate>
		<dc:creator>sean</dc:creator>
				<category><![CDATA[Computers]]></category>

		<guid isPermaLink="false">http://seanp2k.com/?p=78</guid>
		<description><![CDATA[I really hate it when sites try to make you register just to get your E-Mail address and spam you. I also really hate poorly-written PHP scripts that don&#8217;t work. Combine these two and you have the newest trend in PHP CrapWare direct from middle-eastern &#8220;software&#8221; companies. I&#8217;d like to note that all of these [...]]]></description>
			<content:encoded><![CDATA[<p>I really hate it when sites try to make you register just to get your E-Mail address and spam you.  I also really hate poorly-written PHP scripts that don&#8217;t work.  Combine these two and you have the newest trend in PHP CrapWare direct from middle-eastern &#8220;software&#8221; companies.  I&#8217;d like to note that all of these scripts have issues and none of them are near production quality or the quality of finely-written software, such as WordPress or Movable Type.</p>
<p>So without further ado, I present to you Download URLs to forgo the registration process and not let these jerks get more E-Mail addresses for their crappy software.  ClipBucket is the only one that doesn&#8217;t require registration to download, but unfortuantely ClipBucket is even crappier than the others; I couldn&#8217;t even get the main page to come up without crippling errors.</p>
<p>&#8212;&#8212;osTube<br />
Community Edition: http://ip2k.com/ostube/osTube_2.6_osTube_2.6_community_edt.tar.gz<br />
Clean URLS doc: http://www.ostube.de/files/download/documentation/osTube_2.6_CleanUrls_en.pdf<br />
Installation Instructions: http://www.ostube.de/files/download/documentation/osTube_2.6_Schnellanleitung_en.pdf</p>
<p>&#8212;&#8212;Vidiscript</p>
<p>http://vidiscript.com/get</p>
<p>&#8212;&#8212;PHPMotion<br />
For PHP 4.x &#8211; http://downloads.phpmotion.com/V3.0/php4/phpmotion.zip<br />
For PHP 5.x &#8211; http://downloads.phpmotion.com/V3.0/php5/phpmotion.zip</p>
<p>SETUP INSTRUCTIONS<br />
For installation instructions visit  http://wiki.phpmotion.com/InstallingV3</p>
<p>&#8212;&#8212;ClipBucket</p>
<p>http://clip-bucket.com/</p>
<p>If you&#8217;re looking for a quick breakdown on why each sucks:</p>
<p>osTube: Mostly foreign-language, setup process is much more complicated than modern PHP scripts&#8230;C&#8217;mon guys, this isn&#8217;t the 90&#8242;s anymore and not everyone has SSH access to install your garbage.</p>
<p>VidiScript:<br />
It&#8217;s &#8220;beta&#8221; software from a &#8220;quality&#8221; developer&#8230;need I say more?</p>
<p>PHPMotion: Would be fine except it&#8217;s encoded with PHPShield (as if anyone would want to steal their AMAZING source code).  Loader progress bar is broken and updates percentages incorrectly.  Path settings don&#8217;t have any affect on actual paths that it&#8217;ll try to use.  Doesn&#8217;t like being installed in a subdir; in fact, it won&#8217;t even work in a subdir.</p>
<p>ClipBucket: Couldn&#8217;t even get main page to load, that&#8217;s how terrible it is.</p>
]]></content:encoded>
			<wfw:commentRss>http://seanp2k.com/2009/07/vidiscript-phpmotion-ostube-clipbucket-direct-download-links/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>New improved MySQL Backup script</title>
		<link>http://seanp2k.com/2009/03/new-improved-mysql-backup-script/</link>
		<comments>http://seanp2k.com/2009/03/new-improved-mysql-backup-script/#comments</comments>
		<pubDate>Thu, 05 Mar 2009 09:31:51 +0000</pubDate>
		<dc:creator>sean</dc:creator>
				<category><![CDATA[Computers]]></category>
		<category><![CDATA[Linux]]></category>
		<category><![CDATA[backup]]></category>
		<category><![CDATA[backups]]></category>
		<category><![CDATA[bash]]></category>
		<category><![CDATA[console]]></category>
		<category><![CDATA[database]]></category>
		<category><![CDATA[databases]]></category>
		<category><![CDATA[mysql]]></category>
		<category><![CDATA[script]]></category>
		<category><![CDATA[scripting]]></category>
		<category><![CDATA[shell]]></category>
		<category><![CDATA[sql]]></category>

		<guid isPermaLink="false">http://seanp2k.com/?p=62</guid>
		<description><![CDATA[Auto-detects databases, has the temp file and backup file locations separated, purple colored real-time output, only logs important output, md5sums into a text file for databases, every filename uniquely hashed with month, day, year, hour, minute, and second, timestamps everything, uses bzip2 compression for smallest file sizes. #!/bin/bash # vars &#8211; no trailing slash please [...]]]></description>
			<content:encoded><![CDATA[<p>Auto-detects databases, has the temp file and backup file locations separated, purple colored real-time output, only logs important output, md5sums into a text file for databases, every filename uniquely hashed with month, day, year, hour, minute, and second, timestamps everything, uses bzip2 compression for smallest file sizes.</p>
<blockquote><p>#!/bin/bash</p>
<p># vars &#8211; no trailing slash please<br />
THEDATE=$(date +%m%d%y%H%M%S)<br />
BACKUPDIR=&#8217;/backups/mysql&#8217;<br />
TEMPDIR=&#8217;/backups/mysql/temp&#8217;<br />
LOGFILE=&#8221;$TEMPDIR/info-$THEDATE.txt&#8221;<br />
USER=root<br />
PASSWORD=password<br />
date &gt; $LOGFILE</p>
<p>date</p>
<p>echo -e &#8220;\e[1;35m[ " $(date +%H:%M:%S) "-- Starting MySQL Backup Script v0.3 by Seanp2k ]\e[00m"</p>
<p># magic<br />
DATABASES=$(mysql --user=$USER --password=$PASSWORD -e "SHOW DATABASES;" | tr -d "| " | grep -v Database)</p>
<p>echo -e "\e[1;35m[ " $(date +%H:%M:%S) "-- Found" $(echo $DATABASES | wc -w) "databases:" $DATABASES "]\e[00m"</p>
<p># loop -- dump and hash<br />
for DB in $DATABASES; do</p>
<p>echo -en "\e[1;35m[ " $(date +%H:%M:%S)<br />
echo -n " -- Processing " $DB ".."<br />
mysqldump --user=$USER --password=$PASSWORD --databases $DB &gt; $TEMPDIR/$DB-$THEDATE.sql<br />
echo -n "..md5sum..."<br />
md5sum $TEMPDIR/$DB-$THEDATE.sql &gt;&gt; $LOGFILE<br />
echo -e "Done ]\e[00m"<br />
done</p>
<p># compress and clean<br />
echo -e "\e[1;35m[ " $(date +%H:%M:%S) "-- Creating Archive " $BACKUPDIR/mysql-THEDATE.tar.bz2 "]\e[00m"<br />
time tar -cvvjf $BACKUPDIR/mysql-$THEDATE.tar.bz2 $TEMPDIR/*.sql $TEMPDIR/info-$THEDATE.txt<br />
rm -rf $TEMPDIR/*.sql $TEMPDIR/info-$THEDATE.txt<br />
date<br />
echo -e "\e[1;35m[ " $(date +%H:%M:%S) "-- Finished ]\e[00m&#8221;</p></blockquote>
]]></content:encoded>
			<wfw:commentRss>http://seanp2k.com/2009/03/new-improved-mysql-backup-script/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Domain Parking sucks</title>
		<link>http://seanp2k.com/2009/02/domain-parking-sucks/</link>
		<comments>http://seanp2k.com/2009/02/domain-parking-sucks/#comments</comments>
		<pubDate>Sun, 01 Feb 2009 20:37:18 +0000</pubDate>
		<dc:creator>sean</dc:creator>
				<category><![CDATA[Computers]]></category>
		<category><![CDATA[domain parking]]></category>
		<category><![CDATA[domains]]></category>
		<category><![CDATA[funny]]></category>
		<category><![CDATA[parking]]></category>
		<category><![CDATA[xkcd]]></category>

		<guid isPermaLink="false">http://seanp2k.com/?p=59</guid>
		<description><![CDATA[And the banner at the top read: &#8220;Aaaaaaaaaaaaaaaaaaaa.com What you need, when you need it&#8221; Somehow, I HIGHLY doubt that.]]></description>
			<content:encoded><![CDATA[<p>And the banner at the top read:</p>
<p>&#8220;Aaaaaaaaaaaaaaaaaaaa.com</p>
<p>What you need, when you need it&#8221;</p>
<p>Somehow, I HIGHLY doubt that.</p>
]]></content:encoded>
			<wfw:commentRss>http://seanp2k.com/2009/02/domain-parking-sucks/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Keep a remote Winamp playing your newest music with a short bash script</title>
		<link>http://seanp2k.com/2009/01/keep-a-remote-winamp-playing-your-newest-music-with-a-short-bash-script/</link>
		<comments>http://seanp2k.com/2009/01/keep-a-remote-winamp-playing-your-newest-music-with-a-short-bash-script/#comments</comments>
		<pubDate>Fri, 23 Jan 2009 11:48:56 +0000</pubDate>
		<dc:creator>sean</dc:creator>
				<category><![CDATA[Computers]]></category>
		<category><![CDATA[Linux]]></category>
		<category><![CDATA[Music]]></category>
		<category><![CDATA[bash]]></category>
		<category><![CDATA[remote]]></category>
		<category><![CDATA[rpc]]></category>
		<category><![CDATA[script]]></category>
		<category><![CDATA[winamp]]></category>

		<guid isPermaLink="false">http://seanp2k.com/?p=47</guid>
		<description><![CDATA[I had a problem: I wanted my radio station to automagically play my newer music and update the stuff that it plays every day, yet keep enough older stuff that there is still some variety, especially if no new music gets discovered for a while. I&#8217;d need to find some way to keep the most [...]]]></description>
			<content:encoded><![CDATA[<p>I had a problem:  I wanted my radio station to automagically play my newer music and update the stuff that it plays every day, yet keep enough older stuff that there is still some variety, especially if no new music gets discovered for a while.  I&#8217;d need to find some way to keep the most recent 200 or so tracks playing on my station.</p>
<p>Let&#8217;s start by looking at what we have and what we have to do:<br />
Files on a Linux fileserver playing on a Windows server (via samba) in Winamp using EdCast to stream to sc_serv (Shoutcast) on a different Linux server in the DMZ.  Currently, I have the X: drive on the Windows server mapped to the Linux Fileserver.  Winamp re-scans the fileserver every 3 days for new music and adds it to the library, but I still have to manually go in and add new tracks to the playlist.</p>
<p>Some initial ideas and problems:<br />
-Use XML-RPC / SOAP from another music cataloging program that I currently use<br />
+I just really feel like there was an easier way to do what I wanted without going through all the trouble.</p>
<p>-Telling Winamp to [re]load the playlist: the Winamp API Uses C++&#8230;yuck&#8230;I don&#8217;t know or want to learn C++ just for this project.  Plus, DRY applies, someone HAS to have thought of this before.<br />
+Solution: httpQ, a simple http listener plugin for Winamp that uses a simple and easy to implement control scheme: simply call the right URL and Winamp does what you want.  Awesome. ( <a href="http://httpq.sourceforge.net/">http://httpq.sourceforge.net</a> )</p>
<p>-Finding files that have been modified recently, and if none have been modified in the time specified, keep looking until you find enough files<br />
<span id="more-47"></span><br />
So let&#8217;s look at what we&#8217;re going to do with this script:<br />
-Set up some variables for internal use and for how many tracks we want in our playlist<br />
-Loop through something to find our tracks and write them out to a file<br />
-Check that file to see if if has as many lines as we want (I know a better way to do this would be to just store it in memory and index it until you have enough, but on a modest p4 this executes in about 1 second in a directory with ~300GB files&#8230;YMMV but it wasn&#8217;t slow enough to justify re-writing it for me)<br />
-if it doesn&#8217;t, re-generate it and let some files that are a bit older get included as well<br />
-Tell Winamp to drop its current playlist<br />
-Tell Winamp to load our new playlist<br />
-Tell Winamp to play, just to make sure it&#8217;s playing&#8230;you don&#8217;t want to have dead air, even on the internet.</p>
<p>And finally, the script:</p>
<blockquote><p>#!/bin/bash</p>
<p>DAY=3<br />
#set the default to search for files 3 or less days old</p>
<p>CNT=0<br />
#initalize count&#8230;don&#8217;t really need to but it makes me feel better</p>
<p>DESIRED=200<br />
#how many files do you want (at least)?</p>
<p>until [ $CNT -ge $DESIRED ]; do<br />
#until the playlist has as many or more files than we specified, keep doing this over and over&#8230;probably should set some limit so it doesn&#8217;t go nuts if it has an error</p>
<p>find /foo/bar -mtime -&#8221;$DAY&#8221; -iname &#8220;*.mp3&#8243; -print | sed &#8216;s^/foo/bar/^X:\\files\\^&#8217; | tr &#8216;/&#8217; &#8216;\&#8217; &gt; /foo/bar/current.m3u<br />
#find files named *.mp3 in /foo/bar with a modified time of minus X days and echo the results&#8230;to sed which replaces /foo/bar with X:\Windows\Path&#8230;fix for converting slashes to<br />
#backslashes&#8230;sed also works but tr runs faster</p>
<p>CNT=$(wc -l /foo/bar/current.m3u | cut -d\  -f1)<br />
#count the lines of the playlist.  Note that I&#8217;m passing a space as the delimeter to cut, by escaping with a backslash then double space until the next flag,<br />
#which grabs column 1 (col2 is the filename, yick)</p>
<p>let DAY+=1<br />
#shorthand for day = day+1&#8230;won&#8217;t be used unless we loop again.<br />
done</p>
<p>wget -O &#8211; &#8211;quiet &#8220;http://windows:4800/delete?p=passwd&#8221;<br />
wget -O &#8211; &#8211;quiet &#8220;http://windows:4800/playfile?p=passwd&amp;file=X:\current.m3u&#8221;<br />
wget -O &#8211; &#8211;quiet &#8220;http://windows:4800/play?p=passwd&#8221;<br />
#the RPC calls to the Windows server.  Note that we&#8217;re telling wget to output to -&#8230;i.e. drop the output.<br />
#Also, be sure to double quote that URL.<br />
exit 0;<br />
#exit with no error code
</p></blockquote>
]]></content:encoded>
			<wfw:commentRss>http://seanp2k.com/2009/01/keep-a-remote-winamp-playing-your-newest-music-with-a-short-bash-script/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Block the &#8220;Donate Now&#8221; header on Wikipedia</title>
		<link>http://seanp2k.com/2008/12/block-the-donate-now-header-on-wikipedia/</link>
		<comments>http://seanp2k.com/2008/12/block-the-donate-now-header-on-wikipedia/#comments</comments>
		<pubDate>Thu, 25 Dec 2008 10:24:09 +0000</pubDate>
		<dc:creator>sean</dc:creator>
				<category><![CDATA[Computers]]></category>
		<category><![CDATA[ad]]></category>
		<category><![CDATA[adblock]]></category>
		<category><![CDATA[block]]></category>
		<category><![CDATA[configuration]]></category>
		<category><![CDATA[header]]></category>
		<category><![CDATA[wikipedia]]></category>

		<guid isPermaLink="false">http://seanp2k.com/?p=33</guid>
		<description><![CDATA[12-26-08: Edited to acknowledge the hypocrisy of the new even more intrusive video ads to the right on this site. Tehehehehe. I love Wikipedia, I really do.  In fact, one of the things I really appreciate about Wikipedia and the open-source community in general is the rejection of advertizing and the non-profit nature of it [...]]]></description>
			<content:encoded><![CDATA[<p>12-26-08: Edited to acknowledge the hypocrisy of the new even more intrusive video ads to the right on this site.  Tehehehehe.</p>
<p>I love Wikipedia, I really do.  In fact, one of the things I really appreciate about Wikipedia and the open-source community in general is the rejection of advertizing and the non-profit nature of it all.  However, sometimes nagware can be annoying, and I refuse to be annoyed by a computer.  One of my favorite Firefox plugins and probably the most useful is Adblock Plus.  Adblock Plus downloads a free, continually updated list of filters for things that should be blocked, and it does an amazing job of killing the ads on most sites without even wasting bandwidth downloading the ads.  Now, this may be great for the user, but I believe that it&#8217;s also not too terrible for the advertizers&#8230;if people that obviously aren&#8217;t going to be click on your ads anyway because they despise advertizing as a whole, why not let them do you a favor and save you bandwidth?  They don&#8217;t want to see your crappy banners and annoying flash pop-ups, so why try to get around Adblock?  Just accept it as an advertizing opt-out.  Now, Wikipedia should be accepting of this mentality more than anyone, so it&#8217;s with that reasoning that I publish a very simple hack that anyone remotely familiar with the way ABP and javascript works could easily figure out for themselves.  Without further ado, I give you the filter that will remove the annoying header from Wikipedia:</p>
<blockquote><p>|*centralnotice.js?192xx</p></blockquote>
<p>
Be sure to include the bar &#8220;|&#8221; at the beginning.  As a more generalized filter that would probably block stuff in the future, you could also try:</p>
<blockquote><p>|*centralnotice.js*</p></blockquote>
<p>
but I have not yet tested it as they have not yet changed their banner.  To add this filter, simply pop open ABP and click the &#8220;Add Filter&#8221; button at the bottom left of the ABP dialog and paste or type it in there.  Couldn&#8217;t be easier.  Enjoy.</p>
]]></content:encoded>
			<wfw:commentRss>http://seanp2k.com/2008/12/block-the-donate-now-header-on-wikipedia/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
