Posts

Showing posts with the label Software

Looking for a personal finance software

I have been looking for alternatives to Microsoft Money for a while. While annoying to have to keep a virtual Windows machine just for Money (which you can freely download from Microsoft by the way), it was working just great. The features I really liked about it are: Keyboard shortcuts made it very easy to quickly enter multiple entries Importing my monthly credit card statement made it very easy to reconcile and catch any potential errors Easy to get monthly reports about my spending But then one day the latest import made Money crash and I was forced to look for alternatives. Gnucash Pros: easy to match imported transactions to already existing transactions has android app that is easy to import from sufficient support for multiple currencies Cons: clumsy interface reports are almost unusable OFX support is buggy crashes on legitimate OFX files imported categories from the mobile app create duplicate transactions Skrooge Pros: very nice interface automatic download of the latest exc...

Easy copy-pasting in X

Check what the clipboard contents are: xsel -b Put foo in the primary X selection: echo foo | xsel -p Copy the clipboard to the primary X selection: xsel -b | xsel -p This is just a hint on how to copy/paste between X programs that cannot agree on which X buffer to use. Say you have the xterm which uses the primary selection, and you have some silly java program program which only uses the clipboard. What do you do if middle click doesn't want to paste your console output. An ugly workaround is to fire some editor that supports both and keep pasting with one method and copying with the other before pasting in the final destination. Middle click in gvim to paste what you selected in your xterm, then select the text in gvim and copy it to the clipboard. Or, you can use xsel . The simple features of xsel are to put something in one of the selections (if there is anything coming on STDIN) or to output the content of a buffer. So, to put the primary (the one you get when you selec...

Fixing stupid mojibake Japanese forms

I just had a very hard time trying to change my address on the JAL Mileage Bank page. They still had my address from about 4 years ago which changed at least a couple of times since then. When I tried to change it I realized why. I submitted the form, properly filled with full-width characters (including the digits) and on the confirmation screen I get the same form filled with mojibake asking me to complete it correctly. You have guessed already - nothing I type in there would actually help. Firebug to the rescue! I opened the form in Firebug, added an enctype="multipart/form-data" to the form element and surprise, surprise - my input was accepted.

Console fonts with good looking Japanese and Cyrillic

Image
Finally! A set of fonts that look good and properly display Japanese and Cyrillic. That is, the Cyrillic is half-width as it is supposed to be. For Gentoo users the package is media-fonts/efont-unicode or there is the official page for everyone else. Some characters like the lowercase б and д are oddly designed but that's a very small price to pay for the pleasure of not having to mix and match different fonts in my terminal configuration. I wish I'd known that a little earlier.

grub2 cannot read core.img

