Skip to content

Instantly share code, notes, and snippets.

View hoetmaaiers's full-sized avatar

Hoetmaaiers hoetmaaiers

View GitHub Profile
@hoetmaaiers
hoetmaaiers / ulimit.md
Last active August 29, 2015 14:27
ulimit issues

ulimit -n ulimit -n 512

WEB 101 workhop part 1 - prerequisites

If you want to join the first workshop and get your hands dirty in the handson part, ensure the following is ready on your computer:

@hoetmaaiers
hoetmaaiers / hands-on-promise-solution.md
Last active February 23, 2016 20:58
Promise solution

Promise solution

/**
 * HANDSON Promises: provide more levels to the game
 *
 * We have some cool levels waiting for you at the following urls:
 * - 'http://localhost:8080/levels/basic.json'
 * - 'http://localhost:8080/levels/easy-start.json'
 * - 'http://localhost:8080/levels/hard-to-get-drunk.json'

Import solution

custom-levels/my-level.js

/**
 * Create your level from these building blocks:
 *
 * Legende:
 *   @ = Player start position
 *   o = Coins

app.js

// import styles
import '../styles/app.css';

// import dependencies
import { polyfill as promisePolyfill} from 'es6-promise';
import fetch from 'isomorphic-fetch';

Design developer friendly

Zeplin FTW

Icons

  • svg icons please
  • ids / classes voor stijlbare groepen, dit maakt de svg stijlbaar en herbruikbaar
  • wanneer oude browsers (<IE9) moet voor elk icoon ook een .png variant voorzien worden (Zeplin)
@hoetmaaiers
hoetmaaiers / ios-version.js
Created July 7, 2016 12:51 — forked from Craga89/ios-version.js
JavaScript iOS version detection
/*
* Outputs a float representing the iOS version if user is using an iOS browser i.e. iPhone, iPad
* Possible values include:
* 3 - v3.0
* 4.0 - v4.0
* 4.14 - v4.1.4
* false - Not iOS
*/
var iOS = parseFloat(

Run bash inside running container.

docker exec -it CONTAINER_ID /bin/bash

Buliding efficient Dockerfiles for node

@hoetmaaiers
hoetmaaiers / fibonacci-while.js
Created February 9, 2017 15:16
Fibonacci calculations
function fib(end) {
const range = [0, 1];
while (range[range.length - 1] < end) {
const prev = range[range.length - 1];
const prevPrev = range[range.length - 2];
range.push(prev + prevPrev);
}
return range;
@hoetmaaiers
hoetmaaiers / overview.md
Last active August 29, 2022 07:28
Webstorm live templates

React Native Live Templates for WebStorm

How to add Live Template in Webstorm

  1. open preferences
  2. editor> live templates
  3. add template group for React Native
  4. add templates below to the new group
  5. define context > javascript
  6. edit variables > add "fileNameWithoutExtension" to "$fnName$"