This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class Nav | |
def self.padded_selector(sel, max_len) | |
sel.ljust(max_len) | |
end | |
attr_accessor :id, :height, :items, :image | |
def initialize(attrs={}) | |
attrs.each { |k,v| send("#{k}=", v) } | |
end |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This is all pulled from a series of posts I made on a message board, so | |
hopefully it still makes some sense out of context. | |
============================================================================= | |
Oh shit, just thought of something. This whole time skipping thing means that | |
John's 'dreams' could really be memories, ala Desmond suddenly 'remembering' | |
his encounter with Danny Faraday. | |
Before all the time skips, John has a bunch of visionary dreams that give him | |
info about the island, such as how to find that plane. He thinks it's the |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# haml + liquid example | |
# | |
# James MacAulay 2009 | |
require 'rubygems' | |
require 'liquid' | |
require 'haml' | |
template = <<EOF |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<div class="gallery wrapper white padding"> | |
<div class="container_12"> | |
<h2>Dixie Diamond</h2> | |
<div class="grid_9"> | |
<div class="grid_3 alpha"> | |
<center> | |
<img src="/images/girls/dixiediamond/classy_gal_small.jpg" class="border" alt="Classy Gal" /> | |
</center> | |
</div> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
require 'rubygems' | |
require 'fastercsv' | |
class Discover | |
attr_accessor :data | |
def initialize(file) | |
@data = FasterCSV.read(file, :headers => true, :header_converters => :symbol) | |
end | |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# This is a mechanism we use often in our migrations. When we have a migration | |
# that hits every record of a large table, this looping mechanism takes the | |
# bite away from the migration. This allows us to be transactional in our | |
# migration while avoiding aggressive locking of the table. Ultimately | |
# allowing us to do migratory deployments even more frequently during high | |
# usage areas of the day. | |
# | |
# Further, some long migrations that we'd run over a weekend may exceed the | |
# max transaction time set on our MySQL server. Running smaller transactions | |
# avoids this sensible restriction. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
cd ~/Library/Application\ Support/Firefox | |
git init | |
git add . | |
git commit -m "Saving FF3 Profile." | |
git checkout -b ff3.5 | |
open /Applications/Firefox3.5 | |
(close Firefox3.5) | |
git commit -m "Saving FF3.5 Profile." | |
git checkout master | |
open /Applications/Firefox |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
~/repos/harvest$ irb | |
>> require 'harvest' | |
=> true | |
@harvest = Harvest(:email => "[email protected]", | |
:password => "123456", | |
:sub_domain => "tomatoist", | |
:headers => {"User-Agent" => "Tomatoist", 'Content-Type' => 'application/xml' }) | |
@harvest.timesheet.new(:hours => 3, :notes => 'workdammit', :project_id => 388131, :task_id => 319119, :spent_at => Date.today).save |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
============================= | |
Setlist Format Template | |
============================= | |
- !ruby/object:Importer::Show | |
date: | |
venue: | |
locale: | |
name: | |
sets: |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
- !ruby/object:Show | |
date: 12/31/2008 | |
venue: | |
name: The Note | |
locale: West Chester, PA | |
sets: | |
one: | |
- Crutch | |
- Dead Clowns | |
- One Rabbit Race -> |
OlderNewer