Generate a random string from the Linux Command Line

You could use this command from the Linux command line prompt to generate a random 15-character string of letters and numbers:

/usr/bin/gpg --gen-random --armor 1 15 | sed 's/[^[:alnum:]]//g'

The sed statement removes all non-alphanumeric characters from the output generated by the gpg command.

This command comes in handy for generating random passwords for people you do not like. 

Today in Geek History

On Saturday March 24 1984, five students report at 7:00am for all-day detention at Shermer High School, in Shermer Illinois, a suburb of Chicago. Say hello to "The Breakfast Club".


What Kind of Dungeons and Dragons Character Would You Be?

I Am A: Neutral Good Human Ranger (7th Level)

Ability Scores:
Strength-10
Dexterity-10
Constitution-12
Intelligence-14
Wisdom-13
Charisma-12

Alignment:
Neutral Good A neutral good character does the best that a good person can do. He is devoted to helping others. He works with kings and magistrates but does not feel beholden to them. Neutral good is the best alignment you can be because it means doing what is good without bias for or against order. However, neutral good can be a dangerous alignment when it advances mediocrity by limiting the actions of the truly capable.

Race:
Humans are the most adaptable of the common races. Short generations and a penchant for migration and conquest have made them physically diverse as well. Humans are often unorthodox in their dress, sporting unusual hairstyles, fanciful clothes, tattoos, and the like.

Class:
Rangers are skilled stalkers and hunters who make their home in the woods. Their martial skill is nearly the equal of the fighter, but they lack the latter's dedication to the craft of fighting. Instead, the ranger focuses his skills and training on a specific enemy a type of creature he bears a vengeful grudge against and hunts above all others. Rangers often accept the role of protector, aiding those who live in or travel through the woods. His skills allow him to move quietly and stick to the shadows, especially in natural settings, and he also has special knowledge of certain types of creatures. Finally, an experienced ranger has such a tie to nature that he can actually draw on natural power to cast divine spells, much as a druid does, and like a druid he is often accompanied by animal companions. A ranger's Wisdom score should be high, as this determines the maximum spell level that he can cast.

Find out What Kind of Dungeons and Dragons Character Would You Be?, courtesy of Easydamus (e-mail)

Going back to College...

I am now a student at Capella University for the BS Information Technology FlexPath program with a Specialization in General Information Technology, beginning April 13, 2015.

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]#