Contact our honeypot department if you are desperate to get blacklisted.

Tuesday, April 20, 2010

Hex to Decimal

Many thanks to Chris Bryant (CCIE #12933) for finally making the decimal to hex conversion easier to understand. Put simply, it's base-16, DUH... It seems obvious, but for some reason this simple fact just didn't sink in until 6:30 this morning.

For example, the hexidecimal number 4A simply means 4 units of 16 plus 10 units of 1, or ((4 * 16)+(10 *1)) which equals 64 + 10 which equals 74.

comments in Vi

Assuming you use a hash mark as a comment delimiter:

comment next 5 lines:  .,+4s/^/#/
comment each line from current line to end of file:  .,$s/^/#/