Disk image

Posted on So 16 Mai 2021 in Notebook • Tagged with notebook, linux, filesystem

Creating

dd if=/dev/zero of=file.img bs=1 count=0 seek=512M

Copy

cp --sparse=always new_file.img recovered_file.img

Growing

dd if=/dev/zero of=file.img bs=1 count=0 seek=1G

This will increase its size to 1 Gb, and leave its information intact.

cryptsetup …

Continue reading

Rotkohlschnitzel mit Ziegenkäse

Posted on So 14 März 2021 in Notebook • Tagged with notebook, rezepte

  • großer Rotkohl
  • 4 Zehe/n Knoblauch, fein gehackt
  • 4 EL Olivenöl oder Rapsöl
  • 60 g Zitronensaft
  • 4 EL Ahornsirup
  • 250 g Ziegenkäse in Scheiben
  • 100 g Rohschinken, gewürfelt
  • Salz und Pfeffer
  • etwas Petersilie

Zubereitung Vom Rotkohl die äußeren weichen Blätter entfernen. Aus der Mitte des Rotkohls zwei etwa 2 cm …


Continue reading

Hard drive firmware update on linux

Posted on So 03 Januar 2021 in Notebook • Tagged with notebook, linux, hardware

Doing it manually

Since I can’t use the tool provided by Seagate, the workaround is:

  • find the firmware in the ISO
  • apply it manually to both disks

Haystack, needle…

Mount the key (or the ISO):

> sudo mount -o loop ./Downloads/BarracudaLP-ALL-CC35.iso /home/fabien/plop/

Look up all those …


Continue reading

Delicata Kürbis mit Salbei und Rosmarin

Posted on Do 29 Oktober 2020 in Notebook • Tagged with notebook, rezepte

Ingredients

  • Delicata Kürbis(se)
  • Frische Salbeiblätter und geschnippelter Rosmarin
  • Olivenöl
  • Frisch gemahlener Pfeffer
  • Salz

Directions

  1. Den Ofen auf 220 Grad vorheizen.
  2. Kürbis waschen, halbieren, die Kerne entfernen, die Hälften in Scheiben schneiden.
  3. Kürbisscheiben in einer Lage auf einem mit Backpapier ausgelegtem Backpapier verteilen und mit Öl bestreichen, die Kräuter dazugeben …

Continue reading

Gefüllter Butternusskürbis

Posted on Do 29 Oktober 2020 in Notebook • Tagged with notebook, rezepte

Zutaten

  • 2kleine Butternusskürbisse à je ca. 800 g
  • 4 ELOlivenöl
  • Salz
  • Pfeffer
  • 150 gLauch
  • 250 gCherrytomaten
  • ca. ½roter Peperoncino
  • 2Knoblauchzehen
  • 1 BundKräuter, z. B. Oregano, Thymian und Petersilie
  • 500 gHackfleisch
  • 1 dlGemüsebouillon
  • 60 ggeriebener Parmesan

So gehts

Zubereitung: ca. 35 Minuten Backen: ca. 80 Minuten Gesamt: 1 Std. 55 Min …


Continue reading

Chapatis

Posted on Do 29 Oktober 2020 in Notebook • Tagged with notebook, rezepte

Auf dem Grill lassen sich auch indische Brotfladen backen: Kümmel und Korianderpulver im Teig sorgen für die exotische Note.

Zutaten

  • 250 g Halbweissmehl
  • 0.5 TL Salz
  • 0.5 TL Kümmel
  • 0.5 TL Korianderpulver
  • 1 EL Bratbutter, weich
  • ca. 1 dl lauwarmes Wasser

Und so wirds gemacht:

Vorbereiten: Alle …


Continue reading

Sweet Potato Salad

Posted on Do 29 Oktober 2020 in Notebook • Tagged with notebook, rezepte

A mighty Sweet Potato Salad with a fabulous honey lemon dressing. Terrific combo of textures and flavours, serve this as a meal or an impressive side!

Ingredients

Sweet potato:

  • 1kg / 2 lb sweet potato , cut into 2cm / 4/5" cubes (Note 1)
  • 2 tbsp olive oil
  • 1/2 tsp salt …

