Get Homebrew installed on your mac if you don't already have it
Install highlight. "brew install highlight". (This brings down Lua and Boost as well)
express = require "express" | |
sys = require "sys" | |
util = require "util" | |
oauth = require "oauth" | |
fs = require "fs" | |
app = module.exports = express.createServer() | |
app.configure('development', () -> | |
app.use(express.errorHandler({ dumpExceptions: true, showStack: true })) |
var oauthPercentEncode = (function(){ | |
var escapeChars = "!*'();:@&=+$,/?%#[]", | |
matchChars = new RegExp( "([\\" + ( escapeChars.split('').join('\\')) + "])", "gi"); | |
return function( p ) { | |
return p.replace( matchChars, function( char ) { | |
return '%' + ( "" + char ).charCodeAt(0).toString(16).toUpperCase(); | |
}) | |
} |
/** | |
* Replacement callback function | |
* | |
* @param array $match | |
* @return string | |
*/ | |
private function queryReplacementCallback($match) { | |
if (!isset($this->queryReplacementData[$match[2]]) || $this->queryReplacementData[$match[2]] === null) { | |
$replace = 'null'; | |
} else { |
/* GPL */ | |
/*Whitelist version with quick test*/ | |
function k(q){ | |
var s, | |
d = document.createElement("div"), | |
n = q, | |
p = [ "webkit", "moz", "ms", "O", "" ], | |
o = n, | |
r, j=0, len, l; |
Get Homebrew installed on your mac if you don't already have it
Install highlight. "brew install highlight". (This brings down Lua and Boost as well)
#!/bin/sh | |
### | |
# SOME COMMANDS WILL NOT WORK ON macOS (Sierra or newer) | |
# For Sierra or newer, see https://github.com/mathiasbynens/dotfiles/blob/master/.macos | |
### | |
# Alot of these configs have been taken from the various places | |
# on the web, most from here | |
# https://github.com/mathiasbynens/dotfiles/blob/5b3c8418ed42d93af2e647dc9d122f25cc034871/.osx |
Locate the section for your github remote in the .git/config
file. It looks like this:
[remote "origin"]
fetch = +refs/heads/*:refs/remotes/origin/*
url = [email protected]:joyent/node.git
Now add the line fetch = +refs/pull/*/head:refs/remotes/origin/pr/*
to this section. Obviously, change the github url to match your project's URL. It ends up looking like this:
// PubSub impl. with require.js & backbone.js | |
// events.js | |
define(['underscore', 'backbone'], function (_, Backbone) { | |
'use strict'; | |
var events = {}; | |
_.extend(events, Backbone.Events); | |
return events; | |
}); |
license: gpl-3.0 |