Skip to content

Instantly share code, notes, and snippets.

View natlownes's full-sized avatar

Nat Lownes natlownes

View GitHub Profile

tmux shortcuts & cheatsheet

start new:

tmux

start new with session name:

tmux new -s myname
var fs = require("fs"),
http = require("http"),
path = require("path"),
url = require("url"),
util = require("util"),
sys = require("sys"),
zlib = require('zlib');
var port = parseFloat(process.argv[2]) || 8081;
### Keybase proof
I hereby claim:
* I am natlownes on github.
* I am narf (https://keybase.io/narf) on keybase.
* I have a public key whose fingerprint is 4883 C577 22A3 0ADC F196 2484 A77D 30B9 3D83 A61A
To claim this, I am signing this object:
CmdUtils.CreateCommand(
{
name: "ruby",
takes: {"function": noun_arb_text},
icon: "http://ruby-doc.org/favicon.ico",
homepage: "http://jackndempsey.blogspot.com",
author: {name: "Jack Dempsey", email: "jack.dempsey@gmail.com"},
license: "MPL,GPL",
description: "Search ruby functions documentation",
help: "Select a ruby function",
// ==UserScript==
// @name Swoopo Ripoff Calculator
// @namespace http://*.swoopo.com
// @include http://www.swoopo.com/
// ==/UserScript==
var spans = document.getElementsByTagName("span");
var priceRe = /^price_index_page_.*/;
var earnRe = /^earn_price_index_page_.*/
// requires yahoo.util.dom
var InfoWidget = Class.create();
// ex. widget = new InfoWidget({
// 'text': "your text",
// 'severity': 'info',
//
// })
// widget.show();
InfoWidget.prototype = {
initialize: function(options){
div.info-widget {
position: absolute;
border: 2px solid darkgrey;
cursor: default;
font-family: helvetica;
background-color: lightyellow;
border:1px solid lightgrey;
top: auto;
left:auto;
}
root=Dir.pwd
puts ">>> Serving: #{root}"
run Rack::Directory.new("#{root}")
def underscoralize
self.downcase.strip.gsub(/\s+/, "_").gsub(/[^a-z0-9_-]/, "").gsub(/[-_]{2,}/,"_")
end
To change two vertically split windows to horizonally split
^Wt^WK
Horizontally to vertically:
^Wt^WH
where ^W means "hit Ctrl-W". Explanations:
^Wt makes the first (topleft) window current
^WK moves the current window to full-width at the very top