Skip to content

Instantly share code, notes, and snippets.

View brettchalupa's full-sized avatar

Brett Chalupa brettchalupa

View GitHub Profile
@t-mart
t-mart / netrw quick reference.md
Last active November 10, 2024 02:21
A quick reference for Vim's built-in netrw file selector.
Map Action
<F1> Causes Netrw to issue help
<cr> Netrw will enter the directory or read the file
<del> Netrw will attempt to remove the file/directory
- Makes Netrw go up one directory
a Toggles between normal display, hiding (suppress display of files matching g:netrw_list_hide) showing (display only files which match g:netrw_list_hide)
c Make browsing directory the current directory
C Setting the editing window
d Make a directory
@brettchalupa
brettchalupa / instructions.md
Last active January 13, 2017 03:23 — forked from wrburgess/gist:5528649
Backup Heroku Postgres database and restore to local database

How To Use Heroku Postgresql Database Locally

https://devcenter.heroku.com/articles/heroku-postgres-import-export

or

  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
@brettchalupa
brettchalupa / golang_notes.md
Created August 6, 2015 02:28
Go(lang) Notes

Notes While Learning Go(lang)

Useful Commands

  • godoc -http=:8000 - serve Go docs locally
@biscuitvile
biscuitvile / remote-pairing.md
Last active February 9, 2018 00:06
Improved Remote Pairing with Vim, Tmux and Tmate (IMO)

Improved Remote Pairing with Vim, Tmux and Tmate

Goals

  • Spin up tmux sessions for each app automatically
  • Have vim started in each tmux session
  • Have a console successfully started for Rails apps, regardless of Rails version
  • Tail the pow logs for Rails apps
  • Start Ember server and test runner for Ember apps
  • Maintain vim sessions automatically so vim is always "as we left it"
function fish_greeting
set_color green
print_weather | cowsay
end
function print_weather
if test -f .weather
set time (head -n 1 .weather)
set current (date +%s)
set diff (math $current - $time)

I highly suspect that the RSpec core team all use black backgrounds in their terminals because sometimes the colors aren’t so nice on my white terminal

I certainly use a black background. I'm not sure about the other RSpec core folks. Regardless, if there are some color changes we can make that would make output look good on a larger variety of backgrounds, we'll certainly consider that (do you have some suggested changes?). In the meantime, the colors are configurable, so you can change the colors to fit your preferences on your machine. First, create a file at

@bobbygrace
bobbygrace / trello-css-guide.md
Last active November 3, 2024 14:56
Trello CSS Guide

Hello, visitors! If you want an updated version of this styleguide in repo form with tons of real-life examples… check out Trellisheets! https://github.com/trello/trellisheets


Trello CSS Guide

“I perfectly understand our CSS. I never have any issues with cascading rules. I never have to use !important or inline styles. Even though somebody else wrote this bit of CSS, I know exactly how it works and how to extend it. Fixes are easy! I have a hard time breaking our CSS. I know exactly where to put new CSS. We use all of our CSS and it’s pretty small overall. When I delete a template, I know the exact corresponding CSS file and I can delete it all at once. Nothing gets left behind.”

You often hear updog saying stuff like this. Who’s updog? Not much, who is up with you?

@rastasheep
rastasheep / keyrepeat.shell
Last active January 1, 2020 20:09 — forked from kconragan/keyrepeat.shell
Enable key repeat in Apple Lion for Atom in Vim mode
# Mac OS X Lion introduced a new, iOS-like context menu when you press and hold a key
# that enables you to choose a character from a menu of options. If you are on Lion
# try it by pressing and holding down 'e' in any app that uses the default NSTextField
# for input.
#
# It's a nice feature and continues the blending of Mac OS X and iOS features. However,
# it's a nightmare to deal with in Atom if you're running vim mode,
# as it means you cannot press and hold h/j/k/l to move through your file. You have
# to repeatedly press the keys to navigate.
@Kartones
Kartones / postgres-cheatsheet.md
Last active November 15, 2024 21:14
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)