CartMetrix - Do you know yours?

6/30/2006

Statistics With MySQL

Need a quick count of repeated occurences of matching rows for statistical analysis?

SELECT search_query, count( search_query ) AS total
FROM search_log
GROUP BY search_query
ORDER BY total DESC

Popularity: 23%

6/26/2006

OpenSSL Secure Certificate Tricks

Create RSA private key

openssl genrsa -des3 -out host.domain.com.key 1024

Generate CSR

openssl req -new -key host.domain.com.key -out host.domain.com.csr

Verify data in CSR

openssl req -noout -text -in host.domain.com.csr

Generate a self-signed certificate (for testing only)

openssl req -new -x509 -nodes -out host.domain.com.crt -keyout host.domain.com.key

Remove passphrase from a key

openssl rsa -in host.domain.com.key -out host.domain.com.pem

Related Link: SSL Certificates available here with 256 bit encryption certs. A trusted secure server authority.

Popularity: 17%

Automating Screen Shots on Mac OSX

MacWorld published a screenshot automation AppleScript which automatically names the file with the date and time and saves the screen shot in the Pictures folder then opens the image in Preview.

The AppleScript works great, so I added an option to add my own names instead of the date and time.

Download: ScreenShot.scpt

Popularity: 17%

6/23/2006

MySQL Client Security on the Command Line

The MySQL client allows specifying the database password on the command line using the following parameters:

mysql -utheusername -pthepassword thedatabasename

If you are in a habit of doing this… STOP NOW!

If you are using a shell like Bash, the password is saved in the bash_history file. Should anyone into the server, they can easily get your MySQL password by viewing the history file.

Altering the command line to:

mysql -utheusername -p thedatabasename

Causes MySQL to ask for the password, so that it cannot be stored in the history.

Proper security is layered. Just because one account password is hacked, doesn’t mean you should give away the keys to MySQL too!

Popularity: 18%

Hegemony

Hegemony is the dominance of one group over other groups, with or without the threat of force, to the extent that, for instance, the dominant party can dictate the terms of trade to its advantage; more broadly, cultural perspectives become skewed to favor the dominant group. Hegemony controls the ways that ideas become “naturalized” in a process that informs notions of common sense.

Wikipedia: Hegemony

Popularity: 19%

6/20/2006

MySQL RAND Function To Randomly Populate Table

MySQL’s RAND() function can be used to set random values or fill a table with random data.

The following SQL snippet will change column1 in all rows to a random number 0-50.

UPDATE tablename SET column1 = (rand() * 50)

Popularity: 29%

Next Page »


damonparker.org is proudly powered by WordPress
Entries (RSS) and Comments (RSS).

copyright © 2002-2008 damonparker.org. all rights reserved.

Close
E-mail It