This file contains 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
RUN /bin/echo -e "PassEnv DB_PORT_3306_TCP_ADDR\n\ | |
PassEnv DB_PORT_3306_TCP_DATABASE\n\ | |
PassEnv DB_PORT_3306_TCP_USER\n\ | |
PassEnv DB_PORT_3306_TCP_PASS\n\ | |
PassEnv LDAP_PORT_389_TCP_ADDR\n\ | |
PassEnv LDAP_PORT_689_TCP_ADDR\n\ | |
PassEnv LDAP_BASEDN\n\ | |
PassEnv LDAP_UID\n\ | |
PassEnv LDAP_SEARCH_USER\n\ | |
PassEnv LDAP_SEARCH_PASS\n\ |
This file contains 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 'ohai' | |
o = Ohai::System.new | |
o.all_plugins | |
node_name o[:macaddress].split(":").join |
This file contains 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
Rubinius Crash Report #rbxcrashreport | |
Error: signal �SIGSEGV | |
[[Backtrace]] | |
ruby[0x81bd52a] | |
[0x4001d400] | |
/lib/tls/i686/cmov/libc.so.6(index+0x63)[0x40233db3] | |
/lib/tls/i686/cmov/libnss_dns.so.2(_nss_dns_gethostbyname3_r+0xb6)[0x43ce6b66] | |
/lib/tls/i686/cmov/libnss_dns.so.2(_nss_dns_gethostbyname2_r+0x4b)[0x43ce6f2b] |
This file contains 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 'sidekiq/cli' | |
require 'sidekiq/launcher' | |
module Sidekiqer | |
Sidekiq = ::Sidekiq.dup | |
module Sidekiq | |
CLI = ::Sidekiq::CLI.dup | |
Launcher = ::Sidekiq::Launcher.dup | |
::Sidekiq.send(:remove_const, :CLI) |
This file contains 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
@Poller = | |
delay: (ms, func) -> setTimeout func, ms | |
poll: (url,time)-> | |
@schedulePoll(url, time) | |
$.getScript(url) | |
schedulePoll: (url, time=30000) -> | |
poller = @delay(time, =>@poll(url, time)) | |
$(document).on 'page:fetch', => | |
clearTimeout(poller) |
This file contains 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
module MyApp | |
class Clock | |
include Celluloid | |
include Clockwork | |
require_relative '../clockwork' | |
end | |
end |
This file contains 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
Celluloid::DeadActorError: attempted to call a dead actor | |
/Users/bgoff/.gem/ruby/2.0.0/bundler/gems/celluloid-02e3882c1e55/lib/celluloid/proxies/sync_proxy.rb:23:in `method_missing' | |
/Users/bgoff/dev/monitor/agent/lib/agent/worker.rb:20:in `post_run' | |
/Users/bgoff/dev/monitor/agent/lib/agent/worker.rb:12:in `perform' | |
/Users/bgoff/.gem/ruby/2.0.0/bundler/gems/celluloid-02e3882c1e55/lib/celluloid/calls.rb:25:in `public_send' | |
/Users/bgoff/.gem/ruby/2.0.0/bundler/gems/celluloid-02e3882c1e55/lib/celluloid/calls.rb:25:in `dispatch' | |
/Users/bgoff/.gem/ruby/2.0.0/bundler/gems/celluloid-02e3882c1e55/lib/celluloid/calls.rb:67:in `dispatch' | |
/Users/bgoff/.gem/ruby/2.0.0/bundler/gems/celluloid-02e3882c1e55/lib/celluloid/actor.rb:322:in `block in handle_message' | |
/Users/bgoff/.gem/ruby/2.0.0/bundler/gems/celluloid-02e3882c1e55/lib/celluloid/actor.rb:416:in `block in task' | |
/Users/bgoff/.gem/ruby/2.0.0/bundler/gems/celluloid-02e3882c1e55/lib/celluloid/tasks.rb:55:in `block in initialize' |
This file contains 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
# Serializes model for use with pivot.js | |
# https://github.com/rjackson/pivot.js | |
require 'csv' | |
module Concerns::Pivotable | |
extend ActiveSupport::Concern | |
included do | |
attr_reader :pivotable_attrs | |
@pivotable_field_options ||= [] | |
end |
This file contains 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
class ApplicationController < ActionController::Base | |
#... stuff | |
private | |
def resource_params | |
if params[:action] == 'new' | |
[] | |
elsif current_user.admin? | |
params.require(resource_instance_name).permit! | |
else | |
params.require(resource_instance_name).permit( *policy_attributes(resource_class) ) |
This file contains 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
include_recipe "rbenv::default" | |
include_recipe "rbenv::ruby_build" | |
@my_ruby_version = node[:_common_system][:ruby][:version] | |
rbenv_ruby @my_ruby_version do |rbenv| | |
rbenv.ruby_version @my_ruby_version | |
rbenv.global true | |
end | |
def gem_install(gem) |