Skip to content

Instantly share code, notes, and snippets.

@rvanzee
rvanzee / .gitignore
Created April 10, 2012 16:00
Template .gitignore file for WordPress projects
# This is a template .gitignore file for git-managed WordPress projects.
#
# Fact: you don't want WordPress core files, or your server-specific
# configuration files etc., in your project's repository. You just don't.
#
# Solution: stick this file up your repository root (which it assumes is
# also the WordPress root directory) and add exceptions for any plugins,
# themes, and other directories that should be under version control.
#
# See the comments below for more info on how to add exceptions for your
@rvanzee
rvanzee / nginx.conf
Created April 10, 2012 15:32
nginx config file
user www-data;
worker_processes 4;
worker_cpu_affinity 0001 0010 0100 1000;
error_log /var/log/nginx/error.log;
pid /var/run/nginx.pid;
events {
worker_connections 2048;
}
@rvanzee
rvanzee / www.conf
Created April 10, 2012 15:22
PHP-FPM config (www.conf)
; Start a new pool named 'www'.
; the variable $pool can we used in any directive and will be replaced by the
; pool name ('www' here)
[www]
; Per pool prefix
; It only applies on the following directives:
; - 'slowlog'
; - 'listen' (unixsocket)
; - 'chroot'
@rvanzee
rvanzee / shell
Created April 10, 2012 15:17
Update the Dotdeb repository
cd /usr/local/src
wget http://www.dotdeb.org/dotdeb.gpg
cat dotdeb.gpg | sudo apt-key add -
rm dotdeb.gpg
apt-get update
apt-get upgrade
@rvanzee
rvanzee / shell
Created April 10, 2012 14:57
install sudo
apt-get install sudo
@rvanzee
rvanzee / git-completion.sh
Created April 10, 2012 14:15
Git auto-complete script
#!bash
#
# bash completion support for core Git.
#
# Copyright (C) 2006,2007 Shawn O. Pearce <spearce@spearce.org>
# Conceptually based on gitcompletion (http://gitweb.hawaga.org.uk/).
# Distributed under the GNU General Public License, version 2.0.
#
# The contained completion routines provide support for completing:
#
@rvanzee
rvanzee / .bashrc
Created April 10, 2012 14:06
Bash prompt customization
#show git branch name in prompt
PS1='\[\e[1;32m\]\u: $CurDir $(__git_ps1 " (%s)")\$\[\e[0m\] '
# make bash autocomplete with up arrow
bind '"\e[A":history-search-backward'
bind '"\e[B":history-search-forward'
# make tab cycle through commands instead of listing
bind '"\t":menu-complete'
bind "set completion-ignore-case on"