THIS GIST WAS MOVED TO TERMSTANDARD/COLORS
REPOSITORY.
PLEASE ASK YOUR QUESTIONS OR ADD ANY SUGGESTIONS AS A REPOSITORY ISSUES OR PULL REQUESTS INSTEAD!
" Highlight long lines (>80) | |
autocmd BufEnter * highlight OverLength ctermbg=darkgrey guibg=#592929 | |
autocmd BufEnter * match OverLength /\%81v.*/ | |
autocmd BufEnter * let w:long_line_match = 1 | |
fu! LongLineHighlightToggle() | |
highlight OverLength ctermbg=darkgrey guibg=#592929 | |
if exists('w:long_line_match') | |
match OverLength // |
# Goal: put a non-Rails-aware Ruby library using normal `require`s in | |
# lib/sim. Have it transparently reloaded between requests like Rails app | |
# code is. | |
# | |
# The code here goes inside of your configure block in | |
# config/environments/development.rb. There are two parts, commented inline. | |
# Reload code whenever the simulator changes. | |
config.watchable_dirs["lib/sim"] = [:rb] | |
config.watchable_files << "lib/sim.rb" |
module Wrapping | |
def wrap(method_name, &block) | |
# Alternative implementations: either will do the trick. | |
wrap_with_prepend(method_name, &block) | |
#wrap_with_bind(method_name, &block) | |
end | |
private | |
def wrap_with_prepend(method_name) |
TESTFLIGHT_APP_TOKEN=90210 | |
TESTFLIGHT_TEAM_TOKEN=90210 | |
TESTFLIGHT_API_TOKEN=90210 | |
BUGSENSE_API_KEY=90210 | |
BUGSENSE_API_TOKEN=90210 | |
DEVELOPMENT_CERTIFICATE_NAME="iPhone Developer: yourName" | |
DEVELOPMENT_PROVISIONING_PROFILE_PATH="/path/to/development.mobileprovision" | |
THIS GIST WAS MOVED TO TERMSTANDARD/COLORS
REPOSITORY.
PLEASE ASK YOUR QUESTIONS OR ADD ANY SUGGESTIONS AS A REPOSITORY ISSUES OR PULL REQUESTS INSTEAD!
module InventoryItems(Command(..), Event(..), handle) where | |
import Data.Maybe(isJust) | |
type Id = String | |
type Name = String | |
type Amount = Int | |
data Command = CreateInventoryItem Id | |
| RenameInventoryItem Id Name |
module Curryable | |
def curry(arity=nil) | |
method(:call).to_proc.curry(arity) | |
end | |
end | |
class Foo | |
include Curryable | |
def call(x, y, z) |
task :outdated => :environment do | |
include ActionView::Helpers::DateHelper | |
regexp = /\* ([^ ]+) \((\S+) > ([^)]+)\)/ | |
outdated = `bundle outdated`.scan(regexp) | |
outdated.each do |gem_name, available, current| | |
data = JSON.parse(`curl --silent https://rubygems.org/api/v1/versions/#{gem_name}.json`) | |
version = data.find { |e| e['number'] == current } | |
age = distance_of_time_in_words_to_now(Time.parse(version['built_at'])) | |
puts " * #{gem_name}: (#{available} > #{current}, built #{age} ago)" | |
end |
# Hook into unicorn, unicorn middleware, not rack middleware | |
# | |
# Since we need no knowledge about the request we can simply | |
# hook unicorn | |
module Middleware::UnicornOobgc | |
MIN_REQUESTS_PER_OOBGC = 5 | |
MAX_DELTAS = 20 |
NOTE TO CONTRIBUTORS : Take this wherever you like. If you have articles that really helped you, add them to the list of resources at the end. All content added to this EtherPad is considered public domain. Add your name to the list of contributors at the end of you want attribution.
Suggestions on where to eventually take this content are welcome. I was thinking of making it into a Github pages branch, or maybe on a wiki somewhere?
There seem to be many approaches to test driving your Chef infrastructure, and the amount of projects to pick from is overwhelming. This document tries to provide some overview.