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
# 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") |
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
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: |
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
#!/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; |
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
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); |
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
var Wall = Backbone.Controller.extend({ | |
routes: { | |
"wall": "index" | |
}, | |
initialize: function() { | |
console.log('controller initialized'); | |
}, | |
index: function() { |
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
scenario "have ability to edit profile", :js => true do | |
@ability.should be_able_to(:edit, @profile) | |
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
$(document).ready(function() { | |
// 4cd5b71dd64d240a09000001 | |
Backbone.sync = function(method, model) { | |
alert(method + ' -- ' + model.url); | |
}; | |
//var Tweet = Backbone.Model.extend({}); | |
//var test = new Tweet; |
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
# base folder path to look for watch folders | |
BASE_FOLDER_PATH = '\\\\192.168.222.50\main-content-backup' | |
ap '%s' % Settings::BASE_FOLDER_PATH | |
ap path | |
"\\\\192.168.222.50\\main-content-backup" | |
Notice the \\ now before main-content-backup |
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 Post | |
require 'carrierwave/orm/mongoid' | |
include Mongoid::Document | |
include Mongoid::Timestamps # adds created_at and updated_at fields | |
include Mongoid::Slug | |
include Mongoid::Paranoia | |
include Stateflow | |
# relations | |
referenced_in :source |
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 Source | |
include Mongoid::Document | |
include Mongoid::Slug | |
include Mongoid::Timestamps # adds created_at and updated_at fields | |
attr_reader :twitter_username, :rss_username | |
embeds_one :twitter, :class_name => "Twitter" | |
# fields |