Skip to content

Instantly share code, notes, and snippets.

/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
* This is the Parser 2 API version of the LetMeGoogleThatForYou *
* Ubiquity script compatible with Ubiquity 0.5+. *
* The Legacy parser version is available at *
* http://gist.github.com/45201 *
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
var icon = "http://letmegooglethatforyou.com/favicon.ico";
var tu_desc = "<a href=\"http://www.tinyurl.com\">TinyUrl</a>";
var lmg_desc = "<a href=\"http://lmgtfy.com\">Let Me Google That For You</a>";
@reinh
reinh / gist:41325
Created December 29, 2008 17:50 — forked from rezaprima/gist:39869
function current_git_branch {
git branch 2> /dev/null | grep '\*' | awk '{print $2}'
}
hack()
{
CURRENT=$(current_git_branch)
git checkout master
git pull origin master
git checkout ${CURRENT}
@reinh
reinh / hack
Created August 28, 2008 02:15 — forked from rick/hack
#!/bin/sh -x
# hack
CURRENT=`git branch | grep "\*" | awk "{print $2}"`
git checkout master
git pull origin master
git checkout ${CURRENT}
git rebase master
// Examples:
//
// HTML:
// <form action='messages/1/mark_unread'><input type='submit' class='button_to_link' value='Mark Unread'/></form>
//
// Rails:
// button_to "Mark as unread", mark_as_unread_message_path(message), :method => :put, :class => "button_to_link"
//
// jQuery:
// $(document).ready(function() {
// Convert to jQuery please...
var field = $('password_confirmation_field');
field.hide();
$('user_password').observe('focus', field.show.bind(field));
// This the best?
var confirmation = $('#password_confirmation_field').hide();
$('#user_password').focus(function () {
confirmation.show();
});