<?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>Kraken Technologies</title>
	<atom:link href="http://www.krakentechnologies.com/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.krakentechnologies.com</link>
	<description>NYC web programming and design</description>
	<lastBuildDate>Thu, 12 May 2011 15:07:33 +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>Easy MySQL backup shell script</title>
		<link>http://www.krakentechnologies.com/2011/05/easy-mysql-backup-shell-script/</link>
		<comments>http://www.krakentechnologies.com/2011/05/easy-mysql-backup-shell-script/#comments</comments>
		<pubDate>Thu, 12 May 2011 15:07:33 +0000</pubDate>
		<dc:creator>m</dc:creator>
				<category><![CDATA[MySQL]]></category>
		<category><![CDATA[Web Development]]></category>
		<category><![CDATA[backup]]></category>
		<category><![CDATA[database backup]]></category>
		<category><![CDATA[linux]]></category>
		<category><![CDATA[linux commands]]></category>
		<category><![CDATA[mysql]]></category>
		<category><![CDATA[mysqldump]]></category>
		<category><![CDATA[script]]></category>
		<category><![CDATA[server administration]]></category>
		<category><![CDATA[shell script]]></category>

		<guid isPermaLink="false">http://www.krakentechnologies.com/?p=80</guid>
		<description><![CDATA[I accidentally deleted my MySQL backup script. No backups is bad news. I was looking for replacements and found a bunch, but they are all overkill. And half of them don&#8217;t even zip your backups. The only two elements I &#8230; <a href="http://www.krakentechnologies.com/2011/05/easy-mysql-backup-shell-script/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>I accidentally deleted my MySQL backup script. No backups is bad news. I was looking for replacements and found a bunch, but they are all overkill. And half of them don&#8217;t even zip your backups.</p>
<p>The only two elements I really need control over are the database name and directory to store the backups. Those are easily handled with shell variables.</p>
<p>Things to note:</p>
<ol>
<li>Don&#8217;t store passwords in the file! You need to enter a password, so use the password shadow file. On systems using Plesk, this should be /etc/psa/psa.shadow. If you don&#8217;t have a password shadow file, you can store the password in an option in the user&#8217;s .my.cnf file in their home directory. Make sure to make it readable only by the user.</li>
<li>While you&#8217;re at it, make sure the user has only the necessary privileges. Don&#8217;t use a superuser account or an account with access to other databases.</li>
<li>Ensure unique file names. I use the date command for this. The format string &#8220;%b-%d-%y_%H&#8221; produces 2011-05-12_08, but adjust to your own needs.</li>
</ol>
<p>Then just stick it in your crontab and you&#8217;re done!</p>
<p>If anyone knows a nice way to do incremental backups, that&#8217;d be nice.</p>


<div class="wp-geshi-highlight-wrap5"><div class="wp-geshi-highlight-wrap4"><div class="wp-geshi-highlight-wrap3"><div class="wp-geshi-highlight-wrap2"><div class="wp-geshi-highlight-wrap"><div class="wp-geshi-highlight"><div class="php"><pre class="de1"><span class="co2">#!/bin/bash
</span>
BACKUP_DIR<span class="sy0">=</span><span class="st0">&quot;/YOUR/BACKUP/DIR&quot;</span>
DB<span class="sy0">=</span><span class="st0">&quot;DATABASE_NAME&quot;</span>
&nbsp;
mysqldump <span class="sy0">-</span>uUSER <span class="sy0">-</span>p`cat <span class="sy0">/</span>PATH<span class="sy0">/</span>TO<span class="sy0">/</span>PASSWDSHADOW` <span class="re0">$DB</span> <span class="sy0">|</span> gzip <span class="sy0">&amp;</span>gt<span class="sy0">;</span> <span class="re0">$BACKUP_DIR</span><span class="sy0">/</span><span class="re0">$DB</span><span class="sy0">.</span>`<span class="kw3">date</span> <span class="sy0">+%</span>b<span class="sy0">-%</span>d<span class="sy0">-%</span>y_<span class="sy0">%</span>H`<span class="sy0">.</span>sql<span class="sy0">.</span>gz</pre></div></div></div></div></div></div></div>


]]></content:encoded>
			<wfw:commentRss>http://www.krakentechnologies.com/2011/05/easy-mysql-backup-shell-script/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Solved: Cleanr WordPress Theme conflicts with Disqus comments</title>
		<link>http://www.krakentechnologies.com/2011/03/solved-cleanr-wordpress-theme-conflicts-with-disqus-comments/</link>
		<comments>http://www.krakentechnologies.com/2011/03/solved-cleanr-wordpress-theme-conflicts-with-disqus-comments/#comments</comments>
		<pubDate>Fri, 04 Mar 2011 05:12:31 +0000</pubDate>
		<dc:creator>m</dc:creator>
				<category><![CDATA[PHP]]></category>
		<category><![CDATA[Wordpress]]></category>

		<guid isPermaLink="false">http://www.krakentechnologies.com/?p=67</guid>
		<description><![CDATA[I&#8217;m a big fan of Disqus (especially since they use Django), but the comment form was not displaying correctly in another blog I was working on. Specifically it was being displayed in the wrong place on the individual post page. &#8230; <a href="http://www.krakentechnologies.com/2011/03/solved-cleanr-wordpress-theme-conflicts-with-disqus-comments/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>I&#8217;m a big fan of Disqus (especially since they use Django), but the comment form was not displaying correctly in another blog I was working on. Specifically it was being displayed in the wrong place on the individual post page.<br />
At first I thought it was a CSS issue, but it was actually a function call in the wrong place in single.php. There&#8217;s an big if block that starts with:</p>


<div class="wp-geshi-highlight-wrap5"><div class="wp-geshi-highlight-wrap4"><div class="wp-geshi-highlight-wrap3"><div class="wp-geshi-highlight-wrap2"><div class="wp-geshi-highlight-wrap"><div class="wp-geshi-highlight"><div class="php"><pre class="de1"><span class="kw2">&lt;?php</span> <span class="kw1">if</span> <span class="br0">&#40;</span><span class="br0">&#40;</span><span class="st_h">'open'</span> <span class="sy0">==</span> <span class="re0">$post</span><span class="sy0">-&gt;</span><span class="me1">comment_status</span><span class="br0">&#41;</span> <span class="sy0">&amp;&amp;</span> <span class="br0">&#40;</span><span class="st_h">'open'</span> <span class="sy0">==</span> <span class="re0">$post</span><span class="sy0">-&gt;</span><span class="me1">ping_status</span><span class="br0">&#41;</span><span class="br0">&#41;</span> <span class="br0">&#123;</span></pre></div></div></div></div></div></div></div>


<p>Cut that block, with all of the elses and paste it outside of the p tag that lists categories, etc, but before the two closing div tags. Voila!<br />
Note that this is for <a href="http://wordpress.org/extend/themes/cleanr">WPShoppe&#8217;s Cleanr theme</a>. Not the many others with the <a href="http://themeforest.net/item/cleanr-theme-wordpress-version/102093">same</a> <a href="http://webtint.net/resources/cleanr-a-free-wordpress-theme-from-webtint/">name</a>. WPShoppe&#8217;s theme is actually getting kind of old and that may be why this is happening. Webtint&#8217;s Cleanr looks more polished.<br />
 
</pre>
]]></content:encoded>
			<wfw:commentRss>http://www.krakentechnologies.com/2011/03/solved-cleanr-wordpress-theme-conflicts-with-disqus-comments/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Removing duplicate rows in SQL</title>
		<link>http://www.krakentechnologies.com/2010/11/removing-duplicate-rows-in-sql/</link>
		<comments>http://www.krakentechnologies.com/2010/11/removing-duplicate-rows-in-sql/#comments</comments>
		<pubDate>Tue, 30 Nov 2010 21:15:22 +0000</pubDate>
		<dc:creator>m</dc:creator>
				<category><![CDATA[Geek]]></category>
		<category><![CDATA[Web Development]]></category>
		<category><![CDATA[duplicate rows]]></category>
		<category><![CDATA[LAMP]]></category>
		<category><![CDATA[SQL]]></category>
		<category><![CDATA[web development]]></category>

		<guid isPermaLink="false">http://www.krakentechnologies.com/?p=53</guid>
		<description><![CDATA[Since I&#8217; ve had to look this up twice in the last year, I should blog about it so I&#8217;ll remember. This is the quickest solution I&#8217;ve found. Problem: You have duplicate rows in your database. Even if you have &#8230; <a href="http://www.krakentechnologies.com/2010/11/removing-duplicate-rows-in-sql/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>Since I&#8217; ve had to look this up twice in the last year, I should blog about it so I&#8217;ll remember. This is the quickest solution I&#8217;ve found.</p>
<p>Problem:<br />
You have duplicate rows in your database. Even if you have an <code>AUTOINCREMENT</code> primary key, that doesn&#8217;t necessarily prevent you from having rows with identical information.</p>
<p>Solution:<br />
Find a column that will uniquely identify a record. If there isn&#8217;t one column, find a combination of columns. If there isn&#8217;t a combination of columns that uniquely identify your row, you probably have database design issues.</p>
<p><code>CREATE TEMPORARY TABLE nonduplicates LIKE table_with_duplicates;<br />
INSERT INTO nonduplicates SELECT * FROM table_with_duplicates GROUP BY unique_column;</code></p>
<p>To use a combination of columns, do:</p>
<p><code>INSERT INTO nonduplicates SELECT * FROM table_with_duplicates GROUP BY unique_column_1, unique_column_2, etc...;</code></p>
<p>If you have a very large data set, this technique is going to take a lot of time and resources. It may not even be possible due to memory constraints. In that case, here is an article on <a href="http://www.15seconds.com/issue/011009.htm">analyzing duplicate rows without using temporary tables</a>. In essence, you <code>JOIN</code> a table to itself in a subquery that matches all of your unique_columns against themselves with a <code>HAVING</code> clause that checks for an <code>id</code> lower or higher than the <code>MAX(id)</code> or <code>MIN(id)</code> depending on whether or not you want to keep the older or newer records. You could also use a timestamp field for this if there is one. This allows you much finer control over which records you keep. And in the time it will take you to understand my explanation, you could have read the (commented!) SQL code in the link above and understood it much better.</p>
<p>Of the many languages I work in and have worked with, SQL is the most unintuitive to me. I ran across the above link while idly searching for links on SQL and set theory. I can think of functional languages in terms of mathematical functions, but I don&#8217;t have that mapping in my brain with SQL. I think it&#8217;s the syntax. It&#8217;s always felt so awkward and COBOL-ish to me. I guess I&#8217;m spoiled by Python.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.krakentechnologies.com/2010/11/removing-duplicate-rows-in-sql/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Life with OS X on my Hackintosh</title>
		<link>http://www.krakentechnologies.com/2010/10/mac-os-x-on-my-hackintosh/</link>
		<comments>http://www.krakentechnologies.com/2010/10/mac-os-x-on-my-hackintosh/#comments</comments>
		<pubDate>Tue, 26 Oct 2010 20:43:14 +0000</pubDate>
		<dc:creator>m</dc:creator>
				<category><![CDATA[Geek]]></category>
		<category><![CDATA[apple]]></category>
		<category><![CDATA[hackintosh]]></category>
		<category><![CDATA[iphone]]></category>
		<category><![CDATA[netbook]]></category>
		<category><![CDATA[os x]]></category>
		<category><![CDATA[steve jobs]]></category>

		<guid isPermaLink="false">http://www.krakentechnologies.com/?p=44</guid>
		<description><![CDATA[So on to what I&#8217;ve learned from getting hacked. I&#8217;ve learned that Windows is not to be trusted with anything. I&#8217;m still not sure whether I got the virus by transferring a file from another computer or if it was &#8230; <a href="http://www.krakentechnologies.com/2010/10/mac-os-x-on-my-hackintosh/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>So on to what I&#8217;ve learned from getting hacked. I&#8217;ve learned that Windows is not to be trusted with anything. I&#8217;m still not sure whether I got the virus by transferring a file from another computer or if it was from a Vista security hole.</p>
<p>My experience with my Hackintosh has been very positive, except it (a Dell Mini 10v) doesn&#8217;t get anywhere near the battery life of my Samsung NC310. It doesn&#8217;t auto-dim the screen when on battery power.</p>
<p>It also has problems with hibernation/safe sleep. I&#8217;m getting the message &#8220;hibernation image too old&#8221; and this is after I had to use the pmset command in Terminal. Is there really no menu setting for this in OS X? I have no problem going into the command line, but I&#8217;d expect Apple to have some shiny, lickable interface for this.</p>
<p>Firefox 3.6 is almost unbearably slow on this. Chrome feels more or less like a desktop browser if you reasonably limit your tabs. Safari is fine, but not quite as peppy as Chrome.</p>
<p>Two-finger vertical scrolling works, which is nice, but the Dell Mini 10V&#8217;s  trackpad is a bit uncomfortably small. I can&#8217;t get horizontal gestures, three-finger gestures, or pinch and zoom to work, but maybe this is possible and I&#8217;m just not doing it right.</p>
<p>I&#8217;m sure that a lot of these problems could be solved with fairly simple tweaks. I haven&#8217;t had time to research it as I&#8217;m working hard on the new version of Yodelscope. I didn&#8217;t even hack this Hackintosh myself, which is shameful to my nerd status. An Apple mega-nerd friend of mine gave it to me to play with Apple&#8217;s various dev kits (He also makes an iPhone app called <a href="http://www.dopieslife.com">How Did I Get Home?</a> which you should definitely check out). I will get around to turning this thing into a triple-booting little beast one of these days.</p>
<p>I also ran across this really interesting <a href="http://www.cultofmac.com/john-sculley-on-steve-jobs-the-full-interview-transcript/63295">Cult of Mac interview with former Apple CEO John Sculley</a>. I&#8217;m too attached to the idea(l)s of open source to join the Mac (or more appropriately Apple) cult, but this article certainly does help cement Jobs&#8217; mythical status. As a young nerd, I read a lot about Apple, but many things focused on Steve Wozniak&#8217;s technical genius rather than the organizational/design genius of Jobs. Call me culturally clueless, but this interview is what first drew this to my attention.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.krakentechnologies.com/2010/10/mac-os-x-on-my-hackintosh/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Site hacked!</title>
		<link>http://www.krakentechnologies.com/2010/09/site-hacked/</link>
		<comments>http://www.krakentechnologies.com/2010/09/site-hacked/#comments</comments>
		<pubDate>Tue, 28 Sep 2010 20:38:56 +0000</pubDate>
		<dc:creator>m</dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://www.krakentechnologies.com/?p=37</guid>
		<description><![CDATA[If you came here or to some of my other sites recently, you may have noticed that Google blacklisted them as site distributing malware. This was a result of a virus that infected my PC and used a keylogger to &#8230; <a href="http://www.krakentechnologies.com/2010/09/site-hacked/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>If you came here or to some of my other sites recently, you may have noticed that Google blacklisted them as site distributing malware. This was a result of a virus that infected my PC and used a keylogger to steal passwords. Then, on Sept. 25, it used those passwords to download files via FTP and re-upload them with malicious Javascript files included from addonrock.ru and alienradar.ru. It did this to any file named index or default with an extension of .php or .html. It also affected many .js files, adding a document.write call to insert malware scripts.</p>
<p>The way this all started is that I had a Windows Vista laptop that was sitting around forever and when I connected it to the Internet, it must have gotten infected before I had a chance to apply essential Windows upgrades. This was months ago and I don&#8217;t think that infection specifically was the keylogger. I cleaned that virus up as much as I could using advice from www.bleepingcomputer.com and tools like <a href="http://www.malwarebytes.org">Malware Bytes&#8217; Malware Defender</a> and <a href="http://www.safer-networking.org">Spybot Search &amp; Destroy</a>. Unfortunately, I don&#8217;t think that totally removed whatever virus it was. There was some part of the trojan left lurking around, dormant. I think it later re-activated to download another part or an updated version of itself, which is what stole my passwords. I&#8217;m still not sure whether to just totally wipe the hard drive on my Windows laptop. Painstakingly removing all traces of the viruses could a learning experience, but I can think of slightly more fun ways to spend my time.</p>
<p>So, now I&#8217;m typing this from OS X, on  a little Hackintosh netbook, which I got from my pal over at <a href="http://www.dopieslife.com">Dopie&#8217;s Life</a>. It&#8217;s probably a stepping stone to an all-Linux life. Or maybe I&#8217;ll get really paranoid about security and use some customized NetBSD install with encrypted everything. I&#8217;m already looking at encrypting my files using something like TrueCrypt.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.krakentechnologies.com/2010/09/site-hacked/feed/</wfw:commentRss>
		<slash:comments>4</slash:comments>
		</item>
		<item>
		<title>Microsoft Silverlight broke Netflix</title>
		<link>http://www.krakentechnologies.com/2010/08/microsoft-silverlight-broke-netflix/</link>
		<comments>http://www.krakentechnologies.com/2010/08/microsoft-silverlight-broke-netflix/#comments</comments>
		<pubDate>Sun, 15 Aug 2010 20:41:51 +0000</pubDate>
		<dc:creator>m</dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://www.krakentechnologies.com/?p=29</guid>
		<description><![CDATA[I went to stream some movies from Netflix today and got a DRM error (N8151) instead of the film I wanted to watch. After a quick call with Netflix&#8217;s very helpful staff, they informed me that it was a problem &#8230; <a href="http://www.krakentechnologies.com/2010/08/microsoft-silverlight-broke-netflix/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>I went to stream some movies from Netflix today and got a DRM error (N8151) instead of the film I wanted to watch. After a quick call with Netflix&#8217;s very helpful staff, they informed me that it was a problem with Microsoft Silverlight&#8217;s latest version and I would have to downgrade to version 3 (download here: <a title="Download Microsoft Silverlight 3.0" href="http://www.microsoft.com/getsilverlight/handlers/getsilverlight.ashx?v=3.0">http://www.microsoft.com/getsilverlight/handlers/getsilverlight.ashx?v=3.0</a>) in order to fix it. Apparently the latest version of Silverlight just refuses to accept the certificate.</p>
<p>This worked, but&#8230;. so annoying! I  develop using SSH/Emacs (and screen in case I get disconnected) so I can generally use any platform. I work on OS X, Windows, and Linux on different contracts. All my home systems are Windows for a bunch of programs unavailable elsewhere. PuTTY, Cygwin and XAMPP allow me to do work. I&#8217;ve never been convinced of the innate superiority of Apple (especially now that I own an iPhone), but between this and getting a virus on my Vista laptop by doing NOTHING except being online, I&#8217;m getting pretty fed up.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.krakentechnologies.com/2010/08/microsoft-silverlight-broke-netflix/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>New Section: Portfolio!</title>
		<link>http://www.krakentechnologies.com/2010/07/new-sectio-portfolio/</link>
		<comments>http://www.krakentechnologies.com/2010/07/new-sectio-portfolio/#comments</comments>
		<pubDate>Tue, 13 Jul 2010 01:24:37 +0000</pubDate>
		<dc:creator>m</dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://www.krakentechnologies.com/?p=23</guid>
		<description><![CDATA[On the Portfolio page, you&#8217;ll find links to all the websites I can think of that I&#8217;ve worked on. Wow, this is starting to resemble a real website.]]></description>
			<content:encoded><![CDATA[<p>On the <a href="/portfolio" target="_self">Portfolio</a> page, you&#8217;ll find links to all the websites I can think of that I&#8217;ve worked on. Wow, this is starting to resemble a real website.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.krakentechnologies.com/2010/07/new-sectio-portfolio/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Welcome!</title>
		<link>http://www.krakentechnologies.com/2010/07/welcome/</link>
		<comments>http://www.krakentechnologies.com/2010/07/welcome/#comments</comments>
		<pubDate>Sat, 10 Jul 2010 00:08:34 +0000</pubDate>
		<dc:creator>m</dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://www.krakentechnologies.com/?p=8</guid>
		<description><![CDATA[I&#8217;m Michael Buell and this is my blog where I&#8217;ll be posting various things related to my profession: programming and software development, usually for dynamic websites and web applications. My languages of choice for web development are Python, Django, and &#8230; <a href="http://www.krakentechnologies.com/2010/07/welcome/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>I&#8217;m Michael Buell and this is my blog where I&#8217;ll be posting various things related to my profession: programming and software development, usually for dynamic websites and web applications.</p>
<p>My languages of choice for web development are Python, Django, and jQuery. I&#8217;ve also done a fair amount of work in PHP&#8230; under duress. I have done work on everything from e-commerce sites to iPhone in-app purchase servers to custom enterprise tools, all using open source technology wherever possible.</p>
<p>I&#8217;ll be discussing all of these topics, plus whatever other nerdery springs to mind. This will also be the repository for all my notes on programming, server setup, etc. Partly for my own reference, hopefully to help other people solve the same problems.</p>
<p>Alright! I look forward to hearing from you, my non-existent audience!</p>
]]></content:encoded>
			<wfw:commentRss>http://www.krakentechnologies.com/2010/07/welcome/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

