Skip to content

Instantly share code, notes, and snippets.

@lukeramsden
lukeramsden / README.md
Last active August 2, 2018 13:04 — forked from bartoszmajsak/prepare-commit-msg.sh
How to automatically prepend git commit with a branch name
curl https://gist.githubusercontent.com/lukeramsden/81e029be19a686261dda4204c8002873/raw/bff6973325b159254a3ba13c5cb9ac8fda8e382b/prepare-commit-msg.sh > ~/.git-hooks/prepare-commit-msg
chmod u+x ~/.git-hooks/prepare-commit-msg
git config --global core.hooksPath ~/.git-hooks
@lukeramsden
lukeramsden / index.js
Last active April 15, 2022 14:04
Accept All Steam Trade Offers With Steam Inventory Helper
// http://jsfiddle.net/dandv/47cbj/
function RateLimit(fn, delay, context) {
var queue = [], timer = null;
function processQueue() {
var item = queue.shift();
if (item)
fn.apply(item.context, item.arguments);
if (queue.length === 0)
clearInterval(timer), timer = null;
@lukeramsden
lukeramsden / README.md
Last active May 22, 2018 10:24
ZSH function to commit to Git

Usage:

commit                      # opens default editor for commit message
commit updated readme.md    # commits with message "updated readme.md"
@lukeramsden
lukeramsden / README.md
Last active May 22, 2018 10:22
ZSH function to commit and push to Git repo

Usage:

push                      # opens default editor for commit message, then pushes
push updated readme.md    # commits with message "updated readme.md", then pushes