This file contains 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
# Note: pasted from command line | |
umask 022 | |
apt-get update | |
apt-get install libssl-dev pkg-config build-essential wget gcc g++ checkinstall | |
mkdir /tmp/node-install | |
cd /tmp/node-install | |
# Note: your version number may vary | |
wget http://nodejs.org/dist/node-latest.tar.gz | |
tar -zxvf node-v0.10.16.tar.gz |
This file contains 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
bindkey "^[[5~" eval "copy" "stuff ^b" # enter copy mode and move up one page | |
bindkey -m "^[[5~" stuff ^b # move up one page |
This file contains 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
// Usage from some other file: | |
// | |
// var app = require('./proxy')({proxyUrl: '//your-remote.com', proxyBase: '/api'}) | |
var path = require('path'), | |
request = require('request'), | |
express = require('express'), | |
app = express(); | |
app.use(express.logger('dev')); |
This file contains 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 passport = require('passport'); | |
var util = require('util'); | |
var GitHubStrategy = require('passport-github').Strategy; | |
passport.serializeUser(function(user, done) { | |
done(null, user); | |
}); | |
passport.deserializeUser(function(obj, done) { | |
done(null, obj); |
This file contains 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
02:27 < sorensen> export NODE_ENV="production" | |
02:27 < sorensen> exec chpst -u user node /<path>/app.js 2>&1 >> /<path>/process.log |
This file contains 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 exportsToContext() { | |
var alen = arguments | |
for (var a = 0; a < alen; a++) { | |
this.exports[el] = arguments[0][a]); | |
}); | |
} | |
var foo = 1, bar = 2, zoo = function() { return "z" }; | |
function export( argArr ) { |
This file contains 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 is gone, go here to find newest: | |
https://github.com/csmr/jesbang/ |
This file contains 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
# encoding: utf-8 | |
module G | |
class UI | |
def initialize | |
require 'io/console' # for on-key input | |
@input_buffer = "" | |
@_debug_frame = 0 | |
ui_run 1 |
This file contains 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
<article> | |
<time datetime="<%= @item[:datetime] %>"><%= @item[:time] %></time> | |
<h1><%= @item[:title] %></h1> | |
<%= yield %> | |
</article> | |
... | |
<aside id="sidebar"> | |
<h2>Index</h2> | |
<ul> | |
<li> |
This file contains 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
I. Some version string | |
Using clean/smudge filter script | |
https://git-scm.com/book/en/v2/Customizing-Git-Git-Attributes | |
Versuiob tagging | |
http://softwareengineering.stackexchange.com/questions/141973/how-do-you-achieve-a-numeric-versioning-scheme-with-git | |
Heahd shrot hash | |
git rev-parse --short HEAD | |
http://stackoverflow.com/questions/1274605/ruby-search-file-text-for-a-pattern-and-replace-it-with-a-given-value |
OlderNewer