Continue reading

Rotkraut

Posted on Do 29 Oktober 2020 in Notebook • Tagged with notebook, rezepte

Butter in einer Pfanne erwärmen. Zwiebel, Lorbeerblätter und Nelken andämpfen. Kabis, Apfel und Zucker beigeben, kurz mitdämpfen, salzen. Wein dazugiessen, ca. 1 Min. einkochen, Bouillon und Aceto dazugiessen. Kabis zugedeckt unter gelegentlichem Rühren bei kleiner Hitze ca. 2 Std. weich köcheln.

  • 1 EL Butter
  • 1 Zwiebel, in Ringen
  • 2 Lorbeerblätter …

Continue reading

docker

Posted on So 24 März 2019 in Notebook • Tagged with notebook, linux, utilities

Dockerfile

FROM gentoo/portage:latest as portage
FROM gentoo/stage3-amd64:latest

COPY --from=portage /var/db/repos/gentoo /var/db/repos/gentoo

ENV ACCEPT_KEYWORDS="~amd64" \
    EMERGE_DEFAULT_OPTS="--jobs=4 --quiet" \
    FEATURES="-sandbox -usersandbox -ipc-sandbox -network-sandbox -mount-sandbox -pid-sandbox" \
    MAKEOPTS="-j4" \
    USE=""

RUN emerge dev-vcs/git app-portage/repoman dev-util/pkgcheck \
 && rm -rf /var …

Continue reading

Creamy Cashew Chicken Curry

Posted on Sa 23 März 2019 in Notebook • Tagged with notebook, rezepte

Ingredients

  • For the Spice Mix:
  • 10 g kosher salt, or more to taste
  • 3 g ground cumin
  • 2 g ground coriander
  • 5 g paprika
  • 0.9 g cayenne pepper
  • 1 g ground turmeric
  • 4 g garam masala
  • 910 g boneless, skinless chicken thighs
  • 15 ml vegetable oil
  • 30 g butter …

Continue reading

Spicy Thai Basil Chicken

Posted on Sa 23 März 2019 in Notebook • Tagged with notebook, rezepte

Ingredients

  • 80 ml chicken broth
  • 4 g oyster sauce
  • 15 ml soy sauce, or as needed
  • 10 ml fish sauce
  • 4 g white sugar
  • 5 g brown sugar
  • 30 ml vegetable oil
  • 455 g skinless, boneless chicken thighs, coarsely chopped
  • 40 g sliced shallots
  • 4 cloves garlic, minced
  • 20 g …

Continue reading

Hummus

Posted on Sa 23 März 2019 in Notebook • Tagged with notebook, rezepte

  • 130 g trockene Kichererbsen
  • 0,5 Zitrone (Saft)
  • 3 EL Tahin (Sesammus)
  • 1 Koblauchzehe
  • 0,5 TL Kreuzkümmel
  • 5 EL kaltes Wasser
  • Salz
  • etwas Olivenöl und Petersilie als Topping
  1. Die Kichererbsen mit Wasser abspülen und abtropfen lassen oder trockene Kichererbsen vorkochen.
  2. Zusammen mit Zitronensaft, Tahin, Knoblauch, Kreuzkümmel, Wasser und etwas …

Continue reading

Chewy Granola Bars

Posted on Sa 23 März 2019 in Notebook • Tagged with notebook, rezepte

Ingredients

  • 2 ½ cups old-fashioned oat
  • 2 ½ cups rice cereal
  • ½ cup brown sugar
  • ½ cup coconut oil
  • ½ cup honey
  • ½ teaspoon salt
  • ½ teaspoon vanilla

Chocolate Chip

  • ½ cup chocolate chips

Apple Cinnamon

  • ½ cup dried apple, dried
  • 1 teaspoon cinnamon
  • ¼ teaspoon nutmeg

Cherry Almond

  • ½ …

Continue reading

ffmpeg

Posted on Di 19 September 2017 in Notebook • Tagged with notebook, linux, media, video

concat

FFmpeg has three concat methods.

concat protocol

ffmpeg -i 'concat:input1|input2' -codec copy output

concat video filter

