Skip to content

Instantly share code, notes, and snippets.


Wing wingleung

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 / 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 /
Last active Dec 10, 2019
Automatically prepend JIRA issue key to commit message
# Automatically adds Jira key to commit message
if [ -z "$BRANCHES_TO_SKIP" ]; then
BRANCHES_TO_SKIP=(master develop)
BRANCH_NAME=$(git symbolic-ref --short HEAD)
You can’t perform that action at this time.