Skip to content

Instantly share code, notes, and snippets.

Avatar

Mark Wubben novemberborn

View GitHub Profile
@novemberborn
novemberborn / howto.md
Created Feb 18, 2016
Creating a PKCS#12 file from a Let's Encrypt certificate
View howto.md
@novemberborn
novemberborn / setup.md
Created Jan 7, 2016
OS X Redirect ports 80 and 443 to 8080 and 8443 respectively
View setup.md

Changes with .dev domains in mind.

Create /etc/pf.anchors/dev, containing:

rdr pass inet proto tcp from any to any port 80 -> 127.0.0.1 port 8080
rdr pass inet proto tcp from any to any port 443 -> 127.0.0.1 port 8443

@novemberborn
novemberborn / howto.md
Created Feb 17, 2016
CSR with subjectAltName on OSX
View howto.md

Copy /System/Library/OpenSSL/openssl.cnf to a new file.

Add the following at the end:

[ req ]
req_extensions = v3_req

[ v3_req ]
# Extensions to add to a certificate request
@novemberborn
novemberborn / setup.md
Created Jan 7, 2016
OS X Dnsmasq setup for .dev domains
View setup.md

Install dnsmasq using Homebrew. Edit the dnsmasq.conf file (Homebrew will tell you where to put it) to contain:

address=/.dev/127.0.0.1
listen-address=127.0.0.1

Then make sure Dnsmasq is running (again follow Homebrew instructions).

Create the /etc/resolver/dev directory (using root) if it doesn't exist yet and create a resolver for .dev:

@novemberborn
novemberborn / gist:6938771
Created Oct 11, 2013
Guide to setting up a local NPM registry
View gist:6938771

CouchDB

Install CouchDB. This guide assumes 1.3.1. Set up an admin account.

Create the database required by NPM:

curl -X PUT http://admin:password@127.0.0.1:5984/registry
@novemberborn
novemberborn / README.md
Last active Jan 25, 2019
AVA throwsAsync transform for jscodeshift
View README.md

Usage:

$ npx jscodeshift -t https://gist.githubusercontent.com/novemberborn/c2cdc94020083a1cafe3f41e8276f983/raw/eaa64c55dfcda8006fc760054055372bb3109d1c/transform.js test.js

See https://github.com/facebook/jscodeshift#usage-cli for further details.

View keybase.md

Keybase proof

I hereby claim:

  • I am novemberborn on github.
  • I am novemberborn (https://keybase.io/novemberborn) on keybase.
  • I have a public key ASBotTxsIgcNBdJ7414oGO7TAGHyYaUtXfNLUrR3N-maaQo

To claim this, I am signing this object:

@novemberborn
novemberborn / coverage.sh
Created Nov 26, 2015
Code Coverage with Babel, Istanbul & NYC
View coverage.sh
#!/bin/bash
set -e
# Shell script to compute code coverage even after the Babel transforms have
# been applied.
# Clear previous coverage.
rm -rf coverage
# Generate test coverage based on however `npm test` performs the tests.
@novemberborn
novemberborn / gist:899634
Created Apr 2, 2011
Convert pasteboard string into JSON
View gist:899634
#!/usr/bin/env node
require("child_process").exec("pbpaste", function(_, stdout){
process.stdout.write(JSON.stringify(stdout.trim()));
});
View .babelrc
{
plugins: [
['./plugin', {label: 'plugin'}],
['./plugin', {label: 'plugin'}, 'named']
],
overrides: [
{
test: 'foo.js',
extends: './extends.json5',
plugins: [