Skip to content

Instantly share code, notes, and snippets.

var Wall = Backbone.Controller.extend({
routes: {
"wall": "index"
},
initialize: function() {
console.log('controller initialized');
},
index: function() {
var Twitter = Backbone.Controller.extend({
REFRESH_INTERVAL: 10000,
el: $('#left'),
routes: {
"twitter": "twitter",
},
initialize: function() {
_.bindAll(this, 'addOne', 'addAll', 'fetchLatest');
Tweets.bind('refresh', this.addAll);
@zenom
zenom / gist:703740
Created November 17, 2010 18:02
rvm.sh
#!/bin/bash
CHANGE=0;
if [ $RUBY_VERSION != $ORIG_RUBY ]; then
ORIG_RUBY=$RUBY_VERSION;
CHANGE=1;
fi
if [ "$ORIG_GEMSET" != "$rvm_gemset_name" ]; then
ORIG_GEMSET=$rvm_gemset_name;
CHANGE=1;
gondwana master / $ rvm info
ree-1.8.7-head@gondwana:
system:
uname: "Darwin mbp.local 10.5.0 Darwin Kernel Version 10.5.0: Fri Nov 5 23:20:39 PDT 2010; root:xnu-1504.9.17~1/RELEASE_I386 i386"
bash: "/bin/bash => GNU bash, version 3.2.48(1)-release (x86_64-apple-darwin10.0)"
zsh: "/usr/local/bin/zsh => zsh 4.3.10 (i386-apple-darwin10.4.0)"
rvm:
# RSpec 2.0 syntax Cheet Sheet by http://ApproachE.com
# defining spec within a module will automatically pick Player::MovieList as a 'subject' (see below)
module Player
describe MovieList, "with optional description" do
it "is pending example, so that you can write ones quickly"
it "is already working example that we want to suspend from failing temporarily" do
pending("working on another feature that temporarily breaks this one")
Failures:
1) Notifier::Campfire should send a failed message
Failure/Error: @build.build_failed!
undefined method `find_room_by_name' for nil:NilClass
# ./app/models/notifier/campfire.rb:27:in `send_message'
# ./app/models/notifier/campfire.rb:13:in `send_failed'
# ./app/models/build.rb:64:in `failed_build'
# ./spec/models/notifier/campfire_spec.rb:12
@zenom
zenom / model.rb
Created December 5, 2010 03:50
campfire test
require 'spec_helper'
describe Notifier::Campfire do
it { should have_field(:ssl).of_type(Boolean) }
before(:each) do
@build = Fabricate(:build, :state => :building)
end
it 'send message should trigger tinder' do
connection = mock('Tinder::Campfire')
room = mock('Tinder::Room')
Tinder::Campfire.stub!(:new).and_return(connection)
connection.stub_chain(:find_room_by_name).and_return(room)
room.stub!(:speak)
room.should_receive(:leave)
@build.build_completed!
end
Status = Backbone.Model.extend({
initialize: function() {
this.id = this.attributes._id;
}
});
StatusCollection = Backbone.Collection.extend({
model: Status,
url: '/social/twitter/status',
jar tf smuggler-0.0.2-standalone.jar | more master * ] 6:07 PM
META-INF/MANIFEST.MF
META-INF/maven/smuggler/smuggler/pom.xml
META-INF/maven/smuggler/smuggler/pom.properties
smuggler/core$_main.class
smuggler/core$fill_handbag.class
smuggler/core$generate_shipment.class
smuggler/core$get_random_number.class
smuggler/core$loading__4410__auto__.class
smuggler/core$parse_int.class