<?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>Favoretti's Braindumps</title>
	<atom:link href="http://favoretti.net/wp/feed/" rel="self" type="application/rss+xml" />
	<link>http://favoretti.net/wp</link>
	<description>Miscellaneous notes about nothing</description>
	<lastBuildDate>Sat, 21 Jan 2012 11:53:18 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.1</generator>
		<item>
		<title>How to install Adobe Photoshop CS5 on a case-sensitive MacOS volume</title>
		<link>http://favoretti.net/wp/2012/01/21/how-to-install-adobe-photoshop-cs5-on-a-case-sensitive-macos-volume/</link>
		<comments>http://favoretti.net/wp/2012/01/21/how-to-install-adobe-photoshop-cs5-on-a-case-sensitive-macos-volume/#comments</comments>
		<pubDate>Sat, 21 Jan 2012 11:52:56 +0000</pubDate>
		<dc:creator>favoretti</dc:creator>
				<category><![CDATA[Braindump]]></category>

		<guid isPermaLink="false">http://favoretti.net/wp/?p=181</guid>
		<description><![CDATA[https://bitbucket.org/lokkju/adobe_case_sensitive_volumes This is just incredible. I&#8217;m sooooo thankful to this guy. Millions of kudos.]]></description>
			<content:encoded><![CDATA[<p><a href="https://bitbucket.org/lokkju/adobe_case_sensitive_volumes">https://bitbucket.org/lokkju/adobe_case_sensitive_volumes</a></p>
<p>This is just incredible. I&#8217;m sooooo thankful to this guy. Millions of kudos.</p>
]]></content:encoded>
			<wfw:commentRss>http://favoretti.net/wp/2012/01/21/how-to-install-adobe-photoshop-cs5-on-a-case-sensitive-macos-volume/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>+1, really +1</title>
		<link>http://favoretti.net/wp/2012/01/06/1-really-1/</link>
		<comments>http://favoretti.net/wp/2012/01/06/1-really-1/#comments</comments>
		<pubDate>Fri, 06 Jan 2012 14:46:28 +0000</pubDate>
		<dc:creator>favoretti</dc:creator>
				<category><![CDATA[Braindump]]></category>

		<guid isPermaLink="false">http://favoretti.net/wp/?p=173</guid>
		<description><![CDATA[Oh so true.]]></description>
			<content:encoded><![CDATA[<p><a href="http://favoretti.net/wp/wp-content/uploads/2012/01/1523205_460s_v1.jpg"><img src="http://favoretti.net/wp/wp-content/uploads/2012/01/1523205_460s_v1.jpg" alt="" title="1523205_460s_v1" width="419" height="324" class="alignleft size-full wp-image-174" /></a><br />
Oh so true.</p>
]]></content:encoded>
			<wfw:commentRss>http://favoretti.net/wp/2012/01/06/1-really-1/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>And in 2 smooth moves I got myself a new desktop.</title>
		<link>http://favoretti.net/wp/2011/11/26/and-in-2-smooth-moves-i-got-myself-a-new-desktop/</link>
		<comments>http://favoretti.net/wp/2011/11/26/and-in-2-smooth-moves-i-got-myself-a-new-desktop/#comments</comments>
		<pubDate>Sat, 26 Nov 2011 10:37:52 +0000</pubDate>
		<dc:creator>favoretti</dc:creator>
				<category><![CDATA[Braindump]]></category>
		<category><![CDATA[ilikeit]]></category>
		<category><![CDATA[macos]]></category>
		<category><![CDATA[macpro]]></category>

		<guid isPermaLink="false">http://favoretti.net/wp/2011/11/26/and-in-2-smooth-moves-i-got-myself-a-new-desktop/</guid>
		<description><![CDATA[Box was a bit dirty, but who cares, it&#8217;s all about the contents! Your quick geek-a-lion &#8220;unboxing&#8221; There, happy now! ￼]]></description>
			<content:encoded><![CDATA[<p>Box was a bit dirty, but who cares, it&#8217;s all about the contents!</p>
<p><img src="http://favoretti.net/wp/wp-content/uploads/2011/11/myWPEdit_Image_1322303795.jpg" alt="myWPEdit Image" />
</p>
<p>Your quick geek-a-lion &ldquo;unboxing&rdquo; <img src='http://favoretti.net/wp/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
<p><img src="http://favoretti.net/wp/wp-content/uploads/2011/11/myWPEdit_Image_1322303829.jpg" alt="myWPEdit Image" /></p>
<p>There, happy now!</p>
<p><small><img src="http://favoretti.net/wp/wp-content/uploads/2011/11/myWPEdit_Image_1322303855.jpg" alt="myWPEdit Image" /></small><small>￼</small></p>
]]></content:encoded>
			<wfw:commentRss>http://favoretti.net/wp/2011/11/26/and-in-2-smooth-moves-i-got-myself-a-new-desktop/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>F6 :(</title>
		<link>http://favoretti.net/wp/2011/11/02/f6/</link>
		<comments>http://favoretti.net/wp/2011/11/02/f6/#comments</comments>
		<pubDate>Wed, 02 Nov 2011 12:13:35 +0000</pubDate>
		<dc:creator>favoretti</dc:creator>
				<category><![CDATA[Braindump]]></category>

		<guid isPermaLink="false">http://favoretti.net/wp/2011/11/02/f6/</guid>
		<description><![CDATA[]]></description>
			<content:encoded><![CDATA[<p><img src="http://favoretti.net/wp/wp-content/uploads/2011/11/myWPEdit_Image_1320236011.jpg" alt="myWPEdit Image" style="float:left;" /></p>
]]></content:encoded>
			<wfw:commentRss>http://favoretti.net/wp/2011/11/02/f6/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Python script to clean up binlogs based on number</title>
		<link>http://favoretti.net/wp/2011/10/25/python-script-to-clean-up-binlogs-based-on-number/</link>
		<comments>http://favoretti.net/wp/2011/10/25/python-script-to-clean-up-binlogs-based-on-number/#comments</comments>
		<pubDate>Tue, 25 Oct 2011 11:06:13 +0000</pubDate>
		<dc:creator>favoretti</dc:creator>
				<category><![CDATA[Braindump]]></category>

		<guid isPermaLink="false">http://favoretti.net/wp/?p=162</guid>
		<description><![CDATA[I stumbled on a problem in MySQL that you can only rotate binlogs based on age. In certain cases it wasn&#8217;t sufficient. Scripts that I&#8217;ve found on the net (mysql doc, etc) were all in PHP/perl&#8230; So I took a bit of liberty and stole one idea from mysql&#8217;s doc comments and turned it into [...]]]></description>
			<content:encoded><![CDATA[<p>I stumbled on a problem in MySQL that you can only rotate binlogs based on age. In certain cases it wasn&#8217;t sufficient. Scripts that I&#8217;ve found on the net (mysql doc, etc) were all in PHP/perl&#8230; So I took a bit of liberty and stole one idea from mysql&#8217;s doc comments and turned it into a piece of Python code. (uyes, ai luv python&#8230; hisssssssss).</p>
<pre code="python" line=1>
#!/usr/bin/env python
#
# Since MySQL is unable to purge logs based on number of logs and does it only based on days
# I stole this idea from mysql.com. It was in PHP, I rewrote it in Python <3
#
#         vllazarenko@ebay.com
#
# Questions? Do mail or pass by.
#
#

import sys
import MySQLdb

""" If you want to smurf, smurf over here """

slaveHost="localhost"
slaveUser="root"
slavePass="rootpass"
slaveDb=""

masterHost="masterhost"
masterUser="root"
masterPass="rootpass"
masterDb=""

keepLogs = 5

""" Please don't smurf after this line, unless you're an experienced smurf """

try:
     connSlave = MySQLdb.connect(slaveHost,
        	                 slaveUser,
                	         slavePass,
                        	 slaveDb)
except MySQLdb.Error, e:
     print "SLAVE: Error %d: %s" % (e.args[0], e.args[1])
     sys.exit (1)

try:
	connMaster = MySQLdb.connect(masterHost,
        	                     masterUser,
                	             masterPass,
                        	     masterDb)
except MySQLdb.Error, e:
     print "MASTER: Error %d: %s" % (e.args[0], e.args[1])
     sys.exit (1)

cursSlave = connSlave.cursor(MySQLdb.cursors.DictCursor)
cursMaster = connMaster.cursor(MySQLdb.cursors.DictCursor)

cursSlave.execute("SHOW SLAVE STATUS")
row = cursSlave.fetchone()

if row["Slave_IO_Running"] != "Yes":
	print "Alert. Slave IO not running."
if row["Slave_SQL_Running"] != "Yes":
	print "Alert. Slave SQL not running."
if row["Last_Error"] != "":
	print "Alert. Error on slave: %s" % row["Last_Error"]

masterLog = row["Master_Log_File"]
print "Current Master file on which Slave is acting: %s" % masterLog

cursMaster.execute("SHOW MASTER LOGS")
rows = cursMaster.fetchall()

if cursMaster.rowcount == 0:
	print "No master logs found."
	sys.exit(1)

lognames = list()

for row in rows:
	lognames.append(row["Log_name"])

marker = lognames.index(masterLog)
delMarker = marker - keepLogs;

if delMarker < 2:
	print "Not purging below 2 logs."
	sys.exit(1)

print "Going to purge logs up to %s." % lognames[delMarker]

delQuery = "PURGE MASTER LOGS TO '%s'" % lognames[delMarker]
# cursMaster.execute(delQuery)

print "Master binlogs were purged. The oldest log now available on the master is %s." % lognames[delMarker]

cursSlave.close()
connSlave.close()
cursMaster.close()
connMaster.close()
</pre>
]]></content:encoded>
			<wfw:commentRss>http://favoretti.net/wp/2011/10/25/python-script-to-clean-up-binlogs-based-on-number/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Just me&#8230;</title>
		<link>http://favoretti.net/wp/2011/10/17/just-me/</link>
		<comments>http://favoretti.net/wp/2011/10/17/just-me/#comments</comments>
		<pubDate>Mon, 17 Oct 2011 11:58:54 +0000</pubDate>
		<dc:creator>favoretti</dc:creator>
				<category><![CDATA[Braindump]]></category>

		<guid isPermaLink="false">http://favoretti.net/wp/2011/10/17/just-me/</guid>
		<description><![CDATA[]]></description>
			<content:encoded><![CDATA[<p><a href="http://favoretti.net/wp/wp-content/uploads/2011/10/360903_460s_v1.jpg"><img style="background-image: none; border-bottom: 0px; border-left: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top: 0px; border-right: 0px; padding-top: 0px" title="360903_460s_v1" border="0" alt="360903_460s_v1" src="http://favoretti.net/wp/wp-content/uploads/2011/10/360903_460s_v1_thumb.jpg" width="147" height="244" /></a></p>
]]></content:encoded>
			<wfw:commentRss>http://favoretti.net/wp/2011/10/17/just-me/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Music&#8230;</title>
		<link>http://favoretti.net/wp/2011/10/17/music/</link>
		<comments>http://favoretti.net/wp/2011/10/17/music/#comments</comments>
		<pubDate>Mon, 17 Oct 2011 11:31:14 +0000</pubDate>
		<dc:creator>favoretti</dc:creator>
				<category><![CDATA[Braindump]]></category>

		<guid isPermaLink="false">http://favoretti.net/wp/?p=153</guid>
		<description><![CDATA[]]></description>
			<content:encoded><![CDATA[<p><a href="http://favoretti.net/wp/wp-content/uploads/2011/10/362559_700b.jpg"><img class="aligncenter size-full wp-image-154" title="362559_700b" src="http://favoretti.net/wp/wp-content/uploads/2011/10/362559_700b.jpg" alt="" width="400" height="389" /></a></p>
]]></content:encoded>
			<wfw:commentRss>http://favoretti.net/wp/2011/10/17/music/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Want an iPhone 4G upgraded to 4S? No problem.</title>
		<link>http://favoretti.net/wp/2011/10/05/want-an-iphone-4g-upgraded-to-4s-no-problem/</link>
		<comments>http://favoretti.net/wp/2011/10/05/want-an-iphone-4g-upgraded-to-4s-no-problem/#comments</comments>
		<pubDate>Wed, 05 Oct 2011 15:29:56 +0000</pubDate>
		<dc:creator>favoretti</dc:creator>
				<category><![CDATA[Braindump]]></category>

		<guid isPermaLink="false">http://favoretti.net/wp/?p=150</guid>
		<description><![CDATA[]]></description>
			<content:encoded><![CDATA[<p><a href="http://favoretti.net/wp/wp-content/uploads/2011/10/post-1-13178225277185.jpg"><img class="size-full wp-image-151 alignleft" title="post-1-13178225277185" src="http://favoretti.net/wp/wp-content/uploads/2011/10/post-1-13178225277185.jpg" alt="" width="372" height="426" /></a></p>
]]></content:encoded>
			<wfw:commentRss>http://favoretti.net/wp/2011/10/05/want-an-iphone-4g-upgraded-to-4s-no-problem/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Delete cookies</title>
		<link>http://favoretti.net/wp/2011/10/04/delete-cookies/</link>
		<comments>http://favoretti.net/wp/2011/10/04/delete-cookies/#comments</comments>
		<pubDate>Tue, 04 Oct 2011 07:42:41 +0000</pubDate>
		<dc:creator>favoretti</dc:creator>
				<category><![CDATA[Braindump]]></category>

		<guid isPermaLink="false">http://favoretti.net/wp/?p=144</guid>
		<description><![CDATA[&#160; &#160; &#160; &#160; &#160; &#160;]]></description>
			<content:encoded><![CDATA[<p><a href="http://favoretti.net/wp/wp-content/uploads/2011/10/301028_281600521867723_119768228050954_1111756_757819569_n.jpg"><img class="size-full wp-image-145 alignleft" title="301028_281600521867723_119768228050954_1111756_757819569_n" src="http://favoretti.net/wp/wp-content/uploads/2011/10/301028_281600521867723_119768228050954_1111756_757819569_n.jpg" alt="" width="226" height="320" /></a></p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
]]></content:encoded>
			<wfw:commentRss>http://favoretti.net/wp/2011/10/04/delete-cookies/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>My life in a nutshell</title>
		<link>http://favoretti.net/wp/2011/10/02/my-life-in-a-nutshell/</link>
		<comments>http://favoretti.net/wp/2011/10/02/my-life-in-a-nutshell/#comments</comments>
		<pubDate>Sun, 02 Oct 2011 09:18:06 +0000</pubDate>
		<dc:creator>favoretti</dc:creator>
				<category><![CDATA[Braindump]]></category>

		<guid isPermaLink="false">http://favoretti.net/wp/?p=141</guid>
		<description><![CDATA[]]></description>
			<content:encoded><![CDATA[<p><a href="http://favoretti.net/wp/wp-content/uploads/2011/10/dilbert_servers.gif"><img class="size-full wp-image-142 alignleft" title="dilbert_servers" src="http://favoretti.net/wp/wp-content/uploads/2011/10/dilbert_servers.gif" alt="" width="560" height="252" /></a></p>
]]></content:encoded>
			<wfw:commentRss>http://favoretti.net/wp/2011/10/02/my-life-in-a-nutshell/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

