I hereby claim:
- I am sikachu on github.
- I am sikachu (https://keybase.io/sikachu) on keybase.
- I have a public key whose fingerprint is 7270 8199 79B1 6AD7 0571 6B7B 889C 472F 2DA2 8377
To claim this, I am signing this object:
| require 'rubygems' | |
| require 'nokogiri' | |
| lines = File.open("Safari Bookmarks.html").readlines | |
| urls = [] | |
| output = [] | |
| lines.each do |line| | |
| if line =~ %r(<DT><A HREF="(.+)">.+</A>$) |
| http://radio1.serverradio.net:8012/ |
| #!/usr/bin/env ruby | |
| require 'open-uri' | |
| size_hash = {"720p" => "6540", "720i" => "4540", "540p" => "2540", "540i" => "1840", "360p" => "1240", "360i" => "0640", "360is" => "0440", "224p" => "0240"} | |
| if ["--help", "help", "-h"].include?(ARGV[0]) || ARGV.size < 1 | |
| puts "Usage: #{File.basename __FILE__} ( #{size_hash.keys.join(' | ')} )" | |
| exit 0 | |
| end |
| window.it = (desc, func) -> | |
| if func? | |
| jasmine.getEnv().it(desc, func) | |
| else | |
| jasmine.getEnv().it desc, -> | |
| throw "test is undefined" |
| class User | |
| has_many :topics | |
| has_many :posts, through: topics | |
| end | |
| class Topic | |
| belongs_to :user | |
| has_many :posts | |
| end |
| Benchmark.bmbm do |x| | |
| x.report('start_with?') { 10_000.times { "fooo".start_with?('foo') }} | |
| x.report('regexp') { 10_000.times { "fooo" =~ /^foo/ }} | |
| end |
| gpr() { | |
| current_branch=`git rev-parse --abbrev-ref HEAD` | |
| if [[ $1 != '' ]]; then | |
| upstream=$1 | |
| else | |
| upstream='master' | |
| fi | |
| origin_username=`git remote -v | grep 'origin.\+fetch' | sed "s/^.*github.com[\/:]\(.*\)\/\(.*\)\.git.*$/\1/"` | |
| origin_repository=`git remote -v | grep 'origin.\+fetch' | sed "s/^.*github.com[\/:]\(.*\)\/\(.*\)\.git.*$/\2/"` | |
| if [[ `git remote | grep sikachu` != '' ]]; then |
| irb(main):001:0> class Foo | |
| irb(main):002:1> def initialize(a, b = a.to_s) | |
| irb(main):003:2> puts [a, b].inspect | |
| irb(main):004:2> end | |
| irb(main):005:1> end | |
| => nil | |
| irb(main):006:0> Foo.new 1 | |
| [1, "1"] | |
| => #<Foo:0x007f973d9ca410> |
| # Note: This assume that you're using libxml2 from Homebrew, which is keg-only. | |
| # Run this command: | |
| $ bundle config build.nokogiri --with-xml2-include=/usr/local/opt/libxml2/include/libxml2 --with-xml2-lib=/usr/local/opt/libxml2/lib --with-xslt-dir=/usr/local/opt | |
| # Remove and rebundle. You use Bundler, right? | |
| $ yes | gem uninstall nokogiri --force | |
| $ bundle |
I hereby claim:
To claim this, I am signing this object: