Skip to content

Instantly share code, notes, and snippets.

View vnglst's full-sized avatar
💭
Building 🪲

Koen van Gilst vnglst

💭
Building 🪲
View GitHub Profile
@vnglst
vnglst / destructuring.js
Last active February 15, 2016 10:38 — forked from mikaelbr/destructuring.js
Javascript examples
// === Arrays
var [a, b] = [1, 2];
console.log(a, b);
//=> 1 2
// Use from functions, only select from pattern
var foo = () => {
return [1, 2, 3];
@vnglst
vnglst / osx_pdf_join.sh
Created May 16, 2016 15:16 — forked from anthonywu/osx_pdf_join.sh
Mac OS X – bash function to join pdfs on the command line
function pdf_join {
join_py="/System/Library/Automator/Combine PDF Pages.action/Contents/Resources/join.py"
read -p "Name of output file > " output_file && "$join_py" -o $output_file $@ && open $output_file
}
@vnglst
vnglst / delay.js
Last active January 15, 2018 18:43 — forked from daliborgogic/delay.js
Handy snippet: Node.js Async/Await delay
'use strict'
const timeout = ms => new Promise(res => setTimeout(res, ms))
function convinceMe (convince) {
let unixTime = Math.round(+new Date() / 1000)
console.log(`Delay ${convince} at ${unixTime}`)
}
async function delay () {