Skip to content

Instantly share code, notes, and snippets.

View swr's full-sized avatar

Sean W. Richardson swr

View GitHub Profile
@swr
swr / mysql db user creation
Created September 24, 2009 23:53
mysql db commands
mysql -u root -p
CREATE DATABASE databasename;
GRANT ALL PRIVILEGES ON databasename.* TO "wordpressusername"@"hostname" IDENTIFIED BY "password";
FLUSH PRIVILEGES;
EXIT
@zaius
zaius / background.sh
Created January 16, 2011 23:29
How to redirect a running process output to a file and log out
ctrl-z
bg
touch /tmp/stdout
touch /tmp/stderr
gdb -p $!
# In GDB
p dup2(open("/tmp/stdout", 1), 1)
p dup2(open("/tmp/stderr", 1), 2)