Skip to content

Instantly share code, notes, and snippets.

View ngsmrk's full-sized avatar

Angus Mark ngsmrk

  • London
  • 21:06 (UTC)
View GitHub Profile
@ngsmrk
ngsmrk / gist:2767770
Created May 22, 2012 09:15
How to config rspec so that view, helper and router specs are not generated when you generate controllers (and factory girl factories are)
In config/application.rb add the following inside the 'class Application < Rails::Application' block
config.generators do | g |
g.test_framework :rspec,
:fixtures => true,
:view_specs => false,
:helper_specs => false,
:routing_specs => false,
:controller_specs => true,
:request_specs => true
@ngsmrk
ngsmrk / gist:4260341
Created December 11, 2012 17:06
Sample travis CI YML file
language: ruby
rvm:
- 1.8.7
- 1.9.2
- 1.9.3
# uncomment this line if your project needs to run something other than `rake`:
script: bundle exec rspec spec
@ngsmrk
ngsmrk / gist:4267479
Created December 12, 2012 12:48
Add remote for heroku
git remote add heroku [email protected]:<app_name>.git
@ngsmrk
ngsmrk / gist:4267500
Created December 12, 2012 12:55
Get details of heroku apps
heroku apps
heroku apps:info --app <app_name>
@ngsmrk
ngsmrk / gist:4364392
Created December 23, 2012 17:00
Brakeman setup
# add this to your gemfile in your :development group
gem 'brakeman'
bundle
bundle exec brakeman --rake
@ngsmrk
ngsmrk / gist:4364436
Created December 23, 2012 17:03
Running brakeman
# run and put output to console
bundle exec rake brakeman:run
# run and save output as HTML to doc/report.html
bundle exec rake brakeman:run[doc/report.html]
@ngsmrk
ngsmrk / gist:4365723
Created December 23, 2012 20:08
Brakeman in Rakefile
task :default do
Brakeman.run :app_path => ".", :print_report => true
end
@ngsmrk
ngsmrk / gist:5420492
Created April 19, 2013 13:51
Remove all gems
gem list | cut -d" " -f1 | xargs gem uninstall -aIx
@ngsmrk
ngsmrk / gist:9024337
Last active August 29, 2015 13:56
Example Meteor Mongo insert
Offices.insert({name: names[i], rows: [
{number: 1, desks: [
{occupant: 'Person 1'},
{occupant: 'Person 2'}
]}
]});
@ngsmrk
ngsmrk / docker_hello_world
Created April 18, 2014 20:59
Docker hello world
time docker run tutum/wordpress echo 'hello world'