Installed and configured tigervnc on my Linode host today, had a nasty problem getting fonts to display though. After KDE had loaded only the fixed width font used by vncconfig was showing, the rest were empty squares. Here’s what didn’t work on my Fedora 14 host:
- xorg-x11-fonts-misc-7.2-12.fc14.noarch
- 1:xorg-x11-xfs-1.0.5-8.fc14.x86_64
- xorg-x11-server-Xvfb-1.9.5-1.fc14.x86_64
I contribute this to my lacking of any knowledge of what fonts KDE tries to use by default. After some googling I got lucky and found this thread where someone suggests the original poster install the liberation family of fonts. That ended up being what fixed the problem for me.
In the future I hope to expand on this list. In general though, strive to follow the basics of the Unix Philosophy.
Law of Demeter
You should only know what your close friends tell you - http://en.wikipedia.org/wiki/Law_of_Demeter
- Each unit should have only limited knowledge about other units: only units “closely” related to the current unit.
- Each unit should only talk to its friends; don’t talk to strangers.
- Only talk to your immediate friends.
Principle of least astonishment
Boring behavior is the new exciting - http://en.wikipedia.org/wiki/Principle_of_least_astonishment
- “…when two elements of an interface conflict, or are ambiguous, the behaviour should be that which will least surprise the user…”
The “UNIX Way”
(Doing) less is more - http://www.faqs.org/docs/artu/ch01s06.html
- Write programs that do one thing and do it well.
Make good with what you’re given, complain if you can’t
Rule of Repair: Repair what you can — but when you must fail, fail noisily and as soon as possible http://www.catb.org/~esr/writings/taoup/html/ch01s06.html#id2878538
- Be liberal in what you accept, and conservative in what you send
While searching for modes which would help me edit bind9 configuration files I came across this mailing list post. It mentions zone-mode which ended up being great for editing the actual zone files A+. It also tipped me off to another emacs Easter Egg, M-x zone. Described thus:
zone is an interactive compiled Lisp function.
It is bound to <menu-bar> <tools> <games> <zone>.
(zone)
Zone out, completely.
It’s basically an emacs screensaver/psychedelic ascii mode using your focused buffer for content. It obfuscates the buffer in ways which involves wrapping your code around the screen or swapping characters around, and even just turning it all into curly braces and wiggling. Press a key to undo it all. Might be a neat trick to play on a friend, but I see no other usage for this mode.
Hopefully getting something that resembles a DNS server polling from LDAP set up tonight. I love virtual machines.
Tonight I’m upgrading my desktop (“fridge”) from Fedora 11 to 12. For my own personal benefit I’ll be documenting the process. Things I want to take note of in particular include: which additional files must be backed up for system services like samba, my current partition map, and what process I used to perform the upgrade (optical media, netboot?).
Emacs related posts are now being syndicated on Planet Emacsen!
Often we get Nagios alerts letting us know that your kernel is about to panic and your server is going to crash and die because read/write operations are going to FAIL MISERABLY.
Obviously being a systems administrator it becomes your job to figure out what can go, what needs to stay, et al.
I’ve found that archived logs (logrotate) on a secure server often can be quite large. And on a low-end configuration with a server with only 40G it becomes a nuisance when you have a few Gb of data…
And you all probably know this, but Tim asked when I’d blog. So… I’ll make sure!
Having 40 or 50 files is a pain to manually delete. Sure, you could probably rm -f *.1 *.2 *.3 etc etc etc but that becomes too much of a pain.
On BSD systems there is an awesome counter called ‘jot’; it works exactly the opposite of the GNU command ‘seq’; so for a rudimentary example to remove all files it becomes a simple one liner–
- jot 6 1 |while read i; do rm -f *.${i};done
- seq 1 6|while read i; do rm -f *.${i};done
In Emeril fashion: BAM! You’re now out of the clear.
I needed to know
Is this Even or odd, hmm?
I used modulus
This is the simplest way to quickly find out if an integer is even or odd. I’m posting this because I don’t recall my programming lab TAs or professors ever mentioning this simple way to figure that out.
May it save you many lines of code and time!
Update: Suppose I should show an exampe
if ( (your-number % 2) == 0) { echo “that’s an even number” }
We’ll probably change the name. For now it’s plain and descriptive: Yet another geeky blog. Let the acronyms fly!