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
[2013-08-16T23:33:35+00:00] DEBUG: Gem::InstallError: ruby_block[Compile Custom OpsWorks Run List] (opsworks_custom_cookbooks::execute line 3) had an error: Gem::InstallError: chef_gem[hipchat] (hipchat::default line 1) had an error: Gem::InstallError: httparty requires multi_xml (>= 0.5.2) | |
/usr/lib/ruby/vendor_ruby/rubygems/installer.rb:232:in `ensure_dependency' | |
/usr/lib/ruby/vendor_ruby/rubygems/installer.rb:408:in `ensure_dependencies_met' | |
/usr/lib/ruby/vendor_ruby/rubygems/installer.rb:407:in `each' | |
/usr/lib/ruby/vendor_ruby/rubygems/installer.rb:407:in `ensure_dependencies_met' | |
/usr/lib/ruby/vendor_ruby/rubygems/installer.rb:158:in `install' | |
/usr/lib/ruby/vendor_ruby/rubygems/dependency_installer.rb:297:in `install' | |
/usr/lib/ruby/1.8/fileutils.rb:243:in `each_with_index' | |
/usr/lib/ruby/vendor_ruby/rubygems/dependency_installer.rb:270:in `each' | |
/usr/lib/ruby/vendor_ruby/rubygems/dependency_installer.rb:270:in `each_with_index' |
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
package "python-software-properties" do | |
action :install | |
end | |
execute "redis ppa install" do | |
command "/usr/bin/add-apt-repository ppa:chris-lea/redis-server" | |
command "/usr/bin/apt-get -y update" | |
action :run | |
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
$('a.cne-google').on('mouseenter', function() { | |
$('div#cne-google-tooltip').fadeIn(); | |
}) | |
$('#cne-google').mouseleave( function() { | |
$('#cne-google-tooltip').delay(1000).fadeOut("slow"); | |
}) | |
$('#cne-google-tooltip').mouseenter(function(){ | |
$('a.cne-google').stop(); |
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
# Given an array of objects with people's name and age | |
# sort this array based on a person's age | |
# for a given age, do not change the order of the original array | |
people = [ | |
{:name => "Jake", :age => 33}, | |
{:name => "Larry", :age => 31}, | |
{:name => "Chhay", :age => 33}, | |
{:name => "Li", :age => 29}, | |
{:name => "Li2", :age => 32}, |
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
// Set up a collection to contain player information. On the server, | |
// it is backed by a MongoDB collection named "players". | |
Players = new Meteor.Collection("players"); | |
var randomScore = function() { | |
return Math.floor(Math.random()*10)*5; | |
} | |
if (Meteor.isClient) { | |
Template.leaderboard.players = function () { |
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 'yaml' | |
file_data = YAML.load_file('shipping.yaml') | |
class ShippingData | |
def initialize(attr={}) | |
@sd_data = attr | |
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
#!bash | |
# | |
# bash/zsh completion support for core Git. | |
# | |
# Copyright (C) 2006,2007 Shawn O. Pearce <[email protected]> | |
# Conceptually based on gitcompletion (http://gitweb.hawaga.org.uk/). | |
# Distributed under the GNU General Public License, version 2.0. | |
# | |
# The contained completion routines provide support for completing: | |
# |
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
# 11.6.12 | |
# Jack Dorsey - creator of Twitter | |
# gem 'rspec' | |
# bundle | |
# rails g rspec: install | |
# in spec, create new folder, models | |
# rails g test_unit: model Song #=> didn't work as expected | |
# create songs_spec.rb |
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 JukeBox | |
# attr_accessor :request | |
@@songs = [ | |
"The Phoenix - 1901", | |
"Tokyo Police Club - Wait Up", | |
"Sufjan Stevens - Too Much", | |
"The Naked and the Famous - Young Blood", | |
"(Far From) Home - Tiga", | |
"The Cults - Abducted", | |
"The Phoenix - Consolation Prizes" |
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
def assert_equal(actual, expected) | |
if expected == actual | |
puts 'pass' | |
else | |
puts "fail: expected #{expected}, got #{actual}" | |
end | |
end | |
def assert(statement) | |
if statement |