Skip to content

Instantly share code, notes, and snippets.

View joutvhu's full-sized avatar
💭
I may be slow to respond.

Giáo Hồ joutvhu

💭
I may be slow to respond.
View GitHub Profile
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]
    }
}
  • Create a get-base64.js file with the content as below
const fs = require('fs');

console.log(fs.readFileSync(
	'<file path>',
	{encoding: 'base64'}
));
  • Disable git hooks
git config core.hooksPath no-hooks
  • Re-enable git hooks
git config --unset core.hooksPath