<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:dc="http://purl.org/dc/elements/1.1/" version="2.0"><channel><atom:link rel="hub" href="http://tumblr.superfeedr.com/" xmlns:atom="http://www.w3.org/2005/Atom"/><description>Welcome to my scratch pad for projects and other items of attention deficit. aim: stellar678 / gmail: slybeck at gmail dot com / skype: stevenlybeck / twitter: stellar678</description><title>Steven Lybeck</title><generator>Tumblr (3.0; @stevenlybeck)</generator><link>http://www.stevenlybeck.com/</link><item><title>best guide i've found to delete a file from git history</title><description>&lt;p&gt;&lt;a title="Remove a file permanently from git" href="http://stackoverflow.com/questions/1216733/remove-a-directory-permanently-from-git"&gt;Remove a file permanently from git&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;You use filter-branch to replay the whole history with a filter applied (—filter-tree ‘rm -f file_to_immolate’). Then you remove the original refspec saved by filter-branch (rm -rf ./git/refs/original). Then you run garbage colleciton to remove the objects that are no longer referenced. (git gc)&lt;/p&gt;
&lt;p&gt;And suddenly you’re clean.&lt;/p&gt;
&lt;p&gt;Also useful if you’ve been mucking about: &lt;a title="Repack/Unpack/Prune/etc..." href="http://stackoverflow.com/questions/2164581/remove-file-from-git-repository-history"&gt;Repack/Unpack/Prune/etc…&lt;/a&gt;&lt;/p&gt;</description><link>http://www.stevenlybeck.com/post/2817383113</link><guid>http://www.stevenlybeck.com/post/2817383113</guid><pubDate>Tue, 18 Jan 2011 15:11:00 -0800</pubDate></item><item><title>Trouble adding a foreign key relation to your MySQL table?</title><description>&lt;p&gt;Getting weird errors about 1005 and/or 150, “can’t create table #blahblahblah”? Perhaps MySQL can’t find the index on the column in your target table:&lt;/p&gt;
&lt;p&gt;&lt;a href="http://bugs.mysql.com/bug.php?id=16290"&gt;http://bugs.mysql.com/bug.php?id=16290&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;I needed to create an additional index even though my referenced column was the primary key. No idea why yet, but I figured I’d record this.&lt;/p&gt;</description><link>http://www.stevenlybeck.com/post/1416230865</link><guid>http://www.stevenlybeck.com/post/1416230865</guid><pubDate>Wed, 27 Oct 2010 10:27:01 -0700</pubDate></item><item><title>Learning Python</title><description>&lt;p&gt;Amazed to report that, having never created a Python program longer than “hello world” and within an hour of starting, I was able to research and implement a Python script that imports arbitrary CSV files into a sqlite database for more sane analysis. Go Python!&lt;/p&gt;</description><link>http://www.stevenlybeck.com/post/834409626</link><guid>http://www.stevenlybeck.com/post/834409626</guid><pubDate>Mon, 19 Jul 2010 19:03:00 -0700</pubDate></item><item><title>Writing </title><description>&lt;p&gt;I’ve been starting to think I should be writing a bit more, and things like this (&lt;a href="http://www.copyblogger.com/bad-writing-habits/"&gt;http://www.copyblogger.com/bad-writing-habits/&lt;/a&gt;) keep popping up for me and sparking this feeling even more. I think I’ll use it to help structure my workweek better as well.&lt;/p&gt;</description><link>http://www.stevenlybeck.com/post/329560423</link><guid>http://www.stevenlybeck.com/post/329560423</guid><pubDate>Mon, 11 Jan 2010 16:45:30 -0800</pubDate></item><item><title>Lady Gaga iOKi is currently featured on the app store front...</title><description>&lt;img src="http://28.media.tumblr.com/tumblr_ktmqiwkDRm1qzbxgeo1_500.png"/&gt;&lt;br/&gt;&lt;br/&gt;&lt;p&gt;Lady Gaga iOKi is currently featured on the app store front page, awesome!&lt;/p&gt;</description><link>http://www.stevenlybeck.com/post/255952492</link><guid>http://www.stevenlybeck.com/post/255952492</guid><pubDate>Tue, 24 Nov 2009 12:06:32 -0800</pubDate></item><item><title>I know you've been wondering for months. (I certainly have.)</title><description>&lt;p&gt;PHP’s boolean literals (true and false) are completely case-insensitive. Cool!&lt;/p&gt;</description><link>http://www.stevenlybeck.com/post/201992066</link><guid>http://www.stevenlybeck.com/post/201992066</guid><pubDate>Thu, 01 Oct 2009 13:32:02 -0700</pubDate></item><item><title>easy peasy find big files on linux</title><description>&lt;p&gt;&lt;code&gt;du -xakm /|sort -rn|head -500 &gt; bigfiles.txt&lt;/code&gt;&lt;/p&gt;
&lt;p&gt;This saves (quickly!) a list of the 500 biggest files on your Linux / Unix / Mac OSX system, along with their size in megabytes, and organizes them with the largest at the top. Cool!&lt;/p&gt;
&lt;p&gt;It’s saving me this evening - thanks go out to a commenter named georges at &lt;a href="http://www.cyberciti.biz/faq/find-large-files-linux/"&gt;http://www.cyberciti.biz/faq/find-large-files-linux/&lt;/a&gt;&lt;/p&gt;</description><link>http://www.stevenlybeck.com/post/190807714</link><guid>http://www.stevenlybeck.com/post/190807714</guid><pubDate>Thu, 17 Sep 2009 23:36:00 -0700</pubDate></item><item><title>Drinking Tropicana Orange Juice</title><description>&lt;p&gt;And the box says “Contains Orange Juice from the U.S. and Brazil.”&lt;/p&gt;

