Skip to content

Instantly share code, notes, and snippets.

@jhubert
jhubert / FindMusicVideoForCurrentTrack.scpt
Created March 7, 2009 21:46
An applescript for finding the music video for whatever song you're listening to in iTunes
property baseURL : "http://jeremyhubert.com/playground/mvs/?song="
tell application "iTunes"
-- get a reference to playing or selected track
if player state is not stopped then
set theTrack to current track
else if selection is not {} then
set theTrack to (item 1 of selection)
else
r = Grit::Repo.new('test.git')
i = r.index
i.add('my file.txt', 'hello world! 1')
i.commit('my first commit')
i.add('my file.txt', 'hello world! 2')
i.commit('my second commit')
i.add('my file.txt', 'hello world! 3')
i.commit('my third commit')
huh
testing
git archive --remote=/Users/jhubert/repos/myrepo.git HEAD
works: git --git-dir=/Users/jhubert/repos/myrepo.git archive HEAD
doesnt: git archive --remote=/Users/jhubert/repos/myrepo.git HEAD
The second one doesn't return from the output. It waits.
I have to ctrl+c out of it in order to get back to a command prompt.
match('/:key(/:id)(/:action)(.:format)',
:paste_key => /^[0-9]+|[a-z0-9]{14}$/,
:id => /^[a-z0-9]{40}$/
).to(:action => 'show')
if(typeof(DeviceInfo)!="object"){DeviceInfo={}}
PhoneGap={queue:{ready:true,commands:[],timer:null},_constructors:[]};
PhoneGap.available=DeviceInfo.uuid!=undefined;
PhoneGap.addConstructor=function(a){var b=document.readyState;if(b!="loaded"&&b!="complete"){PhoneGap._constructors.push(a)}else{a()}};
(function(){var a=setInterval(function(){var c=document.readyState;if(c!="loaded"&&c!="complete"){return}clearInterval(a);while(PhoneGap._constructors.length>0){var b=PhoneGap._constructors.shift();try{b()}catch(d){if(typeof(debug.log)=="function"){debug.log("Failed to run constructor: "+d.message)}else{alert("Failed to run constructor: "+d.message)}}}},1)})();
PhoneGap.exec=function(){PhoneGap.queue.commands.push(arguments);if(PhoneGap.queue.timer==null){PhoneGap.queue.timer=setInterval(PhoneGap.run_command,10)}};
PhoneGap.run_command=function(){};
function Device(){this.available=PhoneGap.available;this.model=null;this.version=null;this.gap=null;this.uuid=null;try{if(window.DroidGap!=undefined&&window.DroidGap.
def render_partial_if_exists(path)
render :partial => path if partial_template_exists?(path)
end
def partial_template_exists?(path)
erb_template_exists?(partial_pieces(path).join('/_'))
end