ffmpeg -i opening.mkv -i episode.mkv -i ending.mkv \
  -filter_complex '[0:0] [0:1] [1:0] [1:1] [2:0] [2:1] concat=n=3:v=1:a=1 [v …

Continue reading

VirtualBox

Posted on Sa 29 April 2017 in Notebook • Tagged with notebook, linux, utilities

Shrink a vdi VirtualBox disk image

  • Run defrag in the guest (Windows only)
  • Nullify free space:

With a Linux Guest run this:

cat /dev/zero > zero.fill;sync;sleep 1;sync;rm -f zero.fill

With a Windows Guest, download SDelete from Sysinternals and run this:

sdelete.exe c: -z …

Continue reading

Creating a new GPG key

Posted on Mo 20 Juli 2015 in Notebook • Tagged with notebook, linux, utilities

At the time of writing GnuPG unfortunately defaults to a 1024 bit DSAkey as the primary with SHA1 as the preferred hash. Due to weaknessesfound with the SHA1 hashing algorithm Debian prefers to use keys thatare at least 2048 bits and preferring SHA2. The following instructionsprovide a guide to how …


Continue reading

git

Posted on Mo 20 Juli 2015 in Notebook • Tagged with notebook, linux, utilities

clean up git

git reflog expire --expire=1.minute refs/heads/master
git fsck --unreachable
git prune
git gc

A simple way to create git repository on a server machine connecting via ssh

Create a working copy repository

First, create a new local git repository and add all files within …


Continue reading

Update Lenovo Bios on Linux

Posted on So 08 Februar 2015 in Notebook • Tagged with notebook, linux, hardware

Just put the extracted Bios Update utilities into the WinPE 4.0 64-bit Image and create a bootable usbstick. Then, from the admin console launch:

InsydeFlashx64.exe <BiosUpdate>.ROM

To extract the bios:

innoextract <Version>.exe

Command Comparison:

DOS Command UNIX or Bash Command Action
DIR ls -l List directory …

Continue reading

Recover Btrfs Partition

Posted on Fr 08 August 2014 in Notebook • Tagged with notebook, linux, filesystem

Let's assume that you don't have a physical device failure (which is a different set of tools -- mount -odegraded, btrfs dev del missing).

First thing to do is to take a btrfs-image -c9 -t4 of the filesystem, and keep a copy of the output to show josef. :)

Then start with …


Continue reading

Using Xephyr

Posted on Fr 08 August 2014 in Notebook • Tagged with notebook, linux, utilities

$ Xephyr -ac -screen 800x600 -reset :1 &

-ac : Disables access control restrictions and allows to forward the session -screen : sets the resolution of the new X session. Set it according to your need. -:1 : This specifies that the new X session is display number “1“. Your current Display is most probably …


Continue reading

Unzipping a problematic archive

Posted on Fr 08 August 2014 in Notebook • Tagged with notebook, linux, utilities

Nice little tip for unzipping problematic archives (.zip) from AskUbuntu.com. I downloaded a .zip archive and could not for the life of me unzip. I tried gunzip and unzip – both failed with the following errors:

Gunzip

$ gunzip foo.gzip
gzip: foo.gzip: unknown suffix -- ignored

Unzip

$ unzip foo.zip …

Continue reading

Config

Posted on Fr 08 August 2014 in Notebook • Tagged with notebook, linux, utilities

Boot Kernel Command Line

On boot systemd activates (by default), the target unit default.target whose job is to activate services and other units by pulling them in via dependencies.

To override the unit to activate, systemd parses its own kernel command line arguments via the systemd.unit= command line …


Continue reading

Commands

Posted on Fr 08 August 2014 in Notebook • Tagged with notebook, linux, utilities

permissions

find /home/user -type d -print0 | xargs -0 chmod 0775
find /home/user -type f -print0 | xargs -0 chmod 0664

clean up dconf

For a single key:

dconf reset "/path/to/the/key"

Must …


Continue reading

Images

Posted on Fr 08 August 2014 in Notebook • Tagged with notebook, linux, media, image

pdfimages

pdfimages -j foo.pdf  bar

This will extract all images from foo.pdf and save them in JPEG format (option -j) to bar-000.jpg, bar-001.jpg, bar-002.jpg, etc.

