Skip to content

Instantly share code, notes, and snippets.

View jthoms1's full-sized avatar
💻
Writing Code

Josh Thomas jthoms1

💻
Writing Code
View GitHub Profile
@WebReflection
WebReflection / esx.md
Last active April 9, 2024 09:37
Proposal: an ESX for JS implementation
@StefanNieuwenhuis
StefanNieuwenhuis / reactiveconf-framework-independent-components-library-with-StencilJS.md
Last active September 23, 2020 12:55
How to build a framework independent component library with StencilJS

How to build a framework independent component library with StencilJS

This is a proposal for a lightning talk at Reactive Conf. Please 🌟 this gist to push the proposal! If you're on your phone, please request the 🖥 desktop site to star this gist 😇 #ReactiveConf

@jthoms1
jthoms1 / promisify.ts
Last active October 20, 2016 20:16
Create a promise from a node async function.
export interface Promisify {
<T>(func: (callback: (err: any, result: T) => void) => void): () => Promise<T>;
<T, A1>(func: (arg1: A1, callback: (err: any, result: T) => void) => void): (arg1: A1) => Promise<T>;
<T, A1, A2>(func: (arg1: A1, arg2: A2, callback: (err: any, result: T) => void) => void): (arg1: A1, arg2: A2) => Promise<T>;
<T, A1, A2, A3>(func: (arg1: A1, arg2: A2, arg3: A3, callback: (err: any, result: T) => void) => void): (arg1: A1, arg2: A2, arg3: A3) => Promise<T>;
<T, A1, A2, A3, A4>(func: (arg1: A1, arg2: A2, arg3: A3, arg4: A4, callback: (err: any, result: T) => void) => void): (arg1: A1, arg2: A2, arg3: A3, arg4: A4) => Promise<T>;
<T, A1, A2, A3, A4, A5>(func: (arg1: A1, arg2: A2, arg3: A3, arg4: A4, arg5: A5, callback: (err: any, result: T) => void) => void): (arg1: A1, arg2: A2, arg3: A3, arg4: A4, arg5: A5) => Promise<T>;
}
/**
* @example: const rReadFile = promisify<Buffer, string>(fs.readFile);
@pi0
pi0 / colors
Last active August 4, 2022 17:35
Super Simple Node.js String Colors Support
This snippets add super Simple Node.js String Colors Support.
See here:
http://stackoverflow.com/questions/32474241/node-js-terminal-color
http://stackoverflow.com/questions/9781218/how-to-change-node-jss-console-font-color
# Hello, and welcome to makefile basics.
#
# You will learn why `make` is so great, and why, despite its "weird" syntax,
# it is actually a highly expressive, efficient, and powerful way to build
# programs.
#
# Once you're done here, go to
# http://www.gnu.org/software/make/manual/make.html
# to learn SOOOO much more.
@MohamedAlaa
MohamedAlaa / tmux-cheatsheet.markdown
Last active April 18, 2024 10:01
tmux shortcuts & cheatsheet

tmux shortcuts & cheatsheet

start new:

tmux

start new with session name:

tmux new -s myname