All posts by cdstealer

Winter Stew

Prep Time: 30 mins (always takes me 2+ hours)
Cooking Time: 1.5 Hours
Oven Temp.: 200C (gas 6)
Servers: 4-6
Calories: 392

Main Ingredients:

2-3 tablespoons of Vegetable oil ( I used coconut oil)
1 Large chopped onion.
5-6 Root vegetables (bite size chunks)
2 Leeks, halved, washed and sliced.
3 Potatoes (bite size chunks)
1 tablespoon of Plain white flour. (or 2)
1.2 litres of Veg stock. (I used 2 litres)
1 tablespoon of Tomato purée (or 2)
0.25 teaspoon of Celery seeds.

Dumplings:

25g of Soya margarine. (I used melted Coconut oil)
175g of Self raising flour.
1 teaspoon of Mixed Herbs
1 tablespoon of Vegetable oil (if using margarine)
A few grinds of Salt and Pepper.
8 tablespoons of Water

Method (Dumplings):

If you're using margarine, rub it into the flour. Add the herbs, Salt and Pepper to the flour and mix well.  Mix the oil and water together and slowly add to the flour to form a soft dough.

Method (Main):

Heat a little of the oil in a pan, and fry the onion quickly until golden brown.  Transfer to an ovenproof casserole dish.   Adding a little more oil as necessary, brown the vegetables in batches transfer to the casserole dish.  Add a little more oil to the pan, stir in the flour and cook over a steady heat, stirring until the flour is browned.  Pour in the stock and bring to the boil, stirring until the stock has thickened.  Add the tomato purée, celery seeds, salt and pepper, then pour over the vegetables.  Cover the casserole and cook in a preheated over for 50 minutes.  Meanwhile, make the dumplings.
When the casserole has cooked 50 minutes, remove the lid and add the dumplins.  Replace the lid and put back into the oven for a further 20-30 minutes.  The dumplings will rise to the top and swell to double their size.

IMG_20150118_184736

Kodi with Systemd

kodi-logo-weis3
Kodi As An Appliance

After installing a base gentoo OS (no gui)
install evilvm and kodi (or use upstream kodi)

If using upstream kodi, create the file: /etc/portage/sets/kodi and populate with: (adjust accordingly)

app-eselect/eselect-java
dev-java/java-config
dev-java/openjdk-bin
dev-lang/swig
dev-libs/crossguid
dev-libs/flatbuffers
dev-libs/libcdio
dev-libs/libfmt
dev-libs/libfstrcmp
dev-libs/libinput
dev-libs/libtomcrypt
dev-libs/libtommath
dev-libs/rapidjson
dev-libs/spdlog
dev-libs/tinyxml
dev-python/cffi
dev-python/olefile
dev-python/pillow
dev-python/pycparser
dev-python/pycryptodome
dev-python/xkbcommon
dev-vcs/git
media-fonts/roboto
media-libs/intel-hybrid-codec-driver
media-libs/libass
media-libs/libdisplay-info
media-libs/libdisplay-info
media-libs/libdvdcss
media-libs/libdvdnav
media-libs/libdvdread
media-libs/libva-intel-driver
media-libs/libva-intel-media-driver
media-libs/taglib
media-sound/pulseaudio
net-fs/nfs-utils
net-fs/samba
net-libs/libmicrohttpd
sci-libs/kissfft
sys-apps/baselayout-java
sys-devel/clang
=llvm-core/clang-17.0.6
=llvm-core/llvm-17.0.6
x11-wm/evilwm

install the deps with: emerge -quUND @kodi

Ensure you have all the correct use flags defined in /etc/portage/package.use/package.use

Create the file: /usr/lib/systemd/system/kodi.service and populate with:

[Unit]
Description = Starts instance of Kodi
After = systemd-user-sessions.service network.target sound.target startx.service

