Skip to content

Instantly share code, notes, and snippets.

<!DOCTYPE html>
<html class="no-js">
<head>
<script src="http://ajax.googleapis.com/ajax/libs/jquery/1.3.2/jquery.min.js"></script>
<link rel="stylesheet" href="http://ajax.googleapis.com/ajax/libs/jqueryui/1.7.2/themes/base/jquery-ui.css" type="text/css" />
<link rel="stylesheet" href="http://www.eyecon.ro/colorpicker/css/colorpicker.css" type="text/css" />
<script src="http://ajax.googleapis.com/ajax/libs/jqueryui/1.7.2/jquery-ui.min.js"></script>
// A bookmarklet to add search ability to any github.com repo.
// Note: Disable Chrome Frame in IE to use this bookmarklet as github.com supports Chrome Frame
// @author John-David Dalton (http://www.twitter.com/jdalton)
javascript:void(function(){var a='';if(!$('.subnav-bar').length){a=$('form#search-form input[name=q]').val();$('.big-search').remove();$('.tabs').after('<div class="subnav-bar"></div>')}else{$('#repo-search-form').remove()}$('.subnav-bar').append('<ul style="float:right;margin-left:10px;"><li><a class="dropdown" href="#">Search by&hellip;</a><ul><li><a href="#" onclick="$(\'#choice\').val(\'code\');return false;">Code</a></li><li><a href="#" onclick="$(\'#choice\').val(\'grep\');return false;">Commit Messages</a></li><li><a href="#" onclick="$(\'#choice\').val(\'author\');return false;">Author</a></li><li><a href="#" onclick="$(\'#choice\').val(\'committer\');return false;">Committer</a></li></ul></li></ul><form id="repo-search-form" action="'+$('.pagehead.repohead h1 a')[1].href+'/search"><i
@paulirish
paulirish / to12hr.js
Created December 6, 2009 03:38 — forked from redoPop/to12hr.js
var to12Hr = function(n, r /* round to nearest r minutes */) {
if (!n || n >= 24) return '12:00 AM';
var m = (Math.round(n%1*(r = (r ? 60/r : 60)))/r)*60;
return ((n = (m>59 ? n+1 : n))>=13 ? (n|0)-12 : n|0) + ':' + (m>9 ? (m>59 ? '00' : m) : '0'+m) + (n>=12 && m<60 ? ' PM' : ' AM');
}
// to12Hr(6.5) => "6:30 AM"
// to12Hr(13.19) => "1:11 PM"
// to12Hr(13.19, 15) => "1:15 PM" (rounds to 15 mins)
"Ode to Paul Irish"
There once was a jQuery master from Boston,
whose soul-piercing eyes you could get lost in.
He gave some cool talks,
which knocked off my socks,
and now he's the daddy of my children.