Skip to content

Instantly share code, notes, and snippets.


Brett Chalupa brettchalupa

View GitHub Profile
brettchalupa / db_import.rake
Last active Oct 18, 2017
A Simple Rake Task for Importing Heroku Postgres Databases Locally for Rails Apps
View db_import.rake
# lib/tasks/db_import.rake
namespace :db do
namespace :import do
desc 'Import Heroku Staging database locally'
task :staging do
import_db('staging', 'YOUR_STAGING_HEROKU_APP_HERE')
desc 'Import Heroku Production database locally'
task :production do
brettchalupa / config.yml
Created Sep 15, 2016
Shopify Theme Kit config example for screencast (
View config.yml
password: add-password-in-config
theme_id: "live"
bucket_size: 40
refill_rate: 2
- "*.swp"
- "*~"
- "config/settings_data.json"
brettchalupa / Rakefile
Created Mar 14, 2016
Testing Rake tasks with RSpec examples from the talk I gave at Test Ruby PDX in March 2016. See more here:
View Rakefile
require_relative 'greeter'
desc 'Outputs a greeting to stdout'
task :hello do
brettchalupa / gist:e9245a1d9e5f0cdeda4c
Created Jan 14, 2016 — forked from jimbojsb/gist:1630790
Code highlighting for Keynote presentations
View gist:e9245a1d9e5f0cdeda4c

Step 0:

Get Homebrew installed on your mac if you don't already have it

Step 1:

Install highlight. "brew install highlight". (This brings down Lua and Boost as well)

Step 2:

brettchalupa /
Last active Jan 13, 2017 — forked from wrburgess/gist:5528649
Backup Heroku Postgres database and restore to local database

How To Use Heroku Postgresql Database Locally


  1. Create a new database backup - heroku pg:backups capture
  2. Request and copy the URL - heroku pg:backups public-url
  3. Download the database backup - curl "[the url]" > tmp/db.dump
  4. Restore the backup - pg_restore --verbose --clean --no-acl --no-owner -h localhost -d [db_name] tmp/db.dump

Notes While Learning Go(lang)

Useful Commands

  • godoc -http=:8000 - serve Go docs locally
View x.rb
class X
attr_accessor :i
def initialize
@i = 0
def work(e)
@i += e
View tmux-cheatsheet.markdown

tmux shortcuts & cheatsheet

start new:


start new with session name:

tmux new -s myname
brettchalupa /
Created Jan 30, 2014
Curry checks that committers in a GitHub Pull Request have signed Chef's CLA in Super Market.


Curry checks that committers in a GitHub Pull Request have signed Chef's CLA in Super Market.


The general goal of curry is to verify that committer(s) opening a pull request in a Chef Inc. repo have signed a CLA. If they have signed a CLA, Super Market will leave a comment letting Chef Inc. know that the user has signed a CLA. If they have not, Super Market will leave a comment letting Chef Inc. and the committer(s) know they have not signed a CLA, while instructing the committer(s) to sign a CLA. When the Pull Request is opened, a ticket is opened in the ticket tracking system being used (in Chef's case, JIRA).

Major parts of Curry include:

View Better security

Better security practices:

  • unique and strong passwords
  • unassociate credit cards with online vendors (Amazon, PayPal, etc.)
  • enable two factor auth wherever possible
  • delete old and unused accounts
You can’t perform that action at this time.