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) |
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
execute 'foo' do | |
command 'some_command_that_doesnt_create_its_own_file && touch /some/location/foo' | |
creates '/some/location/foo' | |
end | |
# or | |
execute 'foo' do | |
command 'this_command_creates_a_file_foo_in_etc' | |
creates '/etc/foo' |
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
Brians-MacBook-Pro:~ bgoff$ which ruby | |
/Users/bgoff/.rubies/ruby-2.0.0-p247/bin/ruby | |
Brians-MacBook-Pro:~ bgoff$ irb | |
irb(main):001:0> require 'ridley' | |
/Users/bgoff/.gem/ruby/2.0.0/gems/json-1.8.0/lib/json/common.rb:67: [BUG] Segmentation fault | |
ruby 2.0.0p247 (2013-06-27 revision 41674) [x86_64-darwin12.4.0] | |
-- Crash Report log information -------------------------------------------- | |
See Crash Report log file under the one of following: | |
* ~/Library/Logs/CrashReporter |
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
Brians-MacBook-Pro:~ bgoff$ knife bootstrap windows winrm 10.0.1.130 -x OCD | |
WARNING: Could not load IOV methods. Check your GSSAPI C library for an update | |
WARNING: Could not load AEAD methods. Check your GSSAPI C library for an update | |
Bootstrapping Chef on 10.0.1.130 | |
Enter your password: | |
10.0.1.130 "Rendering 'C:\Users\OCD\AppData\Local\Temp\bootstrap-15078-1375894896.bat' chunk 1" | |
10.0.1.130 "Rendering 'C:\Users\OCD\AppData\Local\Temp\bootstrap-15078-1375894896.bat' chunk 2" | |
10.0.1.130 '#39' is not recognized as an internal or external command, | |
10.0.1.130 operable program or batch file. | |
10.0.1.130 "Rendering 'C:\Users\OCD\AppData\Local\Temp\bootstrap-15078-1375894896.bat' chunk 3" |
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
location /reverse { | |
location ~ ^/(.*)/(.*) { | |
set $parsed_upstream $1; | |
set $url_remainder $2; | |
proxy_pass http://$parsed_upstream/$url_remainder; | |
} | |
proxy_pass http://$parsed_upstream/$url_remainder; | |
} |
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
cookbook_file[/var/chef/cache/preseed/ldap/slapd-2.4.28-1.1ubuntu4.3.seed] (dynamically defined) had an error: Chef::Exceptions::FileNotFound: Cookbook 'ldap' (0.1.0) does not contain a file at any of these locations: | |
files/ubuntu-12.04/slapd.seed.erb | |
files/ubuntu/slapd.seed.erb | |
files/default/slapd.seed.erb | |
This cookbook _does_ contain: ['/tmp/vagrant-chef-1/chef-solo-1/cookbooks/ldap/files/default/ldap.conf' | |
Resource Declaration: | |
--------------------- |
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
Thread 29 (Thread 0x7fff86ffb700 (LWP 17872)): | |
#0 0x00007ffff72840fe in pthread_cond_timedwait@@GLIBC_2.3.2 () from /lib/x86_64-linux-gnu/libpthread.so.0 | |
#1 0x0000000000658fba in wait_until (ts=0x7fff86ff9c70, mutex=..., this=0x7fff7c014490) at vm/util/thread.hpp:446 | |
#2 rubinius::Park::park_timed (this=0x7fff7c014490, state=0x7fff86ffae10, call_frame=0x7fff86ff9ff0, ts=0x7fff86ff9c70) | |
at vm/park.cpp:49 | |
#3 0x00000000006ef567 in rubinius::System::vm_sleep (state=0x7fff86ffae10, gct=..., duration=<optimized out>, | |
calling_environment=0x7fff86ff9ff0) at vm/builtin/system.cpp:754 | |
#4 0x0000000000614c03 in rubinius::Primitives::vm_sleep (state=0x7fff86ffae10, call_frame=0x7fff86ff9ff0, exec=0x7ffff5a4e370, | |
mod=0x1695900, args=...) at vm/gen/method_primitives.cpp:22764 |
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" | |
ruby_version = node[:_common_system][:ruby][:version] | |
rbenv_ruby ruby_version do |rbenv| | |
rbenv.ruby_version ruby_version | |
rbenv.global true | |
end | |
def gem_install(gem, ruby) |