Skip to content

Instantly share code, notes, and snippets.

ActionMailer::Base.add_delivery_method :ses, AWS::SES::Base, :access_key_id => ENV['AWSKEY'], :secret_access_key => ENV['AWSSEC']
CarrierWave.configure do |config|
config.fog_credentials = {
:provider => 'AWS', # required
:aws_access_key_id => ENV['AWSKEY'], # required
:aws_secret_access_key => ENV['AWSSEC'], # required
:region => 'us-east-1' # optional, defaults to 'us-east-1'
}
# config.fog_directory = 'temp-cm' # required
config.fog_public = false # optional, defaults to true
# config.fog_attributes = {'Cache-Control'=>'max-age=315576000'} # optional, defaults to {}
<%= javascript_include_tag "https://maps.googleapis.com/maps/api/js?key=#{GOOGLEKEY}&sensor=false" %>
<div id="map">
<div id="map_canvas"></div>
</div>
html { height: 100% }
body { height: 100%; margin: 0; padding: 0 }
#map
@chyld
chyld / branch.rb
Last active March 22, 2018 03:29
# encoding: utf-8
branches = STDIN.read.chomp
if !branches.empty?
branch = branches.split("\n").map(&:strip)[0].split(' ').map(&:strip)[-1]
second_line = branches.split("\n").map(&:strip)[1]
is_clean = second_line == "nothing to commit, working directory clean"
if !branches.empty?
if is_clean
puts " ✓ #{branch}"
else
@chyld
chyld / bash_profile
Last active December 11, 2015 18:09
txtblk='\[\e[0;30m\]' # Black
txtred='\[\e[0;31m\]' # Red
txtgrn='\[\e[0;32m\]' # Green
txtylw='\[\e[0;33m\]' # Yellow
txtblu='\[\e[0;34m\]' # Blue
txtpur='\[\e[0;35m\]' # Purple
txtcyn='\[\e[0;36m\]' # Cyan
txtwht='\[\e[0;37m\]' # White
txtrst='\[\e[0m\]' # Text Reset
@sfate
sfate / vim-on-heroku.sh
Created June 7, 2012 14:39 — forked from naaman/vim-on-heroku.sh
vim on heroku
#!/usr/bin/env bash
curl https://s3.amazonaws.com/heroku-jvm-buildpack-vi/vim-7.3.tar.gz --output vim.tar.gz
mkdir vim && tar xzvf vim.tar.gz -C vim
export PATH=$PATH:/app/vim/bin