Bash, looping over stdin

I usually forget when install samba for the first time in Debian it pulls the whole /etc/passwd db into the samba passwd TDB. ie:


[nic@base-field:~] sudo pdbedit -L
games:5:games
nobody:65534:nobody
proxy:13:proxy
www-data:33:www-data

Here’s a quick clean out bash scriptlet.


for VAR in `sudo pdbedit -L | cut -d: -f1`; do
sudo pdbedit -x $VAR;
done

Comments (1)

NX, Skype and Asterisk

I was using Skype a lot when I was travelling during April and May. I found it very useful when I was in a random airport, being able to find a hotspot and call whoever. I’ve been thinking hard how I can integrate voip solution in my companies infrastructure for a long time. Unfortunately I haven’t had a chance, yet, to play around with Asterisk to understand it better.

One of the problems I’ve been thinking about is how to get thin client technology (NX/LTSP) to work with a headset arrangement if I put Skype on certain desktops. I haven’t yet move to NX, but its my next big project. Finaling moving from Win2K to Kubuntu.

I was googling at options today, and came to the realisation that my best option is not to put phones on the screen but on the desktop. Look at integrating my standard phone network into Asterisk. Then find some other ways to get some of the nice features of Skype, ie. SkypeIn.

Things like FWD and IAX will probably do the job.

I’d still like keep the option of Skype when I’m travelling. Its very useful tool. But say with kphone and openvpn or just something like FWD direct I can do the same thing.

Comments (2)

Debian, simscan and qmail

I was using gadoyanvirus with some local modifications, but I was finding it having dfifficultly with Worm.Mytob.DK and viruu zip attachments. Simscan was a quick and easy install and it seems to work perfectly. Here are some notes about installing simscan on Debian. Requires QMAIL-QUEUE patch installed, which is part of the most recent debian packages.

Read the rest of this entry »

Comments (1)

Openbsd: ‘interface groups and pf’

PF and Openbsd keep getting better: MARC: msg ‘interface groups and pf’.


block in on egress from (customer:network)…

….
there is an “egress” interface group now which follows the default routes. This interface group contains all interfaces which IPv4 and IPv6 default routes point to … So, imagine that on your notebook, where you are sometimes on wireless and sometimes on wired network connections – just write your pf.conf so that it refers to the egress group instead of wi0 and em0, and it will Just Work ๐Ÿ™‚

Comments (2)

Solarias on Xen

Comments off

svk sync smerge

Bsag has made some changes and released Tracks 1.03, so I figured it was a good time to try out the smerge process with svk. This article has a good description of thesvk workflow process this involves.

Unfortunately it is a difficult merge due to whitespace formating changes. So it hides any of the real code changes that might have occured. In fact after the merge I had to unrevert some of the changes I made in my local trunk. svk smerge doesn’t seem to be able to view conflicts on a line by line base.

I have svk sync running on crontab, so to mirror branch in the local svk repository is pretty much constantly up to date. Star merging these changes into the local svk development branch and then onto my svn and svk working copies is the next job.

Read the rest of this entry »

Comments (9)

svk and working with external project

I’ve been reading the svk documentation, which is somewhat lacking, working out the best way to setup an external development enviroment for tracks a Rails based GTD project I’ve been contributing too. I’m planning to port the Salted Hash Login Generator to Tracks. Currently I don’t have write access to the track subversion repository, so this lead me to try svk out.

I decided that I wanted a seperate subversion repository from the svk default depot for mirror tracks and tracking my changes. So I followed the basic setup for svk: svk depotmap –init. Then added ‘tracks’:/home/svn/tracks via svk depotmap.

Read the rest of this entry »

Comments off

rhtml, vim and rails

Grab and install eruby.vim into ~/.vim/syntax. Then following this tip add:


au BufNewFile,BufRead *.rhtml set syn=eruby

to ~/.vimrc.

While you are at that, make sure you check out HowtoUseVimWithRails.

Comments (5)

Corrupted Openoffice files

We’ve been using the latest OO2 beta (97, now 104) in the office. For some reason my brother’s installation was producing corrupted files that couldn’t be reopened. So I tried the simple approach to trying to fix it. Unzip, ran content.xml though firefox and found this error: “XML Parsing Error: duplicate attribute. Location: file:///home/nic/tmp/pp/content.xml Line Number 2, Column 10155:”.

A quick with hack with emacs and then a repack the document with the perl script from: Unpacking and Packing OpenOffice.org files.

It worked! My brother was soon back in business.

Microsoft Office and corrupted files usually means “Don’t pass go”. OASIS is a great file format.

Comments (3)

Symphony Operating System

Symphony Operating System is an interesting looking desktop project based on Knoppix. You can read this review. It’s interesting point is the way it “organizes the desktop environment.”

Comments off