Skip to content

Instantly share code, notes, and snippets.

View martonpe's full-sized avatar
👾

Peter B Marton martonpe

👾
View GitHub Profile
@dfl
dfl / mysql.rake
Created April 12, 2011 04:34
rails rake tasks for dumping and reloading mysql databases
# mysql db backup and restore for rails
# by David Lowenfels <david@internautdesign.com> 4/2011
require 'yaml'
namespace :db do
def backup_prep
@directory = File.join(RAILS_ROOT, 'db', 'backup')
@db = YAML::load( File.open( File.join(RAILS_ROOT, 'config', 'database.yml') ) )[ RAILS_ENV ]
@db_params = "-u #{@db['username']} #{@db['database']}"
@rgabo
rgabo / empire_vs_elastic_beanstalk.md
Last active December 4, 2015 17:26
Empire vs Elastic Beanstalk

Reasons why we did not go with Elastic Beanstalk

tldr;

Elastic Beanstalk with Docker is great at having a standard way of running and scaling out web and worker applications, if you are OK with AWS abstractions and further lock-in. For instance, auto-scaling web apps using autoscaling group policies is extremely powerful, but I believe there is a lot of accidental complexity that comes with Elastic Beanstalk so we chose something that we believe is simpler and easier to understand or change.

not so tldr;

  1. AWS is great at taking an existing technology, wrapping it into AWS-specific concepts and creating a proprietary JSON/XML API around it. This is why ECS Task Definitions exist. Elastic Beanstalk goes one step further and creates yet another layer of API on top of ECS and ELB aptly called Dockerrun.aws.json v2. The format is proprietary and we preferred ex
@tmichel
tmichel / bash_cheatsheet.md
Created June 16, 2017 12:57
Bash cheat sheet

Shell cheat sheet

Setting up iTerm

  • Use option as meta key:

Go to Preferences->Profiles tab. Select your profile on the left, and then open the Keyboard tab. At the bottom is a set of buttons that lets you select the behavior of the Option key. For most users, Esc+ will be the best choice.

  • Setting up word-by-word movement with Option+: