Skip to content

Instantly share code, notes, and snippets.

View brettchalupa's full-sized avatar

Brett Chalupa brettchalupa

View GitHub Profile
@Kartones
Kartones / postgres-cheatsheet.md
Last active July 17, 2025 06:54
PostgreSQL command line cheatsheet

PSQL

Magic words:

psql -U postgres

Some interesting flags (to see all, use -h or --help depending on your psql version):

  • -E: will describe the underlaying queries of the \ commands (cool for learning!)
  • -l: psql will list all databases and then exit (useful if the user you connect with doesn't has a default database, like at AWS RDS)
@btm
btm / gist:9532345
Last active August 29, 2015 13:57
Cookbook Namspacing
I wrote this on 2010-10-01, and I've been passing it around as the entry to my opinion on why we need namespacing on the community site. Maybe it's a terrible argument since we haven't implemented it yet, but it's a lot of words that I can save myself from typing over again.
I thought there were tickets or mailing list posts with opposition to namespacing, but I can't find them. Drop them in the comments if you know of any please.
Bryan McLellan <[email protected]>
###
Earlier in the week we had a meeting (you guys rock) at HQ about
cookbook workflow and one of the subjects we discussed heavily was
cookbook namespace on the cookbook site. At the end of the meeting I

tmux shortcuts & cheatsheet

start new:

tmux

start new with session name:

tmux new -s myname
@brettchalupa
brettchalupa / curry.md
Created January 30, 2014 17:22
Curry checks that committers in a GitHub Pull Request have signed Chef's CLA in Super Market.

Curry

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

Intro

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:

@brettchalupa
brettchalupa / technologies_to_watch.md
Created January 30, 2014 01:32
Interesting technologies to watch.
@jbenet
jbenet / simple-git-branching-model.md
Last active May 3, 2025 18:07
a simple git branching model

a simple git branching model (written in 2013)

This is a very simple git workflow. It (and variants) is in use by many people. I settled on it after using it very effectively at Athena. GitHub does something similar; Zach Holman mentioned it in this talk.

Update: Woah, thanks for all the attention. Didn't expect this simple rant to get popular.

@wrburgess
wrburgess / gist:5528649
Last active September 13, 2024 19:00
Backup Heroku Postgres database and restore to local database

Grab new backup of database

Command: heroku pgbackups:capture --remote production

Response: >>> HEROKU_POSTGRESQL_COLOR_URL (DATABASE_URL) ----backup---> a712

Get url of backup download

Command: heroku pgbackups:url [db_key] --remote production

@ktheory
ktheory / Gemfile
Last active December 14, 2015 12:38
Rack::Attack heroku demo w/ Redis
source 'https://rubygems.org'
gem 'rack-attack', :ref => '1c01e6097ce18f486d887ebbeb9f0c4b434cd8f5', :git => 'https://github.com/kickstarter/rack-attack.git'
gem 'redis-activesupport'
@brettchalupa
brettchalupa / .vimrc
Last active December 14, 2015 04:49
vim config vimrc
execute pathogen#infect()
syntax enable
set hidden
set t_Co=256 " enable 256 color support
set textwidth=80 " set the textwidth char to wrap at
set ts=2 " set the tab spacing to be 2 chars
set shiftwidth=2 " set the shiftwidth to be 2 chars
set wrapmargin=0
set number " display line numbers
set expandtab
@brettchalupa
brettchalupa / developer_resources.md
Last active December 12, 2015 09:19
a list of resources for web application and web site developers. for front-end, back-end and everything in-between.