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 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>"; |
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 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} |
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
#!/bin/sh -x | |
# hack | |
CURRENT=`git branch | grep "\*" | awk "{print $2}"` | |
git checkout master | |
git pull origin master | |
git checkout ${CURRENT} | |
git rebase master |
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
// 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() { |
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
// 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(); | |
}); |
NewerOlder