Your shopping cart is empty.

Latest Posts

Linux Command Reference

Included below are some commands that I have found, created or tweaked to help make life easier along the way. I have collected them here so I can easily refer to them instead of buildling up the commands from scratch. Some are very simple, others are approaching "script" level. Hopefully others will find them useful as well.

Misc Linux Commands

Find and compress all PNG files under the apache web root:


The Joy of OpenSSL

Get into the correct directory:
cd /etc/pki/tls/certs

Generate key
openssl genrsa -des3 -out mike.key 4096
chmod 600 mike.key

Generate signing request
openssl req -new -key mike.key -out mike.csr
chmod 600 mike.csr

Get the CA to sign the request
openssl x509 -req -days 10000 -in mike.csr -out mike.cert \
-CA /etc/pki/tls/certs/ \
-CAkey /etc/pki/tls/certs/ -CAcreateserial

Wireshark and tcpdump

Wireshark and tcpdump are extremely powerful network troubleshooting tools. Here are some command examples that may be useful.

SQL Command Reference

Deactivate all inactive users in the last year:

UPDATE `smf_members` SET `is_activated` = 0, `validation_code` = `dateRegistered`
WHERE (UNIX_TIMESTAMP() - `lastLogin`) / 86400 >= 365
AND (UNIX_TIMESTAMP() - `dateRegistered`) / 86400 >= 365;

Search and replace text in the "body" field (note that it must be updated in 2 places):

UPDATE smf_messages SET body = replace(body,'OLD','NEW');

Append a value to a field, if it's not already present:



Getting SELinux working can be tough. Here are some commands I found useful.

Show the security context of a file:

ls -lZ

Copy the context from one file to another:

chcon --reference=<source> <destination>

Create a rule from an audit log (contained in /tmp/selinux):

/usr/bin/audit2allow -i /tmp/selinux

Explain an audit log (that appears in dmesg):

/usr/bin/audit2why -d

Reading an audit entry:

Kids Quotes

...because sometimes kids say the darndest things.


Age 1-2

"Look at all the STUFF!" (Said to Annette, while she was getting in the shower.)
- 1998

"Holy Jesus, it's beautiful!" (Said about a newly added Christmas decoration.)
- December 1999

Age 3

"Daddy knows all about cheese in my hand." (Said to DJ when I went to get Sarah a cheese slice.)
- July 2000


How to check for an open relay

To see if is an open relay, you can run through the following sequence on any box that has a telnet client:

telnet 25
From: "Relay Test"
To: Mike
Subject: Open Relay Test
This is a relay test. A properly configured mail server
should decline to relay this message.

Using a Linux Webcam

It's actually surprisingly easy. Install fswebcam (preferably via RPM) and then run this command:

/usr/bin/fswebcam --quiet --background --loop 120 --skip 40 \
--timestamp "%d-%m-%Y %H:%M:%S (%Z)" --png --palette png \
--font /usr/share/fonts/liberation/LiberationMono-Regular.ttf \
--resolution 640x480 --info "The Bobbitt Family" --top-banner \
--save /var/www/webcam/webcam.png


Adobe Photoshop Tips

Colouring Pages

  • Open the image
  • Image --> Image Size --> 720x540
  • Image --> Mode --> Grayscale
  • Filter --> Sketch --> Photocopy
  • Settings
    • Detail: 2
    • Darkness: 25
  • Blur More Intro Pics

  • Image --> Adjustments Gradient Map to #003300 --> 009900 (reverse)
  • Filter --> Sketch --> Photocopy
  • Settings
    • Detail: 12
    • Darkness: 50

Secure, Automated Backups

After a fair amount of trial and error, I have finally discovered a way to back up files on one system over the Internet, to a remote system in a secure, automated way.



Twitter Updates

cd “../Saint John” 4 days 17 hours ago
RT : super excited to have been a part of this oh boy 2 weeks 4 hours ago