This file contains hidden or 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
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 |
This file contains hidden or 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
def underscoralize | |
self.downcase.strip.gsub(/\s+/, "_").gsub(/[^a-z0-9_-]/, "").gsub(/[-_]{2,}/,"_") | |
end |
This file contains hidden or 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
root=Dir.pwd | |
puts ">>> Serving: #{root}" | |
run Rack::Directory.new("#{root}") |
This file contains hidden or 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
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; | |
} |
This file contains hidden or 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
// requires yahoo.util.dom | |
var InfoWidget = Class.create(); | |
// ex. widget = new InfoWidget({ | |
// 'text': "your text", | |
// 'severity': 'info', | |
// | |
// }) | |
// widget.show(); | |
InfoWidget.prototype = { | |
initialize: function(options){ |
This file contains hidden or 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
// ==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_.*/ |
This file contains hidden or 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
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: "[email protected]"}, | |
license: "MPL,GPL", | |
description: "Search ruby functions documentation", | |
help: "Select a ruby function", |
NewerOlder