Examine x509 Certificate
Wednesday, June 24, 2009
I've noted uses of the "openssl" command before. Here is another.
openssl x509 -text -in cert.pem
posted by Don @ 1:12 PM, , link to this post
Convert Seperate Key/Cert Files to PFX
Thursday, June 04, 2009
The reverse of the process of extracting the key/certs from a PFX can be achieved via the following:
openssl pkcs12 -export -in [certificate.crt] -inkey [private.key] -out [package.pfx]
posted by Don @ 11:21 AM, , link to this post
Recover MySQL Root Password
Monday, April 20, 2009
To recover the password for the root account on a MySQL server use the following steps. Essentially, it can be done by restarting the daemon without the grant tables.
1. Stop the currently mysql daemon# /etc/init.d/mysql stop2. Start the daemon without the grant tables# mysqld_safe --skip-grant-tables &3. Login to mysql as the root user ... it will have a blank password# mysql -u root4. Reset the root account passwordmysql> use mysql;mysql> update user set password=PASSWORD("NEW-PASSWORD") where User='root';mysql> flush privileges;mysql> quit5. Stop & restart the daemon# /etc/init.d/mysql stop# /etc/init.d/mysql start
posted by Don @ 9:46 AM, , link to this post
Content-Disposition Header
Friday, April 10, 2009
In situations where you want a file linked to from within a website to present a 'Save As' dialog rather than simply displaying the content ... you can inject a Content-Disposition header into the HTTP connection to prompt the browser to do so. I recently had a situation where I was linking to an uncommon file extension through a reverse-proxy and Internet Explorer 6 wanted to include extra URI information in the 'Save As' file name. You can force the saved file name with this header as well.
header('Content-type: text/plain');header('Content-Disposition: attachment; filename=myfile.ext');
posted by Don @ 3:18 PM, , link to this post
Upper To Lower To Upper Case Command Line
Wednesday, March 25, 2009
Nice trick to pipe command line data through to convert it's alpha characters to upper or lower case. Most people dont even realize the 'tr' command exists on most linux/shell releases.
From UPPER to lower: tr [:upper:] [:lower:]From lower to UPPER: tr [:lower:] [:upper:]Example: ls /directory | tr [:lower:] [:upper:] | sort
posted by Don @ 11:31 AM, , link to this post
Mount ISO (.iso) In Linux
Thursday, January 22, 2009
To mount an ISO (.iso) on a Linux system...
mount -t iso9660 -o ro,loop /path-to-file/file.iso /path-to-mount-point
Labels: Linux
posted by Don @ 4:44 PM, , link to this post
Enable Syntax Highlighting In Vim (vi), Mac OSX (Leopard)
Thursday, January 15, 2009
To enable the syntax highlight feature of Vim on a Mac OSX (Leopard) system, edit the /usr/share/vim/vimrc file and add the "syntax on" config.
sudo vi /usr/share/vim/vimrc
Labels: Mac
posted by Don @ 10:57 AM, , link to this post
Remotely Reboot Windows XP
Monday, January 12, 2009
Using a remote desktop client to connect to a Windows XP box will not provide you with the option to reboot or restart the remote machine. To do this from the command line, open a command prompt (Start->Run->Cmd.exe) and use the command:
shutdown -r -t 0
...to open a gui interface to manage the reboot:
shutdown -i
posted by Don @ 3:35 PM, , link to this post
Web Based Design Tools
Sunday, December 28, 2008
Some great online tools for a web designer or content creator. I frequently use the Image Optimizer to cheat some load time off my site's images.
posted by Don @ 5:17 PM, , link to this post
Mac Keyboard Shortcuts For Symbols
Saturday, December 27, 2008
Mac OSX keyboard shortcut combinations for many common symbols.
™ (trademark) = Option + 2£ (pound) = Option + 3¢ (cent) = Option + 4∞ (infinity) = Option + 5§ (section) = Option + 6¶ (paragraph) = Option + 7• (dot) = Option + 8€ (euro) = Shift + Option + 2° (degree) = Shift + Option + 8¥ (yen) = Option + y÷ (division) = Option + /± (plus/minus) = Option + =≥ (greater than or equal to) = Option + >≤ (less than or equal to) = Option + <√ (square root) = Option + vπ (pi) = Option + p≈ (approx.) = Option + x∆ (delta) = Option + j∑ (sum) = Option + wΩ (ohm) = Option + zµ (micro) = Option + m© (copyright) = Option + g® (registered) = Option + r† (dagger) = Option + t
Labels: Mac
posted by Don @ 5:45 PM, , link to this post
About This Blog
This blog is a place where I hope to put the snippets and trimmings of my geek'dom ... code samples that have served me well, tech links and other such things that'll I find useful. In short, any time I have to Google something, I tend to post it here for others to find as well.
Also, having owned 'digital-penguin.com' for many years and having worked with many a fellow geek, this site also serves as a place where I can always be found.
