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
| # Released under WTFPL - http://sam.zoy.org/wtfpl/ | |
| module PoorMansMigrations | |
| @@_migration_columns = [] | |
| def column(name, type, options = {}) | |
| @@_migration_columns << {:column_name => name, :column_type => type, :options => options} | |
| end | |
| def realize!(force_drop = false) | |
| # Force drop if needed |
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
| Name: Performance#description should replace an obscene description with an innocent one | |
| Type: Failure Message: | |
| expected: "Me performing care bear on my teddy", | |
| got: "Me performing cunillingus on my teddy" | |
| Name: Performance#title should replace an obscene title with an innocent one | |
| Type: Failure Message: | |
| expected: "care bear", | |
| got: "fingerfuckers" | |
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
| /* | |
| Less CSS3 utils. | |
| Usage: | |
| .fooClass { | |
| border: 3px solid #000; | |
| .vbg-gradient(#FFF, #CCC); | |
| .hbox(); | |
| } | |
| */ |
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
| #!/usr/local/bin/macruby | |
| framework 'QuartzCore' | |
| framework 'AVFoundation' | |
| class NSColor | |
| def toCGColor | |
| # approach #2 | |
| components = [redComponent, greenComponent, blueComponent, alphaComponent] | |
| color_space = CGColorSpaceCreateWithName(KCGColorSpaceGenericRGB) |
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
| #!/usr/local/bin/macruby | |
| framework 'QuartzCore' | |
| framework 'AVFoundation' | |
| class NSTimer | |
| def self.scheduledTimerWithTimeInterval interval, repeats: repeat_flag, block: block | |
| self.scheduledTimerWithTimeInterval interval, | |
| target: self, | |
| selector: 'executeBlockFromTimer:', | |
| userInfo: block, | |
| repeats: repeat_flag |
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
| require 'rubygems' | |
| require 'httparty' | |
| require 'curb' | |
| require 'net/http' | |
| require 'benchmark' | |
| include Benchmark | |
| RUNS = 1000 | |
| url = 'http://localhost:4567/' |
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 | |
| host=`facter fqdn` | |
| if [[ ! -n "$1" ]]; then | |
| port=8000 | |
| else | |
| port=$1 | |
| fi | |
| echo "http://$host:$port" |
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
| cd ~ | |
| sudo apt-get update | |
| sudo apt-get install openjdk-7-jre-headless -y | |
| ### Check http://www.elasticsearch.org/download/ for latest version of ElasticSearch and replace wget link below | |
| # NEW WAY / EASY WAY | |
| wget https://download.elasticsearch.org/elasticsearch/elasticsearch/elasticsearch-0.90.1.deb | |
| sudo dpkg -i elasticsearch-0.90.1.deb |
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
| cd ~ | |
| sudo apt-get update | |
| sudo apt-get install openjdk-7-jre-headless -y | |
| ### Check http://www.elasticsearch.org/download/ for latest version of ElasticSearch and replace wget link below | |
| # NEW WAY / EASY WAY | |
| wget https://download.elasticsearch.org/elasticsearch/elasticsearch/elasticsearch-0.90.11.deb | |
| sudo dpkg -i elasticsearch-0.90.11.deb |