kntrl + o //open command line in vim

:colorschema =>press tab and select something
:syntax enable

:set number => show line number

if you want new schema

View check.js
var check = function(o) {
return (o == null) ? null : o.constructor == Function ? == "" ? "Callback" : "Class_" + :;
// how can be different check and typeof
// checkfor check result typeof result
check(null); //null "object"
check(undefined); //null "undefined"
check(1); //"Number" "number"
check([]); //"Array" "object"

How To TCP NAT Traversal using Node.js and a STUN Server

With the scarecity of IPv4 addresses, and IPv6 still not available at large, NAT traversal is becoming a necessity. Especially with the generalisation of Carrier-grade NATs that you can find on mobile connections. Even with IPv6 you may suffer NAT66. Imagine your mobile device that gets only a single Ipv6 address, and you want to share it on your computer.

The solution might be in a decentralized protocol for address attribution such

View preprocessor_fun.h
// Just before switching jobs:
// Add one of these.
// Preferably into the same commit where you do a large merge.
// This started as a tweet with a joke of "C++ pro-tip: #define private public",
// and then it quickly escalated into more and more evil suggestions.
// I've tried to capture interesting suggestions here.
// Contributors: @r2d2rigo, @joeldevahl, @msinilo, @_Humus_,
// @YuriyODonnell, @rygorous, @cmuratori, @mike_acton, @grumpygiant,
View reverse_ssh.rb
require 'rubygems'
require 'net/ssh'
# Run this on the machine (node) which needs to tunnel out to forward the UI to the remote system (console)
Net::SSH.start("remote_host", "remote_user") do |ssh|
# since we are running sinatra locally we will forward 43210 on the remote_host to our localhost 4567
# This is effectively the same as:
# ssh -R 4567:localhost:43210 remote_user@remote_host
ssh.forward.remote(4567, "localhost", 43210)
ssh.loop { true }

how to compile

$ gcc -g -Wall -I /path/to/libuv/include /path/to/libuv/uv.a -framework CoreServices server.c -o server
$ gcc -g -Wall -I /path/to/libuv/include /path/to/libuv/uv.a -framework CoreServices client.c -o client
View gist:3798173
package main
import (
var urls = []string{
View tmux-cheatsheet.markdown

tmux shortcuts & cheatsheet

start new:


start new with session name:

tmux new -s myname
View backbone.collectioncache.js
* backbone.collectioncache.js v0.0.2
* Copyright 2012, Tim Branyen (@tbranyen)
* backbone.collectioncache.js may be freely distributed under the MIT license.
(function(window) {
"use strict";
// Dependencies
View .htaccess
#301 Redirects for .htaccess
#Redirect a single page:
Redirect 301 /pagename.php
#Redirect an entire site:
Redirect 301 /
#Redirect an entire site to a sub folder
Redirect 301 /