Skip to content

Instantly share code, notes, and snippets.

View joutvhu's full-sized avatar

Giáo Hồ joutvhu

View GitHub Profile
  • Disable git hooks
git config core.hooksPath no-hooks
  • Re-enable git hooks
git config --unset core.hooksPath
  • Create a get-base64.js file with the content as below
const fs = require('fs');

console.log(fs.readFileSync(
	'<file path>',
	{encoding: 'base64'}
));
def commandLineOf(command, terminal = null) {
    if (System.properties['os.name'].toLowerCase().contains('windows')) {
        return ['cmd', '/c', command]
    } else if (terminal != null) {
        return ['bash', '-c', terminal]
    } else {
        return ['bash', '-c', command]
    }
}