Posts

RHCE Flash Cards

Image
I came up with some flashcards based on commonly used redhat linux commands. Here is my working draft. RHCE -Flash-Cards These notes should be helpful to anyone working on Redhat Enterprise Linux (RHEL), or preparing for the RHCE exam. My RHCE Study Guide was hugely popular, but unfortunately it had some potential copyright issues. This group of flashcards has also been released as a quick study guide, or cheat sheet, and contains much of the same original study guide material, but with all proprietary information removed. This 3-page guide is listed as RHCE Flash Cards (condensed version) How These Slides Were Created These slides were produced using OpenOffice.org Impress. Created Slides Saved as html Copied contents of html between body tags to .page files. Used a bash shell script with sed, and awk to get the files to appear properly for webgen. See script here— html2page.html Ran webgen on the directory to generate .html Also .pdf files were saved from Openoffice.org Wri...

Comic - Huge Software Sale

Image
We can't have all work and no play, so a cartoon every once in a while doesn't hurt. While you're having fun, check out http://www.lifeisnojoke.com . Here are some articles on where to find free software: opensource-software-for-windows searching-for-software Now, some people may not understand that by free, we mean free. Not pirated, illegally copied, or borrowed. Open source software is free to use, copy, modify and distribute. A small to medium-sized company may have 100 computers, and have to pay $200 for some kind of office software for each machine for a total of $20,000. But if the company chooses to use free software such as openoffice , the price would be $0.00 x 100 = $0.00.

Freedom Fry — "Happy birthday to GNU"

Mr. Stephen Fry introduces you to free software, and reminds you of a very special birthday. Freedom Fry — "Happy birthday to GNU" Published on: http://www.gnu.org/fry/happy-birthday-to-gnu.html

Using the Perl Debugger Interactively

Image
Sometimes you might want to test a few ideas to implement into a perl script, but you want to see if it will work before you implement it. The Perl debugger is perfect for that. What is the Perl Debugger? Here is an intro from man perldebug : If you invoke Perl with the -d switch, your script runs under the Perl source debugger. This works like an interactive Perl environment, prompting for debugger commands that let you examine source code, set breakpoints, get stack backtraces, change the values of variables, etc. This is so convenient that you often fire up the debugger all by itself just to test out Perl constructs interactively to see what they do. For example: $ perl -d -e 42 Using the Perl Debugger Interactively To invoke the perl debugger, simply use the -d option, and give it any name, such as "1", in this example. Instead of specifying "-e 1", you could specify a filename to have perl debug the file. In this case, we wan...

How to Find Domain Names with whois_check.sh

Image
The idea to write a shell script is often the result of having to do repeated tasks. Imagine having to check hundreds of domain names by typing "whois domain.com" each time. It would take much longer than writing a simple script. Using whois to Check for Available Domain Names Suppose you want to find a good domain name, but you want to see if all of the domain suffixes are available? For example, you want a good .com domain, but you also want the .net, and .org. Not only that, but you might want to use blogspot.com, or wordpress.com for your blog. You can always check a domain availability by using the whois command, e.g. $ whois google.com Obviously, google.com is not available, so whois will display information about the company that registered the domain name. If the domain is not taken, then whois will usually return "No match", or "NOT FOUND". You have to keep trying a domain name until you find one that is available. This can be time-consumi...

Find Subnet Mask with ipcalc

An easy way to convert a subnet mask from bit notation (e.g. /24) to dotted decimal notation is to use ipcalc from any linux box. The -m option displays the subnet mask. $ ipcalc -m 10.10.10.128/25 NETMASK=255.255.255.128 $ O.K., that's fine, you say, but how do I know how many hosts are on the subnet? That's easy enough -- just use the -b option to find the broadcast address. $ ipcalc -b 10.10.10.128/25 BROADCAST=10.10.10.255 The range of IP's will be from one more than the network address up to one less than the broadcast address. In the example above the IP address range is 129-254. Often the gateway is the first or last address in the range to avoid confusion. If you don't have access to a linux box, you can always do a google search for "subnet calc," where you can probably find an online subnet calculator. For the opposite calculation - find prefix from subnet mask, use the -p option. $ ipcalc -p 10.10.10.128 255.255.255.128 PREFIX=25 $ There y...

Convert a Text File to HTML

Image
While considering how to make my shell scripts look better on the web, I started looking at freshmeat.net for programs that would convert source code to html. Then I thought, vim already has syntax highlighting. I wonder if it has a way to convert to html. Sure enough, it can be done with a single command: :runtime! syntax/2html.vim Convert Text File to HTML :runtime! syntax/2html.vim : convert txt to html :h 2html : help about 2html :wq! : write the new file The current file is converted, and an .html extension is added. Once the file is saved, it can be opened in a browser. For more vi tips, check out: http://systemnotesorg.blogspot.com/search/label/vi And the official vim site: http://www.vim.org/tips , Here is a beautiful example of C source code that was quickly converted to HTML, while preserving all of vim's color coding: http://systemnotes.org/download/matrix/matrix.c.html