Last active
August 29, 2015 14:08
-
-
Save sebatyler/0098d780de0444189b71 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#export LC_ALL=ko_KR.UTF-8 | |
export LC_ALL=en_US.UTF-8 | |
export TZ='Asia/Seoul' | |
set -o vi | |
# if running bash | |
if [ -n "$BASH_VERSION" ]; then | |
# include .bashrc if it exists | |
if [ -f "$HOME/.bashrc" ]; then | |
. "$HOME/.bashrc" | |
fi | |
fi | |
# set PATH so it includes user's private bin if it exists | |
if [ -d "$HOME/bin" ] ; then | |
PATH="$HOME/bin:$PATH" | |
fi | |
function gdbi () | |
{ | |
local AP_DIR=/home/ubuntu/ium-veyron/httpd; | |
$AP_DIR/bin/httpd >& /dev/null | |
local AP_PPID=`cat /home/ubuntu/ium-veyron/var/httpd.pid || cat $AP_DIR/logs/httpd.pid`; | |
local AP_PID=`ps -eo pid,ppid | awk -v ppid=$AP_PPID "{if(\\\$2==ppid)print\\\$1}" | head -1`; | |
shift; | |
test "z$AP_PID" = "z" && echo "error: cannot fine apache process id" 1>&2 && return 1; | |
sudo gdb "$@" -p $AP_PID | |
} | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment