Skip to content

Instantly share code, notes, and snippets.

View jamie-ga's full-sized avatar

Jamie Weatherby jamie-ga

View GitHub Profile
@jamie-ga
jamie-ga / rm_pip_commits.vim
Last active August 29, 2015 14:26
In pip freeze > requirements.txt, the specific commit used is included. This one-liner removes that and preserves the useful info.
%s/@[^@#]*#egg/#egg/g
@jamie-ga
jamie-ga / all_pdb_variables.py
Created July 21, 2015 17:28
Printing all the local variables in pdb.set_trace()
{k: v for k,v in locals().iteritems() if '__' not in k and 'pdb' not in k}
@jamie-ga
jamie-ga / tmux.conf
Last active June 30, 2016 23:12
Personal Vim Config for python development (still in progress)
# 0 is too far from ` ;)
set-option -g prefix F10
set -g base-index 1
# Automatically set window title
set-window-option -g automatic-rename on
set-option -g set-titles on
#set -g default-terminal screen-256color
set -g status-keys vi
@DanHerbert
DanHerbert / fix-homebrew-npm.md
Last active June 4, 2024 04:16
Instructions on how to fix npm if you've installed Node through Homebrew on Mac OS X or Linuxbrew

OBSOLETE

This entire guide is based on an old version of Homebrew/Node and no longer applies. It was only ever intended to fix a specific error message which has since been fixed. I've kept it here for historical purposes, but it should no longer be used. Homebrew maintainers have fixed things and the options mentioned don't exist and won't work.

I still believe it is better to manually install npm separately since having a generic package manager maintain another package manager is a bad idea, but the instructions below don't explain how to do that.

Fixing npm On Mac OS X for Homebrew Users

Installing node through Homebrew can cause problems with npm for globally installed packages. To fix it quickly, use the solution below. An explanation is also included at the end of this document.

@iros
iros / API.md
Created August 22, 2012 14:42
Documenting your REST API

Title

<Additional information about your API call. Try to use verbs that match both request type (fetching vs modifying) and plurality (one vs multiple).>

  • URL

    <The URL Structure (path only, no root url)>

  • Method: