<?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>I am interested in CakePHP, Ruby on Rails, Git, Mac OSX, and Ubuntu among other things web related.</description><title>Web Development and other ramblings</title><generator>Tumblr (3.0; @jimiyash)</generator><link>http://jimiyash.tumblr.com/</link><item><title>Thoughts on the new Macbook Air 13-inch (Late 2011 model)</title><description>&lt;p&gt;Today, I bought the 13-inch Macbook Air with 2GB memory, 1.86 Core 2 Duo, and the 128 SSD. In Japan, on January 2nd, there are all kinds of special sales and I went to the Ginza Apple Store to pick up my new toy. I could have bought it on from the Apple web store and gotten 8400 yen off, but I also got an extra 5000 yen off at the Apple store. Unfortunately, I wanted to upgrade to 4GB memory, but they only had models with 4GB memory and the 256 SSD upgrade which would have made it way too expensive. &lt;/p&gt;
&lt;p&gt;Until now, I have been using a 2008 Macbook 15 inch (non-unibody) with a 4GB ram upgrade. It would overheat when watching Flash video. Using the SMC fan utility on the new Air, it said that the temperature was about 80&amp;#160;C, which is about the same as the my old Macbook Pro. The big difference is that while my Macbook Pro is very hot to the touch, the Air only feels slightly warmer than usual.&lt;/p&gt;
&lt;p&gt;Launching applications feels much faster on the Air, but other than that, the speed is about on par with my Macbook Pro. I have yet to try compiling and installing programs from the command line, but I heard those are really fast with an SSD. I also picked up a Grifin mini display port to HDMI adapter at the Apple store for $40  (probably paid too much, I know). I was worried it wouldn&amp;#8217;t carry audio through the display port to my TV, but it worked after setting the sound output to tv in the system preferences.&lt;/p&gt;
&lt;p&gt;I plan to use this as my main machine after moving a few more files and applications and try to sell my old macbook pro. Overall, I am really happy with the new Macbook Air after about 3 hours of use. &lt;/p&gt;</description><link>http://jimiyash.tumblr.com/post/2565900820</link><guid>http://jimiyash.tumblr.com/post/2565900820</guid><pubDate>Sun, 02 Jan 2011 04:58:00 -0500</pubDate><category>apple</category></item><item><title>Macbook wishlist</title><description>&lt;p&gt;I like the new Macbook Air, but it doesn&amp;#8217;t quite meet my needs. I am looking forward to the next iteration of the Macbook/Macbook Pro.&lt;/p&gt;
&lt;p&gt;Here is a list of hardware I would like in order of importance:&lt;/p&gt;
&lt;ol&gt;&lt;li&gt;SSD standard, or the solid state stick like in the Air&lt;/li&gt;
&lt;li&gt;A second hard drive for storage. The SSD would hold the OS and applications and the hard drive would be for video, music, documents, etc. I wouldn&amp;#8217;t really care if I lost the optical drive&lt;/li&gt;
&lt;li&gt;Core i3 standard with nvidia standard&lt;/li&gt;
&lt;li&gt;HDMI port. I hate the mini display port, I don&amp;#8217;t want to buy another adapter, I have 3-4 that are now useless&lt;/li&gt;
&lt;li&gt;USB 3.0 (unlikely), firewire 400/800 (unlikely)&lt;/li&gt;
&lt;/ol&gt;</description><link>http://jimiyash.tumblr.com/post/2300047610</link><guid>http://jimiyash.tumblr.com/post/2300047610</guid><pubDate>Mon, 13 Dec 2010 07:25:13 -0500</pubDate></item><item><title>Awesome re-indent from Textmate</title><description>&lt;p&gt;&lt;span&gt;
&lt;h3&gt;&lt;a name="re-indent_text" id="re-indent_text"&gt;4.6.3&lt;/a&gt; Re-indent Text&lt;/h3&gt;
&lt;p&gt;If you have code which has broken indent, you can select it and use Text → Indent Selection (without a selection it indents the current line).&lt;/p&gt;
&lt;p&gt;The rules for estimating the indent are setup per-language using &lt;a href="http://manual.macromates.com/en/preferences_items.html"&gt;bundle preferences&lt;/a&gt;. For more details see the&lt;a href="http://manual.macromates.com/en/appendix#indentation_rules.html"&gt;indentation rules section&lt;/a&gt;.&lt;/p&gt;
&lt;/span&gt;&lt;/p&gt;</description><link>http://jimiyash.tumblr.com/post/1643890360</link><guid>http://jimiyash.tumblr.com/post/1643890360</guid><pubDate>Sun, 21 Nov 2010 21:48:51 -0500</pubDate></item><item><title>Deleting duplicate rows in mysql</title><description>&lt;p&gt;&lt;a href="http://forums.mysql.com/read.php?47,255365,257894#msg-257894"&gt;http://forums.mysql.com/read.php?47,255365,257894#msg-257894&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;consider employee table(number,name,salary) to contain your data &lt;/span&gt;&lt;span&gt;&lt;br/&gt;&lt;/span&gt;&lt;span&gt;1 ethan 900 &lt;/span&gt;&lt;span&gt;&lt;br/&gt;&lt;/span&gt;&lt;span&gt;1 ethan 900 &lt;/span&gt;&lt;span&gt;&lt;br/&gt;&lt;/span&gt;&lt;span&gt;2 sumakar 800 &lt;/span&gt;&lt;span&gt;&lt;br/&gt;&lt;/span&gt;&lt;span&gt;3 jay 800 &lt;/span&gt;&lt;span&gt;&lt;br/&gt;&lt;/span&gt;&lt;span&gt;4 jack 700 &lt;/span&gt;&lt;span&gt;&lt;br/&gt;&lt;/span&gt;&lt;span&gt;4 jack 700 &lt;/span&gt;&lt;span&gt;&lt;br/&gt;&lt;/span&gt;&lt;span&gt;4 jack 700 &lt;/span&gt;&lt;span&gt;&lt;br/&gt;&lt;/span&gt;&lt;span&gt;&lt;br/&gt;&lt;/span&gt;&lt;span&gt;Follow the three steps below, &lt;/span&gt;&lt;span&gt;&lt;br/&gt;&lt;/span&gt;&lt;span&gt;&lt;br/&gt;&lt;/span&gt;&lt;span&gt;Step 1: Move the non duplicates to a temporary table &lt;/span&gt;&lt;span&gt;&lt;br/&gt;&lt;/span&gt;&lt;span&gt;&lt;br/&gt;&lt;/span&gt;&lt;span&gt;CREATE TABLE new_employee AS &lt;/span&gt;&lt;span&gt;&lt;br/&gt;&lt;/span&gt;&lt;span&gt;SELECT * FROM employee WHERE 1 GROUP BY number,name,salary; &lt;/span&gt;&lt;span&gt;&lt;br/&gt;&lt;/span&gt;&lt;span&gt;&lt;br/&gt;&lt;/span&gt;&lt;span&gt;Step 2: delete old table &lt;/span&gt;&lt;span&gt;&lt;br/&gt;&lt;/span&gt;&lt;span&gt;We no longer need the table with all the duplicate entries, so drop it! &lt;/span&gt;&lt;span&gt;&lt;br/&gt;&lt;/span&gt;&lt;span&gt;DROP TABLE employee; &lt;/span&gt;&lt;span&gt;&lt;br/&gt;&lt;/span&gt;&lt;span&gt;&lt;br/&gt;&lt;/span&gt;&lt;span&gt;Step 3: rename the new_table to the name of the old_table &lt;/span&gt;&lt;span&gt;&lt;br/&gt;&lt;/span&gt;&lt;span&gt;RENAME TABLE new_employee TO employee; &lt;/span&gt;&lt;span&gt;&lt;br/&gt;&lt;/span&gt;&lt;span&gt;&lt;br/&gt;&lt;/span&gt;&lt;span&gt;&lt;br/&gt;&lt;/span&gt;&lt;span&gt;If your table has indexes, hold on a minute&amp;#8230;;)&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;&amp;#8212;&amp;#8212;&amp;#8212;&amp;#8212;&amp;#8212;&amp;#8212;&amp;#8212;&amp;#8212;&amp;#8212;&amp;#8212;&amp;#8212;&amp;#8212;&amp;#8212;&amp;#8212;&amp;#8212;&amp;#8212;&amp;#8212;&amp;#8212;&amp;#8212;&amp;#8212;&amp;#8212;&amp;#8212;&amp;#8212;&amp;#8212;&amp;#8212;&amp;#8212;&amp;#8212;&amp;#8212;&amp;#8212;&amp;#8212;&amp;#8212;&amp;#8212;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;This worked like a charm. However I did it a sligthly different way, using Sequel Pro on Mac OSX:&lt;/p&gt;
&lt;p&gt;1) Right-click the table on the sidebar and click &amp;#8220;Duplicate Table&amp;#8221;. Make sure that you check the box that says duplicate table. This could take a while with a large table, mine had about 67,000 rows.&lt;/p&gt;
&lt;p&gt;2) Truncate the original table.&lt;/p&gt;
&lt;p&gt;3) In the query window, use the query as stated above, but with an insert:&lt;/p&gt;
&lt;p&gt;INSERT INTO table&lt;br/&gt;SELECT * FROM tmp_table GROUP BY id, category&lt;/p&gt;
&lt;p&gt;etc. &lt;/p&gt;</description><link>http://jimiyash.tumblr.com/post/1585689681</link><guid>http://jimiyash.tumblr.com/post/1585689681</guid><pubDate>Mon, 15 Nov 2010 19:41:19 -0500</pubDate></item><item><title>Snippet :: jQuery Syntax Highlighter</title><description>&lt;a href="http://steamdev.com/snippet/"&gt;Snippet :: jQuery Syntax Highlighter&lt;/a&gt;</description><link>http://jimiyash.tumblr.com/post/1514294202</link><guid>http://jimiyash.tumblr.com/post/1514294202</guid><pubDate>Mon, 08 Nov 2010 02:30:52 -0500</pubDate></item><item><title>Creating a secure Git repository</title><description>&lt;p&gt;I have been using git for about a year. One of the differences between Git and Subversion is that Git does not require a server for you to use it because of its distributed nature. However, more times than not, you are working with a team of developers and you need to have access to a centralized server to push and pull from. The default method to setup git is through SSH.&lt;/p&gt;
&lt;p&gt;Here is a short tutorial on setting up the server through SSH &lt;a title="Setting up a Git Server" target="_blank" href="http://blog.commonthread.com/post/1034988660/setting-up-a-git-server"&gt;&lt;a href="http://blog.commonthread.com/post/1034988660/setting-up-a-git-server"&gt;http://blog.commonthread.com/post/1034988660/setting-up-a-git-server&lt;/a&gt;&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;So now we have our git server up and running. Pretty simple, eh? But there is one big problem. There are many cases where you don&amp;#8217;t trust the collaborators you are working with and now you have given them full access to the command line through SSH. They may not have root access but they would be able to create files in their home directory and possibly read files outside!&lt;/p&gt;
&lt;p&gt;At this point, I wondered how Git hosting sites like GitHub or Codaset address this problem. Surely, they don&amp;#8217;t have people accessing their servers using the SSH shell, right? So, I asked the question on stack overflow (&lt;a title="Securing Git Server - Stack Overflow" target="_blank" href="http://stackoverflow.com/questions/3116508/securing-git-server"&gt;&lt;a href="http://stackoverflow.com/questions/3116508/securing-git-server"&gt;http://stackoverflow.com/questions/3116508/securing-git-server&lt;/a&gt;&lt;/a&gt;), which has saved my butt more than a few times. It seems there is a shell that comes with Git that will only allow push and pull and won&amp;#8217;t let them access the shell via SSH.&lt;/p&gt;
&lt;p&gt;Setting the git user&amp;#8217;s shell to /usr/bin/git-shell should do the trick. For instructions please see: &lt;a title="Using Git Shell" target="_blank" href="http://www.kernel.org/pub/software/scm/git/docs/everyday.html"&gt;&lt;a href="http://www.kernel.org/pub/software/scm/git/docs/everyday.html"&gt;http://www.kernel.org/pub/software/scm/git/docs/everyday.html&lt;/a&gt;&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;Note: Some people suggest the use of &lt;a title="Gitosis" href="http://scie.nti.st/2007/11/14/hosting-git-repositories-the-easy-and-secure-way"&gt;Gitosis&lt;/a&gt; or &lt;a title="Gitolite" href="http://github.com/sitaramc/gitolite"&gt;Gitolite&lt;/a&gt;. I haven&amp;#8217;t tried either but as I understand it Gitosis allows you to setup teams and groups for more fine-grained control over which users access which repositories. For my purposes, using git-shell was the easiest and pretty secure, in my opinion.&lt;/p&gt;
&lt;p&gt;Update (11/5/2010): This site pretty much sums it up &lt;a title="setup git" href="http://articles.slicehost.com/2009/5/13/capistrano-series-setting-up-git"&gt;&lt;a href="http://articles.slicehost.com/2009/5/13/capistrano-series-setting-up-git"&gt;http://articles.slicehost.com/2009/5/13/capistrano-series-setting-up-git&lt;/a&gt;&lt;/a&gt;&lt;/p&gt;</description><link>http://jimiyash.tumblr.com/post/1486448958</link><guid>http://jimiyash.tumblr.com/post/1486448958</guid><pubDate>Fri, 05 Nov 2010 04:00:00 -0400</pubDate></item><item><title>Kobe triple double!</title><link>http://jimiyash.tumblr.com/post/1477166341</link><guid>http://jimiyash.tumblr.com/post/1477166341</guid><pubDate>Thu, 04 Nov 2010 01:18:04 -0400</pubDate></item><item><title>Lakers v. Kings</title><description>&lt;p&gt;&lt;a href="http://fuckyeahlakers.tumblr.com/post/1475844643/lakers-v-kings"&gt;fuckyeahlakers&lt;/a&gt;:&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;ESPN. 10 minutes.&lt;/p&gt;
&lt;p&gt;Just a friendly reminder.&lt;/p&gt;
&lt;/blockquote&gt;</description><link>http://jimiyash.tumblr.com/post/1476079063</link><guid>http://jimiyash.tumblr.com/post/1476079063</guid><pubDate>Wed, 03 Nov 2010 22:47:01 -0400</pubDate></item><item><title>Wow, what a play by the bucks out of the timeout</title><description>&lt;p&gt;That&amp;#8217;s why Scott Skiles is one of the best coaches in the league.&lt;/p&gt;</description><link>http://jimiyash.tumblr.com/post/1476073839</link><guid>http://jimiyash.tumblr.com/post/1476073839</guid><pubDate>Wed, 03 Nov 2010 22:46:00 -0400</pubDate></item><item><title>git add -u to add deleted files to staging area</title><description>&lt;a href="http://stackoverflow.com/questions/572549/difference-of-git-add-a-and-git-add"&gt;git add -u to add deleted files to staging area&lt;/a&gt;</description><link>http://jimiyash.tumblr.com/post/1475754894</link><guid>http://jimiyash.tumblr.com/post/1475754894</guid><pubDate>Wed, 03 Nov 2010 22:09:47 -0400</pubDate></item><item><title>Introducing the Ars Technica Reader for iPad</title><description>&lt;a href="http://arstechnica.com/apple/news/2010/11/introducing-the-ars-technica-reader-for-ipad.ars?utm_source=rss&amp;utm_medium=rss&amp;utm_campaign=rss"&gt;Introducing the Ars Technica Reader for iPad&lt;/a&gt;: &lt;p&gt;The user interface is very simple HTML and CSS. This is great, because the Webkit team has implemented a ton of neat stuff like animations, transforms, transitions, advanced CSS3 rules like text and box shadows, gradients, and the canvas tag. They make it easier than ever to meet our designer’s exacting standards and to build fast, beautiful applications without resorting to weird tricks and hacks.&lt;/p&gt;</description><link>http://jimiyash.tumblr.com/post/1457209243</link><guid>http://jimiyash.tumblr.com/post/1457209243</guid><pubDate>Mon, 01 Nov 2010 20:48:16 -0400</pubDate></item><item><title>[HowTo] Backup and Restore MySql Databases at SANIsoft – PHP for E Biz</title><description>&lt;a href="http://www.sanisoft.com/blog/2010/11/01/howto-backup-and-restore-mysql-databases/?utm_source=rss&amp;utm_medium=rss&amp;utm_campaign=howto-backup-and-restore-mysql-databases"&gt;[HowTo] Backup and Restore MySql Databases at SANIsoft – PHP for E Biz&lt;/a&gt;: &lt;p&gt;Very informative. Mentions ways to backup mysql databases using a mysqldump or by backing up the actual physical database file.&lt;/p&gt;</description><link>http://jimiyash.tumblr.com/post/1452198618</link><guid>http://jimiyash.tumblr.com/post/1452198618</guid><pubDate>Mon, 01 Nov 2010 05:19:43 -0400</pubDate></item><item><title>Photo</title><description>&lt;img src="http://24.media.tumblr.com/tumblr_lb0pmbZuJ61qa157ko1_500.jpg"/&gt;&lt;br/&gt;&lt;br/&gt;</description><link>http://jimiyash.tumblr.com/post/1451092393</link><guid>http://jimiyash.tumblr.com/post/1451092393</guid><pubDate>Mon, 01 Nov 2010 00:55:53 -0400</pubDate></item><item><title>Nice home office setup with a 4 monitors and an iMac. This...</title><description>&lt;img src="http://24.media.tumblr.com/tumblr_lb5nz9lXw21qeujiio1_500.jpg"/&gt;&lt;br/&gt;&lt;br/&gt;&lt;p&gt;Nice home office setup with a 4 monitors and an iMac. This person is the developer of &lt;a target="_blank" href="http://www.coffeecup.com/html-editor/"&gt;The HTML Editor&lt;/a&gt; which is a pretty nice WYSIWYG HTML editor and looks nicer than Dreamweaver.&lt;/p&gt;</description><link>http://jimiyash.tumblr.com/post/1445954142</link><guid>http://jimiyash.tumblr.com/post/1445954142</guid><pubDate>Sun, 31 Oct 2010 08:57:09 -0400</pubDate></item><item><title>Vim: reload file using encoding</title><description>&lt;p&gt;&lt;span&gt;
&lt;pre&gt;:e ++enc=&amp;lt;encoding&amp;gt;&lt;/pre&gt;
&lt;/span&gt;&lt;/p&gt;</description><link>http://jimiyash.tumblr.com/post/1413781941</link><guid>http://jimiyash.tumblr.com/post/1413781941</guid><pubDate>Wed, 27 Oct 2010 04:55:02 -0400</pubDate></item><item><title>How to use git+ssh with non-standard port</title><description>&lt;p&gt;&lt;span&gt;From: http://scie.nti.st/2007/11/14/hosting-git-repositories-the-easy-and-secure-way &lt;/span&gt;&lt;/p&gt;
&lt;h3&gt;Non-standard SSH port&lt;/h3&gt;
&lt;p&gt;If you run SSH on a non-standard port on your server, don&amp;#8217;t use the syntax &amp;#8220;git@myserver.com:1234:/foo/bar&amp;#8221;, it won&amp;#8217;t work. Putting the port in the URL doesn&amp;#8217;t seem to make gitosis, or git, (not sure which) happy. Instead, put this in your ~/.ssh/config file:&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;Host myserver.com
  Port 1234&lt;/code&gt;&lt;/pre&gt;</description><link>http://jimiyash.tumblr.com/post/1412956095</link><guid>http://jimiyash.tumblr.com/post/1412956095</guid><pubDate>Wed, 27 Oct 2010 01:39:00 -0400</pubDate></item><item><title>Quix Bookmarklet</title><description>&lt;a href="http://quixapp.com/help/"&gt;Quix Bookmarklet&lt;/a&gt;: &lt;p&gt;Use the quix bookmarklet to speed up your web dev workflow and also some other shortcuts&lt;/p&gt;</description><link>http://jimiyash.tumblr.com/post/1394797165</link><guid>http://jimiyash.tumblr.com/post/1394797165</guid><pubDate>Sun, 24 Oct 2010 22:45:39 -0400</pubDate></item><item><title>tmux</title><description>&lt;a href="http://blog.hawkhost.com/2010/06/28/tmux-the-terminal-multiplexer/"&gt;tmux&lt;/a&gt;: &lt;p&gt;divide up your terminal screen easily with this.&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;brew install tmux&lt;/p&gt;
&lt;/blockquote&gt;</description><link>http://jimiyash.tumblr.com/post/1394784879</link><guid>http://jimiyash.tumblr.com/post/1394784879</guid><pubDate>Sun, 24 Oct 2010 22:44:17 -0400</pubDate></item></channel></rss>
