Skip to content

Instantly share code, notes, and snippets.

View roberthoenig's full-sized avatar

Robert Hönig roberthoenig

  • ETH Zurich
  • Zurich, Switzerland
View GitHub Profile
@jameslaneconkling
jameslaneconkling / y-combinator.js
Last active March 19, 2018 20:54
An implementation of the Y Combinator in Javascript
const Y = (fn) => (
(_fn) => fn((arg) => (_fn(_fn))(arg))
)(
(__fn) => fn((arg) => (__fn(__fn))(arg))
);
var factorial = (fact) => (n) => n === 0 ? 1 : n * fact(n - 1);
Y(factorial)(7);
//> 5040
@FelikZ
FelikZ / gist:659e8a44c211fa6e70c2
Last active February 11, 2019 00:24
ImageMagick convert from image/pdf to single pdf using portrait view and same size of pages.
Below you can find and example command how to do that:
convert -quality 90 -rotate "90>" -gravity center -units PixelsPerInch -density 150x150 -resize 1240x1753 IMG_2456.JPG 1.pdf IMG_2457.JPG 2.pdf IMG_2458.JPG 3.pdf salaries.pdf