Skip to content

Instantly share code, notes, and snippets.

View Twipped's full-sized avatar
🗯️
Cursing out Typescript

Jocelyn Badgley Twipped

🗯️
Cursing out Typescript
View GitHub Profile
@Twipped
Twipped / Output
Last active August 29, 2015 14:08
Why doesn't test() optimize?
[deoptimize context: 1d440be414b1]
[disabled optimization for test, reason: bad value context for arguments value]
Function test(1, 2) is not optimized
prod/live
prod/master -> beta server

dev/uat     -> uat server
dev/master  -> dev server
dev/3000
dev/3001
dev/3002
dev/...
<Venn-> Someone's just installed Windows 8 in our office ...
<Venn-> One of the secretaries said she's not coming to work tomorrow if Windows 7 isn't back on her machine again
<chiper> 8, not 8.1?
<Venn-> and two people went home early
<Venn-> saying they'd bad headaches
<chiper> wait, across the entire office?
<Venn-> yup, very bright IT dept.
<Venn-> A load of people are saying they can no longer use their PCs
<Venn-> and need to go on training courses
<chiper> fucking hell. you don't just deploy that shit overnight
@Twipped
Twipped / gist:c07bddf69803bea379f3
Created September 19, 2014 18:23
Packet loss within cox network between points 2 and 3 on traceroute.
$ traceroute google.com
traceroute: Warning: google.com has multiple addresses; using 74.125.224.194
traceroute to google.com (74.125.224.194), 64 hops max, 52 byte packets
1 192.168.1.1 (192.168.1.1) 0.535 ms 0.369 ms 0.273 ms
2 10.130.0.1 (10.130.0.1) 10.788 ms 10.516 ms 11.649 ms
3 * pwy1aggc01-gex0414.sd.sd.cox.net (68.6.11.78) 15.898 ms 15.429 ms
4 * * *
5 * fed1dsrj02-xe130.0.rd.sd.cox.net (68.6.8.4) 28.982 ms 32.966 ms
6 sanjbprj01-ae0.0.rd.sj.cox.net (68.1.5.184) 31.211 ms * 32.996 ms
7 * paltbprj02-ae1-308.rd.pt.cox.net (68.105.31.37) 30.750 ms 30.803 ms
@Twipped
Twipped / gist:23856fb12bdc794d3925
Last active August 29, 2015 14:05
Gulpfile config to create a pipe that wraps the bootstrap js files with async module definitions, with jQuery AMD
var through2 = require('through2');
var path = require('path');
var gulp = require('gulp');
gulp.task('bootstrap', function () {
return gulp.src('./node_modules/bootstrap/js/*.js')
.pipe(through2.obj(function transform (file, enc, next) {
if (file.isNull()) {
this.push(file); // pass along
return next();
var proxmis = require('proxmis');
var parse = function (callback) {
return function (err, value) {
if (err) {
callback(err);
} else {
try {
value = JSON.parse(value);
var Emitter = require('events').EventEmitter;
module.exports = function (target) {
if (!target) {target = new Emitter();}
if (target.proxyTo) {return target;}
var oldEmit = target.emit;
target.preProxies = [];
target.postProxies = [];
@Twipped
Twipped / chatty.js
Created July 14, 2014 22:25
Very simple nodejs chat server
var net = require('net');
var clients = [];
var total = 0;
net.createServer(function (socket) {
clients.push(socket);
var id = clients.length -1;
var name = 'User ' + (++total);
socket._name = name;
@Twipped
Twipped / gist:8e73c8274048420107e2
Last active August 29, 2015 14:02
Frozen Sins
  1. Anna leaves on horseback just five minutes after Elsa runs off, AND rides a sleigh up the mountain, yet somehow is completely unable to catch up to her sister who is on foot.

  2. "You think you have it bad? I sell ice for a living."

    This is a terrible way to transport ice in the middle of summer. A sleigh would be unmovable without snow on the ground, and the ice would start to melt before he got to his destination. So either Kristoff is trying to use a sleigh in summer, or he's deliberately trying to sell ice in the middle of a freak snow storm. Either way, he is horrible at his job.

  3. After dropping Anna off at the castle, Kristoff manages to walk a mile up-hill in snow in only a few minutes. This movie has no sense of how far a person can walk in snow.

  4. And where is Kristoff going? He doesn't have a sleigh any more, and he's walking away from town, where his business would have been based.

var denyRoutes = express.Router();
denyRoutes
.use(denyAnon)
.get('/listdocs', handlers.listdocs)
.get('/viewer', handlers.viewer)
.get('/viewer/:filename', handlers.viewer)
.get('/getdoc', handlers.getdoc)
.post('/savedoc', bodyParser, csrf, handlers.savedoc)