Almendras Saladas

When I visit Madrid, I try to buy fried almonds as it reminds me of a common “tapa” you had many years ago in most bars in Spain. Nowadays, it is kind of a luxury.

So checking a book of Spanish tapas at home, I found a recipe for salty almonds. I noticed they are not fried… but still went ahead.

Ingredients:

  • 300g of whole almonds (with or without skin)
  • 100ml water
  • 1 tsp of sea salt

Process

  • Grill for 5-10 minutes the almonds in the oven. Just be sure they got toasted a bit.
  • Heat up a frying pan, add the almonds. Toast just a bit.
  • Add the salt to the water and mix.
  • Add the salty water to the hot frying pan. Keep stirring. The water should evaporate quickly and leave a salty coating in the almonds.
  • Once the pan is dried. Remove from the heat. Leave the almonds to cool down and store in a jar. Enjoy!

For next batch, I need to find the recipe of fried almonds (that are salty too)

tty scrollback – tmux

One of the things I had in my to-learn list after rebuilding my laptop was how to scrollback using the tty console (Ctr+F1, etc). I searched and this gave some hope. I tried to see how to do it in Debian as the steps mentioned looked like for Fedora only. This new link looked promising but no joy.

It seems the scrollback support was dropped from kernet 5.9 onwards based on this link. The lack of a maintainer was the main reason (there were security issues that needed attention). I run 5.15.

But as workaround, you can use “tmux” when in the tty and use its scrollback option. tmux is a tool that I would like to learn ๐Ÿ™ I normally use “terminator”. Although I can use both…