&lt;p&gt;WHAT?&lt;/p&gt;

&lt;p&gt;Why is it that food safety rules are so focused on points of failure rather than systemic problems?&lt;/p&gt;

&lt;p&gt;What if we mashed the Brazillian oranges _separately_ from the U.S. oranges? Perhaps the inevitable lapses in food safety would be identified and quashed faster than the absurdly broad contaminations we have now that result in the wholesale destruction of tons and tons of food.&lt;/p&gt;

&lt;p&gt;Just a thought. One glass of orange juice simultaneously from the U.S. and Brazil, harumph.&lt;/p&gt;</description><link>http://www.stevenlybeck.com/post/155398850</link><guid>http://www.stevenlybeck.com/post/155398850</guid><pubDate>Mon, 03 Aug 2009 21:29:28 -0700</pubDate></item><item><title>Apache RewriteRule weirdness</title><description>&lt;p&gt;&lt;a href="http://blog.maxdunn.com/articles/2007/01/12/differences-between-rewriterule-in-htaccess-and-httpd-conf"&gt;Phenomenally useful post&lt;/a&gt; by a guy named Max Dunn in his blog “Eschew Obfuscation”.&lt;/p&gt;
&lt;p&gt;The gist of the usefulness for me:&lt;/p&gt;

&lt;ul&gt;&lt;li&gt;Let’s say people are accessing your site on the url &lt;a href="http://site.com/coolpage"&gt;http://site.com/coolpage&lt;/a&gt; and you need to rewrite that to &lt;a href="http://site.com/index.php/coolpage"&gt;http://site.com/index.php/coolpage&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;When your RewriteRule directive is in a conf file, it will be matching against “/coolpage”&lt;/li&gt;
&lt;li&gt;When the directive is in a .htaccess file located in the document root for site.com, it will be matching against “coolpage”&lt;/li&gt;
&lt;/ul&gt;&lt;p&gt;I thought it was pretty weird behavior until I realized: the .htaccess rules will only be applied to requests for things within the site.com document root, (making the leading slash irrelevant information) whereas the the conf files are potentially server-wide.&lt;/p&gt;
&lt;p&gt;Here’s what you’d probably use in each case:&lt;/p&gt;
&lt;p&gt;Apache conf file:&lt;/p&gt;
&lt;p&gt;&lt;code&gt;RewriteRule ^/(.*)$ index.php?/$1 [L]&lt;/code&gt;&lt;/p&gt;
&lt;p&gt;.htacess file:&lt;/p&gt;
&lt;p&gt;&lt;code&gt;RewriteRule ^(.*)$ index.php?/$1 [L]&lt;/code&gt;&lt;/p&gt;</description><link>http://www.stevenlybeck.com/post/154418165</link><guid>http://www.stevenlybeck.com/post/154418165</guid><pubDate>Sun, 02 Aug 2009 13:37:20 -0700</pubDate></item><item><title>Google Sites Screencasts</title><description>&lt;p&gt;I recently gave a workshop on how to create a simple personal branding website using the Google Sites service and decided that I could provide a recap of some of the key steps here for anyone that needs them. I’ll be adding more as time goes by, but I’m getting started with a simple one that shows how to create a new site:&lt;/p&gt;
&lt;ul&gt;&lt;li&gt;&lt;a href="http://tr.im/tgnP" title="Creating a new site in Google Sites" target="_self"&gt;Creating a new site in Google Sites&lt;/a&gt; - 5 minute narrated tutorial showing how to create a new site&lt;/li&gt;
&lt;/ul&gt;&lt;p&gt;I know this is really basic but don’t worry, more are coming! If you bookmark &lt;a href="http://www.stevenlybeck.com/tagged/google-sites-screencasts" title="Google Sites Tutorials" target="_self"&gt;this page dedicated to the tutorials&lt;/a&gt; and check back regularly, the new posts will appear right at the top.&lt;/p&gt;</description><link>http://www.stevenlybeck.com/post/146593574</link><guid>http://www.stevenlybeck.com/post/146593574</guid><pubDate>Tue, 21 Jul 2009 22:44:00 -0700</pubDate><category>google-sites-screencasts</category></item><item><title>Really cool remote file copying trick</title><description>&lt;p&gt;So I was trying to copy a really huge (about 4 gigs) file from my laptop up to my web server, using a simple and standard command:&lt;/p&gt;

