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
# Append to ~/.profile (or ~/.bashrc) | |
# append to history, not overwrite | |
shopt -s histappend | |
# append command to history file before it's executed | |
export PROMPT_COMMAND="history -a" | |
# ignore duplicate consecutive commands | |
export HISTCONTROL=ignoreboth | |
# thanks to: | |
# http://www.linuxforums.org/forum/linux-programming-scripting/109516-retaining-bash-history-all-sessions.html |
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
# copy to your Capistrano recipe file | |
namespace :deploy do | |
task :clear_cached_assets, :roles => :web do | |
dir = "#{current_release}/public" | |
run %(rm #{dir}/javascripts/all.js #{dir}/stylesheets/master.css) | |
end | |
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
function singleton(self, wrapper, ctor) { | |
// support for early failing | |
if (self instanceof wrapper) { | |
throw wrapper.name + " " + | |
"is a singleton, you cannot create its instance. " + | |
"To get the isntance: " + wrapper.name + "();"; | |
} | |
if (!ctor) { | |
return; |
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
# this goes in the $HOME dir | |
# needs mislav-rspactor v0.3.1 and RSpec 1.2 | |
Runner.class_eval do | |
class << self | |
alias old_formatter_opts formatter_opts | |
def formatter_opts | |
old_formatter_opts + " -r /Users/mislav/Projects/unicode_formatter -f UnicodeFormatter" | |
end | |
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
Experiments in revision control: Curry recipe. | |
My personal recipe for Japanese curry, which has mutated over the years and is | |
now open-source thanks to github, hot damn. Some of the ingredients are not | |
very Japanese, but curry came to Japan from England which got it from India to | |
begin with, so whatever. | |
1.5 - 2 lbs. of meat, prefer thin-sliced beef (komagire), pork works, too. | |
Thin-sliced stuff is always best, but in a pinch stewing beef works. Bacon | |
works surprisingly well. Chicken will work, technically, but if you must, |
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 questionablecontent.net RSS text | |
// @namespace http://z3c.info/ | |
// @description Displays text from RSS feed below the comic | |
// @include http://www.questionablecontent.net/ | |
// @include http://www.questionablecontent.net/index.php | |
// @include http://www.questionablecontent.net/view.php?comic=* | |
// @include http://questionablecontent.net/ | |
// @include http://questionablecontent.net/index.php | |
// @include http://questionablecontent.net/view.php?comic=* |
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 twitter Komplimenti | |
// @namespace http://z3c.info/ | |
// @description Daje komplimente korisniku | |
// @include http://twitter.com/home | |
// ==/UserScript== | |
$ = unsafeWindow.jQuery; | |
var MessageProvider = new (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 twitter Search v2 | |
// @namespace http://z3c.info/ | |
// @description Adds a search field to the Twitter interface | |
// @include http://twitter.com/home | |
// ==/UserScript== | |
// Twitter Search script | |
// version 0.3 | |
// 2009-01-31 |
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 last.fm Numeric Compatibility | |
// @namespace http://z3c.info/ | |
// @description Displays the numeric compatibility with a user | |
// @include http://www.last.fm/user/* | |
// @include http://www.lastfm*/user/* | |
// @exclude http://www.last.fm/user/*/* | |
// @exclude http://www.lastfm*/user/*/* | |
// ==/UserScript== | |
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 last.fm About Me Preview | |
// @namespace http://z3c.info/ | |
// @description Displays the Preview button when editing "About You" section in user settings | |
// @include http://www.last.fm/settings | |
// @include http://www.lastfm*/settings | |
// ==/UserScript== | |
$ = unsafeWindow.$; | |
$$ = unsafeWindow.$$; |