- 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.
- No commit pushed to the shared repository should jeopardize the ability to go live.
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:
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
-- 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 |
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
# 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 |
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
# 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: [] |
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
inputs = %w[ | |
CollectionSelectInput | |
DateTimeInput | |
FileInput | |
GroupedCollectionSelectInput | |
NumericInput | |
PasswordInput | |
RangeInput | |
StringInput | |
TextInput |
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
# 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 |
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
# 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 |
curl -L https://gist.github.com/theIV/5022219/raw/18b68d524870041138a4cc95320b99c949fd2e13/chef_solo_bootstrap.sh | bash
More context: http://railscasts.com/episodes/339-chef-solo-basics
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
zip state long lat | |
00001 AK 123 456 | |
00002 AK 234 678 |
NewerOlder