[Service]
User = kodi
Group = kodi
PAMName=login
Type = simple
ExecStart = sh /usr/bin/kodi-standalone2 -- :0 -nolisten tcp
Restart = on-abort

[Install]
WantedBy = multi-user.target

Then create the file: /usr/lib/systemd/system/startx.service and populate with:


[Unit]
Description=StartX service

[Service]
User = kodi
Group = kodi
PAMName=login
Type = simple
ExecStart=/usr/bin/startx :0 /usr/bin/evilwm

[Install]
WantedBy=multi-user.target

Only enable the kodi server: systemctld enable kodi

If you have Intel GFX, create the file: /etc/X11/xorg.conf.d/20-intel.conf and populate with: (adjust accordingly)

Section "Module"
Load "glx"
EndSection

Section "Device"
Identifier "Card0"
Driver "modesetting"
#BusID "PCI:0:2:0"
Option "TripleBuffer" "false"
Option "TearFree" "true"
Option "SwapbuffersWait" "true"
Option "AccelMethod" "glamor"
Option "DRI" "iris"
EndSection

Section "dri"
Mode 0666
EndSection

#Breaks Gnome when set to false, but breaks kodi if enabled
Section "Extensions"
Option "Composite" "False"
EndSection

Create the kodi user and assign to the following groups:

useradd -G tty,audio,video,render,pipewire kodi

If everything went to plan, executing: systemctl start kodi should fire up X and land you at kodi.

NetworkManager with no GUI

I'm writing this as systemd seems to be getting stronger and is replacing initd little by little.  Now if like me you have one or more  Linux systems that do not run a desktop environment.  You may find yourself using a few apps that normally require a GUI to be configured.  NetworkManager is one of those, but does allow you to use the CLI (nmcli).

Here's how:

Assuming you already have everything installed :)

systemctl enable NetworkManager

Will start networkmanager at boot.

nmcli d

will list all interfaces controlled by networkmanager.

To add a connection eg wifi

nmcli c add ifname wlp5s0 type wifi ssid <your ssid>

This will create the file

/etc/NetworkManager/system-connections/wifi-wlp5s0

Which will contain the skeleton config (non working)

[connection]
id=<your ssid>
uuid=b083dd98-f1e0-4bc5-bff6-56c4a1b56e2f
interface-name=wlp5s0
type=wifi
[wifi]
ssid=1027251N
mode=infrastructure

We now need to configure the connection.  (additions highlighted)

[connection]
id=<your ssid>
uuid=b083dd98-f1e0-4bc5-bff6-56c4a1b56e2f
type=wifi
[wifi]
ssid=1027251N
mode=infrastructure
mac-address=00:23:14:B7:57:A0
security=wifi-security
[wifi-security]
key-mgmt=wpa-psk
auth-alg=open
psk=<your ultra secure key>

executing

nmcli c reload

will/should now connect you :)

Block countries with IPTables

I get an absolute battering from China on a daily basis with the occasional attack from France, Germany or the US.  Time to block countries :)

First and foremost, make sure you have iptables installed, configured and working.
Next we'll install some additions:

emerge -av xtables-addons geoipupdate

You may need to remove some of the modules to allow xtables to install (depends on your setup).  This can be achieved by adding the following line to /etc/portage/make.conf:

XTABLES_ADDONS="=account =chaos =condition =delude =dhcpmac =fuzzy geoip =iface =ipmark =ipp2p =ipv4options =length2 =logmark =lscan =pknock =psd =quota2 =rawnat =steal =sysrq =tarpit =dnetmap =echo =gradm"

I'm only interested in geoip, so I removed everything else.

Make the directory where iptables will look for the database:

mkdir -p /usr/share/xt_geoip/

Execute the following to download the geoiplite databases:

If you have a paid account, you could potentially replace the URLs in the download script (untested)

cd /usr/share/xt_geoip/ && /lib64/xtables-addons/xt_geoip_dl && /lib64/xtables-addons/xt_geoip_build *.csv

You could cron this as a weekly update.

