Skip to content

Instantly share code, notes, and snippets.

@rvanzee
rvanzee / .gitignore
Created Apr 10, 2012
Template .gitignore file for WordPress projects
View .gitignore
# 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 Apr 10, 2012
nginx config file
View nginx.conf
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 Apr 10, 2012
PHP-FPM config (www.conf)
View 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 Apr 10, 2012
Update the Dotdeb repository
View shell
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 Apr 10, 2012
install sudo
View shell
apt-get install sudo
@rvanzee
rvanzee / git-completion.sh
Created Apr 10, 2012
Git auto-complete script
View git-completion.sh
#!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 Apr 10, 2012
Bash prompt customization
View .bashrc
#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"