Jon Warbrick, July 2014, V3.2 (for Ansible 1.7)
First one found from of
#View erl's version | |
erl -eval 'erlang:display(erlang:system_info(otp_release)), halt().' -noshell | |
#Install kerl | |
$ brew install kerl | |
# list releases | |
$ kerl list releases |
module Grape | |
module Formatter | |
module Json | |
class << self | |
def call(object, _env) | |
only = _env[Grape::Env::RACK_REQUEST_QUERY_HASH]["__only__"] | |
if object.respond_to?(:to_json) | |
return only.present? ? object.to_json(only: only) : object.to_json | |
end |
var kue = require('kue'), | |
jobs = kue.createQueue(), | |
util = require('util'), | |
noop = function() {}; | |
jobs.CLEANUP_MAX_FAILED_TIME = 30 * 24 * 60 * 60 * 1000; // 30 days | |
jobs.CLEANUP_MAX_ACTIVE_TIME = 1 * 24 * 60 * 60 * 1000; // 1 day | |
jobs.CLEANUP_MAX_COMPLETE_TIME = 5 * 24 * 60 * 60 * 1000; // 5 days | |
jobs.CLEANUP_INTERVAL = 5 * 60 * 1000; // 5 minutes |
Jon Warbrick, July 2014, V3.2 (for Ansible 1.7)
First one found from of
There's an issue with cairo 14.x that results in the axis fonts on the graphs being HUUUUUGE. Downgrading to 12.6 helps:
ps -ef | grep 'irb' | awk '{print $2}' | xargs kill -9 | |
ps -ef | grep 'pry' | awk '{print $2}' | xargs kill -9 |
require "rubygems" | |
require "yaml" | |
require "open-uri" | |
collection_path = 'https://raw.githubusercontent.com/msroot/get_happy_sync/master/collection.yml' | |
`open #{YAML.load(open(collection_path)).sample}` | |
ActiveSupport::Notifications.subscribe do |*args| | |
event = ActiveSupport::Notifications::Event.new(*args) | |
Rails.logger.info "#" * 30 | |
Rails.logger.info "#{event.name} => #{event.duration}" | |
end |
module Yo | |
module Man | |
extend ActiveSupport::Concern | |
included do | |
if Rails::VERSION::MAJOR >= 5 | |
prepend_before_action :rails_yo_before_filter | |
after_action :rails_yo_after_filter | |
else |
ssh user@host 'bash -s' < a.sh |