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/bin/env sh | |
| ffmpeg -r 12 -pattern_type glob -i '*.jpg' -c:v libx264 animation.mp4 |
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
| # http://devrandom.postr.hu/offline-ruby-core-and-stdlib-documentation-with-yard | |
| $ gem install yard | |
| $ wget ftp://ftp.ruby-lang.org/pub/ruby/2.0/ruby-2.0.0-p247.tar.gz | |
| $ tar xzvf ruby-2.0.0-p247.tar.gz | |
| $ cd ruby-2.0.0-p247 | |
| $ yardoc *.c | |
| $ yardoc -b .yardoc-stdlib -o doc-stdlib | |
| $ yard server -m ruby-core2.0 .yardoc stdlib .yardoc-stdlib |
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 'open-uri' | |
| require 'nokogiri' | |
| require 'twilio-ruby' | |
| require 'spinning_cursor' | |
| class Page | |
| attr_reader :etag, :last_modified, :data, :uri | |
| def initialize(uri) |
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 'open-uri' | |
| require 'digest/sha1' | |
| class CreekImage | |
| attr_reader :etag, :data, :uri, :sha1 | |
| def initialize | |
| @uri = 'http://archive.cityofpaloalto.org/earlywarning/creekcam/creekcam.jpg' | |
| open(@uri) do |img| |
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
| git log --follow -p file |
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
| $ for file in ./data/iraq_unrest_0*.csv; do awk -F, -f csv_clean.awk $file; done; |
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
| # Credit - http://mattsears.com/articles/2011/12/10/minitest-quick-reference | |
| # | |
| # must_be list.size.must_be :==, 0 | |
| # must_be_close_to subject.size.must_be_close_to 1,1 | |
| # must_be_empty list.must_be_empty | |
| # must_be_instance_of list.must_be_instance_of Array | |
| # must_be_kind_of list.must_be_kind_of Enumerable | |
| # must_be_nil list.first.must_be_nil |
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
| while max <= 100 do; puts Net::HTTP.get('www.google.com', '/'); max +=1; sleep 60; end |
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
| subset(df, sprint.end.date %in% as.Date(c("2012-11-16", "2012-11-30"))) |
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
| git diff HEAD --ignore-space-at-eol |