&lt;p&gt;&lt;code&gt;scp local_file_name username@remoteserver.com:remote_file_name&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;When I got about 10% through, I began to worry what would happen if the transfer failed somewhere way down the line. (It claimed it would take 4 and a half hours.) So I googled “scp resume” to see if there was anything to be done. Sure enough, I found several blog posts suggesting this command:&lt;/p&gt;

&lt;p&gt;&lt;code&gt;rsync --partial --progress --rsh=ssh local_file_name username@remosthost.com:remote_file_name&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;So, worried to potentially waste a bunch of time if the scp failed at 95% or something, I just canceled it and expected to have to re-do the 10% that was already done.&lt;/p&gt;

&lt;p&gt;The coolest part? The canceled scp left the portion of the file already transfered, and the new rsync command was happy to resume that transfer.&lt;/p&gt;

&lt;p&gt;So it’s not only a resume-friendly alternative to scp, it’s actually a rescue method for failed scp transfers. Cool!&lt;/p&gt;</description><link>http://www.stevenlybeck.com/post/146575992</link><guid>http://www.stevenlybeck.com/post/146575992</guid><pubDate>Tue, 21 Jul 2009 22:12:11 -0700</pubDate></item><item><title>CodeIgniter View Hack</title><description>&lt;p&gt;I ran into what seems like it might a bug in CodeIgniter’s view loading. (Specifically in the extraction of a data array into the local scope for that view.)  I had pulled out a piece of HTML that was repeated a lot into a separate view file in order to call it more easily in the main view file. The data array I was passing in had certain keys that were sometimes present, sometimes not present. I discovered that if I called the view once when the keys were present, and then a second time when the keys were not present, rather than seeing no value for the keys (the expected result), the view saw the values from the previous call.  My eventual soultion was to replace my view loading line &lt;code&gt;$this-&gt;load-&gt;view('view_name', $data);&lt;/code&gt; with &lt;code&gt;$this-&gt;load-&gt;view('view_name',Array('d'=&gt;$data));&lt;/code&gt; Loading the view in this second method meant CodeIgniter was only extracting one symbol ($d) into the global sope of the view I was loading. Since this symbol got replaced on every call, my problem went away. The kinda-lame part, however, is that the view now needs to reference pieces of data as &lt;code&gt;$d['piece_of_data']&lt;/code&gt; instead of simply &lt;code&gt;$piece_of_data&lt;/code&gt;&lt;/p&gt;</description><link>http://www.stevenlybeck.com/post/142524223</link><guid>http://www.stevenlybeck.com/post/142524223</guid><pubDate>Wed, 15 Jul 2009 20:24:00 -0700</pubDate></item><item><title>MAMP default MySQL password</title><description>&lt;p&gt;I decided to try using MAMP for a development project I’m working on, instead of fooling around with remotely editing files on a web server, and instead of manually configuring Apache, MySQL and PHP on OSX. It’s super easy to set up and the workflow is much more smooth than trying to do some kind of networked drive setup, which is how I’ve usually done development in the past.&lt;/p&gt;