delete metadata

exiftool -exif:all= *.jpg
exiftool -xmp:all= *.jpg

or use MAT: Metadata Anonymisation Toolkit https://0xacab.org/jvoisin …


Continue reading

Western Digital GreenPower Disks

Posted on Fr 08 August 2014 in Notebook • Tagged with notebook, linux, hardware

WD GreenPower disks have some problems under Linux with their “head parking” feature parking the head every 8 seconds. This destroys the disk over a short time span. For Linux, there's idle3ctl from the idle3-tools.

You can display the current value with the following command:

$ sudo ./idle3ctl -g /dev/sdX …

Continue reading

rtmpsrv

Posted on Di 01 Mai 2012 in Notebook • Tagged with notebook, linux, media, video

rtmpsrv allows you to get all parameters that are required by rtmpdump. You don't need packet sniffers or complex analysis to use rtmpdump when using rtmpsrv. The only problem you may have is when a video consists of several segments (chapters). In such cases just skip to the next chapter …


Continue reading

ATA Secure Erase (SE) and hdparm

Posted on Di 01 Mai 2012 in Notebook • Tagged with notebook, linux, hardware

Warning

The instructions below will irretrievably destroy data. Moreover, as the hdparm manpage explains, "these switches are DANGEROUS to experiment with, and might not work with every kernel. USE AT YOUR OWN RISK."

Explanation

According to National Institute of Standards and Technology (NIST) Special Publication 800-88: Guidelines for Media Sanitization …


Continue reading

LVM

Posted on So 28 August 2011 in Notebook • Tagged with notebook, linux, filesystem

shrink lvm

# Unmount the filesystem and check its' LV
umount /mnt/foo
e2fsck -f /dev/mapper/vg0-foo

# Shrink ext4 and then the LV to the desired size
resize2fs -p /dev/mapper/vg0-foo 40G
lvreduce -L 40G /dev/mapper/vg0-foo

# Before continuing, run e2fsck. If it bails because the partition
# is …

Continue reading

systemd-nspawn

Posted on Sa 30 Juli 2011 in Notebook • Tagged with notebook, linux, utilities

Systemd

Kernel

You need support for namespaces and multiple devpts instances in your kernel:

CONFIG_UTS_NS=y
CONFIG_IPC_NS=y
CONFIG_USER_NS=y
CONFIG_PID_NS=y
CONFIG_NET_NS=y
CONFIG_DEVPTS_MULTIPLE_INSTANCES=y

Container

Downloading the Stage Tarball:

mkdir /var/lib/machines/gentoo-stage3-amd64 && cd /var/lib/machines/gentoo-stage3-amd64
wget https://gentoo.osuosl.org/releases/amd64/autobuilds/current-stage3-amd64 …

Continue reading

Converting DTS to AC3

Posted on Di 11 Januar 2011 in Notebook • Tagged with notebook, linux, media, audio

Get the track information

mkvmerge -i /path/to/matroska.file.mkv

Sample output

Track ID 1: video (V_MPEG4/ISO/AVC)
Track ID 2: audio (A_DTS)

This means that the matroska.file.mkv contains two tracks, a video track with id 1 and a DTS track with id 2.

Extract the …


Continue reading

Monitor

Posted on Di 04 Januar 2011 in Notebook • Tagged with notebook, linux, hardware

calibration

This is the command to start the calibrator:

dispcal -v -y l -g 2.2 -t 6500 -q h target

There are a few options that can be set in this command by changing the values after the option flags (the dash followed by a letter):

Monitor type: -y …


Continue reading

Encoding Audio

Posted on Do 21 Oktober 2010 in Notebook • Tagged with notebook, linux, media, audio

cdparanoia

cdparanoia -B -- "-3"

flac

for i in *.flac; do flac -d "$i"; done

split cue

shnsplit -o flac -f FILE.cue -t %n.%t FILE.flac

mp3

for i in *.wav; do lame -vbr-new -V 0 "$i" "${i%.wav}.mp3"; done

coverart

eyeD3 --add-image=./cover.jpg:FRONT_COVER ./*.mp3

scan …


Continue reading