Skip navigation.

Harold's Home

XML version of this site

PHP Scripts

CLI fun
Mail on 404
HB-NS (NewsScript)


APOD to Desktop
Dreamweaver Extensions


Other stuff
Central Grinder

OOOk Default:

VJ stuff
VJ Tools
Sample Movies

Older news

616 newsitems found. Page 58 of 62.
Astronomy Picture of the Day
Today's Astronomy picture
I have finished the scripts that will download the astronomy picture of the day and set it as the current desktop backgrond in Mac OS X. The scripts use Perl and OSAscript (the commandline version of applescript). Enjoy.

It appears my iPod is traveling in time.

tracking and tracing timetable for iPod from Taiwan

With any luck I'll have it before Apple even designed it so I can sell it to them and get rich.

Monkey Business
From the BBC: A bizarre experiment by a group of students has found monkeys cannot write Shakespeare. Full article.

Should have picked the right simian.

More weird news:

94 year late book returned to library.

Random Ramblings
UNIX is cool.

Here's a few of the lines I currently have in ~/Library/init/tcsh:
alias bbhttpd "bbedit /etc/httpd/httpd.conf"
alias restartapache "sudo apachectl stop; sudo apachectl start;"

Which makes it extremely easy to edit Apache config files in BBEdit and then restart Apache to see how bad you've fucked up, if at all.
Having your own server at home definitely rocks, especially if your boss pays part of it through some kind of PC at home project while at work you're forced to fiddle with the dark arts and Windows NT while on the job.

So I've decided to get me one of them thar iPods. I figure there's gold in there somewhere. Or at least some pretty good stuff. One of the most important things a digital device has got to do for me is keep track of what books, dvd's and cd's I've already bought so I don't buy them again, and the new notes reader seems to fit the bill, all it needs is an automated export from Filemaker and I'm good to go. This may sound silly but in the past few months it's happened to me a couple of times that I've come home all a-joy, only to find I've bought something I've already got, thus deflating my joy like a balloon on which a sharp-clawed rabbit has sat (a private thought, sorry about that).
Now with books this is normally not a problem, most of my friends are into the same kind of sci-fi I am. Likewise with movies, but in the music department I stand alone. I'm still clinging to the idea that Grindcore will once be the next big thing to hit the market.
Alas, as some random googling points out Grindcore is as dead as a dodo. All you find is some crappy tracks of bands better left unknown. The hey-day of such giants as Carcass and O.L.D. has gone. Earache records seems to be slowly festering away. "Grindcore was invented here..." their <title> tag proclaims. Yeah sure, invented here... but where is your god now?

I'm looking for some kind of daemon that will silently and unnoticably post the iTunes tracks I'm currently listening to to this website, by the way. Something small and background-y. I don't need no stinking dock items anymore. Something like Recent Tunes would fit me nicely except I'm not really in the mood to hack that code right now.
You see, I'm working on some code right now to download the latest astronomy picture of the day and set it to the current desktop picture, using Perl and OSAscript (if you don't know what this means you're probably my mum, in which case: Hi mum! or on some windows thingy or other: yeah sure hi to you too). The code is a bit buggy right now but I'll see how it goes and post it a few days after it seems stable. (Don't you just hate 0.1 releases?)

That's all for now (currently listening to Carcass - Reek of Putrefaction - Excoriating Abdominal Emanation by the way).

PHP from the Command Line
Found via Daring Fireball: an installer package for the commandline version of PHP for Mac OS X: somebody dial 911.

Easy to install and great fun.
I'm playing around with this at the moment but expect to see a small example later this week (possibly tonight but who knows what might happen, I gotta eat too you know...).

it's here, a commandline php script to urldecode or urlencode a string of text.

Newsscript Version 1.1.2 released
I have just released the newest version of the newsscript. It features minor codeenhancements, some small sample modules (search and a sidebar to include the latest headlines on any php page) and an RSS feed. It is also pretty easy to localise for other languages, English and Dutch are included.

Aside from small bug-fixes this will probably be the last version for a while. I'm thinking of turning the thing into more of a blogging tool than a newsscript. Feel free to mail me your thoughts on this or use the poll on the PHP scripts index page.

Cool Useless Software
Found this great review of completely useless software on PT Bruiser.
It's a browser with a twist, it will only allow you to visit, although there is a hidden feature that enables you to visit other websites. I spent a good half an hour before I was able to visit my own homepage screenshot.

If you're running MacOSX give it a whirl, and have fun.
Hint: click the "sponsored by" ad and be aware that you can only get to other sites by clicking on links. Try to find one to Google and you're home free.

Tip of the day: addslashes()
Accesslogs are a wonderful thing.

To the person who wanted to know how to embed apostrophes in mysql:
the function you're looking for is addslashes($variable_name);
I assume you're using PHP here.

MySQL Query
Query: does anyone know if MySQL has some sort of statement that looks in an array (a bit like the in_array function of php)?

Something like: SELECT * FROM table_name WHERE customer_number !IN_ARRAY('1','12',354') ORDER BY customer_number LIMIT 0,1 would fit me nicely for a couple of cheaters in the online statistics of the Virtual Pet Rock site.
Please mail me if it's possible.

<rant>Geez, what is it with some people anyway? They get a free virtual rock to take care of (presumably because they can't keep a goldfish alive and think a real rock is probably a bit involved) and then they cheat by hacking the statsfile.
What worries me most actually is the fact that they not only hack their stats to come out as the best caretaker, but also as the WORST caretaker. C'mon, just neglect the rock for four months, start the app and upload the stats, no need to cheat, just pure and simple neglect, an idiot could do it.</rant>

404 script
I have added a snippet of PHP code to the PHP section that will send an e-mail to the webmaster every time a page is requested that is no longer there.

Read more. Go to page: << 54 55 56 57 58 59 60 61 62
Show all items | Show topics

About, copyright, privacy and accessibility | Mail