Skip to content

Instantly share code, notes, and snippets.

View natlownes's full-sized avatar

Nat Lownes natlownes

View GitHub Profile
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
def underscoralize
self.downcase.strip.gsub(/\s+/, "_").gsub(/[^a-z0-9_-]/, "").gsub(/[-_]{2,}/,"_")
end
root=Dir.pwd
puts ">>> Serving: #{root}"
run Rack::Directory.new("#{root}")
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;
}
// requires yahoo.util.dom
var InfoWidget = Class.create();
// ex. widget = new InfoWidget({
// 'text': "your text",
// 'severity': 'info',
//
// })
// widget.show();
InfoWidget.prototype = {
initialize: function(options){
// ==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_.*/
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",