dan.forys.co.uk
Dan is a web developer in London. He is interested in all things Internet, Linux and Mac.-
Digital conversations. Preserved.
Posted on February 21st, 2011 No commentsThe web is not static. By its very nature, it changes all the time – anything you look at today might have changed, or be removed entirely tomorrow. The BBC’s recent announcements that they are shutting down, rather than simply mothballing, several of their sites, got me thinking about my online activities and their lack of persistence.
That’s when I decided to make a journal. Read the rest of this entry »
-
Pastel de Nata recipe
Posted on January 10th, 2011 2 comments
After travelling to Portugal and savouring many pastéis de nata in their native environment, I decided to try and make them myself.
It was difficult to find a decent recipe online, but after a bit of looking I found a BBC Food recipe. The tarts turned out less than optimal, so I did a bit more sleuthing. After watching a few Youtube videos of the professional tart makers in action, I adapted the recipe and settled on the below.
The key to a successful tart seems to be the careful pressing of the pastry – I highly recommend watching some of the above videos to get an idea of the technique.
Ingredients:
Butter for greasing
3 egg yolks
3 tbsp caster sugar
25g cornflour
2 tsp vanilla essence
1 cinnamon stick
2 small slices of lemon peel
175ml full fat milk
225ml double cream
300g puff pastry (don’t bother making your own – seriously!)- Put the vanilla essence, cinnamon stick, lemon rind, milk and cream in a small pan. Heat gently and bring to the boil slowly whilst stirring gently. When it starts to boil, turn off the heat, strain out the liquid into a jug and set aside.
- Preheat the oven to 210 degrees C. Grease a 12-hole muffin tray with butter.
- In a pan, mix the egg yolks, sugar and cornflour over a low heat until it forms a well combined paste. Add the cream mixture in a thin stream, stirring slowly but continuously. When heated through and well combined, turn off the heat and pour into the jug. (Don’t let it boil – it will cook through and thicken in the oven!)
- Roll out the pastry into a rectangle approx 30cm wide and 60cm long. Slice in half lengthways and place the half on top of the other. Roll into a tight swiss roll.
- Cut into slices approx 1.5cm wide and place horizontally in a muffin tray hold. Wet both your thumbs with water and press from the bottom middle of the pastry outwards. Keep pressing the pastry and rotate the muffin tray around to create an even pastry case the full height of the hole.
- When all 12 cases are ready, take the cooled custard mixture and divide equally among the cases.
- Bake in the oven for around 15 mins, or until the pastry is golden brown and the custard set in the middle. When cooking, the custard will rise over the top of the pastry – don’t worry, it’ll sink when you take it out of the oven.
-
Fixing a bricked D-Link DSL-G624T
Posted on January 22nd, 2010 19 commentsMy Parents have a D-Link DSL-G624T ADSL modem/switch. Unfortunately, my brother decided to update its firmware, crashing it in the process. After a bit of remote debugging over the phone, we thought the best option was to send it to me.
The symptoms were as follows: The power LED came on as normal, the status LED was flashing as normal – indicating that it was at least booting up. The LAN link LEDs would light up when an ethernet cable was plugged in. However, its web administration panel couldn’t be reached on http://192.168.1.1 and it couldn’t be pinged either.
After a lot of searching, reading and failed attempts at repairing it, I have found a method to reset the firmware without the web interface. Quite why D-Link make it so awkward for their UK customers, I don’t know.
Read the rest of this entry » -
Learning PHP – Part 6: Functions
Posted on November 3rd, 2009 No commentsFunctions are a very important PHP feature, and are the building blocks to some very powerful programming techniques. First of all, what is a function?
In the tutorials so far, the PHP scripts have run from the top down. All instructions are performed in the order they appear in the file.
A function can be thought of as a reusable ‘black box’. You (optionally) give it some data (called arguments or parameters), it performs an operation and (optionally) gives you a result.
This is illustrated in the following diagram:

-
Learning PHP – Part 5: Your first dynamic web page
Posted on November 3rd, 2009 No commentsAfter the previous parts of this tutorial, you should be familiar with PHP variables and arrays.
Now we will use these concepts to actually make a working web page. This page will contain a form that you can submit, and we will write PHP code to handle the form contents.
-
Learning PHP – Part 4: Controlling flow
Posted on November 2nd, 2009 No commentsSo now we’ve looked at variables and arrays, it’s time to make the code a little bit smarter.
We’ve already seen how the foreach() can loop (iterate) over items in an array, but there are other ways to alter the flow of the code as well.
Conditional
One of the most common PHP statements is the “if”. In a nutshell, “if” does the following:
if (some condition is true) { run this code }
-
Symptoms of a WordPress Hack
Posted on November 2nd, 2009 2 commentsI came to my site on Sunday morning ready to write the latest in my PHP tutorial, only to find a nasty looking 500 server error. I couldn’t even log into the admin panel.
After a while tinkering with various configuration settings and trying to get something to come up, I started searching the web. Turns out, earlier versions of WordPress were vulnerable to specific hacks that could let attackers create their own admin users.
-
Learning PHP – Part 3: Array basics
Posted on October 26th, 2009 No commentsIn part 2, you were introduced to the concept of variables and the string, integer and floating point types. In part 3 we’ll go through a more advanced type; the array.
-
Learning PHP – Part 2: Variable Basics
Posted on October 25th, 2009 1 commentAfter part 1, you should be familiar with the echo statement, which outputs a string to the browser:
echo 'This is a string';
(Note that from now on the opening (<?php) and closing (?>) PHP tags are omitted from examples, but should still be included in any source code you create)
On its own, it does not appear to be useful; after all we could have just written ‘This is a string’ in HTML for the same effect. The real power comes from using PHP variables.
Read the rest of this entry » -
Learning PHP – Part 1: Introduction
Posted on October 24th, 2009 2 commentsSo, you’ve got to grips with the basics of HTML and CSS, and now you want to actually make your web page do something? Well, PHP is a great way to do that. In this series of blog posts, I will introduce the PHP language and teach many useful techniques that are used in professional PHP development.




