AWS query-instance_method docs
export AWS_ACCESS_KEY_ID=‘XXXX’
export AWS_SECRET_ACCESS_KEY=‘XXXX’# ENV['AWS_ACCESS_KEY_ID']
# ENV['AWS_SECRET_ACCESS_KEY']| # Creating a complex hash, with nested keys | |
| my_complex_hash = { | |
| users: [ | |
| {name: "Yukihiro Matsumoto", age: 57}, | |
| {name: "Kabosu the Shiba Inu", age: 16}, | |
| {name: "Thiago Massa", age: 33} | |
| ] | |
| } |
AWS query-instance_method docs
export AWS_ACCESS_KEY_ID=‘XXXX’
export AWS_SECRET_ACCESS_KEY=‘XXXX’# ENV['AWS_ACCESS_KEY_ID']
# ENV['AWS_SECRET_ACCESS_KEY']| require 'webrick' | |
| server = WEBrick::HTTPServer.new :Port => 8000 | |
| server.mount_proc '/' do |req, res| | |
| puts req.inspect | |
| res.body = nil | |
| end | |
| trap 'INT' do server.shutdown end |
| guard :rspec, cmd: 'zeus rspec --color' do | |
| watch(%r{^spec/.+_spec\.rb$}) | |
| watch(%r{^lib/(.+)\.rb$}) { |m| "spec/lib/#{m[1]}_spec.rb" } | |
| watch('spec/spec_helper.rb') { "spec" } | |
| # Rails example | |
| watch(%r{^app/(.+)\.rb$}) { |m| "spec/#{m[1]}_spec.rb" } | |
| watch(%r{^app/(.*)(\.erb|\.haml)$}) { |m| "spec/#{m[1]}#{m[2]}_spec.rb" } | |
| watch(%r{^app/controllers/(.+)_(controller)\.rb$}) { |m| ["spec/routing/#{m[1]}_routing_spec.rb", "spec/#{m[2]}s/#{m[1]}_#{m[2]}_spec.rb", "spec/acceptance/#{m[1]}_spec.rb"] } | |
| watch(%r{^spec/support/(.+)\.rb$}) { "spec" } |
| $VERBOSE = nil | |
| require File.expand_path('../rooby', __FILE__) | |
| Person = Rooby::Class.new 'Person' do | |
| define :initialize do |name| | |
| @name = name | |
| end | |
| define :name do |
| guard 'spork', :rspec_env => { 'RAILS_ENV' => 'test' } do | |
| watch('config/application.rb') | |
| watch('config/environment.rb') | |
| watch(%r{^config/environments/.+\.rb$}) | |
| watch(%r{^config/initializers/.+\.rb$}) | |
| watch(%r{^config/locales/.+\.yml$}) | |
| watch('Gemfile') | |
| watch('Gemfile.lock') | |
| watch('spec/spec_helper.rb') | |
| end |
| require 'rubygems' | |
| require 'spork' | |
| # This code runs once when you run your test suite | |
| Spork.prefork do | |
| ENV['RAILS_ENV'] ||= 'test' | |
| # Mongoid models reload | |
| require 'rails/mongoid' | |
| Spork.trap_class_method(Rails::Mongoid, :load_models) |
I just had to set up Jenkins to use GitHub. My notes (to myself, mostly):
For setting up Jenkins to build GitHub projects. This assumes some ability to manage Jenkins, use the command line, set up a utility LDAP account, etc. Please share or improve this Gist as needed.
| /* | |
| * This is a manifest file that'll be compiled into application.css, which will include all the files | |
| * listed below. | |
| * | |
| * Any CSS and SCSS file within this directory, lib/assets/stylesheets, vendor/assets/stylesheets, | |
| * or vendor/assets/stylesheets of plugins, if any, can be referenced here using a relative path. | |
| * | |
| * You're free to add application-wide styles to this file and they'll appear at the top of the | |
| * compiled file, but it's generally better to create a new file per style scope. | |
| * |