Skip to content

Instantly share code, notes, and snippets.

View simonbuchan's full-sized avatar

Simon Buchan simonbuchan

  • Skilitics
  • Christchurch, New Zeleand
View GitHub Profile
@simonbuchan
simonbuchan / drawable.ts
Created May 18, 2017 01:02
Using type guards with bitmasks
const TYPE_MASK = 0xFFFF;
const TEXT_TYPE = 1;
const IMAGE_TYPE = 2;
const IS_SIZED = 1 << 16;
const IS_COLORED = 1 << 17;
const HAS_CHILDREN = 1 << 18;
interface IDrawable {
tag: number;
}
@simonbuchan
simonbuchan / gist:9eb7f25d706b48675b33
Created July 8, 2015 00:19
npm#7562 npm-debug.log
4002 silly gunzTarPerm modified mode [ 'node_modules/node-gyp/gyp/buildbot/aosp_manifest.xml',
4002 silly gunzTarPerm 420,
4002 silly gunzTarPerm 438 ]
4003 silly gunzTarPerm extractEntry node_modules/node-gyp/gyp/buildbot/buildbot_run.py
4004 silly gunzTarPerm modified mode [ 'node_modules/node-gyp/gyp/buildbot/buildbot_run.py',
4004 silly gunzTarPerm 493,
4004 silly gunzTarPerm 511 ]
4005 silly gunzTarPerm extractEntry node_modules/node-gyp/gyp/buildbot/commit_queue/README
4006 silly gunzTarPerm modified mode [ 'node_modules/node-gyp/gyp/buildbot/commit_queue/README',
4006 silly gunzTarPerm 420,