xt_geoip_dl: Downloads the CSV database files
xt_geoip_build: Processes the files into a format iptables can read.

/usr/share/xt_geoip/LE/<country abbreviation>.iv4 & .iv6

Now you can block countries using iptables

iptables -A INPUT -m geoip --src-cc CN -j DROP

An iptables -L -n will show

DROP all -- 0.0.0.0/0 0.0.0.0/0 -m geoip --source-country CN

 

Roasted Sweet Potato & Butternut Squash Soup

Ingredients:

1/2 Large Sweet Potato (diced)
1/2 Large Butternut Squash (diced)
~50ml Coconut Oil
1/4 tsp Ground Cinnamon
1/4 tsp Ground Mace
A generous grind of pepper
500ml Vegetable Stock

Method:

Pre-heat the over to 180C
Peel and dice the Sweet Potato & Butternut Squash.
Melt the coconut oil (approx 20 secs in the microwave)
Coat the cubes with the oil, stick them in a baking tray and bake for approx. 40 mins until tender.
Put them in a blender, add the other ingredients and OBLITERATE!

I used 1 whole Sweet Potato & 1 whole Butternut Squash and froze half.

IMG_20140413_173813

Result:

A Very thick, filling, mind blowing tasty bowl of soup.

IMG_20140413_183107

Power Shake

Makes approx. 1l

Ingredients:

600ml of a dairy alternative drink
1-2 Bananas (frozen) chunks
1 tablespoon Crunchy Peanut Butter (or make it healthier by using peanut powder)
30g Soy Protein Isolate
1 teaspoon Maca powder (
amazon)

Method:

Bang everything in the blender and blend until smooth (approx 1 min).  The consistency should resemble a thick smoothie. 2 Bananas gives a thicker shake :)

For extra nutritional punch, add a handful of Kale

I have this before a weight lifting session or Tai Chi/Dook Sau and it gives me quite the energy boost :)

power

Vegan Chocolate Cake

For the cake

190g SR flour
225g sugar
50g cocoa powder
1 teaspoon baking soda
½ teaspoon salt
240ml warm water (you may substitute this for coffee if you want a deeper taste)
1 teaspoon vanilla extract
80ml vegetable/Coconut oil
1 teaspoon white or apple cider vinegar

For the glaze

115g sugar
4 Tablespoons margarine or vegan butter substitute
2 Tablespoons soy milk
2 Tablespoons cocoa powder
2 teaspoons vanilla extract

1) Prepare the Cake

Preheat oven to 350F (177C). In an 8 x 8 inch square pan, mix the flour, sugar, cocoa powder, baking soda and salt with a fork. Add the water or coffee, vanilla extract, vegetable oil and vinegar. Mix the ingredients together. Bake for 30 minutes. Cool on a cooling rack.

2) Prepare the Glaze

In a small saucepan bring the sugar, margarine, soy milk and cocoa powder to a boil, stirring frequently. Simmer for 2 minutes, remove from heat and stir an additional 5 minutes. Stir in the vanilla extract.

3) Glaze the Cake

Pour the glaze onto cake and let it cool for one hour. This recipe makes 1, 8 x 8 inch square Vegan Chocolate Cake.
IMG_20140208_192022
Ok it doesn't rise much, but seriously... it's goooooood!
Unfortunately, the photo doesn't do it justice. :(
Note:  I find if you have a tin where the side comes off, if you pour the frosting on top while the cake is still in the tin and then leave it in the fridge over night.  The frosting becomes a viscous fudge of awesomeness!
IMG_20140209_125235

Peanut Butter Brownies

Ingredients:

  • 225g crunchy peanut butter
  • 200g bar dark chocolate, broken into pieces
  • 280g soft light brown sugar
  • 3 egg replacer
  • 100g self-raising flour

