Skip to content

Instantly share code, notes, and snippets.

View obihann's full-sized avatar

Jeffrey Hann obihann

View GitHub Profile
@rkumar
rkumar / itunes.sh
Created August 1, 2010 09:23
control iTunes from command line
#!/bin/bash
#
####################################
# iTunes Command Line Control v1.0
# written by David Schlosnagle
# created 2001.11.08
# edit 2010.06.01 rahul kumar
####################################
showHelp () {
@fnhipster
fnhipster / html5.haml
Created April 9, 2011 01:19
HTML5 HAML Template
!!! 5
%html
%head
%title= "Your Website"
%meta{ :content => "", :name => "description" }
%meta{ :content => "", :name => "author" }
%meta{ :content => "3 days", :name => "revisit-after" }
%link{ :href => "http://creativecommons.org/licenses/by/3.0/", :rel => "license", :title => "Creative Commons Attribution 3.0 Unported License" }
%link{ :href => "/feed", :rel => "alternate", :title => "Atom", :type => "application/atom+xml" }
%link{ :href => "/css/screen.css", :media => "screen", :rel => "stylesheet" }
@padcom
padcom / update
Created September 8, 2012 17:06
Git update hook forcing the existence of Jira ticket id at the beginning of the subject (first line in commit message)
#!/bin/bash
refname="$1"
oldrev="$2"
newrev="$3"
result=0
# Make sure we handle the situation when the branch does not exist yet
if ! [ $oldrev = 0000000000000000000000000000000000000000 ] ; then
excludes=( ^$oldrev )
@nikcub
nikcub / README.md
Created October 4, 2012 13:06
Facebook PHP Source Code from August 2007
@pixelhandler
pixelhandler / pre-push.sh
Last active July 2, 2024 11:27
Git pre-push hook to prevent force pushing master branch
#!/bin/sh
# Called by "git push" after it has checked the remote status,
# but before anything has been pushed.
#
# If this script exits with a non-zero status nothing will be pushed.
#
# Steps to install, from the root directory of your repo...
# 1. Copy the file into your repo at `.git/hooks/pre-push`
# 2. Set executable permissions, run `chmod +x .git/hooks/pre-push`
@JonathanHindi
JonathanHindi / inAppBrowser.js
Last active December 9, 2019 16:34
[PhoneGap] Open any external link inside PG inAppBrowser
/* Handle any link start with http or https using PhoneGap (Cordova) inAppBrowser
* Options you can set data-in-app-browser html attribute to one of the
* following options:
* _self - opens in the Cordova WebView if url is in the white-list, else it opens in the InAppBrowser
* _blank - always open in the InAppBrowser
* _system - always open in the system web browse
*/
$(document).on('click', 'a[href^=http], a[href^=https]', function(e){
@mikerudolph
mikerudolph / Rdio Proxy
Last active March 11, 2016 18:19
I wanted to see how easy it was to download Rdio songs as you listen to them, turns out its just as easy as I though.
var http = require('http'),
url = require('url'),
fs = require('fs');
var port = 9000;
var httpServer = http.createServer(function(request, response) {
var parsedUrl = url.parse(request.url);
var requestData;
var requestOpts = {
@jewel-andraia
jewel-andraia / README.md
Last active December 11, 2021 06:24
@gavin19's RES settings backup script

@gavin19 said...:

I [gavin19] also wrote this very simple Python script that can take a Chrome chrome-extension_kbm..localstorage file as input and output to the Firefox store.json type. Just copy the old Chrome settings file to the same directory as the script and rename to res.db. Running python chrToFF.py should output a valid Firefox-worthy replica.

@okunishinishi
okunishinishi / Remove all git tags
Created March 8, 2014 03:12
Delete all git remote tags
#Delete local tags.
git tag -l | xargs git tag -d
#Fetch remote tags.
git fetch
#Delete remote tags.
git tag -l | xargs -n 1 git push --delete origin
#Delete local tasg.
git tag -l | xargs git tag -d