2007-03-30

Resources for the eBook lover

Posted in Geek Stuff, Web Wandering & Opinion at 1:55

So you bought something nice, but now you have no money for eBooks… or maybe you hate DRM and don’t feel right about buying a paperback and then torrenting a digital copy. Well, there’s lots of help out there.

I don’t remember all of the free eBook sites I’ve bumped into and bookmarked over the years, but here are the ones I can remember right now:

2007-03-26

A new way of examining the size of the IPv6 address space

Posted in Geek Stuff, Web Wandering & Opinion at 1:54

Ok, you’ve probably heard the usual examples for visualizing how big IPv6’s address space is. 7 IP addresses for every atom of every person on Earth gets the point across, but it’s not exactly very useful… so I decided to try something more practical.

Since I like to do my experimentation in a Python interactive interpreter, I’ll share the raw shell session. First, let’s get some data to work with:

>>> people_on_earth = int(6.5e9) # 6.5 billion (approximately)
>>> ipv6_range = 2**128 # 340,282,366,920,938,463,463,374,607,431,768,211,456
>>> habitable_planets_in_our_galaxy = int(30e6) # 30 million. An estimate from a SPACE.com article I read recently.
>>> cells_in_the_human_body = 10**14 # 100 trillion (Estimate from Science NetLinks via Ask Yakoo!)

2007-03-04

Crontab Timing Tricks

Posted in Geek Stuff at 17:02

Have you ever had a cronjob that needs to run as root, but you can’t do so easily because of the following reasons?

  • /etc/crontab is managed by your package manager
  • vixie-cron ignores /etc/cron.d/
  • Root’s private “crontab -e” crontab is easily overlooked when backing up /etc
  • It needs some odd interval like “every 3 days”

Well, if your interval is evenly divisible into days, (”every 2 days” is OK, “every 1.5 days” is not) then I have just the solution. Create a new cron script in /etc/cron.daily, make it executable, and put the following inside it (For our example, I’ll use two days as the interval and “emerge –sync” as the command):

Bad Behavior has blocked 215 access attempts in the last 7 days.