Skip to content

Instantly share code, notes, and snippets.

View dardub's full-sized avatar

Darren dardub

View GitHub Profile
@dardub
dardub / gist:7044156
Created October 18, 2013 16:33
Cache bust
#kill cache
<FilesMatch "\.(html|htm|js|css)$">
FileETag None
<ifModule mod_headers.c>
Header unset ETag
Header set Cache-Control "max-age=0, no-cache, no-store, must-revalidate"
Header set Pragma "no-cache"
Header set Expires "Wed, 11 Jan 1984 05:00:00 GMT"
</ifModule>
</FilesMatch>
@dardub
dardub / hello-reason-function.md
Last active January 17, 2018 00:54
Hello World
type messageBody = {
  message: string,
  input: string
};

type response = {
  statusCode: int,
  body: Js.Json.t
};
Error: /Users/darren/Sites/site/node_modules/sharp: Command failed.
Exit code: 1
Command: (node install/libvips && node install/dll-copy && prebuild-install) || (node-gyp rebuild && node install/dll-copy)
Arguments:
Directory: /Users/darren/Sites/site/node_modules/sharp
Output:
info sharp Detected globally-installed libvips v8.5.7
info sharp Building from source via node-gyp
gyp info it worked if it ends with ok
gyp info using [email protected]
@dardub
dardub / gist:4bef9744d725ebafe59b43a173ed2279
Created December 30, 2024 17:25
Generate a self-signed certificate for .localhost development
openssl req -x509 -out localhost.crt -keyout localhost.key \
-newkey rsa:2048 -nodes -sha256 \
-subj '/CN=localhost' -extensions EXT -config <( \
printf "[dn]\nCN=localhost\n[req]\ndistinguished_name = dn\n[EXT]\nsubjectAltName=DNS:localhost\nkeyUsage=digitalSignature\nextendedKeyUsage=serverAuth")