Skip to content

Instantly share code, notes, and snippets.

@baopham
baopham / bash_completion.sh
Created April 1, 2012 01:12
bash_completion
#
# bash_completion - programmable completion functions for bash 3.2+
#
# Copyright © 2006-2008, Ian Macdonald <ian@caliban.org>
# © 2009-2011, Bash Completion Maintainers
# <bash-completion-devel@lists.alioth.debian.org>
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 2, or (at your option)
@baopham
baopham / affirmation
Created November 26, 2015 19:55
MuleSoft Contributor Agreement Acceptance by Bao Pham
I, Bao Pham, have read and do accept the MuleSoft Contributor Agreement
at http://www.mulesoft.org/legal/contributor-agreement.html
Accepted on Thu Nov 26 2015 11:55:06 GMT-0800 (PST)
@baopham
baopham / affirmation
Created November 23, 2015 20:29
MuleSoft Contributor Agreement Acceptance by Bao Pham
I, Bao Pham, have read and do accept the MuleSoft Contributor Agreement
at http://www.mulesoft.org/legal/contributor-agreement.html
Accepted on Mon Nov 23 2015 12:29:53 GMT-0800 (PST)
# GistId: f5e29984c42dc4067979
# First remove *all* keybindings
unbind-key -a
# Now reinsert all the regular tmux keys
bind-key C-b send-prefix
bind-key C-o rotate-window
bind-key C-z suspend-client
bind-key Space next-layout
bind-key ! break-pane
@baopham
baopham / .tmux.conf
Last active October 16, 2015 07:36
.tmux.conf
# GistID: 11072193
source-file ~/.tmux.reset.conf
set -g default-terminal "screen-256color"
set-option -g xterm-keys
# Change prefix key to `
set-option -g prefix `
@baopham
baopham / prompt_bpm_setup
Created December 7, 2012 04:54
Prezto bpm theme
#
# Based on sorin theme
#
# Authors:
# Bao Pham <gbaopham@gmail.com>
#
# Screenshots:
# http://cl.ly/image/0O3y120B0T1z
# http://cl.ly/image/111H2O170z0Q
#
@baopham
baopham / Adium.applescript
Created November 26, 2012 09:02
Adium applescript for Quicksilver
registerGrowl()
using terms from application "Quicksilver"
on process text im_text
set im_command to parseCommand(im_text)
runCommand(command of im_command, message of im_command)
end process text
end using terms from
on parseCommand(im_text)
repeat with im_delimiter_position from 1 to (length of im_text)
@baopham
baopham / gist:4090093
Created November 16, 2012 19:23
Powerline for Undotree
diff --git a/autoload/Powerline/Matches.vim b/autoload/Powerline/Matches.vim
index 5cce475..3218228 100644
--- a/autoload/Powerline/Matches.vim
+++ b/autoload/Powerline/Matches.vim
@@ -10,4 +10,6 @@ let g:Powerline#Matches#matches = {
\ 'minibufexplorer' : Pl#Match#Add('bufname("%")', '\-MiniBufExplorer\-'),
\ 'tagbar' : Pl#Match#Add('&ft' , 'tagbar'),
\ 'nerdtree' : Pl#Match#Add('&ft' , 'nerdtree'),
+ \ 'undotree' : Pl#Match#Add('bufname("%")', 'undotree'),
+ \ 'diffpanel' : Pl#Match#Add('bufname("%")', 'diffpanel'),
@baopham
baopham / Messages.applescript
Created July 28, 2012 07:33
Quicksilver + Messages
using terms from application "Quicksilver"
on process text im_text
set im_command to parseCommand(im_text)
runCommand(contact of im_command, message of im_command)
end process text
end using terms from
on parseCommand(im_text)
repeat with im_delimiter_position from 1 to (length of im_text)
set ch to character im_delimiter_position of im_text
@baopham
baopham / apache.md
Created June 5, 2012 17:14
Apache notes

To set up a new domain name

$ sudo cp /etc/apache2/sites-available/default /etc/apache2/sites-available/mynewsite
  • Change the line DocumentRoot /var/www/ to DocumentRoot /var/www/mynewsite

  • Create an alias in /etc/apache2/sites-enabled: