Archive for January, 2009

Make OSX’s top behave like Linux’s top

OSX’s top program doesn’t quite behave like its Linux counterpart out of the box. For me, the two biggest problems are that processes aren’t sorted by CPU usage and the top program itself uses 10% of the CPU because it calculates all sorts of statistics about memory and shared library usage that I personally don’t care about.

There are a series of flags that you can pass to OSX’s top to have its behavior be closer to Linux’s top. I have created the following alias to that effect :

alias mytop='top -s1 -o cpu -R -F'

The display is updated every second, processes sorted by CPU usage and no unnecessary statistics are calculated. Instead of 10%, top uses only 2% of the CPU.

, , ,

No Comments

Steve Jobs and Bill Gates at the same table

Stumbled upon this very interesting series of videos that are about 2 years old.

In their rare joint appearance at All Things Digital 5, Steve Jobs and Bill Gates discuss their contributions to the technology industry, the qualities they most respect in one another.

You rarely get the perspective on a series of topics from these two giants. There are eleven videos in total. The first one is embedded below and you will get the following ones recommended at the end of clip.

, ,

No Comments

pfSense : a software alternative to your old router/firewall

My old D-Link router, like pretty much every other router I’ve ever owned, wasn’t very reliable in some way and so I was looking for open-source alternative firmwares like Tomato to flash it with. With the clear lack of effort put into the official firmwares, I thought it couldn’t hurt to try. Unfortunately, my router wasn’t supported by any third party firmware.

During my search, I however stumbled upon pfSense, a Free-BSD based router/firewall distro. It’s small (<100mb), runs on a 100MHz PC and includes all the features you would get on a very expensive commercial router (Firewall, NAT, VPN server, usage graphs, dynamic DNS support, per-ip bandwidth usage, QoS, etc).

Throughput on WAN interface

I already had a dedicated fileserver so I installed pfSense as a VM on it using VMWare (I could also have done it with VirtualBox, a free alternative to VMWare). All you need are two NICs. I now only use my old router as a wireless access point because pfSense naturally has a DHCP server. I could even completely let go of my D-Link router if I added a wireless NIC in my server.

If you have an old PC lying around or one that could be a host to a pfSense VM, all you might need is an extra NIC to get an enterprise-grade router that will cooperate a lot more than any cheap 50$ D-Link/Linksys/Netgear/etc router.

, , ,

No Comments

Using filemerge for mercurial diffs

A friend of mine found a script that brings up OSX’s FileMerge program instead of the text-based file comparisons you get with mercurial with doing an “hg diff”.

  1. download this script and make sure its location is in your PATH
  2. add the following to .hg/hgrc:
    [extensions]
    hgext.extdiff =
     
    [extdiff]
    cmd.opendiff = fmdiff
  3. Now type hg opendiff <filename> (hg op is enough), instead of hg diff <filename>


Source

, , ,

No Comments