Sadie chewing on her toy


"They say you die twice: once when you take your final breath, and again when someone says your name for the last time." — Banksy.

Crossing Dog Breeds with a Pomeranian

Why is it that when you cross most dog breeds with a Pomeranian, the result is very cute?

This is Sadie ( http://www.dogster.com/dogs/1326662 )
She's a cross between a Jack Russell Terrier and a Pomeranian.


How do I prepend text to a file?

Q:  I know I can redirect standard output to a text file, and the output will be written to the end of the file (append), but how do I add a line of text to the BEGINNING of a text file?

A: Easy, if you use sed. Here's an example of a commandline where I use sed to add "some text to prepend" to the begining of a file called "testfile1.txt":


sed -i '1s/^/some text to prepend\n/' testfile1.txt


Now if you look at the contents of the file, the original line 1 is now line 2, and the new line 1 reads "some text to prepend". The n at the end of the line adds a "newline" control character to the end of the line of text.
 

How do I show all installed RPM GPG keys on my CentOS Linux system?

Use the following command to generate
a list of all installed RPM GPG keys:

 
rpm -q gpg-pubkey --qf '%{name}-%{version}-%{release} --> %{summary}\n'

How to make an OpenSSL key that is AES256 Encrypted

[root@host CA]# openssl dsaparam -out dsaparam.pem 2048
Generating DSA parameters, 2048 bit long prime
This could take some time
..........+.+..+.......+..................+..+.............+......+.........+........+.+.........+..+...........+...................+.+....................................................+++++++++++++++++++++++++++++++++++++++++++++++++++*
........+........+............+.+...........+..+.+...................+........+....+.....+........................+..+........+.....+............................................+................+..........+..........+.......+.........+..+.+.....+...........................+.......+........+..........+...................+.......+...+.+..............................+...+.+++++++++++++++++++++++++++++++++++++++++++++++++++*
[root@host CA]# openssl gendsa -aes256 -out pete.key dsaparam.pem
Generating DSA key, 2048 bits
Enter PEM pass phrase:
Verifying - Enter PEM pass phrase:
[root@host CA]#

grep

"Grep was created by Ken Thompson as a standalone application adapted from the regular expression parser he had written for ed (which he also created). In ed, the command g/re/p would print all lines matching a previously defined pattern. Grep first appeared in the man page for Unix Version 4." --Wikipedia