<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"><channel><description>technology related thoughts that someone may find useful 
software: Widget Platform, Facebook Notifier</description><title>jeremy suriel - tech notes</title><generator>Tumblr (3.0; @jeremys)</generator><link>http://jeremys.tumblr.com/</link><item><title>Duplicate Active Record with has_many relationships</title><description>&lt;p&gt;&lt;pre&gt;old_model.find(old_model_id)&lt;br/&gt;new_model = MyModel.new(old_model.attributes)&lt;br/&gt;new_model.some_collection &lt;&lt; old_model.some_collection.collect{|x| x.clone}&lt;br/&gt;new_model.save&lt;/pre&gt;&lt;/p&gt;</description><link>http://jeremys.tumblr.com/post/183617900</link><guid>http://jeremys.tumblr.com/post/183617900</guid><pubDate>Wed, 09 Sep 2009 08:07:30 -0400</pubDate></item><item><title>Rails DB Sharding &amp; Replication - Data Fabric</title><description>&lt;a href="http://github.com/mperham/data_fabric/tree/master"&gt;Rails DB Sharding &amp; Replication - Data Fabric&lt;/a&gt;: &lt;p&gt;Data Fabric has been great so far with our new project requiring horizontal partitioning.&lt;/p&gt;
&lt;p&gt;We created this rakefile modification to help with db:migrate / db:rollback:  &lt;a href="http://gist.github.com/176353" target="_blank"&gt;http://gist.github.com/176353&lt;/a&gt;&lt;/p&gt;</description><link>http://jeremys.tumblr.com/post/173030963</link><guid>http://jeremys.tumblr.com/post/173030963</guid><pubDate>Thu, 27 Aug 2009 11:16:59 -0400</pubDate></item><item><title>Flash, Rails 2.3, Rack, and SWFUpload</title><description>&lt;a href="http://thewebfellas.com/blog/2008/12/22/flash-uploaders-rails-cookie-based-sessions-and-csrf-rack-middleware-to-the-rescue"&gt;Flash, Rails 2.3, Rack, and SWFUpload&lt;/a&gt;: &lt;p&gt;This article was a tremendous help in getting swfupload to work correctly with rails 2.3 and acts_as_authenticated.&lt;/p&gt;</description><link>http://jeremys.tumblr.com/post/80231450</link><guid>http://jeremys.tumblr.com/post/80231450</guid><pubDate>Sat, 21 Feb 2009 09:32:16 -0500</pubDate></item><item><title>http://blog.programmableweb.com/2009/02/09/yahoos-yql-adds-support-for-microformats/</title><description>&lt;a href="http://blog.programmableweb.com/2009/02/09/yahoos-yql-adds-support-for-microformats/"&gt;http://blog.programmableweb.com/2009/02/09/yahoos-yql-adds-support-for-microformats/&lt;/a&gt;: &lt;p&gt;Good to see microformats getting more visibility.&lt;/p&gt;</description><link>http://jeremys.tumblr.com/post/76900533</link><guid>http://jeremys.tumblr.com/post/76900533</guid><pubDate>Mon, 09 Feb 2009 10:29:03 -0500</pubDate></item><item><title>T-SQL Update or Insert Logic</title><description>&lt;p&gt;&lt;a href="http://coolthingoftheday.blogspot.com/2008/02/t-sql-update-or-insert-logic.html" target="_blank"&gt;Greg’s Cool [Insert Clever Name] of the Day: T-SQL Update or Insert Logic -&lt;/a&gt;&lt;/p&gt;</description><link>http://jeremys.tumblr.com/post/38900521</link><guid>http://jeremys.tumblr.com/post/38900521</guid><pubDate>Wed, 18 Jun 2008 11:31:57 -0400</pubDate></item><item><title>Looks like I might have to pick up the book: The Rails Way </title><description>&lt;p&gt;&lt;a href="http://www.railsjitsu.com/the-rails-way-meet-your-new-bible" target="_blank"&gt;http://www.railsjitsu.com/the-rails-way-meet-your-new-bible&lt;/a&gt;&lt;/p&gt;</description><link>http://jeremys.tumblr.com/post/25273288</link><guid>http://jeremys.tumblr.com/post/25273288</guid><pubDate>Fri, 01 Feb 2008 15:06:00 -0500</pubDate></item><item><title>Burning .dmg to disk - not enough space</title><description>&lt;p&gt;I had a problem where i had a 580mb dmg and wanted to burn to 700mb CDR…  For some reason, Disk Utility prevented me from burning saying that the disk size wasn’t big enough.  I ran the following command on a folder with the .dmg file and it converted it to an .iso.  Disk Utility then allowed me to burn to the same CD:&lt;/p&gt;
&lt;p&gt;hdiutil makehybrid -o isofilename folderwithdmg&lt;/p&gt;
&lt;p&gt;This should create isofilename.iso which you should be able to burn with disk utility. &lt;/p&gt;</description><link>http://jeremys.tumblr.com/post/24472700</link><guid>http://jeremys.tumblr.com/post/24472700</guid><pubDate>Wed, 23 Jan 2008 13:32:00 -0500</pubDate></item><item><title>Sun To Acquire MySQL</title><description>&lt;a href="http://radar.oreilly.com/archives/2008/01/sun_acquires_mysql.html"&gt;Sun To Acquire MySQL&lt;/a&gt;: &lt;p&gt;Sun, please don’t screw this up… &lt;/p&gt;</description><link>http://jeremys.tumblr.com/post/23894282</link><guid>http://jeremys.tumblr.com/post/23894282</guid><pubDate>Wed, 16 Jan 2008 08:20:48 -0500</pubDate></item><item><title>Pagination and Rails 2.0</title><description>&lt;a href="http://agilewebdevelopment.com/plugins/will_paginate"&gt;Pagination and Rails 2.0&lt;/a&gt;: &lt;p&gt;Since pagination has been removed from the rails 2.0 core framework, will_pagination plugin looks like a great alternative: &lt;/p&gt;
&lt;p&gt;- &lt;a href="http://errtheblog.com/posts/69-paginatin-christmas" target="_blank"&gt;http://errtheblog.com/posts/69-paginatin-christmas&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;- &lt;a href="http://agilewebdevelopment.com/plugins/will_paginate" target="_blank"&gt;http://agilewebdevelopment.com/plugins/will_paginate&lt;/a&gt;&lt;/p&gt;</description><link>http://jeremys.tumblr.com/post/23490308</link><guid>http://jeremys.tumblr.com/post/23490308</guid><pubDate>Thu, 10 Jan 2008 19:53:00 -0500</pubDate><category>rails</category><category>RoR</category><category>plugins</category></item><item><title>What's new in Rails 2.0</title><description>&lt;a href="http://weblog.rubyonrails.org/2007/12/7/rails-2-0-it-s-done"&gt;What's new in Rails 2.0&lt;/a&gt;: &lt;p&gt;&lt;a href="http://weblog.rubyonrails.org/2007/12/7/rails-2-0-it-s-done" target="_blank"&gt;http://weblog.rubyonrails.org/2007/12/7/rails-2-0-it-s-done&lt;/a&gt;&lt;/p&gt;</description><link>http://jeremys.tumblr.com/post/23280298</link><guid>http://jeremys.tumblr.com/post/23280298</guid><pubDate>Tue, 08 Jan 2008 08:41:00 -0500</pubDate><category>rails</category><category>RoR</category></item><item><title>Things i like about Ruby</title><description>&lt;p&gt;&lt;ul&gt;&lt;li&gt;Rails&lt;/li&gt;&lt;/ul&gt;&lt;/p&gt;</description><link>http://jeremys.tumblr.com/post/23278831</link><guid>http://jeremys.tumblr.com/post/23278831</guid><pubDate>Tue, 08 Jan 2008 08:23:00 -0500</pubDate><category>ruby</category></item><item><title>Installing mysql on leopard</title><description>&lt;p&gt;- download and install mysql.  do not run the preference or the startup packages.&lt;/p&gt;
&lt;p&gt;(if you’ve already installed, right-click/remove the preference pane and run sudo rm -R /Library/StartupItems/MySQLCOM)&lt;/p&gt;
&lt;p&gt;- put mysql in your path:&lt;/p&gt;
&lt;p&gt;put this into your .bash_login&lt;/p&gt;
&lt;p&gt;export PATH=”/usr/local/bin:/usr/local/sbin:/usr/local/mysql/bin:$PATH” &lt;br/&gt;export ARCHFLAGS=”-arch i386″&lt;/p&gt;
&lt;p&gt;- change root mysql password:&lt;/p&gt;
&lt;p&gt;mysqladmin -u root password NEWPASSWORD&lt;/p&gt;
&lt;p&gt;- If you need to access mysql through rails, install the mysql gem&lt;/p&gt;
&lt;p&gt;sudo gem update —system&lt;/p&gt;
&lt;p&gt;sudo gem update&lt;/p&gt;
&lt;p&gt;sudo gem install mysql — —with-mysql-config=/usr/local/mysql/bin/mysql_config&lt;/p&gt;</description><link>http://jeremys.tumblr.com/post/23225469</link><guid>http://jeremys.tumblr.com/post/23225469</guid><pubDate>Mon, 07 Jan 2008 16:38:00 -0500</pubDate><category>mysql</category><category>leopard</category><category>osx</category><category>ruby</category></item><item><title>Things I dislike about the Ruby programming language</title><description>&lt;p&gt;Did some research on Cocoa and the new Ruby support in XCode over the holiday break.  In general, I like Ruby’s simplicity and flexibility.  But I do have some issues with aspects of the library implementation and a few object-oriented related design principals.  I don’t plan to implement cocoa applications in objective-c, so using Ruby would serve as an easier way to get into Cocoa development using the latest XCode projects templates in leopard.&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Discourages type-safety (although type-safe languages could result in better runtime performance)&lt;/li&gt;
&lt;li&gt;Strings are not inherently based on UTF-8 (i have to import jcode / use $KODE)&lt;/li&gt;
&lt;li&gt;For dates and times i have to be concered with 3 classes Time (which is based on c-libraries), DateTime and Date&lt;/li&gt;
&lt;li&gt;No support for method overloading&lt;/li&gt;
&lt;li&gt;Freezing classes still allows others to extend and override methods (unlike c# and java final keyword)&lt;/li&gt;
&lt;li&gt;Creating an abstract method really is just creating a method that raises an error at runtime?&lt;/li&gt;
&lt;li&gt;A class can only have 1 superclass.  But you can have multiple module includes for a class (Mixins) …&lt;/li&gt;
&lt;/ul&gt;</description><link>http://jeremys.tumblr.com/post/22422397</link><guid>http://jeremys.tumblr.com/post/22422397</guid><pubDate>Wed, 26 Dec 2007 12:54:00 -0500</pubDate><category>ruby</category><category>programming</category></item><item><title>AppleScript for Mail.app notifications with Address Book Image</title><description>&lt;p&gt;I tried GrowlMail on Leopard with no luck.  This script will use Growl to show email notifications with the sender name and subject along with the image of the person if it exists in your address book. &lt;/p&gt;
&lt;p&gt;To install, make sure Growl 1.1.2 is installed and create a mail rule pointing to the following script.  I saved the script to “~/Library/Scripts/Mail Scripts/Rule Actions/GrowlRule.scpt” &lt;/p&gt;
&lt;p&gt;——- &lt;/p&gt;
&lt;p&gt;on perform_mail_action(info)&lt;br/&gt;    tell application “Mail”&lt;br/&gt;        try&lt;br/&gt;            set NewMail to |SelectedMessages| of info&lt;br/&gt;&lt;br/&gt;            repeat with CurrentMessage in NewMail&lt;br/&gt;                set sub to subject of CurrentMessage as string&lt;br/&gt;                set sendr to sender of CurrentMessage as string&lt;br/&gt;&lt;br/&gt;                set sendrname to extract name from sendr&lt;br/&gt;                set sendremail to extract address from sendr&lt;br/&gt;&lt;br/&gt;                tell application “System Events” to set GrowlRunning to ((application processes whose (name is equal to “GrowlHelperApp”)) count)&lt;br/&gt;&lt;br/&gt;                tell application “Address Book” to set thePeople to (image of every person where value of every email of it contains sendremail)&lt;br/&gt;&lt;br/&gt;                if GrowlRunning is greater than or equal to 1 then&lt;br/&gt;                    tell application “GrowlHelperApp”&lt;br/&gt;                        — Make a list of all the notification types &lt;br/&gt;                        — that this script will ever send:&lt;br/&gt;                        set the allNotificationsList to {“Mail Notification”}&lt;br/&gt;&lt;br/&gt;                        — Make a list of the notifications &lt;br/&gt;                        — that will be enabled by default.      &lt;br/&gt;                        — Those not enabled by default can be enabled later &lt;br/&gt;                        — in the ‘Applications’ tab of the growl prefpane.&lt;br/&gt;                        set the enabledNotificationsList to {“Mail Notification”}&lt;br/&gt;&lt;br/&gt;                        — Register our script with growl.&lt;br/&gt;                        — You can optionally (as here) set a default icon &lt;br/&gt;                        — for this script’s notifications.&lt;br/&gt;                        register as application ¬&lt;br/&gt;                            “Standard Mail Notification Script” all notifications allNotificationsList ¬&lt;br/&gt;                            default notifications enabledNotificationsList ¬&lt;br/&gt;                            icon of application “Mail.app”&lt;br/&gt;&lt;br/&gt;                        if (count of thePeople) &gt; 0 then&lt;br/&gt;                            set TIFFdata to item 1 of thePeople&lt;br/&gt;                            notify with name “Mail Notification” title sendrname description sub application name “Standard Mail Notification Script” image TIFFdata&lt;br/&gt;                        else&lt;br/&gt;                            notify with name “Mail Notification” title sendrname description sub application name “Standard Mail Notification Script” icon of application “Mail.app”&lt;br/&gt;                        end if&lt;br/&gt;&lt;br/&gt;&lt;br/&gt;&lt;br/&gt;                    end tell&lt;br/&gt;                end if&lt;br/&gt;&lt;br/&gt;            end repeat&lt;br/&gt;        on error the error_message number the error_number&lt;br/&gt;            display dialog error_message&lt;br/&gt;        end try&lt;br/&gt;    end tell&lt;br/&gt;end perform_mail_action &lt;/p&gt;</description><link>http://jeremys.tumblr.com/post/22154101</link><guid>http://jeremys.tumblr.com/post/22154101</guid><pubDate>Fri, 21 Dec 2007 19:56:00 -0500</pubDate><category>applescript</category><category>mail.app</category><category>addressbook.app</category><category>growlr</category></item></channel></rss>
