Skip to content

Instantly share code, notes, and snippets.

View theIV's full-sized avatar

Stewart Laufer theIV

View GitHub Profile

branch by abstraction (BbA)

[rules][0]

  1. There are also a lot of developers already depending on the code that is subject of the ‘longer to complete’ change, and we do not want them to be slowed down in any way.
  2. No commit pushed to the shared repository should jeopardize the ability to go live.

steps (as defined in mono to micro)

Keybase proof

I hereby claim:

  • I am theiv on github.
  • I am theiv (https://keybase.io/theiv) on keybase.
  • I have a public key ASCgKFvBsgqFrX_3rR3OI8TJ6A9KHYobjkdlcCWdLTcb8wo

To claim this, I am signing this object:

@theIV
theIV / .psqlrc
Created February 8, 2016 21:32 — forked from pivaldi/.psqlrc
.psqlrc dot file to customize the default psql sessions
-- psql prompt can be customized
\set PROMPT1 '%[%033[1;33m%]%M:%>%[%033[1;32m%] %n@%/%R%[%033[0m%]%# '
\set PROMPT2 :PROMPT1
\set PROMPT3 '>> '
-- Missing LIMIT fetch count is set to 1000
\set FETCH_COUNT 1000
-- Set pager to off
\pset pager off
@theIV
theIV / db.rake
Created October 10, 2015 18:59 — forked from hopsoft/db.rake
Rails rake tasks for dump & restore of PostgreSQL databases
# lib/tasks/db.rake
namespace :db do
desc "Dumps the database to db/APP_NAME.dump"
task :dump => :environment do
cmd = nil
with_config do |app, host, db, user|
cmd = "pg_dump --host #{host} --username #{user} --verbose --clean --no-owner --no-acl --format=c #{db} > #{Rails.root}/db/#{app}.dump"
end
puts cmd
# Credits:
# Jason Pirkey, Táve Corporation, http://www.tave.com/
# Jeremy Mickelson, https://github.com/CyborgMaster
# See http://help.papertrailapp.com/kb/hosting-services/aws-elastic-beanstalk/
packages:
yum:
rubygems: []
ruby-devel: []
inputs = %w[
CollectionSelectInput
DateTimeInput
FileInput
GroupedCollectionSelectInput
NumericInput
PasswordInput
RangeInput
StringInput
TextInput
@theIV
theIV / as3.rake
Created March 26, 2014 17:04 — forked from otobrglez/as3.rake
# 1) Put 's3' gem in Gemfile.
# 2) Create as3.yml configuration for S3
# 3) Create initializer for as3.yml
# 4) Make "assets" folder inside your bucket
# 5) After running task run "RAILS_ENV=production rake assets:precompile"
# 6) Invoke task by running "rake as3:upload"
namespace :as3 do
desc "Uploads compiled assets (public/assets) to Amazone AS3"
task :upload do
# How to use Paperclip for generic attachment types on models in Ruby on Rails
class User < ActiveRecord::Base
has_many :user_assets
end
# example of building a model which is a generic attachment asset
@user.build_user_asset(:asset_type => "podcast", :attached_file => some_uploaded_file_data)
# make a generic asset class, with instances initialized for specific asset
@theIV
theIV / README.md
Last active December 14, 2015 03:39 — forked from ryanb/chef_solo_bootstrap.sh
@theIV
theIV / data.txt
Created January 10, 2013 23:41
dat data
zip state long lat
00001 AK 123 456
00002 AK 234 678