Skip to content

Instantly share code, notes, and snippets.

@laggingreflex
laggingreflex / LSOA_2011_BFC_Barking_and_Dagenham.zip
Last active June 3, 2016 12:13
LSOA_2011_BFC_Barking_and_Dagenham.kml
var webpack = require('webpack');
var entryPath = Path.join(__dirname, 'lib/client');
var ngAnnotatePlugin = require('ng-annotate-webpack-plugin');
module.exports = {
cache: true,
devtool: 'source-map',
entry: Path.join(entryPath, 'webpack-entry.js'),
output: {
path: entryPath,
@laggingreflex
laggingreflex / Error: write after end
Created June 13, 2015 05:45
connect-restreamer issue: Error: write after end
// https://github.com/dominictarr/connect-restreamer/issues/8
var express = require('express');
var app = module.exports = express();
var connectRestreamer = require('connect-restreamer');
var bodyParser = require('body-parser');
app.use(bodyParser.urlencoded({
extended: true
@laggingreflex
laggingreflex / node wp redirect
Created June 12, 2015 12:39
Node forward path request to another server
// Node forward path request to another server
// http://stackoverflow.com/questions/30800829/node-forward-path-request-to-another-server
var request = require('request');
request = request.defaults({jar: true });
app.all('/blog*', function(req, res, next) {
console.debug('===============');
var jar = request.jar();
var cookie = request.cookie(serializeCookie(req.session.cookies));
@laggingreflex
laggingreflex / 0_reuse_code.js
Last active August 29, 2015 14:11
Here are some things you can do with Gists in GistBox.
// Use Gists to store code you would like to remember later on
console.log(window); // log the "window" object to the console