Skip to content

Instantly share code, notes, and snippets.

@julienbenjamin
julienbenjamin / misc-linux-tips.md
Created November 5, 2017 18:08
Miscellaneous Linux tips

#1 Fix funny behaviour of a terminal

# reset

#2 Backup bootsector

  • Create backup (if sda is your booting disk)

$ dd if=/dev/sda of=bootsector.img bs=512 count=1

@julienbenjamin
julienbenjamin / manjaro-python-requirements.md
Created March 18, 2018 20:28
Python packages requirements for Manjaro

Python Next generation of the python high-level scripting language

Depends On expat bzip2 gdbm openssl libffi zlib

@julienbenjamin
julienbenjamin / steam-system-specs.txt
Created January 23, 2020 02:06
Steam system specifications
Computer Information:
Manufacturer: Unknown
Model: Unknown
Form Factor: Desktop
No Touch Input Detected
Processor Information:
CPU Vendor: GenuineIntel
CPU Brand: Intel(R) Core(TM) i7-3770K CPU @ 3.50GHz
CPU Family: 0x6
@julienbenjamin
julienbenjamin / systeminformation.txt
Last active December 11, 2020 21:16
System information
Computer Information:
Manufacturer: Unknown
Model: Unknown
Form Factor: Desktop
No Touch Input Detected
Processor Information:
CPU Vendor: AuthenticAMD
CPU Brand: AMD Ryzen 7 3700X 8-Core Processor
CPU Family: 0x17
// For more information about this list, see: https://pgl.yoyo.org/adservers/
// ----
// last updated: Wed, 10 Feb 2021 18:16:46 GMT
// entries: 3571
// format: bindconfig
// credits: Peter Lowe - [email protected] - https://pgl.yoyo.org/
// this URL: https://pgl.yoyo.org/as/serverlist.php?hostformat=bindconfig&showintro=0&mimetype=plaintext
// other formats: https://pgl.yoyo.org/adservers/formats.php
// policy: https://pgl.yoyo.org/adservers/policy.php

Create DNS-over-TLS bridge with Pi-hole, unbound and stubby on Ubuntu Server

Few months ago, I've made a similar work but I wanted something a little more easier to manage. Please have a look at here for my previous work.

This time, I'm gonna do pretty much the same thing but using Pi-hole as base then modify it to include unbound and stubby.

This way, I can use the power of Pi-hole with some additional security layers:

  • Recursive DNS check (unbound)
  • DNS-over-TLS (stubby)
@julienbenjamin
julienbenjamin / dd-examples.md
Created February 5, 2022 17:17 — forked from JonathanPorta/dd-examples.md
DD Backup, Compress, and Restore

Backup/Image

Make sure the if value is correct! If doing this over SSH then open a TMUX session first... or else...

dd if=/dev/YOUR-DEVICE conv=sync,noerror bs=64K | gzip -c  > /home/portaj/macbook.img.gz

NOTE: You might not want to compress the image. It just means you have to uncompress it later to mount it. If you're planning to access the data soon, or frequently, don't compress it.

Saving a copy of the drive geometry

Save it in the same directory as the compressed image so later on if you decide you want to mount or extract data from the image you can see the partition structure without having to decompress the whole image. There might be some other ways to mount a compressed image.

## Make a handy json file to automatically install the needed packages for Radarr to run
echo '{"pkgs":["libunwind","icu","libinotify","openssl","mediainfo","sqlite3","ca_root_nss","libiconv","nano","curl","wget"]}' > /tmp/pkg.json
## Create the jail using that json file we created earlier.
## I use 12.2-RELEASE as it's the most recent at the time of writing.
## Replace <IP>, <MASK> and <GATEWAY> with your own.
iocage create -n "radarr" -p /tmp/pkg.json -r 12.2-RELEASE ip4_addr="vnet0|<IP>/<MASK>" defaultrouter="<GATEWAY>" vnet="on" allow_mlock="1" allow_raw_sockets="1" boot="on"
## Delete the now useless file we created at the beginning.
rm /tmp/pkg.json
@julienbenjamin
julienbenjamin / mesa-howto.md
Created May 3, 2024 10:22 — forked from Venemo/mesa-howto.md
How to build and use mesa from source

Building and using mesa for development and testing

This explains how to build mesa from source, and how to use the custom built mesa to run some apps and games, without needing to replace the mesa libraries that your operating system runs on.

Let's assume that you are using an x86_64 system.

Building mesa

Overview

@julienbenjamin
julienbenjamin / 10-Bit H.264
Created December 30, 2024 00:27 — forked from YamashitaRen/10-Bit H.264
10-Bit H.264 explanation
10-Bit H.264
For all those who haven’t heard of it already, here’s a quick rundown about the
newest trend in making our encodes unplayable on even more systems: So-called
high-bit-depth H.264. So, why another format, and what makes this stuff
different from what you know already?
First off: What is bit depth?
In short, bit depth is the level of precision that’s available for storing color
information. The encodes you’re used to have a precision of 8 bits (256 levels)