Run each chain:
$ ruby full_chain.rb
$ ruby half_chain.rb
$ ruby no_chain.rb| # A sample Gemfile | |
| source "https://rubygems.org" | |
| gem 'mechanize' | |
| gem 'chronic' |
| #!/usr/bin/env ruby | |
| # @see http://stackoverflow.com/a/11522507 | |
| if ARGV.empty? | |
| $stdout.puts "Usage: cleanup.rb dump.sql table_a [table_b ...]" | |
| else | |
| args = ARGV.reverse | |
| file = args.pop |
| #! /usr/bin/perl | |
| # @link: http://unix.stackexchange.com/questions/4527/program-that-passes-stdin-to-stdout-with-color-codes-stripped | |
| use strict; | |
| use warnings; | |
| while (<>) { | |
| s/\e\[?.*?[\@-~]//g; # Strip ANSI escape codes | |
| print; |
| # encoding: utf-8 | |
| # Gemfile | |
| source 'https://rubygems.org/' | |
| gem 'rake' # up to date version | |
| gem 'rack', '~> 1.4.1' # pessimistic version | |
| gem 'thin', '= 1.5' # exact version | |
| group :test do | |
| gem 'rspec' |
| # encoding: utf-8 | |
| use Rack::Static, | |
| :urls => ['/css', '/img', '/js', '/less'], | |
| :root => 'public' | |
| run lambda { |env| | |
| [ | |
| 200, | |
| { |
| # encoding: utf-8 | |
| # | |
| # Extract from: | |
| # @link: http://www.mattsears.com/articles/2011/11/27/ruby-blocks-as-dynamic-callbacks | |
| # @link: http://techscursion.com/2011/11/turning-callbacks-inside-out | |
| class ProcCallback | |
| def initialize(callable, *args) | |
| @callable = callable.to_s | |
| @arguments = args.dup |
| -# Code... | |
| %body{ :"data-controller" => controller_name, :"data-action" => action_name } | |
| -# Code... |
| require 'thor' | |
| class VimInstaller < Thor::Group | |
| include Thor::Actions | |
| def self.source_root | |
| '/tmp' | |
| end | |
| def clean_up |
| # link: http://linssen.me/entry/archive-your-git-repo-easily/ | |
| git archive HEAD | gzip > $PWD\.tar\.gz |