Skip to content

Instantly share code, notes, and snippets.

View durden's full-sized avatar

Luke Lee durden

View GitHub Profile
@ericdill
ericdill / pre-commit
Last active July 21, 2018 04:18
Pre-commit hook that reformats your code according to yapf
#!/bin/bash
# capture the changed files that have been staged
changed_files=$(git diff --staged --name-only)
echo "Changed files: ${changed_files}"
for file in ${changed_files}
do
echo "Modifying ${file}"
yapf ${file} -i
git add ${file}
done
@aroben
aroben / git-commit-editor.vim
Last active November 10, 2024 13:23
Vim script to show git commit diff in vertical split while writing commit messages
" Put this in your .vimrc and whenever you `git commit` you'll see the diff of your commit next to your commit message.
" For the most accurate diffs, use `git config --global commit.verbose true`
" BufRead seems more appropriate here but for some reason the final `wincmd p` doesn't work if we do that.
autocmd VimEnter COMMIT_EDITMSG call OpenCommitMessageDiff()
function OpenCommitMessageDiff()
" Save the contents of the z register
let old_z = getreg("z")
let old_z_type = getregtype("z")
@NorthIsUp
NorthIsUp / fuel.py
Last active October 12, 2015 01:18
Reverse engineering of the nike fuel api to get your fuel
"""
Author: [email protected]
to run you will need to install the following:
pip install requests
pip install simplejson
get the auth token and device id by sniffing the nike app syncing
with api.nike.com with charles