Skip to content

Instantly share code, notes, and snippets.

View phildobbin's full-sized avatar

Phil Dobbin phildobbin

View GitHub Profile
@dzaporozhets
dzaporozhets / gitlab_gitolite.sh
Created October 24, 2012 13:58
Fix gitolite for gitlab 3
# GITOLITE 3
sudo -u git -H sed -i "s/\(GIT_CONFIG_KEYS\s*=>*\s*\).\{2\}/\1'\.\*'/g" /home/git/.gitolite.rc
# GITOLITE 2
sudo -u git -H sed -i 's/\(GL_GITCONFIG_KEYS\s*=>*\s*\).\{2\}/\1"\.\*"/g' /home/git/.gitolite.rc
@ejschmitt
ejschmitt / gist:3790307
Created September 26, 2012 20:16
Install vim on heroku
cd /tmp && curl -O ftp://ftp.vim.org/pub/vim/unix/vim-7.3.tar.bz2 && bunzip2 -c vim-7.3.tar.bz2 | tar -xf - && cd vim73 && ./configure --prefix=/tmp && make install && echo PATH='$PATH:/tmp/bin/' > path && source path
@clarkware
clarkware / lyrics.rb
Created September 10, 2012 20:05
Random Lyrics
#!/usr/bin/env ruby
# API Documentation at http://api.wikia.com/wiki/LyricWiki_API
require 'open-uri'
require 'json'
require 'tmpdir'
ARTIST = "Johnny Cash"
#!/bin/bash
# Formats a man page for reading in a browser, and opens it. Example:
#
# hman xsltproc
#
stylesheet=$(cat <<eocss
<?xml version="1.0" encoding="UTF-8"?>
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
<xsl:output method="html" encoding="UTF-8" indent="yes"/>
@fracai
fracai / periodic-port.sh
Created April 7, 2012 02:08
A script to update MacPorts, fetch outdated ports, compile them, remove the inactive duplicates, and then sign the archives.
#!/bin/sh
# update macports and list outdated software
HOST=$(hostname|sed "s/.local//")
/bin/echo "=== Update MacPorts" | /opt/local/bin/gawk '{print strftime("%b %d %H:%M:%S"),"'${HOST}'",$0; fflush() }'
/opt/local/bin/port selfupdate --nosync 2>&1 | /opt/local/bin/gawk '{print strftime("%b %d %H:%M:%S"),"'${HOST}'",$0; fflush() }'
@fholgado
fholgado / .tmux.conf
Created March 6, 2012 01:37
Show iTunes current track/song in tmux
# Custom status bar
# # Powerline symbols: ⮂ ⮃ ⮀ ⮁ ⭤
set -g status-left-length 32
set -g status-right-length 150
set -g status-interval 5
set -g status-left '#[fg=colour16,bg=colour254,bold] #S #[fg=colour254,bg=colour234,nobold]⮀'
set -g status-right '#[fg=colour245]⮃ %R ⮃ %d %b #[fg=colour254,bg=colour234,nobold]#(~/Documents/AppleScripts/itunes-current-track-tmux.sh)⮂#[fg=colour16,bg=colour254,bold] #h '
# set -g status-right '#(~/Documents/AppleScripts/itunes-current-track-tmux.sh)'
set -g window-status-format "#[fg=white,bg=colour234] #I #W "
set -g window-status-current-format "#[fg=colour234,bg=colour39]⮀#[fg=colour16,g=colour39,noreverse,bold] #I ⮁ #W #[fg=colour39,bg=colour234,nobold]⮀"
@henrik
henrik / Deploy.tmCommand
Created October 21, 2009 07:55
TextMate command to deploy a Jekyll site through a tasks/deploy shell script.
<?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>beforeRunningCommand</key>
<string>nop</string>
<key>bundleUUID</key>
<string>C9BD1ADE-4FD9-4842-A641-DFB373B7D42C</string>
<key>command</key>
<string>#!/usr/bin/env ruby