Skip to content

Instantly share code, notes, and snippets.

Trying my best to be worth something.

Benjamin Lupton balupton

Trying my best to be worth something.
View GitHub Profile
balupton /
Last active Oct 31, 2020
New Machine Start Kit



# If inside vmware install vmware tools (these are just as good as the commercial ones)
sudo apt-get install open-vm-tools open-vm-tools-desktop

# Install git
sudo apt-get install git
balupton / next.config.js
Created Feb 3, 2017
next.js webpack configs
View next.config.js
module.exports = {
webpack: (config) => {
const webpack = require('webpack')
const BundleAnalyzerPlugin = require('webpack-bundle-analyzer').BundleAnalyzerPlugin
config.plugins = config.plugins || []
config.plugins.push(new webpack.ContextReplacementPlugin(/moment[/\\]locale$/, /en/))
config.plugins.push(new BundleAnalyzerPlugin())
return config
balupton /
Last active Oct 22, 2020
Blog: Libertarian Constitution

Draft: Libertarian Constitution

Iterations from 27 October 2019 below, kept to include the interations of that arrived at the final form.


  1. No collective shall have a right that any individual does not also possess.

    i.e. corporate positions, role privileges. e.g. ceo, database owner.


Thank you to all the following people in my life, in no particular order

Helen Lupton for being the one person who's always supported me, perhaps even when you're mad at me... and for the most part, making me smile. It's been a pleasure growing alongside you.

Kasper Tidemann for being there with your always supportive encouraging words and laugh when I needed them most, and as well for financially believing in me

Rob Morris for being there to provide business and financial advisory when I most needed it

Harris for being someone I can adventure with, and be a kid with

balupton /
Last active Oct 7, 2020
The Open Information Pledge

The Open Information Pledge

I believe in the freedom of information, free as in money, and free as in freedom. That this is a fundamental requirement for empowerment.


I understand that ideas are not copyrightable. I expect that you understand this too. I expect that we can both regard all ideas discussed to be of Public Domain, as they are.


I understand that the implementation of ideas is copyrightable.

balupton / cors.js
Created Sep 11, 2012
Acheiving CORS via a Node HTTP Server
View cors.js
// Create our server
var server;
server = http.createServer(function(req,res){
// Set CORS headers
res.setHeader('Access-Control-Allow-Origin', '*');
res.setHeader('Access-Control-Request-Method', '*');
res.setHeader('Access-Control-Allow-Methods', 'OPTIONS, GET');
res.setHeader('Access-Control-Allow-Headers', '*');
if ( req.method === 'OPTIONS' ) {
balupton /
Last active Oct 4, 2020
Learnings from living moneyless for a year in 2014-2015

What inspired it?

In 2013 when I was teaching JavaScript in Berlin, I was introduced to the squatter and dumpster diving movements. Then later in 2013 in Sydney, was introduced to foraging.

Recognised that:

  • my conceptions of food was constrained to that of supermarkets.

  • one can have their basic necessities supplied without money, so people should stop demanding money

balupton / ajaxify-html4.js
Created Mar 7, 2011
Ajaxify a Website using the HTML4 HashChange Functionality
View ajaxify-html4.js
// Prepare our Variables
document = window.document,
$ = window.jQuery;
// Wait for Document
// Prepare Variables
You can’t perform that action at this time.