Skip to content

Instantly share code, notes, and snippets.

@bluengreen
bluengreen / fakeout.rake
Created September 29, 2016 17:03 — forked from matthutchinson/fakeout.rake
fakeout.rake - a simple/configurable rake task that generates some random fake data for the app (using faker) at various sizes
# a simple/configurable rake task that generates some random fake data for the app (using faker) at various sizes
# NOTE: requires the faker or ffaker gem
# sudo gem install faker - http://faker.rubyforge.org
# OR
# sudo gem install ffaker - http://github.com/EmmanuelOga/ffaker
require 'faker'
class Fakeout
@bluengreen
bluengreen / backup_sdb.rb
Created October 13, 2016 03:57 — forked from wr0ngway/backup_sdb.rb
script to backup all simpledb tables from a given aws account
#!/usr/bin/env ruby
# Add your gems here
#
gemfile_contents = <<-EOF
source "http://rubygems.org"
gem "fog"
gem "yajl-ruby"
EOF
require "time"
require "date"
class Date
def to_time
Time.local(year, month, day)
end
end
class Time
about
aboutu
abuse
acme
ad
admanager
admin
admindashboard
administrator
ads
@bluengreen
bluengreen / 1011_workstation_setup.md
Created February 19, 2017 07:35
Workstation Setup - 10.11

Dev Workstation Setup - 10.11

These instructions are for Mac OSX 10.11 El Capitan. Following these instructions will prepare your workstation for developing in Ruby on Rails.

Mac OS X 10.11 El Capitan installation steps

#====================================================================================
# ** many commands require sudo but many do not
@bluengreen
bluengreen / rspec_model_testing_template.rb
Created April 18, 2017 05:03 — forked from SabretWoW/rspec_model_testing_template.rb
Rails Rspec model testing skeleton & cheat sheet using rspec-rails, shoulda-matchers, shoulda-callbacks, and factory_girl_rails. Pretty much a brain dump of examples of what you can (should?) test in a model. Pick & choose what you like, and please let me know if there are any errors or new/changed features out there. Reddit comment thread: http…
# This is a skeleton for testing models including examples of validations, callbacks,
# scopes, instance & class methods, associations, and more.
# Pick and choose what you want, as all models don't NEED to be tested at this depth.
#
# I'm always eager to hear new tips & suggestions as I'm still new to testing,
# so if you have any, please share!
#
# @kyletcarlson
#
# This skeleton also assumes you're using the following gems:
require 'rails_helper'
RSpec.describe TodosController, :type => :controller do
describe "GET #index" do
#describe "POST #create" do
#describe "GET #show" do
#describe "PATCH #update" do (or PUT #update)
#describe "DELETE #destroy" do
#describe "GET #new" do
require 'rails_helper'
RSpec.describe TodosController, :type => :controller do
describe "GET #index" do
#describe "POST #create" do
#describe "GET #show" do
#describe "PATCH #update" do (or PUT #update)
#describe "DELETE #destroy" do
#describe "GET #new" do