- auto indent
- auto new line
<<GROCERY_LIST
1. Salad mix
2. Strawberries
3. Cereal
build:
#!/usr/bin/env bash | |
\. "${rvm_path}/scripts/functions/hooks/jruby" | |
export PROJECT_JRUBY_OPTS="-J-XX:+TieredCompilation -J-XX:TieredStopAtLevel=1 -J-noverify -X-C" | |
if [[ "${rvm_ruby_string}" =~ "jruby" ]] | |
then | |
jruby_options_append "${PROJECT_JRUBY_OPTS[@]}" | |
else |
https://github.com/mperham/dalli/blob/v1.1.4/lib/active_support/cache/dalli_store.rb#L41
def initialize
...
# Extend expiry by stale TTL or else memcached will never return stale data.
# See ActiveSupport::Cache#fetch.
options[:expires_in] += options[:race_condition_ttl] if options[:expires_in] && options[:race_condition_ttl]
module ActionController | |
module Railties | |
module Paths | |
def self.with(app) | |
Module.new do | |
define_method(:inherited) do |klass| | |
super(klass) | |
if namespace = klass.parents.detect { |m| m.respond_to?(:railtie_helpers_paths) } | |
paths = namespace.railtie_helpers_paths |
lambda { |x| puts "#{x}.call(%q(#{x}))" }.call(%q(lambda { |x| puts "#{x}.call(%q(#{x}))" })) |
package main | |
import "fmt" | |
import "math/rand" | |
import "time" | |
func tree(width int, level int) { | |
rand.Seed(time.Now().UnixNano()) | |
full_width := width + (2 * level) | |
tree_level(1, width, full_width) |
var assert = require('assert'); | |
var helpers = { | |
view: function() { | |
return "viewing: " + this.msg; | |
} | |
} | |
// jade | |
// "h1= view()" | |
// compiled jade |
brew update | |
brew tap homebrew/dupes | |
brew install apple-gcc42 | |
export CC=gcc-4.2 | |
curl https://gist.github.com/rorcraft/8815129/raw/f184726d7dd8d306d6f63acd97c39bb8ea6dbb84/jamesgolick-ruby > ~/.rbenv/plugins/ruby-build/share/jamesgolick | |
rbenv install jamesgolick |
var through = require('through2') | |
, gutil = require('gulp-util') | |
function cwebp() { | |
var Webp = require('cwebp') | |
, File = require('vinyl') | |
return through.obj(function (file, enc, cb) { | |
this.push(file) | |
if (file.isBuffer()) { |