All posts by cdstealer

Bakewell Tart

Ingredients: (26cm x 19cm tray)

For the Pastry

(if you don't want pastry sides, reduce by 1/3)
300g plain flour
pinch of salt
150g vegan margarine (pure Soya)
3 tablespoons cold water

For the Sponge

170g of self-raising flour
170g of ground almonds
170g of caster sugar (or coconut sugar)
Half a teaspoon of baking powder
One teaspoon of almond extract
150ml of Coconut oil
170ml of water

Also, strawberry or cherry jam, icing sugar and flaked almonds to decorate.

Note:  If using coconut sugar, the sponge will be dark brown.

Method

  1. Preheat the oven to 190 degrees Celsius.
    Rub the margarine into the flour until it looks like fine breadcrumbs, then add a little cold water until it comes together as a dough, or use a food processor.
    Roll out to about a 3mm thickness, then line a tart tin with it.
    Prick with a fork to stop air bubbles from forming, line with foil and add baking beans, then blind bake for 10 minutes.
  2. Spread a generous layer of jam over the pastry.
  3. Mix the dry ingredients for the sponge together, then add the wet ingredients to it; it should be quite runny. Pour it into the pastry case, sprinkle over the flaked almonds and bake for 10 minutes, then lower the temperature to 160 degrees Celsius and bake for a further 45-55 minutes.
  4. Leave to cool, then shake some icing sugar over the top!

IMG_20150321_150736

IMG_20150321_161217

Portage TMPFS

Portage TMPDIR on tmpfs

When emerging packages it is possible to build them in tmpfs (RAM) space instead of having build files pushed and pulled to Hard Disk Drive (HDD) or Solid State Drive (SSD) space. Building in tmpfs both speeds up emerge times and reduces HDD/SSD wearing. For system's containing SSDs, it is generally a good idea to have Portage compile using tmpfs (RAM) instead burning up precious SSD write cycles (especially on something like compiling software).

fstab Configuration

Mount Portage's TMPDIR to tmpfs by adding the following to the system's /etc/fstab config file:

FILE /etc/fstab tmpfs fstab example
tmpfs		/var/tmp/portage		tmpfs	uid=portage,gid=portage,mode=775,size=2048M,noatime	0 0

Adjust the size parameter /etc/fstab to the desired amount of RAM. Systems with large amounts of RAM can increase the number quite significantly.

After /etc/fstab has been modified, mount Portage's TMPDIR to RAM by running the mount command followed by the directory location outline in fstab:

root #mount /var/tmp/portage

Considering tmpfs' Size

The system's tmpfs space should be large enough to handle the largest packages to be compiled on the system. If the tmpfs space were to ever become completely full then the emerge will fail. Most packages do not need more than 1 GB of tmpfs space their compiles, but there are few very large packages. If you have a lot of RAM, setting Be careful to include enough tmpfs space when installing the following packages:

app-office/openoffice: 10GBs or so.

www-client/chromium: More than 2GBs.

sys-devel/gcc: More than 4 GiB.

Per-Package Choices at Compile Time

Portage can be configured to build large packages outside of the tmpfs space on a per-package basis.

Create a file to tell Portage where to place the temporary files directory:

FILE /etc/portage/env/notmpfs.conf
PORTAGE_TMPDIR="/var/tmp/notmpfs"

Create a separate temporary file directory outside of the tmpfs mount location:

mkdir /var/tmp/notmpfs && chown portage:portage /var/tmp/notmpfs && chmod 775 /var/tmp/notmpfs

Create a special Portage file called package.env in /etc/portage and list all the packages that are too large to be compiled using tmpfs:

FILE /etc/portage/package.env
app-office/libreoffice notmpfs.conf
mail-client/mozilla-thunderbird notmpfs.conf
www-client/chromium notmpfs.conf

Chocolate Cherry Porter Bread

Prep time: 
Cook time: 
Total time: 
Serves: 8-10

INGREDIENTS

For the Bread
  • 2 cups (350g) SR flour
  • ¾ cup (70g) sugar
  • ½ cup (50g) cocoa powder
  • 2 tsp. baking powder (if using plain flour)
  • ½ tsp. baking soda (if using plain flour)
  • ½ tsp. salt
  • 12Oz (350ml) Porter Beer (Sainsburys TTD)
  • ¼ cup (60g) Vegan Margarine, melted (Pure Soy)
  • 1 tsp. vanilla
  • 2 cups (250g) fresh cherries, pitted and coarsely chopped
For the Chocolate Glaze
  • ½ cup (100g) Vegan Chocolate
  • ½ tbsp. Vegan Margarine (Pure Soy)

INSTRUCTIONS

Make the Bread
  1. Preheat oven to 180C.
  2. Grease or spray a 2lb loaf tin (unless it's nonstck)
  3. Combine flour, sugar, cocoa, baking powder, baking soda and salt.
  4. Add porter, margarine and vanilla. Stir just until blended.
  5. Fold in cherries.
  6. Pour into loaf pan.
  7. Bake 1 hour, or until toothpick inserted into center comes out clean.
Make the Glaze
  1. Melt chocolate chips on stove top or by microwaving in 30 second increments.
  2. Add margarine and stir until melted and blended.
Finish
  1. Allow loaf to cool and then remove from pan.
  2. Drizzle with glaze.

IMG_20150207_181145

Verdict

Unfortunately this turned out very bland.  The texture was OK, just not much taste.  I'll tweak this until I get it right, then I'll update.

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