How to scrollback in tmux? Here. So “ctrl+b” then [. Then you can use Fn+PgUp in my case to go up one page. It

A bit of history about Linux console scrollback.

Seneca

I have been read a couple of books about or related to Stoicism in the last couple of years and one the next has been “Letters from a Stoic” of Seneca.

It is a sort book but it is interesting. You have an introduction about Seneca’s life before going through the letters. I liked as it gives some background about the person. As well, I didnt remember/know he was Nero‘s teacher and advisor.

It seems the letter were written during his exile and they cover a lot of aspects of his life and Stoic philosophy. It covers topics like poverty and richness from a Stoic point of view, keeping in mind that he was a rich man can be a bit surprising but it takes his wealth the Stoic way, if it goes, he will be fine. As well, touches a very interesting subject like slavery, that was the base of all Rome economy. He states everybody is a slave of something. The “free” romans were slave of vices: power, money, etc. And clearly says you need to treat a slave like you want to be treated, so it looks like it reduces the slavery to a concept of labor contract, and I think there is touch of “Christianity” in some comments. He was contemporary of Jesus. Maybe a coincidence.

He writes about many subjects like how you need to speak slowly, only mourn/cry the minimum time (very stoic), suicide vs illness (stoic), not taking hot baths, Scipio of Africa, olive trees, Socrates, vegetarianism, excess of alcohol, Socrates, Pythagoras, dont have a night life, negative of having bad companies, etc.

So I liked it, it wasn’t a hardcore book about philosophy so you read it like the memories of an interesting person in history.

Python Threads

I had to check the reachability of many IPs so I decided to “write” a python script to get this done quickly (yes, I can use nmap but not in this case). I realized that the script was very slow, even just sending two probes…. so I decided to find something else and this was perfect for me. So thanks for the original author as it helped me a lot. I have never tried python threads before so I was quite happy that it worked so smoothly. I adapted for my needs and this is what I have. I remember reading about threads in golang so it helped to understand what it is doing. But likely I will be able to use this as base for more tasks.

As well, I realized that I havent pushed anything in git and that there are extra security layers in place. So I had to create a new token for being able to push my changes to the repo.

Munich – Kaiserschmarrn

Last weekend I was in Munich visiting a good friend. We had good weather and enjoyed to be outdoors, mainly in the “English Garden” and the “Olympic Park”. I tried local cuisine like currywurst (sausage with a ketchup/curry sauce), kaiserschmarrn (broken up pancake with raising) and beer (with lemonade) in the famous Bavarian beer halls.

So this weekend I decided to try the kaiserschmarrn as it was something quite new for me. I followed this recipe.

Ingredients:

  • 1/3 cup of raisins
  • 3 tbsp of rum
  • 3 large eggs, separate whites from yolks
  • 1 tsp vanilla paste
  • 2 tbsp sugar
  • 1 pinch of salt
  • 1 cup plain flour
  • 1 cup milk
  • some almond flakes (optional)
  • 2 tbsp butter
  • 2 tbsp sugar

Process:

1- In a cup, soak the raisins with the rum. Let is rest

2- In a crystal bowl, put the egg whites and try to beat them until form stiff peaks (no big deal it you dont get that far). I did it by hand. It takes time so be patience. See this ๐Ÿ™‚

3- In another bowl, mix the egg yolks, melted butter, vanilla paste, sugar and salt. Be sure everything is combined.

4- In the yolks bowl, start adding bit a bit the flour and milk, and keep mixing until everything is combined

5- Take the egg whites and fold them in the yolks bowl slowly until everything is combined

6- Heat up an anti-adherent pan (mine is around 26cm diameter) using a bit of butter or coconut oil at medium heat. Pour all butter mix in the pan.

7- After 3-4 minutes, add the raisins. Keep checking the bottom of the pancake until is golden brown. Very likely less than 10 minutes in total.

8- Once the bottom is golden brown, sprinkle a bit of sugar in the top. Using a knike or similar, divide the pancake in 4 quarters. Then turn each piece at each time. Add a bit of butter to the pan while turning to avoid burning the new side.

9- Keep cooking until the bottom is again golden brown.

10- Tear the pancake into small pieces using forks or similar.

11- Add the remaining 2 tbsp butter and 2 tbsp sugar over the pancake pieces. Toss the pieces while the butter and sugar caramelize.

12- Ready to serve! You can add a bit of sugar powder on top and add some mermelade in the side.

Something I forgot, you can add almond flakes too!

Anyway, very happy with the result. It amazes me how tasty are the raising in some dishes… they are super juicy and it makes the difference in this one.

Oatcakes

Sometimes I buy from the supermarket oatcakes for having snacks at home. I like them because they are not sweet and I think they are “healthy”. But then you check the ingredients list and realized that there are things you wouldnt think…

Anyway, I decided to give it a go and searched for some recipes. I decided for this recipe as it showed some pictures although I used just oats and plenty more water than a couple of tablespoons ๐Ÿ™‚

Ingredients:

  • 200gr oats
  • 25g butter melted
  • 1tsp salt
  • 100-200ml boiling water

Process:

  • Preheat oven at 175C
  • In a bowl, mix the oats and butter.
  • Then add a couple of tsp of hot water at each time until you can form a ball. Knead inside the ball. It doesnt have to be sticky! so dont put too much water.
  • In a work surface, sprinkle a bit of flour and in a rolling pin. Carefully flat the dough with the pin. I tried to reach 0.5 thickness. The sides will crack but dont worry.
  • Use a cookie cutter. I used 8.5cm diameter cutter. Quite big cookie but I liked that way. Likely you will be able to cut one or two cookies at each time. Make a ball again with the leftovers, add water if needed, and repeat the process. Flat with the pin, cut a cookie, recover the leftovers.
  • I put a big of sunflower oil in the try, then move the cookies.
  • Bake for 25-30 minutes. Turn them at least once if you can.

And this is the result!

To be honest, the taste was stronger than the supermarket ones. It tastes (obviously) a lot to oats!

I thought 200g of oats would make a lot of oatcakes but just managed 5 big ones and 2 small pieces.

Happy with the result, and glad to learn something new!

Chips Water Innovation

This is a bit old news. But I found interesting the connection between chips manufacturing and water. And this is brilliant.

I want the world to be dependent on me, but I donโ€™t want to be dependent on anybody else.โ€ I donโ€™t think itโ€™s going to happen.

As well, I left for granted that all innovation for COVID vacciones was just miraculous, but it seems it was something feeding from successful innovation strategies.

So moving forwards, and I guess that should be valid to any country, you need to invest in innovation, R&D. It is expensive but it is worth long run. See TSMC.

OTP attacks

Reading a bit of old news about One-Time-Passwords attacks (link1 and link2) I realized that there is no much awareness in companies about this danger. Most people assume that having 2FA means the perfect security system. But it seems it is not and we have to be still even more vigilant. Trust is earned not deserved. So we need a bit of common sense practices spread around this topci. I liked the explanation about the link used for attacking coinbase and how slick was the method of using a subdomain that in a mobile screen only shows the small part and tricks you.

Prince of Persia

A couple of months ago I was reading about how the game DOOM was ported to a product from a CDN company. I remember I played a bit and brought back good memories when I was playing DOOM2. Even the code was published in github. Somehow I clicked to the book about DOOM and found about a book about Prince of Persia. I bought both at the end.

The book about POP was quick to read. It is “just” the journals of the author across some years. It is interesting how much has changed the industry since late 80s. He though the gaming industry wasn’t going to last long. 30 years later we have even “e-sports”! I didnt know he wrote the whole game. I assumed this kind of projects were managed by big teams. But those times, things were simpler and a good hacker could do those things. And he was super young! And before that he wrote the game “Karateka” that I dont remember. Anyway, Prince of Persia was one of my favourite games! And now you can still play online. I think I played a bit the second part but that was it. I always kept loyal to the first part. As a journal you can read the struggles of the person. He wanted to make movies but then the gaming thing was always calling him. I think it is quite interesting what he did as he was travelling, writing scripts and then video games in the late 80s and 90s.

Use ZFS

As part of my reinstallation, I had to create a ZFS partition that I used to use for personal storage. Debian Installation process doesnt provide this option, so I have to do it manually. To be honest, it is good to remember/refresh these “basic” things, you never know when you are going to need them (urgently very likely).

As the installation process gave most of the space to the “home” partition, that’s the one I need to take space for creating my ZFS partition. I chose LVM during installation so I dont really have to deal with physical partition, it is mainly logical volumes aka “lv”.

So I rebooted in single-mode as I wanted to be sure that I didnt damage anything and I had to umount the “home” lv. So as root:

Check mounted partitions
# df -hT

Checks LV summary
# lvs

Umount /home
# umount /home/

Check "home" is not munted
# df -hT

Check VolgumeGroup summary
# vgs

Perform filesystem check before making any change
# e2fsck -fy /dev/mapper/athens--vg-home

Resize filesystem to 22G
# resize2fs /dev/mapper/athens--vg-home 22G

Check LV hasnt changed
# lvs

Reduce LV for home to 22G
# lvreduce -L 22G /dev/mapper/athens--vg-home

Check LV home is reduced
# lvs
  LV      VG        Attr       LSize   Pool Origin Data%  Meta%  Move Log Cpy%Sync Convert
  home    athens-vg -wi-ao----  22.00g                                                    
  root    athens-vg -wi-ao---- <27.94g                                                    
  swap_1  athens-vg -wi-ao---- 976.00m                                                    
# 

Check you have free space in the VG
# vgs
  VG        #PV #LV #SN Attr   VSize   VFree   
  athens-vg   1   3   0 wz--n- 237.48g <186.59g
# 

Reboot to be sure everything is fine
# reboot

Check all partitions are mounted and "home" is just 22G
$ df -hT
Filesystem                  Type      Size  Used Avail Use% Mounted on
udev                        devtmpfs  3.9G     0  3.9G   0% /dev
tmpfs                       tmpfs     786M  1.6M  785M   1% /run
/dev/mapper/athens--vg-root ext4       28G  6.7G   20G  26% /
tmpfs                       tmpfs     3.9G   87M  3.8G   3% /dev/shm
tmpfs                       tmpfs     5.0M  8.0K  5.0M   1% /run/lock
/dev/sda2                   ext2      456M   72M  360M  17% /boot
/dev/mapper/athens--vg-home ext4       21G  3.0G   17G  16% /home
/dev/sda1                   vfat      496M   64M  433M  13% /boot/efi
tmpfs                       tmpfs     786M   40K  786M   1% /run/user/1000
$

Create new LV "storage" using the spare space in the VG
# lvcreate -L 186G -n storage athens-vg
  Logical volume "storage" created.
# 

Check VG space has reduced
# vgs
  VG        #PV #LV #SN Attr   VSize   VFree  
  athens-vg   1   4   0 wz--n- 237.48g 604.00m
#

Check we have a new LV storage of 186G
# lvs
  LV      VG        Attr       LSize   Pool Origin Data%  Meta%  Move Log Cpy%Sync Convert
  home    athens-vg -wi-ao----  22.00g                                                    
  root    athens-vg -wi-ao---- <27.94g                                                    
  storage athens-vg -wi-a----- 186.00g                                                    
  swap_1  athens-vg -wi-ao---- 976.00m                                                    
#

Create our Zpool storage using the LV storage.
# zpool create storage /dev/mapper/athens--vg-storage 

Check Zpool status
# zpool status
  pool: storage
 state: ONLINE
config:

	NAME                  STATE     READ WRITE CKSUM
	storage               ONLINE       0     0     0
	  athens--vg-storage  ONLINE       0     0     0

errors: No known data errors
#

Check mount point for ZFS pool
# zfs get mountpoint storage
NAME     PROPERTY    VALUE       SOURCE
storage  mountpoint  /storage    default
# 

Change Zpool storage mount point to a point in my home dir
# zfs set mountpoint=/home/tomas/storage storage

Check ZFS list
# zfs list
NAME      USED  AVAIL     REFER  MOUNTPOINT
storage   165K   179G       24K  /home/yo/storage
# 

Check all partitions
$ df -hT
Filesystem                  Type      Size  Used Avail Use% Mounted on
udev                        devtmpfs  3.9G     0  3.9G   0% /dev
tmpfs                       tmpfs     786M  1.6M  785M   1% /run
/dev/mapper/athens--vg-root ext4       28G  6.7G   20G  26% /
tmpfs                       tmpfs     3.9G   87M  3.8G   3% /dev/shm
tmpfs                       tmpfs     5.0M  8.0K  5.0M   1% /run/lock
/dev/sda2                   ext2      456M   72M  360M  17% /boot
/dev/mapper/athens--vg-home ext4       21G  3.0G   17G  16% /home
/dev/sda1                   vfat      496M   64M  433M  13% /boot/efi
tmpfs                       tmpfs     786M   40K  786M   1% /run/user/1000
storage                     zfs       180G  128K  180G   1% /home/y/storage
$ 

I have used these links to refresh myself:

  • lvs resize: https://www.rootusers.com/lvm-resize-how-to-decrease-an-lvm-partition/
  • create lv: https://www.thegeekstuff.com/2010/08/how-to-create-lvm/
  • create zfs pool: https://ubuntu.com/tutorials/setup-zfs-storage-pool#3-creating-a-zfs-pool
  • change zfs mount point: https://docs.oracle.com/cd/E19253-01/819-5461/gaztn/index.html

To be honest, I thought I was going to struggle much more but it has been quick.

Step by step getting back to my normal environment (and trying to improve it). I said it before, I should be able to reinstall my laptop easily, like a production server….