November 1, 2009
I needed mpg123 to burn an audio CD with cdrecord on my Fedora 11 system at home. Since it’s not in Fedora’s standard repos, googled for it, and found this.
http://www.atrpms.net/dist/f11/mpg123/
So far so good, I just needed a few more libraries as dependencies, however, the package names were not really intuitive.
- libartsc – arts
- libaudio – nas-libs
- libportaudio – portaudio
It was mere luck that first I looked for libportaudio, and tried simply “portaudio” for little logical reason. Following the same package naming logic I could find “arts”. Finally found “nas-libs” with google.
Leave a Comment » |
Hacks, Musings |
Permalink
Posted by titan2x
October 3, 2009
I have a major problem with the title netbook from the day I bought it. After roughly 6-8 hours overall running time, it freezes at some point randomly, with nothing interesting in /var/log/messages or anywhere else. It runs Easy Peasy btw.
I stumbled upon a remedy by chance. If I turn off wireless networking when I’m not connected, it doesn’t seem to freeze. Although it’s a little bit annoying to switch wireless on and off when I work in different places, it’s far better than the frequent freezes. I wonder what is the underlying problem, but it’s not really worth the time and effort to properly debug it.
Leave a Comment » |
Hacks, Musings |
Permalink
Posted by titan2x
August 27, 2009
There is NO ternary operator in python but here’s something similar that is COOL:
val = (‘val1′, ‘val2′)[x < y]
… as an imitation of …
val = x < y ? 'val2' : 'val1'
Leave a Comment » |
Hacks |
Permalink
Posted by titan2x
July 6, 2009
Installed lighttpd and then went on to configure the userdir module so that localhost/~myuser works. But it didn’t. There is only one config file, /etc/lighttpd/lighttpd.conf and I searched through all options with "user" in them but nothing. Finally I looked at the settings on my Ubuntu box, and found the missing piece:
userdir.path = “public_html”
Leave a Comment » |
Hacks, Musings |
Permalink
Posted by titan2x
June 28, 2009
It’s great that these things keep getting easier. I used to have to tweak .gnomerc and .uim files and running uim-xim at startup… Probably that’s a thing of the past. Here’s how you do it the modern way.
yum install scim-lang-japanese
Next, go to System | Preferences | Input Method. This brings up the IM Chooser dialog. I selected IBus because it was marked recommended. Then in Input Method Preferences, and choose the Input Methods tab and select the input methods you want. That’s it! You can swith to Japanese input with Ctrl – Space.
Leave a Comment » |
Hacks, Software |
Permalink
Posted by titan2x
June 27, 2009
My hard disk started showing signs of slow and painful death, so after I backed up all my data I confirmed with smartctl that yes, it’s dying.
smartctl -t long /dev/sda
smartctl -a /dev/sda
This looked like a good opportunity to try something new, at least Kubuntu instead of Ubuntu. So I went for the much celebrated Fedora 11.
The live CD
My half-broken hard disk was still in the computer when I started the Live CD and Fedora scored some plus point for showing a warning about the disk, and a very cool GUI for the smartctl self tests.
Next I replaced the hard disk with two new ones, and started the Live CD again and wanted to use the fancy GUI for smartctl. I looked through the menus, the Gnome applets but couldn’t find it. Wonder where it is, it’s a shame to hide this superb tool in a dusty corner. So I did the smartctl the old way. (By now I know where it is: Applications / System Tools / Palimpsest Disk Utility.)
Then I had some MAJOR problems with the disk partitioner. I have two disk of the same sizes and I used to have them in a software RAID1, but that’s not what I intended for this time. The installer’s partitioner oddly showed me only one disk, and with an odd name. It looked like some kind of mirroring setup, so I checked /proc/mdstat and lvs but I couldn’t find anything. For hours I didn’t know what hit me, when finally I figured out it’s dmraid.
dmraid
I was very disappointed by this dmraid thing. Why does the installer try to be so damn smart and do something I don’t want without asking me? And then why is it so damn hard to turn it off? I passed nodmraid kernel param to the installer as suggested by google sensei, but no dice. Finally I managed to turn the bloody thing off with:
- Rest both partition tables
- Start the installer, and if you’re lucky it will ask you to reinitialize the partitions, go for it and exit the installer
- Run
dmraid -an and dmraid -x, or something like that, I don’t remember exactly
- Just to be safe, I created my partitions in
cfdisk before going back to the installer.
Finally the installer showed the disks as they really were and I could get on with the installation.
After installation
So far so good. I liked that upon first start-up the system offered to setup ntp synchronization. It’s also nice that the nfs client tools work well out of the box, in some systems I often need to tweak /etc/init.d scripts to get nfs partitions automatically mounted at boot. And I could setup my RAID1 partitions just fine in my good old-fashioned mdadm way.
Leave a Comment » |
Musings, Software |
Permalink
Posted by titan2x
June 9, 2009
Boy, is this complicated? Yeah, but hey, replication is a serious business…
http://msdn.microsoft.com/en-us/library/ms151247(SQL.90).aspx
Anyway, I just managed to set it up, and the one thing that wasted most of my time was broken stored procedures. The lesson here is, before publishing a stored procedure for replication, recreate it at the source first! (Right click, Modify, F5)
Actually replication might be overkill. Instead of that, daily full restore from daily full dumps might be a viable alternative.
Dump database T-SQL hint:
BACKUP DATABASE [SameName]
TO DISK = N’D:\the long long path\SameName_backup_200906091739.bak’
WITH NOFORMAT, NOINIT,
NAME = N’SameName_backup_20090609173911′,
SKIP, REWIND, NOUNLOAD, STATS = 10
GO
Restore database T-SQL hint:
RESTORE DATABASE [SameName_Restore]
FROM DISK = N’D:\the long long path\200906091105.bak’
WITH FILE = 1,
MOVE N’Dev’
TO N’D:\the long long path\SameName_Restore.mdf’,
MOVE N’Dev_log’
TO N’D:\the long long path\SameName_Restore_1.ldf’,
NOUNLOAD, STATS = 10
GO
Leave a Comment » |
Hacks |
Permalink
Posted by titan2x
April 23, 2009
Had a strange issue just now. Although the output of getenv was not NULL, any attempts to access the memory pointed to by the returned pointer resulted in segmentation fault.
The cause was the missing #include <stdio.h> line, which is pretty easy to spot if you look at the build output.
Leave a Comment » |
Hacks |
Permalink
Posted by titan2x
February 2, 2009
When trying to uninstall an application (called FarPoint, a sleek spreadsheet development platform), I got an error that I need .NET framework 2.0 or higher to use this uninstaller. Which is weird, because I do have .NET 2.0, and the software would not work without it anyway in the first place.
The solution was, I had to run the uninstaller as administrator. Even though the application was not registered in appwiz.cpl
By the way, to run any app in windows as administrator, you don’t need to logout and login as admin, you can just do this:
runas /u:administrator cmd
And then from the appearing cmd prompt window you can run whatever you want as admin.
Leave a Comment » |
Hacks |
Permalink
Posted by titan2x