Showing posts with label unix. Show all posts
Showing posts with label unix. Show all posts

Saturday, August 01, 2009

Farewell, Cory

Cannon shots are being fired every 30 minutes at the military base near our house. It surprises the shit out of me, so I wrote a cronjob to warn me of incoming shots:
0,30  *   *   *   *   echo "Incoming cannon shots in 30 minutes." | say -v Vicki
29,59 * * * * echo "Incoming cannon shots in 1 minute." | say -v Vicki

I didn't know Mac OS X speech synthesis feature was scriptable!

Tuesday, November 25, 2008

pf IPv4 and IPv6 shortcut

There's a shortcut for creating a pf rule that applies to both IPv4 and IPv6. E.g.:

pass in quick on em0 from { 192.168.86.0/24, 2001:418:c0de:babe::/64 } to any keep state label "experimentation"

Results in:

root@soulfury:~# pfctl -sr | grep experimentation
pass in quick on em0 inet from 192.168.86.0/24 to any flags S/SA keep state label "experimentation"
pass in quick on em0 inet6 from 2001:418:c0de:babe::/64 to any flags S/SA keep state label "experimentation"

Monday, November 24, 2008

Hello world from links

I forgot to bring my MacBook, so I'm now surfing the Net in a text-only browser inside a server. I'm surprised that Blogger works. Very cool.

Thursday, November 13, 2008

FreeBSD Problem: Can't see files/dirty state at each boot.

Weird problem. The filesystem is in an unclean state at each boot, even though I have ran fsck before booting the system. Initially, our problem is that our app can't "see" certain files at first read, although subsequent attempts on reading them are OK. Later, we discovered that the filesystem is dirty at each boot. The problem is similar to this issue in FreeBSD-CURRENT. We're using FreeBSD 7.0-RELEASE though, so I'm not sure if we have the same problem. I need to track this down.

Wednesday, June 04, 2008

Unix/Linux Tip: Syntax check your PHP files

If you wish to syntax check (lint) all the PHP files in your current directory, simply do:
    for i in `ls *.php`; do
        php -l $i
    done

Tuesday, October 02, 2007

buffer overflow

Aaaaargh! I'm getting too many interrupt-level buffer overflows with FreeBSD 7.0-CURRENT. I can't connect to the network. Yeah, yeah. I know that using the bleeding-edge development branch is tantamount to suicide. But what the heck.

Monday, October 01, 2007

Should I experiment on using DragonFlyBSD?

My Soekris net4801 box, which acts as my Ethernet switch by bridging all of its ports, is experiencing intermittent slowdown, especially under heavy load. This has occurred after replacing its OS from FreeBSD 6.2 to FreeBSD 7.0-CURRENT, March snapshot. I think it's because it had some critical bugs last March (I was too lazy to download a September snapshot) and because WITNESS, INVARIANTS, and other debugging options have been enabled in the kernel. Instead of rebuilding the kernel, I'm thinking of using DragonFlyBSD instead. I want to experiment. I'll do this on Saturday so as not to interfere with my work.