&lt;p&gt;The one issue I had was figuring out the default MySQL password.&lt;/p&gt;

&lt;p&gt;Here they are:&lt;br/&gt;
username: root&lt;br/&gt;
password: root&lt;/p&gt;

&lt;p&gt;Pretty easy!&lt;/p&gt;</description><link>http://www.stevenlybeck.com/post/139347416</link><guid>http://www.stevenlybeck.com/post/139347416</guid><pubDate>Fri, 10 Jul 2009 18:03:06 -0700</pubDate></item><item><title>ssh on OSX</title><description>&lt;p&gt;I’ve had trouble for ages now with ssh freezing or locking up after being idle for a few minutes. This became especially problematic in the past few days because I’ve needed to use it as a tunnel to access some remote resources on a server I’m working with.&lt;/p&gt;
&lt;p&gt;Well, thankfully I found a quick solution:&lt;/p&gt;
&lt;p&gt;I just opened up the file ~/.ssh/config in an editor and added this line:&lt;/p&gt;
&lt;p&gt;&lt;code&gt;ServerAliveInterval=15&lt;/code&gt;&lt;/p&gt;
&lt;p&gt;I say added, but in fact this is the only line in the file. This tells ssh to ping the server if it hasn’t heard anything for 15 seconds, and it has completely solved my problem. There’s a pretty good, more in-depth explanation at &lt;a href="http://tr.im/rPq8"&gt;&lt;a href="http://tr.im/rPq8"&gt;http://tr.im/rPq8&lt;/a&gt;&lt;/a&gt;&lt;/p&gt;</description><link>http://www.stevenlybeck.com/post/139339496</link><guid>http://www.stevenlybeck.com/post/139339496</guid><pubDate>Fri, 10 Jul 2009 17:44:00 -0700</pubDate><category>ssh</category><category>osx</category><category>timeout</category><category>freeze</category><category>lockup</category><category>serveraliveinterval</category></item><item><title>Hi World</title><description>&lt;p&gt;Just a quick jot to get this blog started in the middle of the night. (Of course.) I’m thinking I’ll turn it into a video-centric blog about my job hunting experience. Interviews with the people I meet, etc…&lt;/p&gt;
&lt;p&gt;Yesh?&lt;/p&gt;
&lt;p&gt;Looking into cameras, and more importantly into whether I think I can keep up an interviewing schedule that would be at all interesting to people…&lt;/p&gt;</description><link>http://www.stevenlybeck.com/post/99221341</link><guid>http://www.stevenlybeck.com/post/99221341</guid><pubDate>Thu, 23 Apr 2009 01:39:00 -0700</pubDate></item></channel></rss>