Method:

  1. Set aside 50g each of the peanut butter and chocolate.
  2. Heat oven to 180C/160C fan/gas 4 and line a 20cm square baking tin with baking parchment.
  3. Gently melt remaining peanut butter, chocolate and all the sugar in a pan, stirring occasionally, until the sugar has just about melted.
  4. Turn off heat and use a wooden spoon to beat in the eggs one by one.
  5. Stir in the flour and scrape into the tin.
  6. Melt reserved peanut butter in the microwave on High for 45 secs, or in a pan, until runny, then drizzle over the brownie.
  7. Bake for 30-35 mins until it has a crust, but the middle still seems slightly uncooked.
  8. Melt reserved chocolate, drizzle over the brownie, then cool in the tin before cutting into squares.

Notes:

Apparently this makes 16 squares!!  :)

Allow to go completely cold before cutting.

I doubled the ingredients for the picture below.. ;)

IMG_0003

Almond Biscuits

Makes 20

175 g (6 oz) Self Raising Flour
A pinch of salt
75 g (3 oz) caster sugar (coconut sugar also works well)
50 g (2 oz) ground almonds
100 g (4 oz) Soy Spread
No more than 1/2 teaspoon of almond essence
Blanched almonds (decoration)

NOTE: If you use coconut oil, you're in for a challenge. The dough will be crumbly and will just ooze oil :(

  1. Heat oven to 170ºC, 338ºF, Gas Mark 4. Grease two baking trays (baking parchment works better).
  2. Mix together the dry ingredients, rub in the margarine and essence.
  3. Bring together using your hands.
  4. Roll out thinly and cut into rounds.
  5. Place half a blanched almond on each.
  6. Place on a baking tray (leave an inch between) and bake for 10 minutes.
  7. You can sprinkle a little caster sugar over them fresh out of the oven to make them a little sweeter.

Amazing Vegan Pecan Pie

Filling
8 oz (240g) raw sugar
8 oz (240g) brown sugar
2oz (60g) Plain flour
8 tablespoons nondairy milk (I use soy unsweetened)
2 egg substitutes (I use Orgran)
8 oz (240g) vegan butter, melted (Pure Soy Spread)
2 teaspoon vanilla extract
16 oz (480g) pecans

Pastry
16 oz (480g) plain flour
pinch of salt
8 oz (240g) vegan margarine
4 tablespoons cold water

Preparation method (pastry)
Place the salt and flour into the processor.
Add the margarine when the processor is on a low speed, in small pieces.
Keep the processor on medium and add the water. Increase the processor gradually until all the ingredients combine.
Stop when the pastry forms a ball.
Knead lightly to form a ball. Cover in clingfilm and refridgerate until needed.

Non processor method
Place the flour and salt in a bowl.
Add the margarine and rub in lightly with your fingertips until the mixture resembles fine breadcrumbs.
Sprinkle over the water and mix, using a round-bladed knife, until the mixture begins to bind together and form a dough.
Knead together very lightly and use as required.

Prick the pastry base several times with a fork, line with foil and fill with baking beans, rice or dried pulses. Bake for 15 minutes, then remove the foil and beans and bake for another 6 minutes until golden.

For me, the pastry shrank ~1cm from the edge of the flan dish.

Preparation method (filling)
Mix all the ingredients together lightly with a whisk just to break up any lumps and pour into the pastry case.  Add a few halves on top towards the end of the cooking (last 5 mins).  Me being a bloke, just chucked them all in :)


1. Preheat oven to 375F/190C. Mix ingredients. They come out watery.
2. Pour into the pie shell. Place on a cookie sheet and put into the oven for 20 minutes.
3. Reduce oven temperature to 275F/135C. Bake for 20 minutes or longer.
4. Check, centre should be slightly soft, but if it seems too watery, bake for 20 more minutes.

Preparation Time: 10 minutes

Cooking time: 40-60 minutes

Notes:
I used a 10" Pyrex flan dish which was a little too large.
I found that greasing maybe unnecessary for the tins.

IMG_20141217_183439