This file contains 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
module TruckPricer | |
class Engine | |
include DataMapper::Resource | |
property :id, Serial, :key => true | |
property :name, String, :required => true | |
property :vin_string, String | |
belongs_to :price, :required => false | |
end | |
end |
This file contains 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 Comparison | |
include DataMapper::Resource | |
property :id, Serial | |
has n, :msruns, :through => Resource | |
has n, :msruns, :through => Resource | |
belongs_to :metric | |
end | |
class Msrun |
This file contains 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
#in top of your app.rb file | |
require 'sinatra' | |
require 'response_size' | |
use Rack::ResponseSize |
This file contains 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 'rack' | |
## | |
# Tries to calculate size of the complete response. | |
# This middleware should be chained in front of everything else. | |
# Middleware taking care of compression, etag handling etc could | |
# produce wrong results. | |
# | |
# Leaves streaming intact and does work file bodies from sockets | |
# and files. |
This file contains 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
var storage = { | |
"messages": [], | |
"callbacks": [] | |
}; | |
function await_message(func) { | |
storage.callbacks.push(func); | |
} | |
//inside my Connect route |
This file contains 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 Foo | |
include DataMapper::Resource | |
#ignore all the other stuff | |
def graph | |
begin | |
files = OtherCode::method_that_throws_exceptions | |
rescue | |
puts "rescued an error" | |
end |
This file contains 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
==> Installing gnuplot | |
==> Downloading http://downloads.sourceforge.net/project/gnuplot/gnuplot/4.4.3/gnuplot-4.4.3.tar.gz | |
File already downloaded in /Users/jergason/Library/Caches/Homebrew | |
==> ./configure --disable-debug --prefix=/usr/local/Cellar/gnuplot/4.4.3 --with-readline=/usr/local/Cellar/readline/6.2.1 --disable-wxwidgets --with-gd=/usr/local/Cellar/g | |
==> make install | |
Making install in config | |
make[2]: Nothing to be done for `install-exec-am'. | |
make[2]: Nothing to be done for `install-data-am'. | |
Making install in m4 | |
make[2]: Nothing to be done for `install-exec-am'. |
This file contains 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
function Test() { | |
this.hurp = "HURP"; | |
this.durp = "DURP"; | |
} | |
Test.prototype.publiclyDoStuff = function(foo) { | |
this.privatelyDoStuff(foo); | |
} | |
Test.prototype.privatelyDoStuff(foo) { |
This file contains 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
(function () { | |
"use strict"; | |
var vows = require('vows') | |
, suite | |
, batch | |
, helloWorld = require('./index') | |
, assert = require('assert') | |
, request = require('ahr2') | |
, createJoin = require('join') |
This file contains 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
window.addEvent('domready', function() { | |
$('fullconfreg').addEvent('click', calculate); | |
$('fullconfspouse').addEvent('click', calculate); | |
$('fullconfregfirsttime').addEvent('click', calculate); | |
$('intspeechticket').addEvent('click', calculate); | |
$('evalticket').addEvent('click', calculate); | |
$('fridinnerham').addEvent('click', calculate); | |
$('fridinnerroastbeef').addEvent('click', calculate); | |
$('fridinnerturkey').addEvent('click', calculate); | |
$('satlunch').addEvent('click', calculate); |
OlderNewer