This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# | |
# Borrowed largely from the PeepCode prompt: | |
# http://peepcode.com/blog/2012/my-command-line-prompt | |
# | |
function +vi-git-status() { | |
# Check for untracked files or updated submodules since vcs_info does not. | |
if [[ -n $(git ls-files --other --exclude-standard 2> /dev/null) ]]; then | |
hook_com[unstaged]=' %F{8}✗%f' |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Source Prezto. | |
if [[ -s "${ZDOTDIR:-$HOME}/.zprezto/init.zsh" ]]; then | |
source "${ZDOTDIR:-$HOME}/.zprezto/init.zsh" | |
fi | |
# Initialize virtualenvwrapper | |
export VIRTUALENVWRAPPER_PYTHON="/usr/local/bin/python3" | |
export WORKON_HOME=$HOME/.virtualenvs | |
export PROJECT_HOME=$HOME/Devel | |
source /usr/local/bin/virtualenvwrapper.sh |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# | |
# Executes commands at login pre-zshrc. | |
# | |
# Authors: | |
# Sorin Ionescu <[email protected]> | |
# | |
# | |
# Browser | |
# |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# | |
# Sets Prezto options. | |
# | |
# Authors: | |
# Sorin Ionescu <[email protected]> | |
# | |
# | |
# General | |
# |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
" Python indent file | |
" Language: Python | |
" Maintainer: Eric Mc Sween <[email protected]> | |
" Original Author: David Bustos <[email protected]> | |
" Last Change: 2004 Jun 07 | |
" Only load this indent file when no other was loaded. | |
if exists("b:did_indent") | |
finish | |
endif |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class UserSerializer(serializers.ModelSerializer): | |
password = serializers.CharField( | |
min_length=6, write_only=True, required=False) | |
class Meta: | |
model = User | |
fields = ('id', 'first_name', 'last_name', 'password') | |
def create(self, validated_data): | |
password = validated_data.pop('password', None) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
def calc(principal, fee_pct, avg_growth_pct, annual_contrib, years): | |
""" | |
>>> calc(10000, 1.5, 7, 5500, 35) | |
(154256.73, 48243.27) | |
>>> calc(10000, 1.0, 7, 5500, 35) | |
(168507.21, 33992.79) | |
>>> calc(10000, 0.5, 7, 5500, 35) | |
(184508.4, 17991.6) | |
""" | |
fee = fee_pct / 100 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
python << EOF | |
import vim | |
import re | |
ipdb_breakpoint = 'import ipdb; ipdb.set_trace()' | |
def set_breakpoint(): | |
breakpoint_line = int(vim.eval('line(".")')) - 1 | |
current_line = vim.current.line |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
scriptencoding utf-8 | |
" vim setting overrides | |
" Dustin Farris Nov 19 2011 | |
syntax on | |
set rtp+=~/.vim/bundle/Vundle.vim | |
call vundle#begin() | |
" Vundles |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
MASTER_BRANCH="master" | |
function new_issue() { | |
# | |
# Create a new branch from master using the provided name | |
# | |
if [ -z $2 ]; then | |
echo "Usage: `basename $1` new <new-issue-name>" |