Skip to content

Instantly share code, notes, and snippets.

View angeal185's full-sized avatar

Angeal185 angeal185

View GitHub Profile
@angeal185
angeal185 / nodemon.json
Created May 6, 2017 17:57
nodemon.json
{
"restartable": "rs",
"ignore": [
".git",
"node_modules/**/node_modules"
],
"verbose": true,
"execMap": {
"js": "node --harmony"
},
window.onload = ->
preloadImages = undefined
preloadImages = (array, waitForOtherResources, timeout) ->
imgs = undefined
list = undefined
loadNow = undefined
loaded = undefined
t = undefined
timer = undefined
loaded = false
@angeal185
angeal185 / gulp-minifyHBS.js
Created May 6, 2017 18:11
gulp task to minify .hbs
var gulp = require('gulp');
var htmlmin = require('gulp-htmlmin');
gulp.task('minifyHbs', function() {
return gulp.src('dev/templates/**/*.hbs')
.pipe(htmlmin({
collapseWhitespace: true,
removeComments: true,
@angeal185
angeal185 / chacha20-poly1305.js
Created May 6, 2019 13:05
nodejs chacha20-poly1305 encrypt decrypt example
const crypto = require('crypto');
let key = crypto.randomBytes(32),
text = 'test';
function encChaPoly(key, data, cb){
try {
let iv = crypto.randomBytes(12),
cipher = crypto.createCipheriv('chacha20-poly1305', key, iv, {
authTagLength: 16
@angeal185
angeal185 / electron.json
Created June 28, 2019 04:50
electron config
{
"width": 800,
"height": 600,
"useContentSize": false,
"center": true,
"minWidth": 0,
"minHeight": 0,
"resizable": true,
"movable": true,
"minimizable":true,