Skip to content

Instantly share code, notes, and snippets.

View kvermeille's full-sized avatar
:bowtie:
Kicking Butt

Ken Vermeille kvermeille

:bowtie:
Kicking Butt
View GitHub Profile
@kvermeille
kvermeille / postinstall.js
Created May 9, 2019 23:47 — forked from jaredpalmer/postinstall.js
React Native Web x TypeScript
// ./postinstall.js
'use strict';
const fs = require('fs');
const RN_TSD = __dirname + '/node_modules/@types/react-native/index.d.ts';
const raw = fs.readFileSync(RN_TSD);
// Fix @types/node conflict
// @see https://github.com/DefinitelyTyped/DefinitelyTyped/issues/15960
@kvermeille
kvermeille / custom-error.js
Last active February 12, 2016 06:04 — forked from justmoon/custom-error.js
Creating custom Error classes in Node.js
'use strict';
module.exports = function VError(message, extra) {
Error.captureStackTrace(this, this.constructor);
this.name = this.constructor.name;
this.message = message;
this.extra = extra;
};
require('util').inherits(module.exports, Error);
@kvermeille
kvermeille / bruteforceZip.js
Created December 28, 2015 16:01
A naive nodejs script to brute force password protected zip files, with all password that match /[a-z]+/
// zipping:
// zip -e target.zip file.something #...prompt for password
// unzipping:
// 7z e target.zip -pPASSWORD
////////////////////
function Dictionary(ab) {
this.ab = ab;