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
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", |
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
// ==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 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 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 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 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 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 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
# git pre-receive hook for rejecting ruby code with debugger statements | |
#!/usr/bin/env ruby | |
def msg(message) | |
%{ | |
############################################################# | |
#{message} | |
############################################################# | |
} |
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
" vimrc to allow for blasting off reggaeton horns while coding | |
nmap HH :silent execute "!afplay $HOME/.vim/audio/air_horn5.mp3 &>/dev/null & redraw!"<CR> |
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
$LOCAL is set to the name of a temporary file containing the contents of the file on the current branch | |
$REMOTE set to the name of a temporary file containing the contents of the file to be merged | |
$BASE set to the name of a temporary file containing the common base for the merge. |
OlderNewer