Aloo Chana Masala
Ingredients
- 120ml Sunflower Oil
- Fennel Seeds (about 12-24)
- Cardamom Pods (freshly ground – never buy pre-ground Caradom)
- 750g Par boiled Potatoes
- 1 1/2 large onion
- Curry Leaves (fresh if possible)
- 2 tbs Ginger & Garlic paste
- Salt (to taste)
- 1 tsp Turmeric
- 1 tin chickpeas
- 1 tsp Cumin
- 2 tsp Chilli Power (to taste)
- 1 tsp Coriander Power
- 6 salad tomatoes roughly chopped
- 3-6 Green Finger Chillis
- Fresh Coriander to top
Method
Par boil the potatoes for 2-3 minutes so still firm.
Gently heat Sun flower oil and add fenel seeds for a minute caramon.
Fry Onion and potatoes (aloo) in the pan for a couple of minutes.
Add curry leaves, ginger and garlic paste and salt and let cook for another 3-4 minutes.
Add chickpeas (Chana), turmeric, chilli powder, cumin powder, corriander powder and cook for a further 3 minutes.
Add chopped tomatoes but do not mix in. Cover and cook for 4 minutes with the lid in place.
After check the mix is not too dry and add water if it is.
Mix and add the green chillis and simmer on a low heat for a further 2 minutes.
Top with gram masala (optional) and fresh corriander and serve.
Spinach Dhall – Dall Saag
Daal saag
Been trying a number of Daal recipes and this is one of the simplest and really tasty. This has been adapted from BBC Foods Daal Saag
Ingredients
- 225g moong daal – yellow split lentils
- 750ml oz water
- 1 tsp ground ginger
- 3 tbsp vegetable oil or olive oil
- 1 tsp black mustard seeds
- 1/2 tsp ground turmeric
- 1/2 tsp ground cumin
- 1/2 tsp asafoetida
- 2 hot green chillies, chopped
- 8 curry leaves
- 100g/3½ oz frozen spinach
- 2 spring onions, chopped
Preparation method
Put the water and daal in a heavy saucepan and bring to the boil. Reduce the heat then simmer for about one hour, or until the lentils are really soft. Add the frozen spinach when the lentils are soft.
Heat the oil in a wok or large pan until a cumin seed fizzes when put in the oil and add the mustard seeds, turmeric, cumin, asafoetida, ginger, chillies and curry leaves and fry for 2-3 minutes stirring.
Add the cooked dhall and spinach to the frying pan and stir in the spring onions.
Heat for a further two minutes, season, then serve.
Speeding up XBMC
I have always run X-Box media centre from xbmc.org which is an amazing piece of open source software. The power, flexibility and scalability of it has blown me away. Currently the release is Frodo 12.3. Coincidently for a long time it no longer runs on the x-box unless some dirty tricks are applied, and for a long time I never even had one, but it runs beautifully on a Linux, several flavours of Windows computers and my Raspberry Pi.
The files in your library are automatically scanned by XBMC and it uses various scrappers to determine what the TV programme or film or music that the name relates to. But the rules are all straight forward and easy to follow. You can always create a .nfo file to describe the program if the file can not be found.
My main computer and the kids computers all want to watch the same films from a NAS drive (network attached storage – i.e. a disc available on your home network), and the best way to do that was to put it on a MySQL server.
That was easy enough, create a file called advancedsettings.xml and populate it with the basic data, obviously changing the host, usernames and database names to the appropriate settings for my configuration. The advanced settings file was on a windows box was under the user profile (.xbmc) either or in the home directory for a Linux box under ~.xbmc
<advancedsettings> <videodatabase> <type>mysql</type> <host>192.168.1.3</host> <port>3306</port> <user>xbmc</user> <pass>xbmc</pass> <name>video</name> </videodatabase> <musicdatabase> <type>mysql</type> <host>192.168.1.3</host> <port>3306</port> <user>xbmc</user> <pass>xbmc</pass> <name>music</name> </musicdatabase> <videolibrary> <importwatchedstate>true</importwatchedstate> </videolibrary> </advancedsettings>
Once it had loaded up with its new setting the concepts worked fine but the performance was always awful. It took 40 seconds to move between each menu and for a long time I thought this was just a problem with the size of my media library. I turned on the debugging (under advanced settings in xmbc and it appeared that the
Optimisations
MySQL
This gave massive performance advantages. As each request was actually timing out due to the reverse DNS lookup. The debug output did not give this impression, in fact it suggested the mysql server was very fast. Each time that a request was being made by XBMC to the SQL server, it looked up the name of who had made the request (Reverse DNS lookup) which it couldn’t resolve.
I solved this by ensuring all my devices running xbmc had the same ip address (using an option in my router under DHCP) and then set up a host table on the MySQL server to tell it what all the devices were called. (edit /etc/hosts and add each machines name and I/P address).
Raspberry Pi.
Use a fast usb stick or disc in addition to the SD card. Both are faster than the SD card itself.
XBMC
Under Setting -> system settings – Video Output
Put the resolution to disable 720 x 480. This only applies to the user interface and not anything you watch. By reducing this value, you are freeing up available memory.
Under Setting -> system settings – Video – File
Disable generate thumbnails – This scans each file as you preview it to find a thumb nail from the file. It massively slows down navigation.
Under Settings -> Skin settings -> Home Window Options
[Optional] Disable “recently watched”- Makes a fair performance difference on the Raspberry Pi – but I want this information so don’t disable it.
[Optional] Disable “Show Recently Added videos” – Makes a fair performance difference on the Raspberry Pi – but I want this information so don’t disable it.
Under Settings -> Skin settings -> Background Options
[Optional] Disable fan art
Printers
Adding a Printer / queue
Setup for Linux
Ensure you are root or sudo’ed
Adding Your First Printer from the Command-Line
Run the lpadmin command with the -p option to add a printer to CUPS:
/usr/sbin/lpadmin -p printer -E -v device -m ppd
or
/usr/sbin/lpadmin -p printer -E -v device -P <directory to ppd file>
For a HP DeskJet printer connected to the parallel port this would look like:
/usr/sbin/lpadmin -p DeskJet -E -v parallel:/dev/lp1 -m deskjet.ppd
Similarly, a HP LaserJet printer using a JetDirect network interface at IP address 11.22.33.44 would be added with the command:
/usr/sbin/lpadmin -p LaserJet -E -v socket://11.22.33.44 -m laserjet.ppd
Managing Printer Classes from the Web Interface
The Web interface is located at:
You may need to check CUPS (Common Unix Printer Services) is installed and running
By default cups installs the following directories:
/etc/cups: Configuration directory.
/var/spool/cups/: The spooler directory where print jobs are held for printing.
/var/spool/cups-pdf: The spooler directory where CUPS-generated PDF files are held for printing.
CUPS also installs an executable binary in /etc/init.d/ (or /etc/rc.d/init.d) called cups. This binary is started with the command:
/etc/init.d/cups start/stop/restart
Create a printer on linux the hard way.
1. To create a printer called mylp for the /dev/lp1 device, open the /etc/printcap file with your preferred text editor. The sd option tells the Linux printing daemon, lpd, where to temporarily place printed (spooled) files. The mx command, used with a value of 0, places no limit on the size of spooled files. Type an entry such as this:
mylp:\ :sd=/var/spool/lpd/mylp:\ :mx#0:\ :lp=/dev/lp1:
2. Save the entry, and then create the printer’s spool directory by using the mkdir command:
mkdir /var/spool/lpd/mylp
3. Make sure the directory lp has the correct group ownership and permissions by using the chgrp and chmod commands, as follows:
chgrp lp /var/spool/lpd/mylp chmod 755 /var/spool/lpd/mylp
4. Test the printer entry with the lpr (line printer command) using the -P option to specify your newly created printer:
lpr -Pmylp test.txt
5. Your printer should activate and print the test document.
Setup for IBM AIX
For this operation you need to be logged in as root or sudo’ed
run smit.
-> Print Spooling
-> Aix Print Spooling
-> Add a Print Queue
Select options
* hpJetDirect
* Other (Select this if your printer type is not listed above)
* generic Generic Printer
* 2 Do NOT make this system a BOOTP/TFTP server
Enter name of queue in ONE of the Names of NEW print queues to add – select PostScript if not sure (e.g. HP4050_QUEUE)
Enter HOSTNAME of JetDirect Card (e.g. HP4050_PRN)
Leave port 9100 as that is nearly always right.
Create a printer on Aix the hard way.
1. Add the printer to /etc/hosts
10.0.0.111 HP4050
2. Add the print queue
Option a) Generic ASCII
/usr/lib/lpd/pio/etc/piomkjetd mkpq_jetdirect -p 'generic' -D asc -q 'HP4050asc' -h 'HP4050' –x '9100'
where ‘HP4050asc’ is the queue name and ‘HP4050’ is the host name as specified in /etc/hosts
Option b) Generic Postscript
/usr/lib/lpd/pio/etc/piomkjetd mkpq_jetdirect -p 'generic' -D ps -q 'HP4050ps' -h 'HP4050' –x '9100'
where ‘HP4050ps’ is the queue name and ‘HP4050’ is the host name as specified in /etc/hosts
What would you do if money was no object?
This is really pongnant. How to we avoid making the same mistakes as a forefathers and make a life, no matter how long really matter.
Lost passwords email recovery
Email spam, phishing and abuse seems to be on the rise again and there a a variety of technologies out there to try to limit it.
However various web applications and legitiamate email messages are also getting blocked. The worst recently was an email password recovery utilitity on a web site would send out an email to the user who lost there password. A message would also be sent so I could see who was requesting a password and look for abuse.
For the last 9 months or so password requests have been on the increase. This wasn’t that more people were losing them, but the same people were coming back several times trying to recover their password and not receiving the email.
Google searches for lost passwords, emails not getting through and stuff like that proved fruitless.
The problem eventually seemed to be traced to incorrect Sender Policy Frameword records. This was not something I had previously come accross. SPF records define which servers are allowed to send emails and is defined against the domain DNS management.
The SPF record is fairly simple and micosoft even provide a wizard to help create one but it simply looks like
v=spf1 ip4:a.b.c.d/ip_range -all
This calculator here works out ip address ranges nicely.
Some of the better ISPs allow you to edit and add SPF records directly on the domain management. Any changes are not reflected for 24 hours.