... gotta get familiar with that stuff at some point:
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# add this as `.ddev/web-build/Dockerfile.imagemagick7` then ddev restart to build with IM7 | |
ENV WEBP_VERSION=1.3.2 | |
ENV IM_VERSION=7.1.1-17 | |
RUN apt install -y build-essential pkg-config libpng-dev libjpeg-dev libtiff-dev libheif-dev | |
RUN curl -L https://storage.googleapis.com/downloads.webmproject.org/releases/webp/libwebp-$WEBP_VERSION.tar.gz \ | |
-o /tmp/libwebp-$WEBP_VERSION.tar.gz | |
RUN cd /tmp && tar xvf libwebp-$WEBP_VERSION.tar.gz |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@echo off | |
php %USERPROFILE%\bin\winwhich.php %* |
I hereby claim:
- I am fwg on github.
- I am fwg (https://keybase.io/fwg) on keybase.
- I have a public key ASCWWOeJko39dNOYrRQKgWwq95OlzNy3R7XyKTjLQLbBYAo
To claim this, I am signing this object:
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var S = require('./peg-gen8'); | |
function P(stream) { | |
try { | |
return S.parse(stream); | |
} catch (e) { | |
if (!(e instanceof S.SyntaxError)) throw e; | |
if (e.message == 'Expected "\\"", "\\\\", "\\\\\\"" or any character but end of input found.') { | |
e.message = 'Syntax error: Unterminated string literal'; | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var S = require('s-expression'); | |
var e = S("(\"a a\")"); | |
document.write(JSON.stringify(e)); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var S = require('s-expression'); | |
var e = S("(\"a a\")"); | |
document.body.appendChild(document.createTextNode(JSON.stringify(e))); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
let f(h as (Number) -> Number, x as Number) | |
// h should take a parameter. it does not, but who cares. | |
let v = h(x) | |
// now v should be a Number, right? | |
// because we told GorillaScript up there, of course it can optimize this condition away | |
if (typeof v == "number" or v instanceof Number) | |
v / 1.23 | |
let g() |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function curry(f) { | |
return function() { | |
if(arguments.length < f.length) | |
return curry(f.bind.apply(f, [this].concat([].slice.call(arguments)))); | |
return f.apply(this, arguments); | |
}; | |
} | |
var sum = curry(function(x, y) { | |
return x + y; |
NewerOlder