Skip to content

Instantly share code, notes, and snippets.

View chrisweight's full-sized avatar

Chris Weight chrisweight

View GitHub Profile
@chrisweight
chrisweight / index.js
Created November 9, 2018 14:48
Testing NPX running a Gist directly from the terminal...
#!/usr/bin/env node
console.log('Running a gist directly in your terminal via npx? Are you MAD! ;)');
@chrisweight
chrisweight / main.ts
Last active October 17, 2018 09:35
Ready Resolver Pattern
export class SomeAsyncClass {
private _ready: Promise<void>;
private _readyResolver: Function;
constructor() {
this._ready = new Promise(resolve => (this._readyResolver = resolve));
this.init();
}
private async init() {

Keybase proof

I hereby claim:

  • I am chrisweight on github.
  • I am chrisweight (https://keybase.io/chrisweight) on keybase.
  • I have a public key ASCZkqdOXnHSqp56JQ6GyxM49LfmV9fS9RsprhFzI2mhLQo

To claim this, I am signing this object: