Skip to content

Instantly share code, notes, and snippets.

@gabrieljcs
gabrieljcs / mullvad-find-valid.sh
Last active March 5, 2022 18:56
zsh script to go through VPN's IPs and validate if they're blacklisted in a streaming service
# This script iterates through Mullvad's servers in order to find a valid (non-geoblocked) IP for HBO Max
mullvad relay update && mullvad connect
# Replace "us" below with the country code you desire
for i in $(mullvad relay list | grep -ow $'\t''us\S*'); do
mullvad relay set hostname $i
sleep 3
# Copy your full request to HBO's (or similar service) session URL including your cookies and user agent
@gabrieljcs
gabrieljcs / docker.md
Created August 6, 2018 16:41
Simple nginx quick setup using Docker (good for references)

Docker quick start

A simple nginx quick setup using Docker

Install Docker and add your user to the Docker group

# apt-get install docker.io
# groupadd docker
@gabrieljcs
gabrieljcs / vmware-fix-f26.md
Last active August 22, 2017 01:58
Fix for VMware Workstation 12.5.7 on Fedora 26

Fix for VMware Workstation 12.5.7 on Fedora 26

Source

Fixing libraries

# cp -r /usr/lib/vmware-installer/2.1.0/lib/lib/libexpat.so.0 /usr/lib/vmware/lib
# mv -i /usr/lib/vmware/lib/libz.so.1 /usr/lib/vmware/lib/libz.so.1.bak
# ln -s /usr/lib64/libz.so.1 /usr/lib/vmware/lib/libz.so.1
@gabrieljcs
gabrieljcs / vm-secureboot.md
Last active May 8, 2023 03:21
Instructions on signing VirtualBox and VMware modules for Secure Boot

Signing VirtualBox & VMware modules

Source

Creating a key

You can change "MOK".priv/.der to any desired name; "CN=" MUST hold your username, signing the modules may not work otherwise (on shim, possibly due to a bug).

$ openssl req -new -x509 -newkey rsa:2048 -keyout MOK.priv -outform DER -out MOK.der -nodes -days 36500 -subj "/CN=John Doe/"
@gabrieljcs
gabrieljcs / lvm-cache-fedora.md
Last active March 23, 2024 13:33
Instructions to create an LVM cache for root in Fedora

LVM cache in Fedora

From the man-pages: "The cache logical volume type uses a small and fast LV to improve the performance of a large and slow LV. It does this by storing the frequently used blocks on the faster LV. LVM refers to the small fast LV as a cache pool LV. The large slow LV is called the origin LV. Due to requirements from dm-cache (the kernel driver), LVM further splits the cache pool LV into two devices - the cache data LV and cache metadata LV. The cache data LV is where copies of data blocks are kept from the origin LV to increase speed. The cache metadata LV holds the accounting information that specifies where data blocks are stored (e.g. on the origin LV or on the cache data LV). Users should be familiar with these LVs if they wish to create the best and most robust cached logical volumes. All of these associated LVs must be in the same VG."

Assuming LVM is already setup in HDD (e.g. from anaconda) and SSD is untouched.

Create a physical