Skip to content

Instantly share code, notes, and snippets.

@dberstein
dberstein / README.md
Last active November 12, 2023 09:01
Git commit hook that prepends message with Jira issue(s) found in branch name (PR branch) otherwise requires message contains at least one Jira issue

With this commit-msg git hook and your branch names have Jira reference(s), your commit messages will be automatically updated to include any missing reference(s) too.

Installation

Place contents of this gist's commit-msg file into your checkout's .git/hooks/commit-msg file and make it executable.

Bash

cd path/to/your/git/checkout \
&& install -vbm 755 <(curl -s https://gist.githubusercontent.com/dberstein/dcc50e171163c3f6e0f23b2b5de5dd49/raw/5e5372ff22a872321ad1f5469a4d579c15ce498a/commit-msg) "$(git rev-parse --git-dir)/hooks/commit-msg"
@dberstein
dberstein / tweet-shindanmaker.js
Created June 27, 2011 18:01 — forked from ucnv/tweet-shindanmaker.js
phantomjs script to tweet through shindanmaker.com
var tweet;
var twitter_id = "";
var twitter_pw = "";
var phase;
var setState = function(nextPhase) {
var s = {tweet: tweet, twitter_id: twitter_id, twitter_pw: twitter_pw, phase: nextPhase};
phantom.state = JSON.stringify(s);
};
if(!phantom.state.length) {
var i, args = Array.prototype.slice.apply(phantom.args);