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
sudo su | |
mkdir /tmp/puppet | |
cd /tmp/puppet | |
wget http://ubuntu.wikimedia.org/ubuntu//pool/main/r/ruby1.8/ruby1.8_1.8.7.302-2_amd64.deb | |
dpkg -i ruby1.8_1.8.7.302-2_amd64.deb | |
wget http://ubuntu.wikimedia.org/ubuntu//pool/main/p/puppet/puppet_2.6.4-2ubuntu2_all.deb | |
wget http://ubuntu.wikimedia.org/ubuntu//pool/main/p/puppet/puppet-common_2.6.4-2ubuntu2_all.deb | |
wget http://ubuntu.wikimedia.org/ubuntu//pool/main/f/facter/facter_1.5.8-2ubuntu2_all.deb | |
dpkg -i puppet-common_2.6.4-2ubuntu2_all.deb |
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
# Playlist.should be_indexed_on([:name]) | |
RSpec::Matchers.define :be_indexed_on do |expected| | |
match do |actual| | |
indexes = ActiveRecord::Base.connection.indexes(actual.table_name) | |
expected.map!(&:to_s) | |
indexes.map { |index| index.columns.map(&:to_s) }.include?(expected) | |
end | |
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
Request URL:https://plus.google.com/u/0/_/sharebox/post/?_reqid=632995&rt=j | |
Request Method:POST | |
Status Code:200 OK | |
Query String Parametersview URL encoded | |
_reqid:632995 | |
rt:j | |
Request Payload | |
spar=%5B%22Testing%20to%20see%20what%20kind%20of%20XHR%20requests%20are%20made%20when%20I%20share%20something%20on%20Google%2B.%20Can't%20find%20a%20good%20Chrome%20extenstion%20to%20share%20so%20thinking%20I%20might%20hack%20a%20quick%20one%20if%20it's%20not%20to%20hard.%22%2C%22oz%3A104431949275766772757.130eb661e76.0%22%2Cnull%2Cnull%2Cnull%2Cnull%2C%22%5B%5C%22%5Bnull%2Cnull%2Cnull%2C%5C%5C%5C%22share%20on%20google%2B%20-%20Chrome%20Web%20Store%5C%5C%5C%22%2Cnull%2Cnull%2Cnull%2Cnull%2Cnull%2C%5B%5D%2Cnull%2Cnull%2Cnull%2Cnull%2Cnull%2Cnull%2Cnull%2Cnull%2Cnull%2Cnull%2Cnull%2C%5C%5C%5C%22Find%20great%20apps%2C%20extensions%20and%20themes%20about%20share%20on%20google%2B%20in%20the%20Chrome%20Web%20Store.%5C%5C%5C%22%2Cnull%2Cnull%2C%5Bnull%2C%5C%5C%5C%22https%3A%2F%2Fchrome.google.com%2Fwebstore%2Fsearch%3Fhl%3Den-US% |
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
function say_hello(name) { | |
msg = "Hello, " + name + "!" | |
alert(msg); | |
}; | |
say_hello("Jello") |
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
Vagrant::Config.run do |config| | |
# All Vagrant configuration is done here. The most common configuration | |
# options are documented and commented below. For a complete reference, | |
# please see the online documentation at vagrantup.com. | |
# Every Vagrant virtual environment requires a box to build off of. | |
config.vm.box = "base" | |
# The url from where the 'config.vm.box' box will be fetched if it | |
# doesn't already exist on the user's system. |
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
function countletters(event){ | |
var max=jQuery(this).attr('maxlength'); | |
var valLen=jQuery(this).val().length; | |
if(valLen > max) { | |
jQuery(this).val(jQuery(this).val().substring(0, max)); | |
valLen=max; | |
} | |
jQuery("div.counter").text( valLen+'/'+max); | |
} |
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
#!/bin/sh | |
tmux new-session -s migration -n irc -d | |
tmux new-window -n migration | |
tmux new-window -n log1 | |
tmux split-window -d -p 30 | |
tmux new-window -n log2 | |
tmux new-window -n log3 | |
tmux new-window -n log4 | |
tmux attach |
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
##BEGIN - Hug## | |
___ ____ ___ | |
____( \ .-' `-. / )____ | |
(____ \_____ / (O O) \ _____/ ____) | |
(____ `-----( ) )-----' ____) | |
(____ _____________\ .____. /_____________ ____) | |
(______/ `-.____.-' \______) | |
##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
module PublisherImporter | |
extend self | |
# Import a csv given it's full path | |
def import(csv_path) | |
CSV.foreach(csv_path, :headers => true) do |row| | |
import_row(row) | |
end | |
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
function Human(name, age) { | |
this.name = name; | |
this.age = age; | |
} | |
bob = new Human("bob", 30); | |
bob.name; // "bob" | |
bob.age; // 30 |