Skip to content

Instantly share code, notes, and snippets.

Did you know your webapp had superpowers? by Szmozsánszky István (Flaki), Frontend Trainer @ DPC Consulting

Progressive Webapps' are just the nicer-sounding version of 'YES, the web can now do that too!' to inquiries about features that were previously reserved for native apps only.. but we are well past that point when offline-first or even native web-based push notifications were news. The unstoppable evolution of web technologies have moved onto greener pastures: storage improvements, improved JavaScript hardware access and new low-level APIs (like service workers themselves) make it possible to shout into your phone to control a game, transpile unsupported JavaScript features on demand and some other exciting/handy/futuristic usecases we are going to explore.

nolan pwa https://nolanlawson.github.io/pwas-2016-05-hackerlounge/ live streamed tomorrow

@flaki
flaki / angular.sh
Last active July 2, 2016 07:36
Angular project bootstrap via NPM
$ npm init
# Enter, enter...
$ npm install --save angular
$ npm install --save-dev angular-mocks
$ npm install -g karma-cli
$ npm install --save-dev karma mocha karma-mocha chai karma-chai
@flaki
flaki / init.coffee
Created July 18, 2015 14:36
Atom on Windows and Hungarian keyboard layout AltGr+<key> keybinding fix - add this to your init.coffee
# Your init script
# Fixes AltGr problems on Hungarian keyboard layouts in Windows
# for characters [ (AltGr+F), < (AltGr+M), \ (AltGr+Q) and { (AltGr+B)
atom.keymaps.keyBindings = atom.keymaps.keyBindings.filter((binding, i) ->
['ctrl-alt-f','ctrl-alt-q','ctrl-alt-b','ctrl-alt-m'].indexOf(binding.keystrokes) == - 1
)
@flaki
flaki / README.md
Last active March 23, 2017 16:03
Animate the Mozilla.org CSS Grid demo!

How To Use?

  1. Navigate to Mozilla.org's CSS Grid demo page
  2. In Firefox, open devtools and create a new stylesheet. Copy grid-logo-animate.css's contents in there!
    • Alternatively you can copy/paste grid-logo-animate.js into the devtools console and hit enter—this should work in any browser.
  3. Hover the logo, watch it fade away.
  4. Lean back, move your cursor off the logo, and enjoy!
@flaki
flaki / undefined.js
Created April 5, 2017 06:20
Shadowing undefined
(function() {
// Won't work, 'undefined' is a property on the global object, but it's unconfigurable (not modifiable)
try {
Object.defineProperty(window, 'undefined', { value: 42 });
} catch (e) { console.log(e.toString()) }
// But 'undefined' could be still shadowed, because it's not a keyword - its name is usable as an identifier
var undefined = 42;
// foo is a non-existent property on the window object
@flaki
flaki / README.md
Created January 30, 2018 06:43
Clouduboy perf timing demo for the Arduboy

Clouduboy perf timing demo

The interesting bits are:

game.custom({
  arduboy: `{ long now=millis()`
});

// and
@flaki
flaki / doggo.microcanvas.js
Created March 10, 2018 14:51
Tamagotchi with MicroCanvas
"use strict";
let game = new MicroCanvas();
let gfxGotchi, gfxGotchiFlip, gfxBone;
game.setup(function(game) {
gfxGotchi = game.loadSprite(`! gotchi 16x16
##............##
.#.....###.#####
@flaki
flaki / clouduboy-workshop-docs.md
Last active May 15, 2018 16:13
Clouduboy Workshop Docs
@flaki
flaki / quickstart.md
Created January 20, 2017 15:15
How to node on the PocketCHIP

How to node on the PocketCHIP?

Install node.js

Install node from NodeSource PPA

curl -sL https://deb.nodesource.com/setup_7.x | sudo -E bash -
sudo apt-get install -y nodejs
@flaki
flaki / wasm-cg.md
Last active April 17, 2019 00:46
WebAssembly CG TLDR

TL;DR: WebAssembly CG Meeting, April 16, 2019

  • Agenda
  • Dan Gohman, Mozilla was voted to Chair the WASI subgroup with unanimous consent
  • Proposal for a second chair (Co-chair), Sam Clegg, Google volunteered but decision was postponed until the next meeting
  • A vote was proposed for adopting the WASI subgroup charter and was accepted without objections
  • A vote was proposed for landing the reference libc implementation for WASI, but eventually postponed. The implementation uses MUSL that is MIT licensed, with no precedence of MIT-licensed code in the codebase before. Vote was postponed until after consulting with legal for guidance on this, and the various other licenses in use/included currently.