Notes and links
This is a list of all my notes from history, so I can find them if I need. Back to notes and links
Finding the last memory chip in Toy Bot Diaries 3 I don't know what the developers were thinking, but the last, impossible to find, memory chip is in fact hidden in the blackness of an area you normally wouldn't want to fall into (or you die).
This blog has moved
Adding an Expires header with apache for Rails We have a problem - we really do. Each time a user requests a page they have to make 50 http requests just to get back a "Not modified" message from the web server. Their browser is asking about every little image and css file and so on. Every one on the page. Those messages are small, but they add up. And as we know, "make fewer HTTP requests" is
Benchmarking at the method level in rails controllers We have a reasonably complicated set of logic inside our controllers that is able to take an incoming url and serve the right content depending on 3 different parts of the url in various combinations and permutations. There are quite many DB queries required, and sometimes it goes slow.
Rails logging - config.log_level has no effect Curiously adding config.log_level = :debug to environment.rb appears to have no effect on the logging performed by ActiveRecord. To get to see the detailed logging and benchmarking of your database queries in production mode you need to place this
Rails testing - two gotchas
debug1: Remote: No xauth program; cannot forward with spoofing I needed to install X on a remote fedora machine, and then use my local machine as the X server over ssh. Compiling & installing X went smoothly, but I got the following error when running ssh -X (with -v for debug output) to the remote machine:
Why Ruby is not my favourite programming language Actually it
Could not find rails (> 0) in any repository This is with a brand new installation of ruby (./configure, make, make install) and of rubygems (ruby setup.rb). Odd error message to get really, rails is certainly there .
Full text search systems A quick survey of the available open source systems for text search
Obfuscated ruby - ETA interpreter updated Just a quick pointer - I had some correspondence resulting in some updates to my by now ancient
IOCCC 2006 winning entries I am delighted to say that both my entries for the 19th IOCCC qualified for a prize.
xtorrent 1.1 - released today Now then, there is this very nice torrent client for the mac called
Caught at the Storyville
Rails: wrapping content from a helper The form_tag method in ActionView uses a nice trick to wrap a block of content in form tags, and you can wrap content the same way yourself.
Tumblelog I made a
Worse than monsters "Daddy Daddy I can't sleep... there are
Installing FFMPEG on a mac UPDATE Ok, you can forget all the stuff about applying a patch. Graham Booker just came up with a
Installing FFMPEG on a mac to encode to flv Actually installing FFMPEG on a mac is not completely trivial due to some
Firefox bug displaying dropdowns inside relatively positioned spans Firefox has a problem with dropdown lists inside a span that is relatively positioned. They won't display the option list when you click on them. Oddly, FF for MAC works ok, this is only a PC problem.
Getting column names from postgresql In Mysql getting the meta data about a table is easy:
Rmagick on OSX, bus error After much fretting, I discovered that using
More breakage in Rails 1.2 - routing and caching We came across at least 5 issues in Rails 1.2 that affected our sites to do with routing / url_for and caching.
More breakage in rails 1.2 - to_param and routing failures A couple more things to watch out for in Rails 1.2
Subversion 1.3 and "svn: Working copy path '...' does not exist in repository." problem We are running version of subversion that is a little bit old - 1.3.0. I hesitate to update it just now because I recall there were a few tricky dependency issues with the database that svn uses when I tried to install it in the first place - I couldn't go later than this particular version.
Compiling gnu emacs under fedora fc5 If you do a straight compile of emacs under fedora it fails - you get this:
Rails 1.2 breakage in routes Rails 1.2 is almost, but not quite, backwards compatible with 1.1x. We suffered from route failures after upgrading.
Expiring the memcached cache in rails - tracking cached fragments This is a brief description of how I solved my caching problem with rails. We have thousands of pages, which will all eventually be cached by the system. We list the actions to be cached, for example:
Ruby on rails: expire_fragment using regexp is broken with memcached My rails application broke badly when I installed memcached.
How to do multpart alternative and related mime messages correctly The problem is to do a message that has plain and html alternatives.
SCGI rails runner and ECONNRESET problem There is a hack for running Rails via the SCGI rails runner that is still required, despite
ActionMailer and embedding images in HTML emails - more Manuel Holtgrewe wrote to me, and pointed me to his weblog where he notes
Excel to php - php excel parser Ever wanted to get the data out of an xls file using PHP? There are some commercial PHP products to read excel spreadsheets that handle all the data types, and formulas and so on (eg
Disgraceful things I started my new web project. It's called
ActionMailer change of behaviour in rails 1.1 It seems that actionmailer now expects you to give the .rhtml extension after the template name in render_message.
More about actionmailer inline images Rails 1.1 arrived, and I upgraded. Things broke...
Inline images from Actionmailer Rails has a nice email component, useful for simple stuff. But for more complicated multipart emails it's, well, not so useful - at least as it comes out of the box.
Ruby on Rails - file column permissions problem There is a wonderful plugin for Rails called
Rails tips
2005 IOCCC winning entry Great excitement, I won in the
Testing with multiple versions of IE Around 6% of web users are still on IE5.0 or 5.5. This is somewhat annoying because it means sites for a general audience must support these browsers or risk alienating 1 in 20 visitors. And neat tricks like using AJAX to make the pages nice and dynamic probably won't work. So fallback behaviour is needed.
Formatting a cell as text in Excel from javascript I needed to format some cells as text because they contained long numbers that get munged and rounded by Excel.
Centering content with CSS while allowing absolute positioning It turns out to be quite hard to center a site with CSS whilst retaining the ability to position things absolutely relative to the centered site edges.
Getting colours in ls and emacs on FreeBSD I spent some time trying to get colours to work in my putty terminal logged into a FreeBSD box. Eventually I came across this excellent advice:
Finnish public holidays I talked about Finnish public holidays
How the checksum digit is calculated in a henkilötunnus In Finland the "Personal ID number" (Sosiaaliturvatunnus (SOTU), or Henkilötunnus (HETU)) is used for identifying the citizens in many government and civilian systems. It uses the form DDMMYYCZZZQ, where DDMMYY is the date of birth, C is the century identification sign (+ for the 19th century, - for the 20th and A for the 21st), ZZZ is the personal identification number (even for females, odd for males) and Q is a checksum character. For example, a valid henkilötunnus is 311280-999J.
Selenium - Web site testing
2005 IOCCC entries It's nearly three months into the judging process for this year's IOCCC contest, and I thought it was about time I put my entries on my website for all to see. My entries from last year are
Adjusting SL1200 tonearm [for my reference, taken from
Adjusting pitch control for technics SL1200 [This is cribbed from a message board, I wanted to keep it for reference. It's about adjusting the 0 mark on the pitch control so there is not a second 0 point away from the central indent.]
Places to go windsurfing in Corsica Just back from Corsica. Before I went I tried to research places to go windsurfing, bearing in mind that I was not taking any of my own kit (meaning I needed to hire).
pear downloading never works The pear package management is a piece of crap that has never
Pinja investigates celestial mechanics Pinja is at that why why why stage. It's a very cool thing. This is an exchange from last night:
IORCC Some people got to organising an obfuscated ruby programming contest, the
LS colours in freebsd I've been used to making sure my ls colours are in form by using eval `dircolors` in linux.
YLE to stop digital radio broadcasts
PHP acceleration A number of php accelerators used to exist - there is the
Fiddler
Learning to backflip My old colleague Joe Walnes
The from(1) command For some reason there is no
Making bread I got a new bread making machine. It's a Chef Leipäkone C-735. And it was on special offer for 39 euros. A bargain.
Mobile phone identity spoofing In the latest issue of Cryptogram, Bruce Schneier's security newsletter, he talks about
Layering content above select boxes in IE I ran into the thorny old problem of popping up content (in this case a calendar date selector) above a select box. The select box always goes on top because of the way IE renders it. However, there is a neat way to fix this by using an iframe underneath your popup box. An example is
IOCCC winning entry Great excitement - I won in the
Finnish words for "there" I originally wrote this blog entry a while ago, but our server died, and the hosting company's most recent backup was from over a week before the failure, so it was lost.
Loyalty card cigarettes
Disabling services on Windows I just disabled a bunch of services on my computer. It's amazing how much crap is running using up memory and resources. Hopefully it will run a little bit quicker now.
Character encoding with PHP and POSTGRES on Redhat Enterprise We were trying to set up a web application on a nice new Redhat server. But sadly all the ä's and ö's were coming out wrong. A typical charset encoding issue.
PHP5? Use Ruby instead! PHP 5 is just out, and someone posted
Creating classes on the fly This Ruby fragment is so cool I just have to make a note of it here.
Controlling cursor in textareas I needed to control the cursor in a textarea from javascript.
Ducktyping The phrase "Ducktyping" comes from the simple idea that "If it walks like a duck, and it quacks like a duck, then let's call it a duck!". Possibly it was invented by the
IOCCC The
AWStats I have started to use
Bobbity flop I just added a children's book to this website. It's called
HttpUnit This looks like a pretty good way to automate testing of web apps - something I have been meaning to start to do for some time. Maybe I will get around to it now. One day I might actually write the tests first too, like one is supposed to...
Browser printing I was trying to print
Satellite programmers forgot about gravity This quote is from SSC's space diary:
Finnish public holidays It's a pretty poor showing this year in Finland for public holidays. It is unfortunate that public holidays are not moved to the following Monday if they fall on the weekend, as they are in the UK. This means that in some years the number of days off work can be reduced in a damn unpleasant way due to unfavourable calendar circumstances.
Nigritude ultramarine There is a
Ujiko search engine There is a new search engine called
CURLOPT_POSTFIELDS does not work with an array in PHP I needed to post some XML data to another website from PHP using SSL (to an https address). The way to do this is by using the PHP curl support.
Eating my own cooking After seeing how well
Madeleine - automatic commands There's been a bit of discussion lately about
Matchstick rockets Hey, *I* invented
IOCCC entries The 17th IOCCC competition entry submission period closes today. I made two entries this year, and I've put them up on my website now.
Hypochondria song I recently got an email from Laura Dolce, who works for a New York newspaper called the
Helsinki - Tallinn ferry operators I needed to find all the options for getting to Tallinn from Helsinki, so here is the list.
Encryption not supported on SQL Server ConnectionOpen (PreLoginHandshake()) I have a setup of MS SQL on my local machine here, which was running fine. But today I started it up, and attempted to connect, but all I got was "Encryption not supported on SQL Server ConnectionOpen (PreLoginHandshake())."
Roland keyboard: FP5 review Ages ago I posted a review of my
ntpdate - no server suitable for synchronization found (3) I've
Templating engine I got an email from
Anti email harvesting measures I just wanted to subscribe to a mailing list (
Finnish children's rhyme Well, I'm not
Poor software protection I just downloaded a product I was interested in from the internet. It was in fact an Excel spreadsheet, containing a bunch of macros to do useful stuff.
Reading mail as plain text in Outlook Receiving HTML emails is a BAD THING, particularly if they are spam and the image tags have identifier codes that notify the spammer that your email address is active.
Disabling the CD ROM autorun feature The autorun feature is irritating, dangerous and unnecessary.
Groklaw
Terrible Palm Pilot security So, I left my palm pilot V for a long while without using it. It ran out of battery completely, and reset itself when I put it back on the charger.
Spam attack solution Some time ago I was
Debugging in your sleep It's a curious thing.
Things people argue about Oh,
DVB specs I've been doing some work involving decoding DVB streams.
Finland's English speakers' association Only of interest if you live in Finland!
ntpdate - no server suitable for synchronization found (2) This is an update.
Textarea in Mozilla - rows and columns bug There is a
Coming from gargleblaster.org? On the gargleblaster.org links page there is a link to this blog. It is described like this:
Ruby 1.8.0 - readline.dll Ruby 1.8.0 has been released. On my windows 2000 box I use the
The elements
Doc-O-Matic I've been using an excellent documentation package to generate the manuals for our product. It's called
SPAM attack So, I checked my email on Saturday morning, and hundreds of mail failures started popping into my inbox. I stopped the transfer, and started to investigate.
Zoe's weblog Just a note that I quite like this weblog. I need one of those blogroll things, but for the moment I'll just note the link
Roland Rhodes 760 review I added a review of my old Roland Rhodes 760 synth to the excellent Harmony Central site, see
Redsheriff I don't like spyware like
Roland Juno 6 I have an old Roland Juno 6 synth. Actually it's in it's case in a friend's attic at the moment, but last time I saw it it was still looking good and working perfectly.
Static routes on Redhat 8 I had a spot of bother establishing some permanent static routes in RH8. Now I know why - this is from the RH9 notes:
Prevayler's friends Nanning (AOP project with support for Prevayler) is here
Why XML sucks I agree with most of
PHP session problems I am finding that my session with apache/php will just hang sometimes. The browser just does not receive any more data, and nothing can be retrieved by that browser until the session file is deleted from the server (or it expires).
SSH problems
Borges
New language From
Ruby bug It's bug week. I found a bug in Ruby also.
Bug in PHP 4.3.0 I found a bug in PHP 4.3.0. Matt Gillam was having trouble with some code, so I whittled it down to the source of the problem.
Prat I notice that Jerry Springer fits under the path
Blowing bubbles It's -26C outside here (in Helsinki) at the moment.
ntpdate - no server suitable for synchronization found Fresh installation of ntp v4 on redhat 8.
Interesting things A couple of things to make a note of:
Abbreviations
Interesting search engine
Captioning/subtitles
Anti-leech, script security Slashdot are running a
Bytea fields in Postgresql Bytea fields seem to be problematic if you want to store anything that has backslashes in it. The DB expects a backslash to be followed by 3 octal digits. Anything else produces an error. So storing pure binary data without special processing is not possible.
RedHat 8 terminal character set After installing RedHat 8 I had considerable difficulty in using putty to acces it. Man pages would come out with some characters displayed wrongly, the ls colours were wrong and various other problems. Eventually I discovered that the default terminal setting was to use UTF-8.
SNMP via php Managing a switch is easy using php. Make sure you have SNMP support compiled in (add --with-snmp to your configure command).
Kay Dekker's livejournal
J2EE and related technologies I was finding myself v-e-e-r-y tempted to move my CMS project across to J2EE. I needed better persistence layer management, particularly speed improvements from caching.
CSI I got very annoyed at the TV last night. Here in Finland they are showing CBS's
Setting up Apache2, PHP 4.2.2, Mysql, Postgresql on Windows 2000 Apache 2 works ok. Use latest build of PHP. No automated installation for PHP so do this (paths work for me, you will need to mod them to suit):
Windows Networking Why oh why does it take a full two minutes for Windows to ask me for my username and password when I try to navigate to our NT server in Windows Explorer?
Querying HTML documents using SQL like syntax
Spam eater It often happens - you want to sign into some site on the internet that requires a valid email address... but you don't exactly know to whom you are handing your nice, so far spam-free address.
Windows 2000 update Just updated my laptop to Windows 2000 SP3. Despite having to agree that Microsoft can download whatever they please onto my computer without my knowing, it was quite painless. The 37Mb download took a while though.
PHPWiki
Mysql / PHP date handling notes To get from mysql format to PHP unix timestamp:
Soothing Sounds My daughter
Privacy I was trying to reduce the amount of information that I give to all the websites I visit. So I have switched on the ask mode for accepting cookies in IE, and I changed the user agent string to say something other than MSIE 6.0/Windows NT 5.0.
Hacking Game
Meta Search Engine
Software protection
Investigating music notation systems
Investigating PHP BB systems
Joe's geeky weblog
Finland windsurfing
Postgres DROP TABLE fails to complete Happened to me. When you try to drop it again it does this:
Postgres notes from Simon Where is the user information stored?
Mysql / php dev tools as told to Matt The problem is to manage simple database tables with a customisable user friendly web interface without having to write so much repetitive php code. Matt notes that none of these solutions use a DB abstraction layer.
|