tag:blogger.com,1999:blog-119111102009-06-28T09:37:34.997+02:004JYes, this is my blog. I will sometimes dump stuff here - use it or don't use it :)Nicohttp://www.blogger.com/profile/07164337094354168207noreply@blogger.comBlogger190125tag:blogger.com,1999:blog-11911110.post-23681391761413870142009-06-12T07:49:00.000+02:002009-06-12T07:55:33.569+02:00To the girlsDiscover Kate Ryan!Nicohttp://www.blogger.com/profile/07164337094354168207noreply@blogger.com0tag:blogger.com,1999:blog-11911110.post-51672165672611840442009-05-31T22:25:00.000+02:002009-05-31T22:46:12.745+02:00Python signal handlingSignals are one of the most under estimated tools on POSIX systems. Windows is supposed to also handle (some) signals, but I've never used it and don't plan to either. These notes are therefor based on Linux and similar behaving systems.I used signal processing a lot in Perl coding but since I'm still learning Python I thought it might be a good idea to check it out. As it turns out, it's Nicohttp://www.blogger.com/profile/07164337094354168207noreply@blogger.com0tag:blogger.com,1999:blog-11911110.post-21367744586135531762009-05-28T08:48:00.000+02:002009-05-28T08:51:55.458+02:00Python: what day is tomorrow?Easy yes? Well - sort of. It's easy if you want to know tomorrows date. It's not so easy if you want to work out the next date from "any" other date.This is by no means perfect - it's work in progress, but for now it works for me:The simple solution to calculate tomorrow (from the Python Cookbook):import datetimetoday = datetime.date.today( )yesterday = today - datetime.timedelta(days=1)tomorrow Nicohttp://www.blogger.com/profile/07164337094354168207noreply@blogger.com0tag:blogger.com,1999:blog-11911110.post-9581485051384854452009-05-25T19:28:00.000+02:002009-05-25T19:28:27.434+02:00Difference between Windows 7 32bit and 64bitInteresting to see there's about 600MB+ difference between the two ISO images... What gives?Nicohttp://www.blogger.com/profile/07164337094354168207noreply@blogger.com0tag:blogger.com,1999:blog-11911110.post-89804866032693884292009-05-12T11:48:00.000+02:002009-05-12T11:52:22.804+02:00Getting VMWare keyboard to play nicely in UbuntuI always found it a bit annoying and finally got the stage where I could no longer take it! If you use VMWare server/workstation on Ubuntu you may find that the arrow keys (amongst others) do not work as expected. For example, one of the arrow keys will pop-up the start menu if your guest OS is Windows.Lucky for Ubuntu users the fix is simple: echo 'xkeymap.nokeycodeMap = true' > ~/.vmwareNicohttp://www.blogger.com/profile/07164337094354168207noreply@blogger.com0tag:blogger.com,1999:blog-11911110.post-34932319517071920672009-05-05T17:25:00.000+02:002009-05-05T17:30:59.364+02:00Windows 7From ScreenshotsSo I finally installed Windows 7. It's a relatively old beta build - but it appears to be running smoothly.For those interested, Microsoft has the RC1 available until somewhere in July 2009. It will work full functional until 1 March 2010 at which time it will shut down after 2 hours.Now to see what works and what breaks :-)Nicohttp://www.blogger.com/profile/07164337094354168207noreply@blogger.com0tag:blogger.com,1999:blog-11911110.post-12478805188524697892009-04-30T16:43:00.003+02:002009-04-30T16:51:46.946+02:00Bash scripts and directory names with spacesAs a rule I avoid directory names with spaces, but from time to time you have to deal with these oddities in your bash scripts. Here is a quick script that demonstrates how to work around this problem...To test, create a directory like "/tmp/some dir". Change into this directory and run the script. You should see something like this: 1 $ /tmp/test.sh 2 Attempting to go back to '/tmp/some dir' 3 /Nicohttp://www.blogger.com/profile/07164337094354168207noreply@blogger.com0tag:blogger.com,1999:blog-11911110.post-67709528633201760592009-04-13T09:21:00.002+02:002009-04-13T09:24:20.559+02:00URL Shortening - Problems and solutionsBackground read to understand the problem: http://joshua.schachter.org/2009/04/on-url-shorteners.htmlSome of the main problems for web users:The real URL are hidden, so the user never knows exactly where they are going. For example: http://service.tld/?abc could point to an undesirable site or just as well to a reputable news site - you never know up front.A lot of spam houses make use of URL Nicohttp://www.blogger.com/profile/07164337094354168207noreply@blogger.com0tag:blogger.com,1999:blog-11911110.post-30075489489878428282009-04-10T19:33:00.002+02:002009-04-10T19:35:55.424+02:00New playlistOn Youtube I created a play list of the three parts about the Toyota Hilux that To Gear tried to "expire" - but failed... Brilliant series...You can also try this link if the above embedded object doesn't work...Nicohttp://www.blogger.com/profile/07164337094354168207noreply@blogger.com0tag:blogger.com,1999:blog-11911110.post-10000736401467535832009-04-02T17:17:00.001+02:002009-04-02T17:19:06.811+02:00Easily mirror a site with wget$ wget -nv -t 0 -c -nc -4 -x -nH --user-agent="" -r -l 5 -k -p -np http://site/path/For those like me that can never remember :-)Nicohttp://www.blogger.com/profile/07164337094354168207noreply@blogger.com0tag:blogger.com,1999:blog-11911110.post-28971443555784406372009-03-28T10:54:00.003+02:002009-03-31T18:58:04.786+02:00Modern Software on old OSIn a bit of useless experimenting I thought I would try out some modern 32bit software on old Operating Systems.I started with my old original copy of Windows 98 - installed under VMWare...It's been a very interesting experiment indeed. My biggest problem interesting enough was browsing the web. I used the original IE (IE5) that shipped with Windows 98 as well as Netscape Communicator 4.79. Nicohttp://www.blogger.com/profile/07164337094354168207noreply@blogger.com0tag:blogger.com,1999:blog-11911110.post-58101193680326316842009-02-26T07:39:00.002+02:002009-02-26T07:43:36.953+02:00A Python Quicky - a function to handle user input (command line)This is perhaps more a note to self, but of course others are welcome to use and improve on the function.#!/usr/bin/pythonimport tracebackimport redef UserInput( question="> ", input_type="numeric", regex="^\d{1}$", action_on_fail="retry", help_on_error="\tYou need to supply exactly 1 numeric digit from 0 to 9. Press CTRL+C to quit." ): quit = 0 userinput = "" while quit == 0: try: if Nicohttp://www.blogger.com/profile/07164337094354168207noreply@blogger.com0tag:blogger.com,1999:blog-11911110.post-77847090562798057402009-02-04T12:52:00.002+02:002009-02-04T13:17:45.730+02:00Memcached Functions for MySQL (UDF's)Tangent recently updated their libmemcached_functions_mysql UDF (now version 0.8), and it's looking good. I had some issues getting it to work on 64 bit Linux, so here are some notes (Centos/RHEL 64Bit).Before you begin you will need all the usual development RPM's including "rpm-build", "mysql-devel", "gcc-c++", "libevent-devel" and "libevent".Next obtain the various sources:http://danga.com/Nicohttp://www.blogger.com/profile/07164337094354168207noreply@blogger.com0tag:blogger.com,1999:blog-11911110.post-70162979637710561502009-01-29T12:49:00.001+02:002009-01-29T12:51:04.723+02:00Apache and PHP - File Upload LimitsIf you can not upload a file using Apache and PHP, it's likely that some of your PHP configuration values are set too low. Here are the important ones to check:upload_max_filesizepost_max_sizememory_limitmax_execution_time max_input_timeHope that helps some one :-)Nicohttp://www.blogger.com/profile/07164337094354168207noreply@blogger.com0tag:blogger.com,1999:blog-11911110.post-81215139126401264652009-01-25T14:35:00.002+02:002009-01-25T14:42:32.537+02:00Sharing 1 KB and Mouse between 2 PC'sOk - I have known it existed for some time, but never bothered using it...It a very useful Open Source tool called Synergy which allow you to share a singe keyboard and mouse between 2 computers - and the two computers could be running different OS's, but why would anybody run anything else then Linux these days?Well - I have now a desktop and a laptop - both running Ubuntu GNU/Linux.I have used Nicohttp://www.blogger.com/profile/07164337094354168207noreply@blogger.com0tag:blogger.com,1999:blog-11911110.post-53724363563548999922009-01-20T12:39:00.002+02:002009-01-20T12:42:52.373+02:00Compiling mydns on 64bit platform (Linux)MyDNS is a very small yet cool DNS server running of a MySQL back-end. To compile it on 64bit Centos I just had to do:$ ./configure --with-mysql-lib=/usr/lib64/mysql/ --with-zlib=/usr/lib64/This was purely to find the required libraries.After that the rest of the build process works as documented.Nicohttp://www.blogger.com/profile/07164337094354168207noreply@blogger.com0tag:blogger.com,1999:blog-11911110.post-41600279294538858902009-01-17T22:44:00.004+02:002009-01-17T22:53:25.526+02:00Top Gun MusicIn South Africa we are watching Top Gun on DSTV this month - still one of the best movies for me.Here is the soundtrack (well - one version at least):Discover Cheap Trick!Where are those days?Nicohttp://www.blogger.com/profile/07164337094354168207noreply@blogger.com0tag:blogger.com,1999:blog-11911110.post-34288839442888072172008-12-29T22:44:00.007+02:002009-01-13T21:24:19.588+02:00mod_python just got cooler - for me at leastOk - for some this might be old news, but I thought I share it in any case. one reason is for all that still needs to discover this cool feature, and the other reason is that this is my way of documenting features like this - because I forget :-)So here's the deal: Have a simple mod_python script that can handle both GET and POST requests - but also have the ability to modify your handler withoutNicohttp://www.blogger.com/profile/07164337094354168207noreply@blogger.com2tag:blogger.com,1999:blog-11911110.post-59379952952736282922008-12-19T14:23:00.002+02:002008-12-19T14:26:08.985+02:00FNB Connect ADSL Speed TestAll I can say is WOW :-) If you have a ADSL account already, you can easily convert - just visit the FNB Connect home page.Nicohttp://www.blogger.com/profile/07164337094354168207noreply@blogger.com0tag:blogger.com,1999:blog-11911110.post-11549992702106115822008-12-10T07:00:00.002+02:002008-12-10T07:04:18.792+02:00New cool stuf from Google...Well, they are up to the usual stuff again... this time it's something called Native Client. Although this sounds like ActiveX and Java Applets, it does have another twist (as one of the coments pointed out): "Google Chrome + Native Client + Gears == the future of application deployment and runtime."Resources:Blog entryDeveloper home pageNicohttp://www.blogger.com/profile/07164337094354168207noreply@blogger.com0tag:blogger.com,1999:blog-11911110.post-49126938079665813032008-11-29T22:24:00.001+02:002008-11-29T22:25:15.171+02:00State of OpenSource Hardware in 2008There's a nice summary over at MakeZineNicohttp://www.blogger.com/profile/07164337094354168207noreply@blogger.com0tag:blogger.com,1999:blog-11911110.post-52220662412258172622008-11-29T22:22:00.000+02:002008-11-29T22:23:28.588+02:00Linux on the iPhoneThe Linux 2.6 kernel now runs on the iPhone :-)iPhone Linux Demonstration Video from planetbeing on Vimeo.Nicohttp://www.blogger.com/profile/07164337094354168207noreply@blogger.com0tag:blogger.com,1999:blog-11911110.post-46462332511448097272008-11-26T11:41:00.003+02:002008-11-26T11:50:42.577+02:00Why do people still use Internet Explorer ???Many people probably just don't know there are other browsers... Perhaps they don't know how to get/install other web browsers... Whatever the reason, they are missing out!Since Chrome is currently only Windows based, I will gladly settle for my Firefox 3 browser, as it didn't do that bad at all.Well done Google!Follow up: Also be sure to check out Lunascape - a triple engine browser!Nicohttp://www.blogger.com/profile/07164337094354168207noreply@blogger.com0tag:blogger.com,1999:blog-11911110.post-57106360142204943512008-11-25T14:03:00.002+02:002008-11-25T14:17:21.249+02:00The snake bites it's tailI have finally hit some sore points in my Python programming experience I don't like at all:Point nr 1: How Python handle NULL values. I am of course not the first to hit this little problem... This is particularly confusing when dealing with databases. A DB query could return one field in one row of which the value is NULL, or, no rows could be returned at all. In both cases you will have a "Nicohttp://www.blogger.com/profile/07164337094354168207noreply@blogger.com0tag:blogger.com,1999:blog-11911110.post-79409701432766170902008-11-07T10:27:00.001+02:002008-11-07T10:28:03.234+02:00Started a new dedicated Python siteCheck it out on http://sites.google.com/site/pythonbits/Will be adding more and more stuff there over time.Nicohttp://www.blogger.com/profile/07164337094354168207noreply@blogger.com0