Skip to content

Instantly share code, notes, and snippets.

View maxboeck's full-sized avatar

Max Böck maxboeck

View GitHub Profile
@maxboeck
maxboeck / focustrap.js
Last active February 15, 2018 10:11
Reusable Focus Trap Example
// Reusable Focus Trap Method
export function createFocusTrap(el, opt = {}) {
let isActive = false
const focusableElementSelectors = [
'a[href]',
'area[href]',
'input:not([disabled])',
'select:not([disabled])',
'textarea:not([disabled])',
@maxboeck
maxboeck / settings.json
Created May 3, 2017 15:26
VScode settings
// Place your settings in this file to overwrite the default settings
{
"editor.fontSize": 16,
"editor.tabSize": 2,
"editor.lineHeight": 28,
"editor.formatOnPaste": true,
"files.exclude": {
"**/.git": true,
"**/.svn": true,
@maxboeck
maxboeck / LetItSnow
Created December 19, 2014 16:30
Festive fun for your terminal!
ruby -e 'C=`stty size`.scan(/\d+/)[1].to_i;S=["2743".to_i(16)].pack("U*");a={};puts "\033[2J";loop{a[rand(C)]=0;a.each{|x,o|;a[x]+=1;print "\033[#{o};#{x}H \033[#{a[x]};#{x}H#{S} \033[0;0H"};$stdout.flush;sleep 0.1}'
@maxboeck
maxboeck / keybase.md
Last active August 28, 2017 09:23
Slef-Verification for Keybase.io

Keybase proof

I hereby claim:

  • I am maxboeck on github.
  • I am mxb (https://keybase.io/mxb) on keybase.
  • I have a public key whose fingerprint is 2D6B F9EA CA44 6DD6 4A4E 83FF 944E 076E 5FC2 7685

To claim this, I am signing this object: