Skip to content

Instantly share code, notes, and snippets.

Hoetmaaiers hoetmaaiers

Block or report user

Report or block hoetmaaiers

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
@hoetmaaiers
hoetmaaiers / spec.md
Last active Nov 8, 2017
iCapps - JSON request/response specification
View spec.md

iCapps - JSON request/response specification

Goals

The goal is to specify a consistent api request/repsonse cycle while keeping enough room for project specific implementation.

General rules

  • Every property is always returned in the response, even when null.
@hoetmaaiers
hoetmaaiers / overview.md
Last active Aug 5, 2019
Webstorm live templates
View overview.md

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$"
View fibonacci-while.js
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;
View docker-tips-n-tricks.md

Run bash inside running container.

docker exec -it CONTAINER_ID /bin/bash

Buliding efficient Dockerfiles for node

@hoetmaaiers
hoetmaaiers / ios-version.js
Created Jul 7, 2016 — forked from Craga89/ios-version.js
JavaScript iOS version detection
View ios-version.js
/*
* 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(
View developer-friendly-designing-tips.md

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)
View all-handson-solutions.md

app.js

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

// import dependencies
import { polyfill as promisePolyfill} from 'es6-promise';
import fetch from 'isomorphic-fetch';
View handson-import-solution.md

Import solution

custom-levels/my-level.js

/**
 * Create your level from these building blocks:
 *
 * Legende:
 *   @ = Player start position
 *   o = Coins
View hands-on-promise-solution.md

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'
View Prerequisites WEB 101 #1.md

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:

You can’t perform that action at this time.