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
NODE=$1; | |
SERVER=$2; | |
knife cookbook upload -a; | |
ID=`knife rackspace server list | grep $SERVER | awk '{print $1}'`; | |
knife rackspace server delete $ID; | |
knife node delete -y $NODE; | |
knife client delete -y $NODE; |
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
describe CardsController, "for a logged in user" do | |
before(:each) do | |
@cardset = Factory(:cardset) | |
profile = @cardset.profile | |
controller.stubs(:require_user).returns(true) | |
controller.stubs(:current_user).returns(profile) | |
end | |
context "and created card" do | |
before(:each) do |
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 Node | |
attr_accessor :left, :right, :value | |
def is_bst?(min = -1.0/0, max = 1.0/0) | |
# exit if the siblings are not of the Node type or Nil and have valid value | |
return false unless is_valid? | |
return false unless left.nil? or left.is_bst?(min, value) | |
return false unless right.nil? or right.is_bst?(value, max) | |
value > min and value < max |
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
def word_cloud(words) | |
wordcount = {} | |
words.split(/\s/).each do |word| | |
word.downcase! | |
if word.strip.size > 0 | |
wordcount[word.strip] = (wordcount.key?(word.strip)) ? (wordcount[word.strip] + 1) : 0 | |
end | |
end | |
s = [] |
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
<?php | |
require('phirehose_0.2.4/lib/Phirehose.php'); | |
class SmsShortCode extends Phirehose { | |
/** | |
* Enqueue each status | |
* | |
* @param string $status |
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
// I am getting the error: | |
// 'this.clock = this.iterateClock(current, future).periodical(1000, this); is undefined' | |
// After it display the days left once, it throws the error | |
// | |
// This is now the working version | |
var Main = new Class({ | |
Implements : [Options], | |
options : { |
NewerOlder