Skip to content

Instantly share code, notes, and snippets.

Avatar
🦴
Building

Koen van Gilst vnglst

🦴
Building
View GitHub Profile
@vnglst
vnglst / delay.js
Last active Jan 15, 2018 — forked from daliborgogic/delay.js
Handy snippet: Node.js Async/Await delay
View delay.js
'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 () {
@vnglst
vnglst / osx_pdf_join.sh
Created May 16, 2016 — forked from anthonywu/osx_pdf_join.sh
Mac OS X – bash function to join pdfs on the command line
View osx_pdf_join.sh
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 / destructuring.js
Last active Feb 15, 2016 — forked from mikaelbr/destructuring.js
Javascript examples
View destructuring.js
// === 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];