mirror of
https://github.com/samsonjs/samhuri.net.git
synced 2026-03-25 09:05:47 +00:00
567 lines
No EOL
39 KiB
HTML
567 lines
No EOL
39 KiB
HTML
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
|
<!-- saved from url=(0081)http://sami.samhuri.net/articles/page/2 -->
|
|
<html xmlns="http://www.w3.org/1999/xhtml"><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
|
|
<title>sjs - samhuri.net</title>
|
|
|
|
<meta content="48.472,-123.3683" name="ICBM">
|
|
<link rel="EditURI" type="application/rsd+xml" title="RSD" href="http://sami.samhuri.net/xml/rsd">
|
|
<link rel="alternate" type="application/rss+xml" title="RSS" href="http://sami.samhuri.net/xml/rss20/feed.xml">
|
|
<link rel="alternate" type="application/atom+xml" title="Atom" href="http://sami.samhuri.net/xml/atom10/feed.xml">
|
|
<script src="./Girlfriend X_files/cookies.js" type="text/javascript"></script>
|
|
<script src="./Girlfriend X_files/prototype.js" type="text/javascript"></script>
|
|
<script src="./Girlfriend X_files/effects.js" type="text/javascript"></script>
|
|
<script src="./Girlfriend X_files/typo.js" type="text/javascript"></script>
|
|
|
|
<script type="text/javascript"></script>
|
|
<link href="./Girlfriend X_files/island.css" media="all" rel="Stylesheet" type="text/css">
|
|
<link href="./Girlfriend X_files/user-styles.css" media="all" rel="Stylesheet" type="text/css">
|
|
<link href="./Girlfriend X_files/print.css" media="print" rel="Stylesheet" type="text/css">
|
|
<style type="text/css" style="display: none !important;">object:not([type]),object[classid$=":D27CDB6E-AE6D-11cf-96B8-444553540000"],object[classid$=":d27cdb6e-ae6d-11cf-96b8-444553540000"],object[codebase*="swflash.cab"],object[data*=".swf"],object[type="application/x-shockwave-flash"],object[src*=".swf"],object[codetype="application/x-shockwave-flash"],embed[type="application/x-shockwave-flash"],embed[src*=".swf"],embed[allowscriptaccess],embed[flashvars],embed[wmode],object[classid$=":166B1BCA-3F9C-11CF-8075-444553540000"],object[codebase*="sw.cab"],object[data*=".dcr"],object[type="application/x-director"],object[src*=".dcr"],embed[type="application/x-director"],embed[src*=".dcr"],object[classid$=":15B782AF-55D8-11D1-B477-006097098764"],object[codebase*="awswaxf.cab"],object[data*=".aam"],object[type="application/x-authorware-map"],object[src*=".aam"],embed[type="application/x-authorware-map"],embed[src*=".aam"],object[classid$="32C73088-76AE-40F7-AC40-81F62CB2C1DA"],object[type="application/ag-plugin"],object[type="application/x-silverlight"],object[type="application/x-silverlight-2"],object[source*=".xaml"],object[sourceelement*="xaml"],embed[type="application/ag-plugin"],embed[source*=".xaml"]{display: none !important;}</style></head>
|
|
|
|
<body><div id="wm-ipp" style="position: relative; padding-top: 0px; padding-right: 5px; padding-bottom: 0px; padding-left: 5px; min-height: 70px; min-width: 800px; z-index: 9000; display: block; ">
|
|
<div id="wm-ipp-inside" style="position:fixed;padding:0!important;margin:0!important;width:97%;min-width:780px;border:5px solid #000;border-top:none;background-image:url(http://staticweb.archive.org/images/toolbar/wm_tb_bk_trns.png);text-align:center;-moz-box-shadow:1px 1px 3px #333;-webkit-box-shadow:1px 1px 3px #333;box-shadow:1px 1px 3px #333;font-size:11px!important;font-family:'Lucida Grande','Arial',sans-serif!important;">
|
|
<table style="border-collapse:collapse;margin:0;padding:0;width:100%;"><tbody><tr>
|
|
<td style="padding:10px;vertical-align:top;min-width:110px;">
|
|
<a href="http://wayback.archive.org/web/" title="Wayback Machine home page" style="background-color:transparent;border:none;"><img src="./Girlfriend X_files/wayback-toolbar-logo.png" alt="Wayback Machine" width="110" height="39" border="0"></a>
|
|
</td>
|
|
<td style="padding:0!important;text-align:center;vertical-align:top;width:100%;">
|
|
|
|
<table style="border-collapse:collapse;margin:0 auto;padding:0;width:570px;"><tbody><tr>
|
|
<td style="padding:3px 0;" colspan="2">
|
|
<form target="_top" method="get" action="http://wayback.archive.org/web/form-submit.jsp" name="wmtb" id="wmtb" style="margin:0!important;padding:0!important;"><input type="text" name="url" id="wmtbURL" value="http://sami.samhuri.net/articles/page/2" style="width:400px;font-size:11px;font-family:'Lucida Grande','Arial',sans-serif;" onfocus="javascript:this.focus();this.select();"><input type="hidden" name="type" value="replay"><input type="hidden" name="date" value="20060614125209"><input type="submit" value="Go" style="font-size:11px;font-family:'Lucida Grande','Arial',sans-serif;margin-left:5px;"><span id="wm_tb_options" style="display:block;"></span></form>
|
|
</td>
|
|
<td style="vertical-align:bottom;padding:5px 0 0 0!important;" rowspan="2">
|
|
<table style="border-collapse:collapse;width:110px;color:#99a;font-family:'Helvetica','Lucida Grande','Arial',sans-serif;"><tbody>
|
|
|
|
<!-- NEXT/PREV MONTH NAV AND MONTH INDICATOR -->
|
|
<tr style="width:110px;height:16px;font-size:10px!important;">
|
|
<td style="padding-right:9px;font-size:11px!important;font-weight:bold;text-transform:uppercase;text-align:right;white-space:nowrap;overflow:visible;" nowrap="nowrap">
|
|
|
|
May
|
|
|
|
</td>
|
|
<td id="displayMonthEl" style="background:#000;color:#ff0;font-size:11px!important;font-weight:bold;text-transform:uppercase;width:34px;height:15px;padding-top:1px;text-align:center;" title="You are here: 12:52:09 Jun 14, 2006">JUN</td>
|
|
<td style="padding-left:9px;font-size:11px!important;font-weight:bold;text-transform:uppercase;white-space:nowrap;overflow:visible;" nowrap="nowrap">
|
|
|
|
<a href="http://sami.samhuri.net/articles/page/2" style="text-decoration:none;color:#33f;font-weight:bold;background-color:transparent;border:none;" title="29 Sep 2006"><strong>SEP</strong></a>
|
|
|
|
</td>
|
|
</tr>
|
|
|
|
<!-- NEXT/PREV CAPTURE NAV AND DAY OF MONTH INDICATOR -->
|
|
<tr>
|
|
<td style="padding-right:9px;white-space:nowrap;overflow:visible;text-align:right!important;vertical-align:middle!important;" nowrap="nowrap">
|
|
|
|
<img src="./Girlfriend X_files/wm_tb_prv_off.png" alt="Previous capture" width="14" height="16" border="0">
|
|
|
|
</td>
|
|
<td id="displayDayEl" style="background:#000;color:#ff0;width:34px;height:24px;padding:2px 0 0 0;text-align:center;font-size:24px;font-weight: bold;" title="You are here: 12:52:09 Jun 14, 2006">14</td>
|
|
<td style="padding-left:9px;white-space:nowrap;overflow:visible;text-align:left!important;vertical-align:middle!important;" nowrap="nowrap">
|
|
|
|
<a href="http://sami.samhuri.net/articles/page/2" title="19:35:24 Sep 29, 2006" style="background-color:transparent;border:none;"><img src="./Girlfriend X_files/wm_tb_nxt_on.png" alt="Next capture" width="14" height="16" border="0"></a>
|
|
|
|
</td>
|
|
</tr>
|
|
|
|
<!-- NEXT/PREV YEAR NAV AND YEAR INDICATOR -->
|
|
<tr style="width:110px;height:13px;font-size:9px!important;">
|
|
<td style="padding-right:9px;font-size:11px!important;font-weight: bold;text-align:right;white-space:nowrap;overflow:visible;" nowrap="nowrap">
|
|
|
|
2005
|
|
|
|
</td>
|
|
<td id="displayYearEl" style="background:#000;color:#ff0;font-size:11px!important;font-weight: bold;padding-top:1px;width:34px;height:13px;text-align:center;" title="You are here: 12:52:09 Jun 14, 2006">2006</td>
|
|
<td style="padding-left:9px;font-size:11px!important;font-weight: bold;white-space:nowrap;overflow:visible;" nowrap="nowrap">
|
|
|
|
<a href="http://sami.samhuri.net/articles/page/2" style="text-decoration:none;color:#33f;font-weight:bold;background-color:transparent;border:none;" title="2 Oct 2007"><strong>2007</strong></a>
|
|
|
|
</td>
|
|
</tr>
|
|
</tbody></table>
|
|
</td>
|
|
|
|
</tr>
|
|
<tr>
|
|
<td style="vertical-align:middle;padding:0!important;">
|
|
<a href="http://wayback.archive.org/web/20060614125209*/http://sami.samhuri.net/articles/page/2" style="color:#33f;font-size:11px;font-weight:bold;background-color:transparent;border:none;" title="See a list of every capture for this URL"><strong>10 captures</strong></a>
|
|
<div style="margin:0!important;padding:0!important;color:#666;font-size:9px;padding-top:2px!important;white-space:nowrap;" title="Timespan for captures of this URL">14 Jun 06 - 9 Oct 07</div>
|
|
</td>
|
|
<td style="padding:0!important;">
|
|
<a style="position:relative; white-space:nowrap; width:400px;height:27px;" href="" id="wm-graph-anchor">
|
|
<div id="wm-ipp-sparkline" style="position:relative; white-space:nowrap; width:400px;height:27px;background-color:#fff;cursor:pointer;border-right:1px solid #ccc;" title="Explore captures for this URL">
|
|
<img id="sparklineImgId" style="position:absolute; z-index:9012; top:0px; left:0px;" onmouseover="showTrackers('inline');" onmouseout="showTrackers('none');" onmousemove="trackMouseMove(event,this)" alt="sparklines" width="400" height="27" border="0" src="./Girlfriend X_files/graph.jsp">
|
|
<img id="wbMouseTrackYearImg" style="display:none; position:absolute; z-index:9010;" width="25" height="27" border="0" src="./Girlfriend X_files/transp-yellow-pixel.png">
|
|
<img id="wbMouseTrackMonthImg" style="display:none; position:absolute; z-index:9011; " width="2" height="27" border="0" src="./Girlfriend X_files/transp-red-pixel.png">
|
|
</div>
|
|
</a>
|
|
|
|
</td>
|
|
</tr></tbody></table>
|
|
</td>
|
|
<td style="text-align:right;padding:5px;width:65px;font-size:11px!important;">
|
|
<a href="javascript:;" onclick="document.getElementById('wm-ipp').style.display='none';" style="display:block;padding-right:18px;background:url(http://staticweb.archive.org/images/toolbar/wm_tb_close.png) no-repeat 100% 0;color:#33f;font-family:'Lucida Grande','Arial',sans-serif;margin-bottom:23px;background-color:transparent;border:none;" title="Close the toolbar">Close</a>
|
|
<a href="http://faq.web.archive.org/" style="display:block;padding-right:18px;background:url(http://staticweb.archive.org/images/toolbar/wm_tb_help.png) no-repeat 100% 0;color:#33f;font-family:'Lucida Grande','Arial',sans-serif;background-color:transparent;border:none;" title="Get some help using the Wayback Machine">Help</a>
|
|
</td>
|
|
</tr></tbody></table>
|
|
|
|
</div>
|
|
</div>
|
|
<!-- BEGIN WAYBACK TOOLBAR INSERT -->
|
|
|
|
<script type="text/javascript" src="./Girlfriend X_files/disclaim-element.js"></script>
|
|
<script type="text/javascript" src="./Girlfriend X_files/graph-calc.js"></script>
|
|
<script type="text/javascript" src="./Girlfriend X_files/jquery.min.js"></script>
|
|
<script type="text/javascript">
|
|
//<![CDATA[
|
|
var firstDate = 820454400000;
|
|
var lastDate = 1325375999999;
|
|
var wbPrefix = "http://web.archive.org/web/";
|
|
var wbCurrentUrl = "http://sami.samhuri.net/articles/page/2";
|
|
|
|
var curYear = -1;
|
|
var curMonth = -1;
|
|
var yearCount = 16;
|
|
var firstYear = 1996;
|
|
var imgWidth=400;
|
|
var yearImgWidth = 25;
|
|
var monthImgWidth = 2;
|
|
var trackerVal = "none";
|
|
var displayDay = "14";
|
|
var displayMonth = "Jun";
|
|
var displayYear = "2006";
|
|
var prettyMonths = ["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"];
|
|
|
|
function showTrackers(val) {
|
|
if(val == trackerVal) {
|
|
return;
|
|
}
|
|
if(val == "inline") {
|
|
document.getElementById("displayYearEl").style.color = "#ec008c";
|
|
document.getElementById("displayMonthEl").style.color = "#ec008c";
|
|
document.getElementById("displayDayEl").style.color = "#ec008c";
|
|
} else {
|
|
document.getElementById("displayYearEl").innerHTML = displayYear;
|
|
document.getElementById("displayYearEl").style.color = "#ff0";
|
|
document.getElementById("displayMonthEl").innerHTML = displayMonth;
|
|
document.getElementById("displayMonthEl").style.color = "#ff0";
|
|
document.getElementById("displayDayEl").innerHTML = displayDay;
|
|
document.getElementById("displayDayEl").style.color = "#ff0";
|
|
}
|
|
document.getElementById("wbMouseTrackYearImg").style.display = val;
|
|
document.getElementById("wbMouseTrackMonthImg").style.display = val;
|
|
trackerVal = val;
|
|
}
|
|
function getElementX2(obj) {
|
|
var thing = jQuery(obj);
|
|
if((thing == undefined)
|
|
|| (typeof thing == "undefined")
|
|
|| (typeof thing.offset == "undefined")) {
|
|
return getElementX(obj);
|
|
}
|
|
return Math.round(thing.offset().left);
|
|
}
|
|
function trackMouseMove(event,element) {
|
|
|
|
var eventX = getEventX(event);
|
|
var elementX = getElementX2(element);
|
|
var xOff = eventX - elementX;
|
|
if(xOff < 0) {
|
|
xOff = 0;
|
|
} else if(xOff > imgWidth) {
|
|
xOff = imgWidth;
|
|
}
|
|
var monthOff = xOff % yearImgWidth;
|
|
|
|
var year = Math.floor(xOff / yearImgWidth);
|
|
var yearStart = year * yearImgWidth;
|
|
var monthOfYear = Math.floor(monthOff / monthImgWidth);
|
|
if(monthOfYear > 11) {
|
|
monthOfYear = 11;
|
|
}
|
|
// 1 extra border pixel at the left edge of the year:
|
|
var month = (year * 12) + monthOfYear;
|
|
var day = 1;
|
|
if(monthOff % 2 == 1) {
|
|
day = 15;
|
|
}
|
|
var dateString =
|
|
zeroPad(year + firstYear) +
|
|
zeroPad(monthOfYear+1,2) +
|
|
zeroPad(day,2) + "000000";
|
|
|
|
var monthString = prettyMonths[monthOfYear];
|
|
document.getElementById("displayYearEl").innerHTML = year + 1996;
|
|
document.getElementById("displayMonthEl").innerHTML = monthString;
|
|
// looks too jarring when it changes..
|
|
//document.getElementById("displayDayEl").innerHTML = zeroPad(day,2);
|
|
|
|
var url = wbPrefix + dateString + '/' + wbCurrentUrl;
|
|
document.getElementById('wm-graph-anchor').href = url;
|
|
|
|
//document.getElementById("wmtbURL").value="evX("+eventX+") elX("+elementX+") xO("+xOff+") y("+year+") m("+month+") monthOff("+monthOff+") DS("+dateString+") Moy("+monthOfYear+") ms("+monthString+")";
|
|
if(curYear != year) {
|
|
var yrOff = year * yearImgWidth;
|
|
document.getElementById("wbMouseTrackYearImg").style.left = yrOff + "px";
|
|
curYear = year;
|
|
}
|
|
if(curMonth != month) {
|
|
var mtOff = year + (month * monthImgWidth) + 1;
|
|
document.getElementById("wbMouseTrackMonthImg").style.left = mtOff + "px";
|
|
curMonth = month;
|
|
}
|
|
}
|
|
//]]>
|
|
</script>
|
|
|
|
<style type="text/css">body{margin-top:0!important;padding-top:0!important;min-width:800px!important;}#wm-ipp a:hover{text-decoration:underline!important;}</style>
|
|
|
|
<script type="text/javascript">
|
|
var wmDisclaimBanner = document.getElementById("wm-ipp");
|
|
if(wmDisclaimBanner != null) {
|
|
disclaimElement(wmDisclaimBanner);
|
|
}
|
|
</script>
|
|
<!-- END WAYBACK TOOLBAR INSERT -->
|
|
|
|
|
|
<div id="content" class="clearfix">
|
|
|
|
<div id="main">
|
|
<div class="post">
|
|
<h2><a href="http://sami.samhuri.net/articles/2006/02/21/textmate-insert-text-into-self-down">TextMate: Insert text into self.down</a></h2>
|
|
<p class="auth"><!-- Posted by <a href="mailto:sjs@uvic.ca">Sami Jensen Samhuri</a> -->
|
|
<span class="typo_date" title="Tue, 21 Feb 2006 22:55:00 GMT">on Tuesday, February 21, 2006</span></p>
|
|
<p><em><strong>UPDATE:</strong> I got everything working and it's all packaged up <a href="http://sami.samhuri.net/articles/2006/02/22/intelligent-migration-snippets-0_1">here</a>. There's an installation script this time as well.</em></p>
|
|
|
|
|
|
<p>Thanks to <a href="http://thread.gmane.org/gmane.editors.textmate.general/8520">a helpful thread</a> on the TextMate mailing list I have the beginning of a solution to insert text at 2 (or more) locations in a file.</p>
|
|
|
|
|
|
<p>I implemented this for a new snippet I was working on for migrations, <code>rename_column</code>. Since the command is the same in self.up and self.down simply doing a reverse search for <code>rename_column</code> in my <a href="http://sami.samhuri.net/articles/2006/02/21/textmate-move-selection-to-self-down">hackish macro</a> didn't return the cursor the desired location.</p>
|
|
|
|
<a href="http://sami.samhuri.net/articles/2006/02/21/textmate-insert-text-into-self-down">Read more...</a>
|
|
<p class="meta">Posted in <a href="http://sami.samhuri.net/articles/category/textmate" rel="tag">textmate</a>, <a href="http://sami.samhuri.net/articles/category/rails" rel="tag">rails</a>, <a href="http://sami.samhuri.net/articles/category/hacking" rel="tag">hacking</a> <strong>|</strong> Tags <a href="http://sami.samhuri.net/articles/tag/commands" rel="tag">commands</a>, <a href="http://sami.samhuri.net/articles/tag/macro" rel="tag">macro</a>, <a href="http://sami.samhuri.net/articles/tag/rails" rel="tag">rails</a>, <a href="http://sami.samhuri.net/articles/tag/snippets" rel="tag">snippets</a>, <a href="http://sami.samhuri.net/articles/tag/textmate" rel="tag">textmate</a> <strong>|</strong> <a href="http://sami.samhuri.net/articles/2006/02/21/textmate-insert-text-into-self-down#comments">no comments</a> <strong>|</strong> <a href="http://sami.samhuri.net/articles/2006/02/21/textmate-insert-text-into-self-down#trackbacks">no trackbacks</a></p>
|
|
</div>
|
|
<div class="post">
|
|
<h2><a href="http://sami.samhuri.net/articles/2006/02/21/textmate-move-selection-to-self-down">TextMate: Move selection to self.down</a></h2>
|
|
<p class="auth"><!-- Posted by <a href="mailto:sjs@uvic.ca">Sami Jensen Samhuri</a> -->
|
|
<span class="typo_date" title="Tue, 21 Feb 2006 08:26:00 GMT">on Tuesday, February 21, 2006</span></p>
|
|
<p><strong>UPDATE:</strong> <em>This is obsolete, see <a href="http://sami.samhuri.net/articles/2006/02/21/textmate-insert-text-into-self-down">this post</a> for a better solution.</em></p>
|
|
|
|
|
|
<p><a href="http://sami.samhuri.net/articles/2006/02/18/textmate-snippets-for-rails-migrations#comment-17">Duane's comment</a> prompted me to think about how to get the <code>drop_table</code> and <code>remove_column</code> lines inserted in the right place. I don't think TextMate's snippets are built to do this sort of text manipulation. It would be nicer, but a quick hack will suffice for now.</p>
|
|
|
|
<a href="http://sami.samhuri.net/articles/2006/02/21/textmate-move-selection-to-self-down">Read more...</a>
|
|
<p class="meta">Posted in <a href="http://sami.samhuri.net/articles/category/textmate" rel="tag">textmate</a>, <a href="http://sami.samhuri.net/articles/category/rails" rel="tag">rails</a>, <a href="http://sami.samhuri.net/articles/category/hacking" rel="tag">hacking</a> <strong>|</strong> Tags <a href="http://sami.samhuri.net/articles/tag/hack" rel="tag">hack</a>, <a href="http://sami.samhuri.net/articles/tag/macro" rel="tag">macro</a>, <a href="http://sami.samhuri.net/articles/tag/rails" rel="tag">rails</a>, <a href="http://sami.samhuri.net/articles/tag/textmate" rel="tag">textmate</a> <strong>|</strong> <a href="http://sami.samhuri.net/articles/2006/02/21/textmate-move-selection-to-self-down#comments">no comments</a> <strong>|</strong> <a href="http://sami.samhuri.net/articles/2006/02/21/textmate-move-selection-to-self-down#trackbacks">no trackbacks</a></p>
|
|
</div>
|
|
<div class="post">
|
|
<h2><a href="http://sami.samhuri.net/articles/2006/02/20/textmate-snippets-for-rails-assertions">TextMate Snippets for Rails Assertions</a></h2>
|
|
<p class="auth"><!-- Posted by <a href="mailto:sjs@uvic.ca">Sami Jensen Samhuri</a> -->
|
|
<span class="typo_date" title="Tue, 21 Feb 2006 07:52:00 GMT">on Monday, February 20, 2006</span></p>
|
|
<p>This time I've got a few snippets for assertions. Using these to type up your tests quickly, and then hitting <strong>⌘R</strong> to run the tests without leaving TextMate, makes testing your Rails app that much more convenient. Just when you thought it was already too easy! (Don't forget that you can use <strong>⌥⌘↓</strong> to move between your code and the corresponding test case.)</p>
|
|
|
|
|
|
<p>This time I'm posting the .plist files to make it easier for you to add them to TextMate. All you need to do is copy these to <strong>~/Library/Application Support/TextMate/Bundles/Rails.tmbundle/Snippets</strong>.</p>
|
|
|
|
|
|
<p style="text-align: center;;"><a href="http://sami.samhuri.net/files/assert_snippets.zip">Assertion Snippets for Rails</a></p>
|
|
|
|
|
|
<p>If anyone would rather I list them all here I can do that as well. Just leave a comment.</p>
|
|
|
|
|
|
<p><em>(I wanted to include a droplet in the zip file that will copy the snippets to the right place, but my 3-hour attempt at writing the AppleScript to do so left me feeling quite bitter. Maybe I was just mistaken in thinking it would be easy to pick up AppleScript.)</em></p>
|
|
|
|
|
|
<p class="meta">Posted in <a href="http://sami.samhuri.net/articles/category/textmate" rel="tag">textmate</a>, <a href="http://sami.samhuri.net/articles/category/rails" rel="tag">rails</a>, <a href="http://sami.samhuri.net/articles/category/hacking" rel="tag">hacking</a> <strong>|</strong> Tags <a href="http://sami.samhuri.net/articles/tag/rails" rel="tag">rails</a>, <a href="http://sami.samhuri.net/articles/tag/snippets" rel="tag">snippets</a>, <a href="http://sami.samhuri.net/articles/tag/testing" rel="tag">testing</a>, <a href="http://sami.samhuri.net/articles/tag/textmate" rel="tag">textmate</a> <strong>|</strong> <a href="http://sami.samhuri.net/articles/2006/02/20/textmate-snippets-for-rails-assertions#comments">no comments</a> <strong>|</strong> <a href="http://sami.samhuri.net/articles/2006/02/20/textmate-snippets-for-rails-assertions#trackbacks">no trackbacks</a></p>
|
|
</div>
|
|
<div class="post">
|
|
<h2><a href="http://sami.samhuri.net/articles/2006/02/20/now-these-are-desks">Now these are desks!</a></h2>
|
|
<p class="auth"><!-- Posted by <a href="mailto:sjs@uvic.ca">Sami Jensen Samhuri</a> -->
|
|
<span class="typo_date" title="Mon, 20 Feb 2006 13:46:00 GMT">on Monday, February 20, 2006</span></p>
|
|
<p>I will take one of <a href="http://www.poetictech.com/">these desks</a> any day! I particularly like the "epic". But you know when you have to contact them to hear the price that's bad, bad news. Ah well, add it to the list of things to get once I have money.</p>
|
|
|
|
|
|
<p class="meta">Posted in <a href="http://sami.samhuri.net/articles/category/life" rel="tag">life</a>, <a href="http://sami.samhuri.net/articles/category/hacking" rel="tag">hacking</a> <strong>|</strong> Tags <a href="http://sami.samhuri.net/articles/tag/cool" rel="tag">cool</a>, <a href="http://sami.samhuri.net/articles/tag/hacking" rel="tag">hacking</a> <strong>|</strong> <a href="http://sami.samhuri.net/articles/2006/02/20/now-these-are-desks#comments">no comments</a> <strong>|</strong> <a href="http://sami.samhuri.net/articles/2006/02/20/now-these-are-desks#trackbacks">no trackbacks</a></p>
|
|
</div>
|
|
<div class="post">
|
|
<h2><a href="http://sami.samhuri.net/articles/2006/02/20/obligatory-post-about-ruby-on-rails">Obligatory Post about Ruby on Rails</a></h2>
|
|
<p class="auth"><!-- Posted by <a href="mailto:sjs@uvic.ca">Sami Jensen Samhuri</a> -->
|
|
<span class="typo_date" title="Mon, 20 Feb 2006 08:31:00 GMT">on Monday, February 20, 2006</span></p>
|
|
<p><em>I'm a Rails newbie and eager to learn. I welcome any suggestions or criticism you have. You can direct them to <a href="mailto:sjs@uvic.ca">my inbox</a> or leave me a comment below.</em></p>
|
|
|
|
|
|
<p>I finally set myself up with a blog. I mailed my dad the address and mentioned that it was running <a href="http://www.typosphere.org/">Typo</a>, which is written in <a href="http://www.rubyonrails.com/">Ruby on Rails</a>. The fact that it is written in Rails was a big factor in my decision. I am currently reading <a href="http://www.pragmaticprogrammer.com/titles/rails/">Agile Web Development With Rails</a> and it will be great to use Typo as a learning tool, since I will be modifying my blog anyways regardless of what language it's written in.</p>
|
|
|
|
|
|
<p>Clearly Rails made an impression on me somehow or I wouldn't be investing this time on it. But my dad asked me a very good question:</p>
|
|
|
|
|
|
<blockquote>
|
|
<p style="border-left: 3px solid #fff; padding-left: 5px;;">Rails? What is so special about it? I looked at your page and it looks pretty normal to me. I miss the point of this new Rails technique for web development.</p>
|
|
</blockquote>
|
|
|
|
|
|
<p>It's unlikely that he was surprised at my lengthy response, but I was. I have been known to write him long messages on topics that interest me. However, I've only been learning Rails for two weeks or so. Could I possibly have so much to say about it already? Apparently I do.</p>
|
|
|
|
<a href="http://sami.samhuri.net/articles/2006/02/20/obligatory-post-about-ruby-on-rails">Read more...</a>
|
|
<p class="meta">Posted in <a href="http://sami.samhuri.net/articles/category/rails" rel="tag">rails</a>, <a href="http://sami.samhuri.net/articles/category/hacking" rel="tag">hacking</a> <strong>|</strong> Tags <a href="http://sami.samhuri.net/articles/tag/hacking" rel="tag">hacking</a>, <a href="http://sami.samhuri.net/articles/tag/migration" rel="tag">migration</a>, <a href="http://sami.samhuri.net/articles/tag/rails" rel="tag">rails</a>, <a href="http://sami.samhuri.net/articles/tag/testing" rel="tag">testing</a> <strong>|</strong> <a href="http://sami.samhuri.net/articles/2006/02/20/obligatory-post-about-ruby-on-rails#comments">2 comments</a> <strong>|</strong> <a href="http://sami.samhuri.net/articles/2006/02/20/obligatory-post-about-ruby-on-rails#trackbacks">no trackbacks</a></p>
|
|
</div>
|
|
<div class="post">
|
|
<h2><a href="http://sami.samhuri.net/articles/2006/02/19/virtue">Virtue</a></h2>
|
|
<p class="auth"><!-- Posted by <a href="mailto:sjs@uvic.ca">Sami Jensen Samhuri</a> -->
|
|
<span class="typo_date" title="Mon, 20 Feb 2006 02:20:00 GMT">on Sunday, February 19, 2006</span></p>
|
|
<p>Man am I glad I saw <a href="http://blog.inquirylabs.com/2006/01/20/virtue-for-tiger/trackback/">Duane's post</a> about <a href="http://tonyarnold.com/articles/2006/02/05/virtue-0-51r76-test-release">Virtue</a>. It's a virtual desktop manager for Mac OS X Tiger. <a href="http://desktopmanager.berlios.de/">Desktop Manager</a> almost had it, but it didn't quite feel right to me. This app is exactly what I've been looking for in virtual desktops. It has bugs, but it mostly works.</p>
|
|
|
|
|
|
<p>My gentoo box has some <strong>serious</strong> competition now. Recently I feel like I spend more time developing on my Mac mini than my dual Opteron. I didn't expect that 5 months ago when I got the mini as my first Mac!</p>
|
|
|
|
|
|
<p class="meta">Posted in <a href="http://sami.samhuri.net/articles/category/gentoo" rel="tag">gentoo</a>, <a href="http://sami.samhuri.net/articles/category/mac-os-x" rel="tag">mac os x</a>, <a href="http://sami.samhuri.net/articles/category/hacking" rel="tag">hacking</a> <strong>|</strong> Tags <a href="http://sami.samhuri.net/articles/tag/macosx" rel="tag">macosx</a> <strong>|</strong> <a href="http://sami.samhuri.net/articles/2006/02/19/virtue#comments">2 comments</a> <strong>|</strong> <a href="http://sami.samhuri.net/articles/2006/02/19/virtue#trackbacks">no trackbacks</a></p>
|
|
</div>
|
|
<div class="post">
|
|
<h2><a href="http://sami.samhuri.net/articles/2006/02/19/syncpeople-on-rails-bundle-for-textmate">syncPeople on Rails Bundle for TextMate</a></h2>
|
|
<p class="auth"><!-- Posted by <a href="mailto:sjs@uvic.ca">Sami Jensen Samhuri</a> -->
|
|
<span class="typo_date" title="Sun, 19 Feb 2006 08:04:00 GMT">on Sunday, February 19, 2006</span></p>
|
|
<p>It's too fast I just can't keep up! :) Duane has posted a <a href="http://blog.inquirylabs.com/2006/02/18/syncpeople-on-rails-06/trackback/">bundle</a> with even more than go to view/controller. Now it has:</p>
|
|
|
|
|
|
<ol>
|
|
<li>Open Controller / View — option-command-up</li>
|
|
<li>Create Partial from Selection — option-command-p</li>
|
|
<li>Intelligent Go To File — keypad 'enter' key</li>
|
|
</ol>
|
|
|
|
|
|
<p>I'd love to see a central place for rails bundle development. We'll see what happens.</p>
|
|
|
|
|
|
<p class="meta">Posted in <a href="http://sami.samhuri.net/articles/category/textmate" rel="tag">textmate</a>, <a href="http://sami.samhuri.net/articles/category/rails" rel="tag">rails</a>, <a href="http://sami.samhuri.net/articles/category/amusement" rel="tag">amusement</a> <strong>|</strong> Tags <a href="http://sami.samhuri.net/articles/tag/rails" rel="tag">rails</a>, <a href="http://sami.samhuri.net/articles/tag/textmate" rel="tag">textmate</a> <strong>|</strong> <a href="http://sami.samhuri.net/articles/2006/02/19/syncpeople-on-rails-bundle-for-textmate#comments">no comments</a> <strong>|</strong> <a href="http://sami.samhuri.net/articles/2006/02/19/syncpeople-on-rails-bundle-for-textmate#trackbacks">no trackbacks</a></p>
|
|
</div>
|
|
<div class="post">
|
|
<h2><a href="http://sami.samhuri.net/articles/2006/02/18/textmate-snippets-for-rails-migrations">Some TextMate snippets for Rails Migrations</a></h2>
|
|
<p class="auth"><!-- Posted by <a href="mailto:sjs@uvic.ca">Sami Jensen Samhuri</a> -->
|
|
<span class="typo_date" title="Sun, 19 Feb 2006 06:48:00 GMT">on Saturday, February 18, 2006</span></p>
|
|
<p>My arsenal of snippets and macros in TextMate is building as I read through the rails canon, <a href="http://www.pragmaticprogrammer.com/titles/rails/" title="Agile Web Development With Rails">Agile Web Development...</a> I'm only 150 pages in so I haven't had to add much so far because I started with the bundle found on the <a href="http://wiki.rubyonrails.org/rails/pages/TextMate">rails wiki</a>. The main ones so far are for migrations.</p>
|
|
|
|
<a href="http://sami.samhuri.net/articles/2006/02/18/textmate-snippets-for-rails-migrations">Read more...</a>
|
|
<p class="meta">Posted in <a href="http://sami.samhuri.net/articles/category/textmate" rel="tag">textmate</a>, <a href="http://sami.samhuri.net/articles/category/rails" rel="tag">rails</a>, <a href="http://sami.samhuri.net/articles/category/hacking" rel="tag">hacking</a> <strong>|</strong> Tags <a href="http://sami.samhuri.net/articles/tag/rails" rel="tag">rails</a>, <a href="http://sami.samhuri.net/articles/tag/snippets" rel="tag">snippets</a>, <a href="http://sami.samhuri.net/articles/tag/textmate" rel="tag">textmate</a> <strong>|</strong> <a href="http://sami.samhuri.net/articles/2006/02/18/textmate-snippets-for-rails-migrations#comments">6 comments</a> <strong>|</strong> <a href="http://sami.samhuri.net/articles/2006/02/18/textmate-snippets-for-rails-migrations#trackbacks">no trackbacks</a></p>
|
|
</div>
|
|
<div class="post">
|
|
<h2><a href="http://sami.samhuri.net/articles/2006/02/18/girlfriend-x">Girlfriend X</a></h2>
|
|
<p class="auth"><!-- Posted by <a href="mailto:sjs@uvic.ca">Sami Jensen Samhuri</a> -->
|
|
<span class="typo_date" title="Sun, 19 Feb 2006 03:50:00 GMT">on Saturday, February 18, 2006</span></p>
|
|
<p>This is hilarious! Someone wrote software that manages a "parallel" dating style.</p>
|
|
|
|
|
|
<blockquote>
|
|
<p>In addition to storing each woman's contact information and picture, the Girlfriend profiles include a Score Card where you track her sexual preferences, her menstrual cycles and how she styles her pubic hair.</p>
|
|
</blockquote>
|
|
|
|
|
|
<p>It's called <a href="http://www.wired.com/news/columns/0,70231-0.html?tw=rss.index">Girlfriend X</a>, but that's a link to an article about it. I didn't go to the actual website. I just thing it's amusing someone went through the trouble to do this. Maybe there's a demand for it. * shrug *</p>
|
|
|
|
|
|
<p class="meta">Posted in <a href="http://sami.samhuri.net/articles/category/amusement" rel="tag">amusement</a> <strong>|</strong> Tags <a href="http://sami.samhuri.net/articles/tag/crazy" rel="tag">crazy</a>, <a href="http://sami.samhuri.net/articles/tag/funny" rel="tag">funny</a> <strong>|</strong> <a href="http://sami.samhuri.net/articles/2006/02/18/girlfriend-x#comments">no comments</a> <strong>|</strong> <a href="http://sami.samhuri.net/articles/2006/02/18/girlfriend-x#trackbacks">no trackbacks</a></p>
|
|
</div>
|
|
<div class="post">
|
|
<h2><a href="http://sami.samhuri.net/articles/2006/02/18/jump-to-view-controller-in-textmate">Jump to view/controller in TextMate</a></h2>
|
|
<p class="auth"><!-- Posted by <a href="mailto:sjs@uvic.ca">Sami Jensen Samhuri</a> -->
|
|
<span class="typo_date" title="Sat, 18 Feb 2006 22:51:00 GMT">on Saturday, February 18, 2006</span></p>
|
|
<p><a href="http://blog.inquirylabs.com/2006/02/17/controller-to-view-and-back-again-in-textmate/trackback/">Duane</a> came up with a way to jump to the controller method for the view you're editing, or vice versa in TextMate while coding using Rails. This is a huge time-saver, thanks!</p>
|
|
|
|
|
|
<p class="meta">Posted in <a href="http://sami.samhuri.net/articles/category/hacking" rel="tag">hacking</a>, <a href="http://sami.samhuri.net/articles/category/rails" rel="tag">rails</a>, <a href="http://sami.samhuri.net/articles/category/textmate" rel="tag">textmate</a> <strong>|</strong> Tags <a href="http://sami.samhuri.net/articles/tag/rails" rel="tag">rails</a>, <a href="http://sami.samhuri.net/articles/tag/textmate" rel="tag">textmate</a> <strong>|</strong> <a href="http://sami.samhuri.net/articles/2006/02/18/jump-to-view-controller-in-textmate#comments">no comments</a> <strong>|</strong> <a href="http://sami.samhuri.net/articles/2006/02/18/jump-to-view-controller-in-textmate#trackbacks">no trackbacks</a></p>
|
|
</div>
|
|
|
|
|
|
<p id="pagination">Older posts: <a href="http://sami.samhuri.net/articles/page/1">1</a> 2 <a href="http://sami.samhuri.net/articles/page/3">3</a> </p>
|
|
|
|
<script type="text/javascript">
|
|
//<![CDATA[
|
|
show_dates_as_local_time()
|
|
//]]>
|
|
</script>
|
|
</div>
|
|
|
|
</div>
|
|
|
|
<div id="leftcolumn">
|
|
<div id="header">
|
|
<h1 id="sitename"><a href="http://sami.samhuri.net/">sjs</a></h1>
|
|
<h2 id="subtitle"> </h2>
|
|
</div>
|
|
|
|
<div id="sidebar">
|
|
<div id="search"><form action="http://sami.samhuri.net/articles/search" id="sform" method="get">
|
|
<label for="q">Search: </label><input type="text" id="q" name="q" value="" size="15">
|
|
<img alt="Spinner-blue" id="search_spinner" src="./Girlfriend X_files/spinner-blue.gif" style="display:none;">
|
|
</form>
|
|
<script type="text/javascript">
|
|
//<![CDATA[
|
|
new Form.Element.Observer('q', 1, function(element, value) {new Ajax.Updater('search-results', '/live/search', {asynchronous:true, evalScripts:true, onComplete:function(request){Element.hide('search_spinner')}, onLoading:function(request){Element.show('search_spinner')}, parameters:'q=' + escape($F('q'))})})
|
|
//]]>
|
|
</script></div>
|
|
<div id="search-results"></div>
|
|
|
|
|
|
|
|
<div class="sidebar-node">
|
|
<h3>All about...</h3>
|
|
<ul>
|
|
<li><a href="http://sami.samhuri.net/pages/about">me in 3 paragraphs</a></li>
|
|
<li><a href="http://sami.samhuri.net/pages/how-i-became-a-geek">geek background</a></li>
|
|
<li><a href="http://sami.samhuri.net/pages/thunder">workstation</a></li>
|
|
</ul>
|
|
|
|
|
|
</div>
|
|
|
|
|
|
<div class="sidebar-node">
|
|
<h3>Categories</h3>
|
|
<ul id="categories">
|
|
|
|
<li><a href="http://sami.samhuri.net/articles/category/amusement">amusement</a> <em>(4)</em></li>
|
|
|
|
|
|
<li><a href="http://sami.samhuri.net/articles/category/gentoo">gentoo</a> <em>(1)</em></li>
|
|
|
|
|
|
<li><a href="http://sami.samhuri.net/articles/category/hacking">hacking</a> <em>(12)</em></li>
|
|
|
|
|
|
<li><a href="http://sami.samhuri.net/articles/category/life">life</a> <em>(4)</em></li>
|
|
|
|
|
|
<li><a href="http://sami.samhuri.net/articles/category/linux">linux</a> <em>(1)</em></li>
|
|
|
|
|
|
<li><a href="http://sami.samhuri.net/articles/category/mac-os-x">mac os x</a> <em>(5)</em></li>
|
|
|
|
|
|
|
|
<li><a href="http://sami.samhuri.net/articles/category/python">python</a> <em>(1)</em></li>
|
|
|
|
|
|
<li><a href="http://sami.samhuri.net/articles/category/rails">rails</a> <em>(11)</em></li>
|
|
|
|
|
|
|
|
|
|
<li><a href="http://sami.samhuri.net/articles/category/technology">technology</a> <em>(2)</em></li>
|
|
|
|
|
|
<li><a href="http://sami.samhuri.net/articles/category/textmate">textmate</a> <em>(10)</em></li>
|
|
|
|
|
|
<li><a href="http://sami.samhuri.net/articles/category/apple">apple</a> <em>(3)</em></li>
|
|
|
|
</ul>
|
|
|
|
|
|
</div>
|
|
|
|
|
|
<div class="sidebar-node">
|
|
|
|
<h3>Archives</h3>
|
|
<ul id="archives">
|
|
|
|
<li>
|
|
<a href="http://sami.samhuri.net/articles/2006/06">June 2006</a>
|
|
<em>(1)</em>
|
|
</li>
|
|
|
|
<li>
|
|
<a href="http://sami.samhuri.net/articles/2006/05">May 2006</a>
|
|
<em>(2)</em>
|
|
</li>
|
|
|
|
<li>
|
|
<a href="http://sami.samhuri.net/articles/2006/04">April 2006</a>
|
|
<em>(1)</em>
|
|
</li>
|
|
|
|
<li>
|
|
<a href="http://sami.samhuri.net/articles/2006/03">March 2006</a>
|
|
<em>(4)</em>
|
|
</li>
|
|
|
|
<li>
|
|
<a href="http://sami.samhuri.net/articles/2006/02">February 2006</a>
|
|
<em>(15)</em>
|
|
</li>
|
|
|
|
</ul>
|
|
|
|
|
|
</div>
|
|
|
|
|
|
<div class="sidebar-node">
|
|
<h3>Links</h3>
|
|
<ul>
|
|
<li><a href="http://phox.ca/cswiki/Main_Page">CSWiki</a></li>
|
|
<li><a href="http://jim.roepcke.com/">Have Browser, Will Travel</a></li>
|
|
<li><a href="http://blog.inquirylabs.com/">Going Up</a></li>
|
|
<li><a href="http://www.mirage.org/">encieno</a></li>
|
|
<li><a href="http://www.nofxwiki.net/">nofxwiki.net</a></li>
|
|
</ul>
|
|
|
|
</div>
|
|
|
|
|
|
<div class="sidebar-node">
|
|
<p></p><ul>
|
|
<li><a class="feed" href="http://sami.samhuri.net/xml/rss20/feed.xml" title="Articles feed"><img src="./Girlfriend X_files/feed-icon-48x48.png" alt="RSS 2.0" width="48" height="48"></a></li>
|
|
|
|
<!--
|
|
|
|
-->
|
|
|
|
</ul><p></p>
|
|
|
|
</div>
|
|
|
|
|
|
|
|
|
|
|
|
<br clear="all">
|
|
</div>
|
|
</div>
|
|
|
|
<div id="footer">
|
|
<ul>
|
|
<li><a href="http://typo.leetsoft.com/">Typo</a></li>
|
|
<li>•</li>
|
|
<li><a href="http://validator.w3.org/check?uri=referer">Valid XHTML</a></li>
|
|
<li>•</li>
|
|
<li><a href="http://jigsaw.w3.org/css-validator/validator?uri=http://sami.samhuri.net/">Valid CSS</a></li>
|
|
</ul>
|
|
</div>
|
|
|
|
<script src="./Girlfriend X_files/urchin.js" type="text/javascript">
|
|
</script>
|
|
<script type="text/javascript">
|
|
_uacct = "UA-214054-3";
|
|
urchinTracker();
|
|
</script>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<!--
|
|
FILE ARCHIVED ON 12:52:09 Jun 14, 2006 AND RETRIEVED FROM THE
|
|
INTERNET ARCHIVE ON 2:38:56 Aug 21, 2011.
|
|
JAVASCRIPT APPENDED BY WAYBACK MACHINE, COPYRIGHT INTERNET ARCHIVE.
|
|
|
|
ALL OTHER CONTENT MAY ALSO BE PROTECTED BY COPYRIGHT (17 U.S.C.
|
|
SECTION 108(a)(3)).
|
|
-->
|
|
<div id="footnotify_lightbox" style="position: fixed; width: 100%; height: 100%; top: 0px; left: 0px; background-image: initial; background-attachment: initial; background-origin: initial; background-clip: initial; background-color: rgba(0, 0, 0, 0.699219); display: none; background-position: initial initial; background-repeat: initial initial; "></div><div id="footnotify_holder" style="position: absolute; display: none; "><div id="footnotify_arrow" style="letter-spacing: -1px; width: 32px; margin-top: 0px; margin-right: -11px; margin-bottom: 0px; margin-left: -11px; text-align: center; font-size: 13px; padding-top: 2em; line-height: 0.9em; color: rgb(0, 0, 0); ">◢◣</div><div id="footnotify_panel" style="padding-top: 1px; padding-right: 1px; padding-bottom: 1px; padding-left: 1px; margin-top: 0px; margin-right: -240px; margin-bottom: 0px; margin-left: -240px; width: 480px; background-image: initial; background-attachment: initial; background-origin: initial; background-clip: initial; background-color: rgb(0, 0, 0); color: inherit; background-position: initial initial; background-repeat: initial initial; "><div id="footnotify_content" style="margin-top: 2em; margin-right: 2em; margin-bottom: 2em; margin-left: 2em; "></div></div></div><div id="footnotify_notification" style="position: fixed; top: 5px; left: 5px; z-index: 999; padding-top: 1em; padding-right: 1em; padding-bottom: 1em; padding-left: 1em; color: rgb(255, 255, 255); background-image: initial; background-attachment: initial; background-origin: initial; background-clip: initial; background-color: rgba(0, 0, 0, 0.699219); display: none; background-position: initial initial; background-repeat: initial initial; "></div></body></html> |