This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[ | |
// Rebind mac to be like windows | |
{ "keys": ["ctrl+n"], "command": "new_file" }, | |
{ "keys": ["ctrl+s"], "command": "save" }, | |
{ "keys": ["ctrl+shift+s"], "command": "prompt_save_as" }, | |
{ "keys": ["ctrl+alt+s"], "command": "save_all" }, | |
{ "keys": ["ctrl+f4"], "command": "close" }, |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var domain = require('domain'); | |
var assert = require('assert'); | |
var DELAY = 10; | |
function doerr() { | |
var fired = false; | |
setTimeout(function () { | |
fired = true; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* ~/Library/KeyBindings/DefaultKeyBinding.Dict | |
This file remaps the key bindings of a single user on Mac OS X 10.5 to more closely | |
match default behavior on Windows systems. | |
You must log out and back in to see these changes. | |
Here is a rough cheatsheet for syntax. | |
Key Modifiers | |
^ : Ctrl | |
$ : Shift |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var request = require('request').defaults({ jar: true }); | |
var config = require('./config.json'); | |
var log = console.log.bind(console); | |
function wrapcb(orig_url, cb) { | |
return function(err, res, body) { | |
if (res && res.statusCode === 302) { | |
var url = require('url').resolve(orig_url, res.headers.location); | |
log('Redirect from ' + orig_url + ' to ' + url); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<html> | |
<head> | |
<script> | |
var beacon = (function() { | |
function fireBeacon(url, cb) { | |
//debug('Firing beacon ' + url); | |
var beacon = new Image(); | |
beacon.onload = function() { | |
cb(); | |
}; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Companion Blog Post about architecture: | |
// http://jimbesser.wordpress.com/2014/10/20/its-node-js-all-the-way-down/ | |
// Companion Blog Post about dealing with legacy requests: | |
// http://jimbesser.wordpress.com/2014/11/29/the-horrible-things-peoples-routers-do-to-my-packets/ | |
// | |
// Routing handled by this app: | |
// [www.]bigscreensmallgames.com -> static site: /var/data/smb_web/bigscreensmallgames.com/ | |
// fanime.info -> node app running entire site on port 4001 | |
// [default site]/app1: replace URL and redirect to single page app on 192.168.0.127:21022 | |
// [default site] -> static site: /var/data/smb_web/dashingstrike.com/ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function requestPreParse(preparse_params) { | |
// Requires https://github.com/Jimbly/node/commit/e8952eb | |
// and https://github.com/Jimbly/node/commit/13cfb39 | |
var data = preparse_params.preparse_data; | |
if (!data.did_haproxy || (data.is_haproxy && !data.did_haproxy_data)) { | |
var len = preparse_params.end - preparse_params.start; | |
if (len >= 6) { | |
data.did_haproxy = true; | |
if (preparse_params.d.toString('utf8', preparse_params.start, preparse_params.start + 6) === 'PROXY ') { | |
data.is_haproxy = true; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
GOOD | |
DEBUG: Local ident: 'SSH-2.0-ssh2js0.0.18' | |
DEBUG: Client: Trying staging.dashingstrike.com on port 22 ... | |
DEBUG: Client: Connected | |
DEBUG: Parser: IN_INIT | |
DEBUG: Parser: IN_GREETING | |
DEBUG: Parser: IN_HEADER | |
DEBUG: Remote ident: 'SSH-2.0-OpenSSH_6.6.1p1 Ubuntu-2ubuntu2.3' | |
DEBUG: Outgoing: Writing KEXINIT | |
DEBUG: Parser: IN_PACKETBEFORE (expecting 8) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
GOOD | |
Client :: ready | |
OpenSSH_6.6.1, OpenSSL 1.0.1f 6 Jan 2014 | |
debug1: Reading configuration data /etc/ssh/ssh_config | |
debug1: /etc/ssh/ssh_config line 19: Applying options for * | |
debug2: ssh_connect: needpriv 0 | |
debug1: Connecting to localhost [127.0.0.1] port 22. | |
debug1: Connection established. | |
debug1: identity file /home/mscdex/.ssh/id_rsa type -1 | |
debug1: identity file /home/mscdex/.ssh/id_rsa-cert type -1 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
* This file contains the generic file loading, test parsing, dispatching code | |
* used in all of my solutions, other than the last lines specifying which problem module | |
* and possibly different delimiters being used, this file remains unchanged. | |
*/ | |
'use strict'; | |
var assert = require('assert'); | |
var child_process = require('child_process'); | |
var fs = require('fs'); |