Skip to content

Instantly share code, notes, and snippets.

🎯
Focusing

Wing wingleung

🎯
Focusing
Block or report user

Report or block wingleung

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
@wingleung
wingleung / generateToken.js
Created Jul 17, 2018
Generates an Authentication Token from username and password for basic authentication
View generateToken.js
'use strict';
const ENCODING = 'base64';
function token(user, pass) {
return base64([user, pass].join(':'));
}
function base64(string) {
return new Buffer(string).toString(ENCODING);
@wingleung
wingleung / prepare-commit-msg.sh
Last active Dec 10, 2019
Automatically prepend JIRA issue key to commit message
View prepare-commit-msg.sh
#!/bin/sh
#
# Automatically adds Jira key to commit message
#
if [ -z "$BRANCHES_TO_SKIP" ]; then
BRANCHES_TO_SKIP=(master develop)
fi
BRANCH_NAME=$(git symbolic-ref --short HEAD)
You can’t perform that action at this time.