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 main | |
import ( | |
"flag" | |
"io" | |
"log" | |
"net" | |
"strings" | |
) |
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
#!/usr/bin/env ruby | |
class Symbol | |
def pipe(method) | |
proc { |array| array.send(method) { |elem| elem.send(self) } } | |
end | |
def detect | |
pipe(:detect) | |
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
javascript:(function(){readConvertLinksToFootnotes=false;readStyle='style-newspaper';readSize='size-medium';readMargin='margin-wide';_readability_script=document.createElement('script');_readability_script.type='text/javascript';_readability_script.src='http://lab.arc90.com/experiments/readability/js/readability.js?x='+(Math.random());document.documentElement.appendChild(_readability_script);_readability_css=document.createElement('link');_readability_css.rel='stylesheet';_readability_css.href='http://lab.arc90.com/experiments/readability/css/readability.css';_readability_css.type='text/css';_readability_css.media='all';document.documentElement.appendChild(_readability_css);_readability_print_css=document.createElement('link');_readability_print_css.rel='stylesheet';_readability_print_css.href='http://lab.arc90.com/experiments/readability/css/readability-print.css';_readability_print_css.media='print';_readability_print_css.type='text/css';document.getElementsByTagName('head')[0].appendChild(_readability_prin |
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
#!/usr/bin/env bash | |
set -e | |
files() { | |
git diff --name-only --cached --full-index | |
} | |
check() { | |
while read file; do | |
filename=$(basename "$file") |
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 ApplicationRestriction | |
include Virtus.model(strict: true) | |
def to_module(&block) | |
restriction = self | |
mod = Module.new do | |
define_singleton_method(:inspect) do | |
"#{restriction.class.name}(#{restriction.attributes})" | |
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
mysql> EXPLAIN SELECT * FROM tf_users WHERE user_id = 'darkhelmet'; | |
+----+-------------+----------+--------+---------------+------+---------+------+------+-------+ | |
| id | select_type | table | type | possible_keys | key | key_len | ref | rows | Extra | | |
+----+-------------+----------+--------+---------------+------+---------+------+------+-------+ | |
| 1 | SIMPLE | tf_users | system | NULL | NULL | NULL | NULL | 1 | | | |
+----+-------------+----------+--------+---------------+------+---------+------+------+-------+ | |
1 row in set (0.00 sec) |
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
2012/08/21 10:41:40 took 1.831589s (9 ns/op) to try 'a' for index 0 | |
2012/08/21 10:41:42 took 1.812426s (9 ns/op) to try 'b' for index 0 | |
2012/08/21 10:41:45 took 1.816416s (9 ns/op) to try 'c' for index 0 | |
2012/08/21 10:41:48 took 1.82774s (9 ns/op) to try 'd' for index 0 | |
2012/08/21 10:41:50 took 1.814831s (9 ns/op) to try 'e' for index 0 | |
2012/08/21 10:41:53 took 1.825167s (9 ns/op) to try 'f' for index 0 | |
2012/08/21 10:41:56 took 1.858311s (9 ns/op) to try 'g' for index 0 | |
2012/08/21 10:41:59 took 1.818296s (9 ns/op) to try 'h' for index 0 | |
2012/08/21 10:42:02 took 1.883082s (9 ns/op) to try 'i' for index 0 | |
2012/08/21 10:42:04 took 1.834942s (9 ns/op) to try 'j' for index 0 |
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 -x | |
# apt -y update | |
# apt -y dist-upgrade | |
# apt -y install docker.io | |
which minikube || (curl -Lo minikube https://storage.googleapis.com/minikube/releases/latest/minikube-linux-amd64 && chmod +x minikube && mv minikube /usr/local/bin/) | |
which kubectl || (curl -Lo kubectl https://storage.googleapis.com/kubernetes-release/release/$(curl -s https://storage.googleapis.com/kubernetes-release/release/stable.txt)/bin/linux/amd64/kubectl && chmod +x kubectl && mv kubectl /usr/local/bin/) | |
which helm || (curl -Lo helm.tar.gz https://kubernetes-helm.storage.googleapis.com/helm-v2.6.1-linux-amd64.tar.gz && tar -xzf helm.tar.gz && mv linux-amd64/helm /usr/local/bin/) |
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
4 Azor, the Lawbringer | |
4 Back to Nature | |
1 Cruel Tutor | |
1 Deranged Hermit | |
1 Devoted Druid | |
3 Dire Fleet Daredevil | |
4 Dire Fleet Poisoner | |
1 Hypnotic Specter | |
1 Reflecting Pool | |
1 Stormbreath Dragon |
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
gem 'resque', '>= 1.10.0' | |
gem 'heroku' # You will need the heroku gem for this too. |
NewerOlder