Skip to content

Instantly share code, notes, and snippets.

View diffficult's full-sized avatar
💽
the big switcharoo

reese diffficult

💽
the big switcharoo
View GitHub Profile
@diffficult
diffficult / README-TAPO-Linux.md
Created November 30, 2024 19:30 — forked from schauveau/README-TAPO-Linux.md
Notes about TP-Link Tapo C500 and Linux

TP-Link Tapo C500 and Linux

Those are my notes about using the TP-Link Tapo C500 camera in my Linux environment.

More precisely, my Linux system are

  • a Debian Testing desktop pc
  • a few raspberry pi
  • an Asustor NAS that is running a highly customized Linux

Tapo C500 technical summary

@diffficult
diffficult / managing-the-gpg-agent.md
Created November 5, 2024 14:41 — forked from CMCDragonkai/managing-the-gpg-agent.md
Managing the gpg-agent #nix #gpg

Managing the gpg-agent

These are the standard commands:

gpgconf --list-dirs
gpgconf --kill gpg-agent
gpgconf --reload gpg-agent
@diffficult
diffficult / rpi_bullseye-debian11_to_bookworm-debian12.md
Created May 28, 2024 05:00
Raspberry OS Bullseye to Bookworm

Upgrading Raspberry Pi OS from Bullseye to Bookworm (11 to 12)

Upgrading Raspberry Pi OS from Bullseye to Bookworm (11 to 12)

Debian version 12, called Bookworm, was recently released. After only a few months of waiting, a version optimized for the Raspberry Pi was released, so it was time to upgrade. If I already did it for me, I'll write a step by step guide :)

The full changelog is here:
https://wiki.debian.org/NewInBookworm

If you write or run shell scripts, please consider the following:

@diffficult
diffficult / linux_kernel_patch.md
Last active April 1, 2024 16:41
Patching Linux Kernel 6.8.2 to solve BT issues

foolproof step by step

  1. sudo pacman -Syu base-devel devtools. This will pull in the necessary dependencies to build Arch packages.
  2. pkgctl repo clone --protocol=https linux. This will grab the PKGBUILD for the linux package. There should now be a linux folder in your current directory.
  3. Visit https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git/commit/?id=1c3366abdbe884 and download the patch by right-clicking the "patch" link next to the commit id and save as.
  4. Place the downloaded patch into the linux folder. It should be named d39a2734bf6221a1a4fe42eea1dd6a17f08ebf5b..1c3366abdbe884be62e5a7502b4db758aa3974c6.patch, but it really doesn't matter what you name it.
  5. Add that patch file name as another line in the source=() section. This tells the PKGBUILD to include the patch as a source file for the build.
  6. Add an extra 'SKIP' line as the last entry in both the `sha256
@diffficult
diffficult / ELECOM_HUGE_Trackball_keymap.md
Created March 30, 2024 22:13
ELECOM Huge Config XORG

ELECOM Trackball Mouse HUGE Trackball

Needed to remap keys on my ELECOM Huge Trackball, so I wrote a .conf file to be loaded at boot by X.

The ELECOM Huge has 12 keys you can assign. I will be remapping Fn1 and Fn2 which are near my index finger to be used as regular Left Click and Middle Click

Code Default Key Remap Key
1 Left Left
2 Middle Middle
@diffficult
diffficult / gist:1c5266a158cde39e47897413b202bdc7
Created July 12, 2023 23:20
enable zram on raspberry pi
https://haydenjames.io/raspberry-pi-performance-add-zram-kernel-parameters/
https://www.techrepublic.com/article/how-to-enable-the-zram-module-for-faster-swapping-on-linux/
https://ikarus.sg/using-zram-to-get-more-out-of-your-raspberry-pi/
@diffficult
diffficult / watchdog_setup.md
Created May 4, 2022 21:12
Setting up "Watchdog" to keep Raspberry Pi Alive

We have deployed a couple of long-running Raspberry Pis equipped with cameras and sensors reporting into our network 24/7. All these are under uptime monitoring for us to keep track of the network availability.

From to time one of our Raspberry Pis freezes in the field either because of a kernel or a hardware issue. In that case there is nothing that can be done with software anymore. You can’t connect to it, can’t ping the Pi – It becomes impossible to send it a restart command in any way to bring it back to normal operation. Debugging into these events you might find indications of such as freeze in the /var/log/kernel.log file, and only manual powering down, and powering up again brought it back to live.

One little known Pi features is a builtin hardware watchdog. This little hardware service will once enabled watch the system activity and automatically power cycle the Raspberry Pi once it gets stuck.

It’s done in few steps directly on a terminal on your Pi:

  1. Enable the hardware watchdog on your Pi a
@diffficult
diffficult / new_python_version_breaks_packages.md
Last active December 13, 2021 15:54
ARCHLINUX: How to rebuild packages when a new version of Python releases and gets added to [core]

How to identify and rebuild packages when a new version of Python is released

2021-12-12

Python 3.10 is now in [core].

You may need to rebuild any Python packages you've installed from the AUR. To get a list of them, you can run:

pacman -Qoq /usr/lib/python3.9

@diffficult
diffficult / bt_headset_audio_autoswitch.md
Last active October 16, 2024 08:32
LINUX - Switch your main audio output to your headset when bluetooth connects

Auto switch audio output when a new Bluetooth device connects

Depending on the distro or DE/WM you are running and which programs you are using to manage your audio you maybe run into the hassle of having to switch audio outputs each time you connect a bluetooth device (headset/speaker). You can in fact make pulseaudio to autoswitch when connection is established and not do it manually.

To accomplish this you just need to check a condition in the default.pa config file located in /etc/pulse/ directory on your install and add the following line load-module module-switch-on-connect like in the code snippet below:

...

### Automatically load driver modules for Bluetooth hardware
@diffficult
diffficult / reglas.md
Last active August 17, 2020 07:13
Reglas del Clan

Nuestra Comunidad

La idea detras de este clan desde un inicio siempre fue juntarse con amigos, hacer nuevos amigos y ayudarnos mutuamente para realizar actividades tanto PVE como PVP de cualquier dificultad sin presiones, despues de todo esto es un juego, una actividad recreativa.

REGLAS

- Los miembros del clan deben ser mayores de 18 años.