Autarchy of the Private Cave

Tiny bits of bioinformatics, [web-]programming etc

    • Archives

    • Recent comments

    Archive for October, 2007

    Ukrainian web-portal bigmir.net switched from own free email service to gmail

    30th October 2007

    Just a minute ago, I was shocked after logging in to mail.bigmir.net: instead of the bigmir’s own, HTML-only email interface, I got redirected at the gmail’s “Terms and conditions”, after accepting which I found my emails in the classic gmail mailbox.

    First thing to think about: at least they did transfer all my emails to the new account.

    Second: hey, they had given up their own email interface! Are they leaving the web-portal market of Ukraine? Was the part of their team (which later formed MI6) too important to handle their exodus with no consequences? Is that just a desire to give customers “better” interface and not invest anything into development?

    I hope this won’t be a trend, for every service to have Google behind their servers. Or even just behind the name, to avoid extra complexity of having a server.

    Finally, I think I’ll get used. But it was only yesterday, that I read the Google anti-utopia, where Big Brother’s name is (evidently) Google, and it’s webcams and microphones and search history define each person’s future AND guilt. Scary…

    And I wonder which will be the next service of bigmir.net, “outsourced” like their email.

    Share

    Posted in Misc, Web | No Comments »

    Using libmp3lame-enabled ffmpeg on shared hosting

    25th October 2007

    Update: there’s now a much more recent post on how to install libmp3lame-enabled ffmpeg on shared linux hosting.

    As Gabe pointed out in my post with compiled ffmpeg Linux binaries, there is a relatively simple method of adding libmp3lame.so.0 file to your shared hosting so that ffmpeg executable will see the library:

    You can upload libmp4lame.so as well to the shared hosting site and when you call ffmpeg, call something to set an environment variable right before the call to ffmpeg i.e. in php I’d do exec(”export LD_LIBRARY_PATH=/path/to/lib/with/lame; /path/to/ffmpeg [ffmpegargs]”); That way you can use the uploaded lame. I hope that helps someone as I have been unable to find any info on how to use an uploaded lame. I’ve tried it and it works on godaddy.

    Hope this helps.

    Update: here’s libmp3lame.so.0.0.0 (from slackware 2.4.x, lame-3.97). I have no idea if it’ll work in your (shared hosting) environment; it is provided AS IS, use at your own risk etc. I can only state that the archived binary file at the moment of upload was indeed libmp3lame.so.0.0.0 from my elderly Slackware with 2.4.x kernel.

    Share

    Posted in *nix, Software, Web | 9 Comments »

    ext2 and ext3 linux partitions read-write support in Windows

    25th October 2007

    Get the driver!

    There’s also another one, but provides read-only support.

    Share

    Posted in Links | 3 Comments »

    Fresh install of Debian Etch 4.0r1 hangs/freezes dead after boot: solution

    24th October 2007

    Recently, I installed Debian Etch 4.0r1 onto my laptop. However, after the first boot into plain console, computer was dead-frozen after some console usage. I rebooted using the Power button – this time to gdm; and again, after some keyboard input system was hanging dead.

    I found the reason at debianhelp.org forums. Basically, it’s the PC speaker module (pcspr) not functioning correctly. I suspect this problem manifests itself only on some types of laptops. The solution is either to somehow reconfigure the pcspkr module, or just disable it. More on how to disable the module below.
    Read the rest of this entry »

    Share

    Posted in *nix, Links | 1 Comment »

    Vivid, cheerful, funny FireFox theme: ColorGnome

    19th October 2007

    Get it here. If you haven’t used any other theme except for default, and if you’re Firefox user for a long time – it’s time to try something new! I suggest you try ColorGnome – it’s bright, clear, vivid, cheerful and even funny! I’m using it for several days already, on all but one of my computer workplaces – and find it good enough to write about.

    If you want something more strict/official-looking, try maxfox II or maxfox II graphite – I enjoyed these two a lot, currently maxcfox II is on the only computer which doesn’t have ColorGnome :)

    Share

    Posted in Links, Misc, Web | No Comments »

    MySQL: INSERT IF NOT EXISTS syntax

    18th October 2007

    To start: as of the latest MySQL, syntax presented in the title is not possible. But there are several very easy ways to accomplish what is expected using existing functionality.

    There are 3 possible solutions: using INSERT IGNORE, REPLACE, or INSERT … ON DUPLICATE KEY UPDATE.

    Imagine we have a table:

    1. CREATE TABLE `transcripts` (
    2.  `ensembl_transcript_id` varchar(20) NOT NULL,
    3.  `transcript_chrom_start` int(10) unsigned NOT NULL,
    4.  `transcript_chrom_end` int(10) unsigned NOT NULL,
    5.  PRIMARY KEY  (`ensembl_transcript_id`)
    6. ) ENGINE=InnoDB DEFAULT CHARSET=latin1;

    Now imagine that we have an automatic pipeline importing transcripts meta-data from Ensembl, and that due to various reasons the pipeline might be broken at any step of execution. Thus, we need to ensure two things: 1) repeated executions of the pipeline will not destroy our database, and 2) repeated executions will not die due to ‘duplicate primary key’ errors.

    Method 1: using REPLACE
    Read the rest of this entry »

    Share

    Posted in Programming | 46 Comments »

    GoDaddy: undocumented 20-second CPU time maximal execution limit? (python, ELF, etc)

    16th October 2007

    Today, setting up a relatively serious (in CPU resources needed) web-system, I ran into a weird problem of python scripts ending prematurely. After some investigation, it looked like any process which uses up more than 20 seconds of CPU time, is automatically killed. To verify this, I wrote an infinite loop in C,

    int main () {
    unsigned int i;

    for (i = 0; i < 2 ; i++ ) { i = 0; } return 0; } [/c] compiled it and executed several times on the GoDaddy shared hosting server. I did observe the program running for the maximum of 20 seconds of CPU time, not a second more. Please note, that 20 seconds of CPU time can be much more of “real” time, if the script isn’t using 100% of CPU, which often the case for shared hosting. Thus if you have in your php.ini max_execution_time set to, say, 60 seconds, your php script may actually execute as long as one minute; but I’m pretty sure that if your script has lots of CPU-intensive procedures, then as soon as it uses 20 seconds of CPU time, it will be terminated (however, this statement still needs checking – anyone?). To verify, I also created a cron job with the same file. It ran for 30 seconds CPU time. Strangely, this behaviour is not documented anywhere. This limit may also explain a number of other problems, if you have heavy web-applications: they just might be killed before they are finished, causing errors. I do understand the reason for this limitation, and am sure similar limitations exist in other shared hosting environments. The only important thing here is that this limit should have been documented and even put upfront somewhere in the hosting plans descriptions. I also wonder if the limit is the same for all godaddy shared hosting plans, or if it differs. 20 seconds when executed from PHP, and 30 seconds when executed as a cron job were observed on the Deluxe Linux Hosting plan. Extensions, additions and comments are welcome.

    Share

    Posted in *nix, Misc, Programming, Web | 22 Comments »