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
<!-- The different ways of marking up dates and times with microformats --> | |
<!-- Microformats are quite flexible when it comes to marking up dates in valid | |
HTML4. The value-class-pattern allows you to mark-up different parts of the | |
date, providing tool-tip context or nesting the data silently alongside a | |
custom format. | |
Date formatting in microformats no-longer requires using the `<abbr>` | |
element. --> | |
<!-- Core requirement for dates in microformats: The date must be available in an |
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
/* Use this to cause a function to fire no more than once every 'ms' milliseconds. | |
For example, an expensive mousemove handler: | |
$('body').mouseover(ratelimit(function(ev) { | |
// ... | |
}, 250)); | |
*/ | |
function ratelimit(fn, ms) { | |
var last = (new Date()).getTime(); |
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 | |
# | |
# git-svn-diff | |
# Generate an SVN-compatible diff against the tip of the tracking branch | |
TRACKING_BRANCH=`git config --get svn-remote.svn.fetch | sed -e 's/.*:refs\/remotes\///'` | |
REV=`git svn find-rev $(git rev-list --date-order --max-count=1 $TRACKING_BRANCH)` | |
git diff --no-prefix $(git rev-list --date-order --max-count=1 $TRACKING_BRANCH) $* | | |
sed -e "s/^+++ .*/& (working copy)/" -e "s/^--- .*/& (revision $REV)/" \ | |
-e "s/^diff --git [^[:space:]]*/Index:/" \ | |
-e "s/^index.*/===================================================================/" |
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
javascript:MOGRdioExt%20=%20{redirect:%20function()%20{var%20artist%20=%20%22%22;var%20album%20=%20%22%22;var%20parts%20=%20window.location.href.split(%27/%27);for(var%20i=0;%20i%20<%20parts.length;%20i++)%20{p=parts[i];switch(p)%20{case%20%27artist%27:i%20=%20i+1;artist%20=%20parts[i];break;case%20%27album%27:i%20=%20i+1;album%20=%20parts[i];break;default:break;}}if(%22%22%20===%20artist)%20{alert(%22This%20only%20works%20if%20you%27re%20viewing%20an%20Rdio%20artist%20or%20album.%22);}else%20{window.location.href%20=%20%22http://mog.com/music/%22+artist+%22/%22+album;}}};MOGRdioExt.redirect(); |
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
javascript:(function()%20{var%20io%20=%20prompt(%22Dehashed%20URL%20(share%20this.):\n\nCopy%20the%20URL,%20then%20press%20OK%20to%20reload%20and%20confirm%20that%20it%20works,%20or%20cancel%20to%20stay%20on%20this%20page.%22,window.location.href.replace(/\/?#!?\/?/,%20%27/%27));if(null%20!==%20io)%20{window.location.href%20=%20io;}})(); |
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
PlayMusic = { | |
using: 'mog', | |
esc: function(s) { | |
return s.replace(' ', '-'); | |
}, | |
sources: { | |
'rdio': { | |
match: /rdio.com/, | |
handler: function(url) { | |
var artist='', album='', track=''; |
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
javascript:(function()%20{function%20esc(s)%20{return%20s.replace(%27%20%27,%20%27-%27);}var%20track,%20artist,%20album,links%20=%20document.getElementsByTagName(%27a%27);for(var%20i=0;l=links[i];i++)%20{if(l.href.match(/^spotify:track:/))%20{track%20=%20l.innerText;}else%20if(l.href.match(/open.spotify.com\/artist/))%20{artist%20=%20l.title;}else%20if(l.href.match(/open.spotify.com\/album/))%20{album%20=%20l.title;}}window.location.href%20=%20%27http://mog.com/music/%27%20+%20esc(artist)%20+%20%27/%27%20+%20esc(album)%20+%20%27/%27%20+%20esc(track);return%20true;})(); |
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
{ | |
'vendor': 'twitter', | |
'intents': [ | |
{ | |
'name': "Follow", | |
'verb': 'follow', | |
'url': 'http://twitter.com/intent/follow', | |
'required_params': ['screen_name'], | |
'param_map': { | |
'user_name': 'screen_name' |
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
<theme> | |
<!-- Color Variables --> | |
<color id="foreground" red="0" green="0" blue="0" alpha="1.0" /> | |
<color id="background" red="1.0" green="0.95" blue="0.6" alpha="1.0" /> | |
<color id="selection" red="0.7" green="0.835" blue="1" alpha="1.0" /> | |
<color id="tag" extendsColorID="foreground" alpha="0.7" /> | |
<color id="handle" extendsColorID="foreground" /> | |
<color id="insertionPoint" extendsColorID="foreground" /> |
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
/* Scrobble my Jam | |
* | |
* Bookmarklet JavaScript for scrobbling http://thisismyjam.com to | |
* Last.FM. If it doesn't scrobble, it doesn't count. | |
* | |
* (c) 2011 Ben Ward (@benward, http://benward.me) | |
* | |
* BSD License | |
* | |
* Instructions: Select all of the JavaScript text below, and drag it to your bookmarks |