Skip to content

Instantly share code, notes, and snippets.

View indreklasn's full-sized avatar
👋

Trevor I. Lasn indreklasn

👋
View GitHub Profile
@indreklasn
indreklasn / add.js
Created February 1, 2018 23:41
vanilla js
const add = (a, b) => {
return a + b
};
add(1, 2) // 3
@indreklasn
indreklasn / add.js
Created February 1, 2018 23:46
add with flow
// @flow
const add = (a: number, b: number) => {
return a + b
}
add(1, 2) // 3
@indreklasn
indreklasn / install.sh
Last active February 2, 2018 00:12
install cra+flow+glow
npm i -g cra glow && create-react-app glow && cd glow && npm i flow-bin -D && flow init && npm run start
@indreklasn
indreklasn / install-typescript.sh
Created February 28, 2018 11:54
install typescript with npm
npm i -g typescript && mkdir typescript && cd typescript && tsc --init
@indreklasn
indreklasn / getting-started.sh
Created February 28, 2018 12:00
create .ts file and tell the compiler to watch for changes
touch typescript.ts && tsc -w
@indreklasn
indreklasn / clone.sh
Created March 20, 2018 16:57
cloning hm boiletplate
git clone [email protected]:highmobility/hm-node-scaffold.git && hm-node-scaffold && yarn install
@indreklasn
indreklasn / install.sh
Created May 21, 2018 13:54
install hapi and nodemon
yarn add hapi nodemon
{
"name": "Mona Lisa",
"url": "https://en.wikipedia.org/wiki/Mona_Lisa#/media/File:Mona_Lisa,_by_Leonardo_da_Vinci,_from_C2RMF_retouched.jpg",
"techniques": ["Portrait"]
}
@indreklasn
indreklasn / touch.js
Last active July 7, 2018 15:58
touch events example
div.addEventListener('mousemove', (e) => { console.log(e) });
div.addEventListener('touchmove', (e) => { console.log(e) });
@indreklasn
indreklasn / pointerEvents.js
Created July 7, 2018 16:29
pointer events example
div.addEventListener('pointermove', (e) => {
console.log(e)
})