Skip to content

Instantly share code, notes, and snippets.

View wingleung's full-sized avatar

Wing wingleung

View GitHub Profile
@wingleung
wingleung / prepare-commit-msg.sh
Last active October 30, 2023 08:50
Automatically prepend JIRA issue key to commit message
#!/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)
@wingleung
wingleung / generateToken.js
Created July 17, 2018 15:58
Generates an Authentication Token from username and password for basic authentication
'use strict';
const ENCODING = 'base64';
function token(user, pass) {
return base64([user, pass].join(':'));
}
function base64(string) {
return new Buffer(string).toString(ENCODING);
@mixin neumorphism($background) {
$highlight: lighten($background, 4%);
$lowlight: darken($background, 4%);
$shadowhigh: lighten($background, 9%);
$shadowlow: darken($background, 9%);
background: linear-gradient(145deg, $highlight, $lowlight);
box-shadow: 2em 2em 4em $shadowlow, -2em -2em 4em $shadowhigh;
}