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 : { |
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
| 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
| 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
| 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
| 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
| var pnlChart = { | |
| INCOME: [ | |
| { interval: "Jan 2011", value: 100, name: null }, | |
| { interval: "Feb 2011", value: 200, name: null }, | |
| { interval: "Mar 2011", value: 300, name: null } | |
| ], | |
| EXPENSE: [ | |
| { interval: "Jan 2011", value: 100, name: null }, | |
| { interval: "Feb 2011", value: 200, name: null }, | |
| { interval: "Mar 2011", value: 300, name: null } |
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 paramify = function(hash){ | |
| var attrs = []; | |
| for (var k in hash) { | |
| attrs.push(k + "=" + hash[k]); | |
| } | |
| attrs = attrs.sort(); | |
| return attrs.join('&'); |
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
| sudo gem update --system --backtrace | |
| Updating rubygems-update | |
| ERROR: While executing gem ... (NameError) | |
| uninitialized constant Gem::Package::TarInput::Zlib | |
| /usr/local/lib/ruby/site_ruby/1.8/rubygems/package/tar_input.rb:49:in `initialize' | |
| /usr/local/lib/ruby/site_ruby/1.8/rubygems/package/tar_reader.rb:64:in `each' | |
| /usr/local/lib/ruby/site_ruby/1.8/rubygems/package/tar_reader.rb:55:in `loop' | |
| /usr/local/lib/ruby/site_ruby/1.8/rubygems/package/tar_reader.rb:55:in `each' | |
| /usr/local/lib/ruby/site_ruby/1.8/rubygems/package/tar_input.rb:32:in `initialize' | |
| /usr/local/lib/ruby/site_ruby/1.8/rubygems/package/tar_input.rb:17:in `new' |
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
| bundle install --deployment --quiet --without development test | |
| /usr/local/lib/ruby/site_ruby/1.8/rubygems/package/tar_output.rb:65:in `add_gem_contents': uninitialized constant Gem::Package::TarOutput::Zlib (NameError) | |
| from /usr/local/lib/ruby/site_ruby/1.8/rubygems/package/tar_writer.rb:113:in `add_file' | |
| from /usr/local/lib/ruby/site_ruby/1.8/rubygems/package/tar_output.rb:63:in `add_gem_contents' | |
| from /usr/local/lib/ruby/site_ruby/1.8/rubygems/package/tar_output.rb:31:in `open' | |
| from /usr/local/lib/ruby/site_ruby/1.8/rubygems/package.rb:68:in `open' | |
| from /usr/local/lib/ruby/site_ruby/1.8/rubygems/builder.rb:77:in `write_package' | |
| from /usr/local/lib/ruby/1.8/open-uri.rb:32:in `open_uri_original_open' | |
| from /usr/local/lib/ruby/1.8/open-uri.rb:32:in `open' | |
| from /usr/local/lib/ruby/site_ruby/1.8/rubygems/builder.rb:76:in `write_package' |
OlderNewer