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
| 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
| 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
| 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
| # 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
| #! /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
| #! /usr/bin/env sh | |
| ffmpeg -i animation.mp4 animation.webm |
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 | |
| convert *.jpg -loop 0 creek.gif |
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 'minitest/spec' | |
| require 'minitest/pride' | |
| require 'minitest/autorun' | |
| require 'net/http' | |
| require 'json' | |
| describe "PagerDuty::Incident" do | |
| before { @incident = PagerDuty::Incident.new } |
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
| Model.search { paginate :page => 1, :per_page => 100 }.hits.map(&:primary_key) |