Skip to content

Instantly share code, notes, and snippets.

View adamprocter's full-sized avatar
💭
making and promoting nodenogg.in!

Adam Procter adamprocter

💭
making and promoting nodenogg.in!
View GitHub Profile
@loilo
loilo / shortcut.md
Last active April 30, 2021 16:28
Vue Global Keyboard Shortcut Mixin

Vue Global Keyboard Shortcut Mixin

This is a Vue.js mixin (or rather, a mixin factory) for simple keyboard shortcuts.

Features:

  • Tiny (<0.5 KB minified & gzipped)
  • Super easy to use
  • Proper restrictions (does not trigger when modifier keys don't match exactly or when an element has focus)

Note that this mixin targets modern browsers. If you need legacy browser support, you need to use a transpiler like Babel with the according polyfills.

@timblair
timblair / 20150820-go-workshop-notes.md
Created August 21, 2015 09:22
2015-08-20: Go Workshop Notes

2015-08-20: Go Workshop Notes

Variables and Types

  • Type gives the compiler two things: size + representation. The compiler guarantees these types