Catalan slow cooked chicken
This is based on a recipe in Asda magazine.
Ingredients
- Chicken pieces – drumsticks, thighs, legs – whatever
- 3 onions, chopped
- 2 cloves of garlic, sliced
- Red and green pepper, chopped
- 6 tomatoes, chopped
- Bay leaves
- 1tsp paprika
- 1tsp turmeric
- 1tsp dried oregano
- Chicken stock pot
- Olive oil
Method
- Put the chicken pieces in a slow cooker with bay leaves and turn on full to warm up.
- Fry the chopped onions, peppers and garlic in olive oil until soft.
- Transfer the cooked onions, peppers, garlic and oil to the slow cooker, add the stock pot, the chopped tomatoes, paprika, turmeric and oregano.
- Just cover with boiling water, put the lid on the slow cooker and leave on high for about an hour until it is bubbling gently.
- Turn down to low and leave to cook for about four to five hours.
Move Linux Mint Root Partition
I recently added a new disk drive to my workstation and, as part of reorganising, wanted to move the Linux Mint root partition from one disk to another. Naturally I googled duckied it and found a certain amount of useful info.
I used gnuparted to copy the partition from one disk to another. The standard method to reinstall grub on a partition so it will boot appears to be to mount it and use grub-install with the –boot-directory option like this.
Read more →Fried Rice
This is our version of Chinese take-away fried rice. Use whatever meat and vegetables are in the larder. Tasty meal for four
Ingredients
- 2 onions, chopped
- 2 cloves of garlic, chopped
- 2 carrots, grated
- 1/4 white cabbage, thinly sliced
- 1 1/2 cups of easy cook rice
- 250g chopped gammon ham
- 100g cooked prawns
- 100g petit pois
- 1 3/4 cups water or stock
- Vegetable oil
Method
- Put a large dollop of oil into a large skillet or wok.
- Add the onions, garlic, cabbage and carrots and place on a medium heat.
- Cover and let the vegetables cook for a while.
- Add the rice, meat, prawns and peas.
- Add the water and give a good stir.
- Cover and allow to cook until the water is absorbed.
- Add more water if necessary.
- It is possible to get a tasty paella-like crust on the bottom of the pan if timed just right.
Pan fried lamb’s liver, bacon and chorizo
Back in the mid 70’s, I had to do some work at Kingston upon Thames Power Station. When I stopped for lunch, I found a little Greek restaurant opposite in a parade of shops and restaurants. That whole area, including the power station has since been redeveloped, and bears no resemblance. I had their lunch time offer of pan fried kidneys, probably with rice.
When I got home, I mentioned this to she who did most of the cooking at that time and she came up with something which became her kidney special. It evolved into a completely different dish over time.
Read more →Handlers in Android
Using a handler to return results from a worker thread
This has taken me quite a while to put together. There are throw-away remarks in the Android docs about this, but no useful examples. You want to get the results back from a worker thread to your main activity so you can do stuff with them. There are several parts to this.
- The main activity implements Handler.Callback, and has a handleMessage function.
- When the worker thread is created, include a reference to the main activity.
- In the worker thread constructor, create a Handler, including the reference to the main activity.
- When some results need passing back, send a Message back to the main activity using the handler.
public class MyActivity extends Activity implements Handler.Callback
{
//...
// On create
@Override
public void onCreate(Bundle savedInstanceState)
{
//...
WorkerThread worker = new WorkerThread(this);
//...
public boolean handleMessage(Message msg)
{
//...
public class WorkerThread extends Thread
{
Handler handler;
//...
// Constructor
public WorkerThread(Handler.Callback callback)
{
handler = new Handler(callback);
//...
private void someFunction()
{
handler.sendEmptyMessage(WHATEVER);
// or
Message msg = handler.obtainMessage(WHATEVER, thingy);
handler.sendMessage(msg);
//...
The handler will send the message back to the activity in the UI thread, so you can do whatever with the contents.
Read more →