Skip to content

Instantly share code, notes, and snippets.

View luispabon's full-sized avatar

Luis Pabon luispabon

  • Auron Consulting Ltd
  • London
View GitHub Profile
@luispabon
luispabon / exports.md
Created October 11, 2024 13:05
nfs mounting on LXC privileged containers

If you can successfully mount an NFS share, and only see folders but not files, and the ownerships of those folders are all wrong, add crossmnt to your NFS export, like so:

/storage 10.0.0.0/24(rw,fsid=1,crossmnt,sync,no_subtree_check,all_squash,anonuid=1000,anongid=1000)
@luispabon
luispabon / readme.md
Created October 10, 2024 13:00 — forked from vadimstasiev/readme.md
Install ZFSBootMenu on Proxmox

Install ZFSBootMenu on Proxmox

Requirements:

  • you must have installed proxmox with root on zfs - aka when you installed proxmox you installed it on a zfs filesystem

mount /dev/nvme0n1p2 /boot/efi/

mkdir /boot/efi/EFI/zfsbootmenu/

@luispabon
luispabon / gist:32427f2fa17aa2c71f9d52759599e9be
Created September 27, 2024 09:46
How to reset "Oil change due" message on 2014 Mazda 6
https://www.reddit.com/r/mazda6/comments/goyj8v/comment/if2g25d/?utm_source=share&utm_medium=web3x&utm_name=web3xcss&utm_term=1&utm_content=share_button
Please find the alternative method to removing the "oil maintenance due" warning light on a Mazda 6. My car no
longer has the settings to reset the oil maintenance light in the owners manual. You do not need any tools or
reset equipment.
Note: no other buttons or pedals should be pressed. You cannot hold or press any buttons before turning the car
on as it ignores the reset command. The engine should remain off for the whole process.
Step 1. Press the engine start button twice to get the electronics on and you see some dash lights.
@luispabon
luispabon / rescan-wifi.sh
Created September 14, 2023 09:26
NetworkManager command line wifi rescan
#!/bin/bash
echo -e "Re-scanning wifi...\n"
nmcli dev wifi rescan
nmcli dev wifi list
echo -e "\nScan finished."
@luispabon
luispabon / readme.md
Created May 1, 2023 18:45
Linux sensors for GA-Z170N-WIFI (rev. 1.0)

Extra linux sensors for GA-Z170N-WIFI (rev. 1.0) motherboard

For a GA-Z170N-WIFI (rev. 1.0), just modprobe it87 is enough, you can just load the it87 module without any options. This enables not only fan speed sensors but also voltages and various other temperature sensors

echo it87 > /etc/modules-load.d/gigabyte-sensors-it87.conf

Full sensor output:

@luispabon
luispabon / readme.md
Last active March 19, 2023 14:47
Jellyscrub + jellyfin + docker with unprivileged jellyfin user

Jellyfin and Jellyscrub in Docker with unprivileged jellyfin user (fixes player not showing thumbnails)

Jellyscrub needs to be able to write to Jellyfin's index.html. If you're running Jellyfin as an unprivileged user it won't be able to, since the official container jellyfin files are owned by root.

This is a docker-compose example of how to work around this problem. The docker-compose service definition for jellyfin also passes through an intel igpu. Leaving here as this might be useful to someone.

Once adding the below, make sure you build the container, delete the old one and bring up a new one with docker-compose down jellyfin && docker-compose up -d. Any changes to the dockerfile or build params also mandate this.

@luispabon
luispabon / Example.md
Last active March 15, 2023 10:51
Wait for DNS
~ wait_for_dns.sh "google.com foobar.foo"                                                                                      Wed 15 Mar 2023 10:49:37 GMT

### Trying to resolve google.com foobar.foo ###
>> Waiting for dns 'google.com' to be available -> 172.217.16.238 2a00:1450:4009:821::200e 👍
>> Waiting for dns 'foobar.foo' to be available ----> Timed out after 4s 👎
@luispabon
luispabon / gist:243e33f1d92aab2301c6b8fd15b72487
Last active October 19, 2022 17:34
Find folders that contain one file but not another
find my/search/path -type d -exec test -e '{}'/i_want_this_file.txt -a '!' -e '{}'/but_not_this_one.txt \; -print | sort
# Note if not obvs: remove the '!' to search for folders that contain both files
@luispabon
luispabon / command line (bash)
Created October 4, 2022 11:47
aws cli terraform import secret and secret version
~ terraform import aws_secretsmanager_secret.yep my_name
~ terraform import aws_secretsmanager_secret_version.yep my_name\|$(aws secretsmanager get-secret-value --secret-id=my_name | jq ".VersionId" --raw-output)
@luispabon
luispabon / main window
Created April 21, 2022 10:28
New jetbrains windows
{
"id": 577,
"type": "con",
"orientation": "none",
"percent": 0.49679487179487181,
"urgent": false,
"marks": [
],
"focused": false,
"layout": "none",