Jono Cole jonocole

View lastfm_skip.bash
1 2 3 4 5 6 7 8 9 10
patch -d /Applications/Last.fm.app/Contents <<EOF
--- Info.plist
+++ Info.plist
@@ -2,6 +2,11 @@
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
+ <key>LSEnvironment</key>
+ <dict>
+ <key>LASTFM_SKIP_LIMIT</key>
View Spotify Silencer.applescript
1 2 3 4 5 6 7 8 9 10
-- This isn't pretty but it works.
 
tell application "Spotify"
set old_volume to sound volume
repeat
if player state is playing then set current_album to album of current track
if player state is playing and (current_album starts with "http://" or current_album starts with "https://" or current_album starts with "spotify:") then
set sound volume to 0
play
else
View gist:1471645
1 2 3 4 5 6 7 8 9 10
function gitbranch {
BRANCH=$(git branch 2> /dev/null |grep \\\*.\*$|sed 's:^. \(.*\):\1:g')
if [ "$BRANCH" ]; then
echo -n "($BRANCH)"
fi
}
 
if [ "$color_prompt" = yes ]; then
PS1='\n${debian_chroot:+($debian_chroot)}\[\033[01;32m\]\u@\h\[\033[00m\]:\[\033[01;34m\]\w\[\033[00m\]\n\[\033[01;35m\]$(gitbranch)\[\033[00m\]\$ '
else
View backmaskr.bash
1 2 3 4 5 6 7 8 9
#!/bin/bash
if [[ $# == 0 ]]; then
echo $0 [mp3 filename] [header filename]
exit
fi
 
echo -n 'static char audiodata[] = {' > $2
sox "$1" -t raw -r 8000 -c1 -s -2 - trim 0 10|xxd -i >> $2
echo -n '}; char* fun(){ return audiodata; }' >> $2
View r
1 2 3 4 5 6 7
#!/bin/bash
BIN=${*:1}
cd `dirname $BIN`
DYLD=`pwd`
cd -
export DYLD_LIBRARY_PATH=$DYLD
$BIN
Something went wrong with that request. Please try again.