Archive for July, 2008

Sketches

Tuesday, July 29th, 2008

Got my new Intuos drawing tablet (the bamboo one) and did  a few sketches:

ifconfig & Netmasks

Tuesday, July 29th, 2008

Whenever moving IPs around on servers I always find myself looking up the hex for a netmask.

Ever run into this?

$ ifconfig

inet xxxxxxxxxxx netmask 0xfffffff0 broadcast xxxxxxxxxxxxxx

And need to know what the fffffff0 was for? Here it is:

Dotted
Decimal
Hex Number of
Addresses
255.0.0.0 FF000000 16777214 (16777216-2)
255.255.0.0 FFFF0000 65534 (65536-2)
255.255.255.0 FFFFFF00 254 (256-2)
255.255.255.128 FFFFFF80 126 (128-2)
255.255.255.192 FFFFFFC0 62 (64-2)
255.255.255.224 FFFFFFE0 30 (32-2)
255.255.255.240 FFFFFFF0 14 (16-2)
255.255.255.248 FFFFFFF8 6 (8-2)
255.255.255.252 * FFFFFFFC * 2 (4-2) *

PHP easy timezone set

Monday, July 28th, 2008

Here is a quick way to set a timezone:

<?php putenv(’TZ=America/New_York’); ?>

A list of timezones for php: http://www.theprojects.org/dev/zone.txt

To get the timezones into a file quickly:

wget http://www.theprojects.org/dev/zone.txt

cat zone.txt | awk ‘{ print $3}’ >> timezones.txt

Remove the first few lines and you have an easily read file that you can make a selection box out of.

Welcome

Monday, July 28th, 2008

Updated the blog again with a new design and decided to re-do a bunch of my portfolio as it was a bit unorganized. More to come!

© 2008 Josh Rendek.