Skip to content

Instantly share code, notes, and snippets.

# Updated version is always at: https://gist.github.com/febuiles/1549991
#!/bin/bash
artist=`osascript -e'tell application "iTunes"' -e'get artist of current track' -e'end tell'`
title=`osascript -e'tell application "iTunes"' -e'get name of current track' -e'end tell'`
song=`curl -s --get "https://makeitpersonal.co/lyrics" --data-urlencode "artist=$artist" --data-urlencode "title=$title"`
echo -e "$artist - $title\n$song"
@xream
xream / MacVPN.sh
Created January 9, 2012 12:27
Mac VPN auto reconnect script
#!/bin/bash
#set the VPN service name
VPN=""
function xxre () {
echo "VPN is not connected!"
echo "Reconnecting!"
networksetup -connectpppoeservice $VPN
sleep 5
}
ifconfig|grep ppp0||xxre
@typeoneerror
typeoneerror / Bash.sublime-build
Created January 11, 2012 20:18
Bash build system for running currently open script in Sublime Text 2
{
"cmd" : ["$file"],
"selector" : "source.shell",
"shell" : "bash"
}
@brockboland
brockboland / local.settings.php
Created January 18, 2012 16:14
My local settings for Drupal sites
<?php
/**
* @file
* local.settings.php
*
* This settings file is intended to contain settings specific to a local
* development environment, by overriding options set in settings.php.
*
* Include this file from your regular settings.php by including this at the
* bottom:
@liamcain
liamcain / Refresh.tmTheme
Created January 22, 2012 15:49
Refresh: colorscheme for Sublime Text 2 or Textmate (modified from IR_Black)
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>name</key>
<string>Refresh</string>
<key>settings</key>
<array>
<dict>
<key>settings</key>
@burke
burke / 0-readme.md
Created January 27, 2012 13:44 — forked from funny-falcon/cumulative_performance.patch
ruby-1.9.3-p327 cumulative performance patch for rbenv

ruby-1.9.3-p327 cumulative performance patch for rbenv

This installs a patched ruby 1.9.3-p327 with various performance improvements and a backported COW-friendly GC, all courtesy of funny-falcon.

Requirements

You will also need a C Compiler. If you're on Linux, you probably already have one or know how to install one. On OS X, you should install XCode, and brew install autoconf using homebrew.

@victorquinn
victorquinn / VolumeAdjust.applescript
Last active February 10, 2018 07:26
Alfred Adjust Volume Applescript
on alfred_script(q)
set tmp to splitString(q, " ")
set q to item 1 of tmp
if length of tmp is 2 then
set change to item 2 of tmp
else
set change to 10
end if
set current to output volume of (get volume settings)
@amotl
amotl / README.rst
Created February 12, 2012 23:16
memmem-fix for tor-0.2.3.12-alpha on mac os x < 10.7

Problem

./tor --version
Tor version 0.2.3.11-alpha-dev (git-5d763b3d0bf8898e).

Tor compiled on Mac OS X 10.7 (Lion), but running on 10.6.8 (Snow Leopard):

@tjluoma
tjluoma / reset-safari.sh
Created February 23, 2012 16:35
this will delete all of Safari's cookies, local storage (including website previews) and database files.
#!/bin/sh
# LogoutHooks run as root, which is why you have to
# use logname to make sure you are cleaning out the right files
cd ~`/usr/bin/logname` &&
/bin/rm -rf \
Library/Cookies/Cookies.binarycookies \
Library/Caches/com.apple.Safari/* \
Library/Safari/LocalStorage/* \
Library/Safari/Databases/*
@jeredb
jeredb / Log to Day One.scpt
Created February 24, 2012 19:26
Based on Brett Terpstra's Log Taskpaper Archives to Day One, except for Omnifocus.
(*
Jered Benoit
jeredb.com
Omnifocus -> Day One Daily Completed Task Log
Based upon [Version 1.0] [1] of [OmniFocus - Weekly Project Report Generator] [2]
Originally Authored by Chris Brogan and Rob Trew
February 5, 2012