Apache Log Grepping

14 September 2009

Nothing beats a full stats package, but with a little grepping and a logfile and we can figure out some quick statistics. Get only hits coming from Google.com/search: grep ‘google.com/search’ access_log | head -1 Extract only the referrer field: grep ‘google.com/search’ access_log | head -1 | awk ‘{print $11}’ Get the search terms only: grep [...]

Read the full article →

Find setuid root Files

10 September 2009

Find all setuid / setgid files owned by root:
find / -user root -type f \( -perm -4000 -o -perm -2000 \) -exec ls -ld ‘{}’ \;

Find all setuid / setgid files owned by any user:
find / -type f \( -perm -4000 -o -perm -2000 \) -exec ls -ld ‘{}’ \;

Read the full article →

Debugging HTTP Headers with cURL

31 August 2009

curl -I http://damonparker.org More info on cURL

Read the full article →

Back

29 August 2009

After nearly two years with not much to say, I decided to pick up the blog again. It was a long and winding journey, this time in between. Maybe more on that later. I should be updating the pages of the blog with current info about myself and my projects over the next few weeks. [...]

Read the full article →

DNS, Lookupd and OS X

15 November 2007

Pre-Leopard the command to force OS X to flush and reload it’s DNS cache was: sudo lookupd -flushcache In Leopard, lookupd no longer exists. Instead force a DNS cache refresh with: sudo dscacheutil -flushcache

Read the full article →

OSX Scrollbars Top and Bottom

5 November 2007

In Terminal: defaults write "Apple Global Domain" AppleScrollBarVariant DoubleBoth

Read the full article →

MailAnnounce Applescript Source

9 October 2007

I have received several requests for the source of my MailAnnounce script that is able to speak the subject of mails using Mail.app and Applescript. Source for version 1 of the script is now available.

Read the full article →

rpmdb: unable to join the environment

10 September 2007

This weekend I was contacted by a client regarding a server that had run out of room on the main hard drive. Among the things that were corrupted by the drive filling up was the RPM database. When trying to query of upgrade any package, the error message rpmdb: unable to join the environment error: [...]

Read the full article →

Blattodephobia

10 September 2007

n. The fear of cockroaches

Read the full article →

Quickly Copy MySQL Database to Remote Host

31 August 2007

Copy an entire database: mysqldump LOCAL_DBNAME | ssh USER@REMOTE_HOST mysql -p REMOTE_DBNAME Copy a single table: mysqldump LOCAL_DBNAME LOCAL_TABLE | ssh USER@REMOTE_HOST -p REMOTE_DBNAME REMOTE_TABLE This shortcut only works if you can access the local DB without a password. If you have to login to both local and remote MySQL servers, the MySQL password prompts [...]

Read the full article →