Skip to content

Instantly share code, notes, and snippets.

View bermanboris's full-sized avatar
🎯
Hyper Focusing

Boris Berman bermanboris

🎯
Hyper Focusing
  • Earth
View GitHub Profile
function translateError(msg) {
var newErr = new Error(msg); // placed here to get correct stack
return e => {
newErr.originalError = e;
throw newErr;
}
}
async function asyncTask() {
const user = await UserModel.findById(1).catch(translateError('No user found'))
@mnn
mnn / JoiFromTypeScript.hs
Created January 20, 2017 12:34
JoiFromTypeScript - Converts TypeScript interface and type statements to Joi schema generators.
#!/usr/bin/env runhaskell
{-|
Module : JoiFromTypeScript
Description : Converts TypeScript interface and type statements to Joi schema generators.
Copyright : monnef
Maintainer : [email protected]
Stability : experimental
= Dependencies
@christiannaths
christiannaths / webpack-symlink-trick.md
Last active October 8, 2017 19:59
Webpack: avoid relative import paths by symlinking a shortcut
@lordneon
lordneon / esp8266.py
Created October 29, 2018 20:55
Parses ESP8266 firmware blobs in IDA. Drop this file into the loaders directory.
#!/usr/bin/python
# esptool imports
from __future__ import division, print_function
import argparse
import base64
import binascii
import copy
import hashlib