pre-tab behaviors
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
.Net Core Tools | |
Add jsdoc comments | |
ASP.Net Core Snippets | |
ASP.Net core VS Code Extension Pack | |
ASP.Net Helper | |
AutoHotkey | |
Beautify | |
Better Comments | |
C# | |
C# Extensions |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
curl https://raw.githubusercontent.com/cleanbrowsing/dnsperftest/master/dnstest.sh | bash | sort -k 22 -n |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var CancelablePromise = (function(){ | |
var cancelledPromiseSymbol = Symbol('PROMISE_CANCELLED'); | |
function createTypeError(message) { | |
var error = new TypeError(message); | |
var stack = error.stack.split('\n'); | |
stack.splice(1, 1); | |
stack[1] = stack[1].replace(/:\d+:\d+\)$/, ')'); | |
error.stack = stack.join('\n'); | |
throw error; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"presets": [ | |
[ | |
"env", | |
{ | |
"loose": true, | |
"targets": { | |
"node": "6.10.3" | |
} | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// logger - https://gist.github.com/tracker1/655be1ac690d23988816a48d52e91550 | |
import log from './logger'; | |
async function main() { | |
// TODO: main processes | |
} | |
let cleanedUp = false; | |
async function cleanup(error) { | |
if (error) log.fatal(error); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import console from 'console'; | |
import process from 'process'; | |
import util from 'util'; | |
import fclone from 'fclone'; | |
import rollingFile from 'rolling-file'; | |
import mkdirp from 'mkdirp'; | |
import { packageBase } from './pkg'; | |
export const LEVELS = Object.seal({ | |
FATAL: 1000, |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// TODO: add process.nextTick foo so that this doesn't block as long | |
import iconv from 'iconv-lite'; | |
// UTF8 BOM - 0xEF, 0xBB, 0xBF | |
// UTF16 BOM - 0xFE, 0xFF | |
// UTF16le BOM = 0xFF, 0xFE | |
export default async function readTextFromBuffer(buffer) { | |
if (!(buffer instanceof Buffer)) throw new Error('Input is not a buffer'); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// for reference: | |
// https://www.bignerdranch.com/blog/asyncing-feeling-about-javascript-generators/ | |
// https://gist.github.com/nybblr/3af62797052c42f7090b4f8614b5e157#gistcomment-2044311 | |
const destreamify = async (stream, callback) => { | |
for await (let event of stream) { | |
callback(event); | |
} | |
}; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
// Enable/disable JavaScript validation. | |
// using eslint plugin instead | |
"javascript.validate.enable": false, | |
"files.autoSave": "off", | |
"editor.tabSize": 2, | |
"editor.fontFamily": "Inconsolata, Menlo, Monaco, 'Courier New', monospace", |