When trying to install grub2 (whatever snapshot was current as of today) I kept getting the following error: $ sudo /sbin/grub-setup -v --directory=/media/sysrescd/boot/grub \ --device-map=/media/sysrescd/boot/grub/device.map -r '(hd1,1)' '(hd1)' .... snip ... grub-setup: error: Cannot read `/media/sysrescd/boot/grub/core.img' correctly The error was not very descriptive because grub was apparently able to read other important files like boot.img and such. The filesystem on my USB stick was identical (feature wise) to the /boot on my HDD -- ext2. And the same command worked just fine for installing to my hard disk. Digging through the code revealed where the problem is. The error was caused by grub-setup being unable to embed core.img in the MBR. The core.img prepared by grub-mkimage was 25k big. That is about 50 sectors. The first partition on my hard disk starts on sector 63. The first partition on my USB stick was starting on sector 32 (or was it 31?). 32 <...

Bloody OpenBSD syslogd

I spent quite some time today trying to figure out why, oh why, syslogd doesn't want to log to a remote log host. The config file on the machine was identical to that on other machines that worked just fine. Long story made short, that particular version on that particular system didn't like having an IP address after that @ sign. A hostname worked fine. The syslog on our other redhat machines didn't care. I don't know what the reason is yet. Could it be that syslog works the same way on both machines and just does a gethostbyname on whatever is after the @ sign, and glibc gives an answer for the IP address while libc on BSD does not? Whatever the reason, bloody syslogd should at least log an error somewhere. Or a warning. Or whatever.

Switching to Gnome

Me, a long-term Windowmaker user, recently switched to Gnome. There main reason is that I had wanted to drop Windowmaker for a while now. There has been no development for a while now and I don't really like the fonts or the lack of themability of window borders and such. I decided to give Gnome a try because I've always liked the appearance of Gtk applications and a full Gnome desktop can run without having to run a zillion processes in the background. I have looked at KDE but it just doesn't feel right. One feature I really liked in Gnome was the automounting of removable media. It didn't work smoothly because there are a few prerequisites: Your user must be in the plugdev group You must not have an entry for the device in /etc/fstab The last one is mostly speculation, but when I removed the lines in /etc/fstab (leftovers from the windowmaker era) it all started working. I still prefer the Windowmaker style Alt+<Right Click and Drag> to resize a window. With...

VS 2005 does not want to profile my ASP.NET project

Image
Visual Studio 2005 does not want to profile my ASP.NET project! What's up with that? This is with the Team Edition that has the quite useful "Performance Tools" included. However, when I start a new Performance Wizard I don't see my ASP.NET web site project in the list of profileable projects. To make a long story short, the solution is to not select the "No Start Page" option in the debug dialog as shown in the following figure. Checking "Current Page" does not work either. Just to be safe, go with "Specific Page" and pick something from the list.

External repositories in subversion

Edit the svn:externals property for the directory where the external stuff will go into svn propedit svn:externals . Add a line for each external entry you want to have: local/path http://external/repo local/path2 -r### http://external/repo Example for me adding jokey's virtualbox ebuilds: svn pe svn:externals /var/repos/chutz/app-emulation virtualbox http://overlays.gentoo.org/svn/dev/jokey/trunk/app-emulation/virtualbox virtualbox-additions http://overlays.gentoo.org/svn/dev/jokey/trunk/app-emulation/virtualbox-additions virtualbox-bin http://overlays.gentoo.org/svn/dev/jokey/trunk/app-emulation/virtualbox-bin virtualbox-guest-additions http://overlays.gentoo.org/svn/dev/jokey/trunk/app-emulation/virtualbox-guest-additions virtualbox-modules http://overlays.gentoo.org/svn/dev/jokey/trunk/app-emulation/virtualbox-modules The original tip was here .

ImageMagick command arguments

Note to self for common commands use by ImageMagick: The manual The examples Geometry specification [width]x[height][+-x+-y] Cropping Always use "+repage" or else... When cropping do specify +0+0 or you'll get lots of tiles Checking the output on the command line -- use xpm:- for output ( -compress none pbm:- is also kind-of usable). Thumbnail gallery: montage input*.jpg -tile XxY -mode Concatenate output.jpg

SQLite, .NET, and DataTable constraints

The problem Here's a simplified snippet of what illustrates the problem I had today. SQLiteCommand cmd = cnn.CreateCommand("SELECT a.a1, b.b1 FROM a INNER JOIN b USING (b1)"); SQLiteDataReader reader = cmd.ExecuteReader(); DataTable dt = new DataTable(); dt.Load(reader); reader.Close(); The problem is that dt.Rows.Count is way lower than what running the same statement in the SQLite CLI produces. The reason The reason is that DataTable complains about an invalid constraint on the "b1" column. Why? Because "b1" has a unique index in "b" and for some reason DataTable doesn't like it when you get to entries with the same value for that column regardless that it is perfectly legal when joining tables. The workaround I have no idea if this is a problem with SQLite or the AdoNet SQLite wrapper, and I haven't tried other databases to see if this is not a problem with SQLite at all. The workaround, however, is this: SELECT a.a1, b.b1 + 0 FR...

Networking in XEN

So I got XEN working but the network interfaces on my host became a mess and it is somewhat related to my naming conventions. I like to name my interfaces with easy (at least to me) to understand names. For example, my local interface is named "lan". The one that my PPPoE connections are running over is "inet". A third card going to my neighbor is called "nei". On my desktop where I was testing XEN I only have one interface -- lan. When I start xend, the default network-bridge script is trying to set up some bridges (another option I had to recompile here), and is trying to move the configuration of my physical interface to the new bridge and rename the bridge to have the name of my interface (after renaming the interface itself of course). What happened is that udev kicked in when the new interfaces showed up as it is doing its best to keep my interfaces with consistent names. That pretty much did the mess, except that the network-bridge script itself wa...

Giving XEN a try, continued

So, I had some time to see why XEN refused to work last time . The first obvious problem was that I had not loaded any modules. So far, so good. I quickly loaded all back-related modules, specifically netloop, netbk, blkbk, and xenblktap. Not loading these would give weird errors about a device not being connectable. One would think that XEN can give more understandable error messages. The case is that it would give the same message if you're missing the module and if the path to the file representing a block device is invalid. So, be careful. Loaded the modules and "xm create" behaved much better. No errors, but it hang for a long time. I didn't know how to interpret the output of "xm list", so I had no clue if the guest domain was running or not. I tried "xm create -c" but it would just bail (after a 30 second wait) with a message that it cannot connect to the console. "netstat -tnlp" did not suggest that anything is listening on a 59xx...

Giving XEN a try

Image
I decided once again that it is time to give XEN a try. I decided to try it on a newer Athlon 64 X2 with virtualisation capabilities. That latter is important, as my overall intention is to also try OSes that are "incompatible" with XEN. I know that there are other alternatives but I'll write on "why XEN" some other time.

Getting wget to work in a "corporate" environment

Alright, here's what I do to get wget from the Native Win32 ports GNU collection to work with as little fuss as possible. set WGETRC=%HOMEDRIVE%%HOMEPATH%\.wgetrc cat > %HOMEDIR%%HOMEPATH%\.wgetrc http_proxy = http://PROXY:PORT/ ftp_proxy = http://PROXY:PORT/ use_proxy = on proxy_user = USERNAME proxy_passwd = PASSWORD user_agent = SOMETHING GOES HERE ^Z^Z Pay attention to proxy_passwd . wget is at version 1.8.2 and that configuration option was renamed in a later version.

Things to consider when going 64-bit

A few days ago I decided to bump the kernel on the server from 2.6.20.7 to 2.6.21.5. While recompiling I decided to remove the support from 32-bit executables from the kernel and see what is going to break. Here is the short list: GRUB no longer worked. Apparently it is a 32-bit executable. memtest86+ cannot be compiled I can no longer chroot to my 32-bit rescue root that I only use to boot an old laptop over the network. Most of the stuff still works, GRUB is already installed in the boot sector, memtest86+ is only used at boot time (i.e. never, except when netbooting other machines), and the chroot -- I can live without upgrading it for now.

Firefox leaking big time

At the office my Firefox 2.0.0.4 again managed to eat up to 500 MB of RAM before I decided to kill it. That has been happening often lately. It's a machine with 2G of RAM and these leaks were not that big of a problem until now. However, lately I've been needing at least 1.5GB of RAM for work and the browser is getting in my way. I am pretty sure that this is a problem with some extension, but I've had no luck identifying the culprit. After disabling some extensions, these are the ones that I still have loaded: Firebug FoxyProxy FullerScreen Link Widgets Location Navigator Nuke Anything Ehnanced Split Browser Tamper Data User Agent Switcher Web Developer

Cacti not creating graphics

I am trying out Cacti for monitoring my systems. The package works more or less OK, except that it does not plot the graphics properly. I was getting messages like "sh: /rrdtool: No such file or directory" in my apache error log, unclear what was causing them. The cause of the problem -- I had PHP running in safe mode .

Rsync and many files -- segfault

My previous entry about rsync segafults was obviously following the wrong lead. I again stumbled upon the segfault problem when syncing a hundred-something thousand files. It was hard to debug the problem since it was not easy to reproduce. Furthermore, the multiple forks of the rsync process do not allow for easy debugging. I tried to follow the child process from gdb, but I was getting transferred to the parent when the error occurred (a SEGFAULT in the child and a SIGPIPE in the parent... the former taking precedence I guess) and I was left with no way of knowing where the segmentation fault was caused. I eventually managed to debug both parent and chlid with two gdb instances. The problem -- a segfault in rsync_acl_free (or some similar function... not sure anymore). Well, one thing's for sure -- running rsync without -A surely does complete without a hitch. I'll have to debug this properly later on.

Needs some project ideas

I recently discovered that my coding skills have atrophied in the last year. The problem -- I haven't had a chance to do anything at work. There are two possible solutions that I see: either get another job or find some projects to work on in my free time (plenty of that). I am thus looking for project ideas. Here is a quick list to serve me as a reminder: Web based multi-protocol IM I am thinking this one can be done with libpurple for the IM protocol communication. This idea may be stupid and/or useless. I am thinking of using a J2EE application server and doing Java bindings for libpurple (possibly with JNI). It's an overkill, but I need to practice my Java. Or, I could use jClaim which is also GPL, but it is not maintained and I couldn't find the source for the separate protocols. Enhance Ekiga . I have previously contributed to this project, maybe it is time to get back to working on it. I previously had the desire to implement support for driver separation for t...