Skip to content

Instantly share code, notes, and snippets.

<body>
<div id="main">
<div id="header" class="">
<div class="site">
<div class="logo">
<a href="/"><img src="/images/modules/header/logo_gist.png" alt="git-hub" /></a>
</div>
<div class="actions">
<a href="/mine"><img alt
<head>
<script type="text/javascript">
function handle_data(twitter_data) {
// manipulate the JSON data
// jQuery works well for this :)
}
</script>
<script type="text/javascript" src="http://search.twitter.com/trends.json?callback=handle_data"></script>
</head>
<Animals>
<dog>
<name>Rufus</name>
<BReed>labrador</breed>
</dog>
<dog>
<name>Marty</name>
<BReed>whippet</breed>
</dog>
<cat name="Matilda"/>
{
animals:{
dog:[
{
name:'Rufus',
breed:'labrador'
},
{
name:'Marty',
breed:'whippet'
handle_data(json_data_from_twitter);
pick c9205f4 Ok, so spawn doesn't work exactly right yet.
pick c770395 Added Errno::ENOTDIR to the list of errors when rmdiring
pick 49221b6 There's no reason to load anything but test for the database.yml
pick bc1af0c Removed rake/gempackagetask and the rubyforge rake task
pick 8a43c13 Added requirement for thoughtbot-shoulda >=2.0.0 in test_helper
pick 06f9b99 #47: Multipage PDFs fixed by Pete Deffendol
pick 279b757 Updated the rake task to take STI into consideration.
# Rebase 701abb0..279b757 onto 701abb0
#
git rebase -i <commit>
Bag
has_many :chips
def tastes
chips.tastes
end
Chip
has_many :tastes
belongs_to :bag
"True Blood: Mine (#1.3)" (2008)
Bill Compton: I have no heart-beat. I have no need to breathe. There are no electrical impulses in my body.
What animates you no longer animates me.
Sookie Stackhouse: What does animate you then? Blood? How do you digest it then if nothing works?
Bill Compton: Magic?
Sookie Stackhouse: Oh, come on Bill! I may look naive but I'm not, and you need to remember that.
require 'webrat'
require 'webrat/mechanize'
session = Webrat::MechanizeSession.new
session.visit 'http://google.com'
session.fill_in 'q', :with => 'Ruby'
session.click_button 'Google Search'
# search the dom for the results