Category Archives: Uncategorized
The Way I Work: Jason Fried of 37Signals
Link
Gallery
Stir-fried chilli broccoli with seared polenta
Link
Stir-fried chilli broccoli with seared polenta
Ingredients
For the seared polenta
100g/3½oz quick-cook polenta, cooked with water or stock according to packet instructions
salt and freshly ground black pepper
2 tbsp olive oil, plus extra for greasing
For the broccoli
1 tbsp olive oil
1 garlic clove, sliced
½ red chilli, seeds removed, finely chopped
3 stalks purple sprouting broccoli, trimmed
½ lemon, juice only
salt and freshly ground black pepper
Method
1. For the seared polenta, place the cooked polenta into a bowl and season with salt and freshly ground black pepper.
2. Lightly oil a small square dish and press the polenta into the dish. Leave to cool – it will form a solid cake.
3. Heat the oil in a frying pan, slice wedges of the polenta from the dish and fry, turning frequently, until crisp and golden-brown on all sides.
4. For the stir-fried chilli broccoli, heat the oil in a wok or large frying pan, add the garlic and chilli and stir fry for one minute.
5. Add the purple sprouting broccoli and stir fry for 3-4 minutes, or until the broccoli is tender.
6. Add the lemon juice and season, to taste, with salt and freshly ground black pepper.
7. To serve, place the broccoli onto a plate with the seared polenta alongside.
Rubular: a Ruby regular expression editor and tester
Link
Mug.gd | An eeevil URL Shortening service
Link
Quote
Product development is a conversation with the user that doesn’t really start till you launch. Before you launch, you’re like a police artist before he’s shown the first version of his sketch to the witness.
Solved – Warning: Unknown column ‘serialized’ in ‘field list’ – error while upgrading Drupal
Link
Solved – Warning: Unknown column ‘serialized’ in ‘field list’ – error while upgrading Drupal
ALTER TABLE cache_similarterms ADD serialized SMALLINT(6) NOT NULL;
Cauliflower Provencale
Link
Ingredients
- 1 cauliflower, broken into flourettes
- 1 medium onion
- 1-2 clove garlic
- 1 tablespoon olive oil
- 1 can plum tomato
- 1 teaspoon salt
- 1 tablespoon herbes de provence
- black pepper
- 1 tablespoon roux (“50:50” flour mashed with softened butter)
Directions
-
1
Boil or (preferably) steam Cauliflower until barely done- still slightly crunchy.
-
2
In a separate pan fry finely chopped onion on medium heat for 4 or 5 minutes adding minced or finely chopped Garlic halfway through.
-
3
When soft but not brown add tomato (do not break up too much)& other ingredients.
-
4
simmer gently for 3 or 4 minutes.
-
5
Adjust seasoning.
-
6
Mix Cauliflower and sauce and serve.
When appending to a string in Ruby use the << method instead of +=
Link
When appending to a string in Ruby use the << method instead of +=
If you come from another language, you might be tempted to use the += operator when appending to a string.
- my_str = “Marco ”
- my_str += “Polo”
It works… but there is a better way to do it : the « method.
- my_str = “Marco ”
- my_str « “Polo”
#UPDATE
I have removed my initial claim about operator precedence as it isn’t really accurate. There is a much better reason to use « instead of += when appending to a string… something I didn’t even realize (Thanks to Gregory). += will create a new String instance and will assign it to your left object. On the other hand, « will append the new string directly into your already existing left object. One could argue that += is only different than « and not better, but to me « is what you’ll want to use 99% of the time (if not 100%) when appending to a String. I have yet to see a real case where one would want to “lose” it’s existing String instance just to get a new one containing the exact same value.
You can also use the « method with arrays :
- [1,2,3] « 4 #gives [1,2,3,4]
Be careful however when using « with Fixnum/Bignum instances. With these objects, the « method will shift the bits of your integer to the left. If you want to do a summation (append style that is), you will have to use +=
