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 / bluetoothdoubledipping.md
Last active May 10, 2024 15:41
Bluetooth Pairing one device on Dual Boot of Windows & Linux - Stop having to Pair Devices

Bluetooth Pairing one device on Dual Boot of Windows & Linux - Stop having to Pair Devices

You may have experienced when dual booting that you need to re-pair your bluetooth devices (ie., Headphones, mouse, keyboard, etc) this usually happens because you have already paired the device with another operating system using the same bluetooth adapter when dual booting (either Linux or Windows).

Some devices cannot handle multiple pairings associated with the same MAC address (ie., bluetooth adapter). As per suggested on the ArchWiki you can fix this by re-pairing the device each time, but there's actually another solution to not do so each time you choose to use your device on a different OS.

How can we accomplish this?

Easy, just pair the device on a OS and copy the bluetooth keys generated to the other OS so our device doesn't notice the difference.

@diffficult
diffficult / installing_virt_manager.md
Last active April 11, 2024 04:10
Easy instructions to get virt-manager qemuv/kvm running on Arch

Easy instructions to get QEMU/KVM and virt-manager up and running on Arch

  1. Make sure your cpu support kvm with below command:

     grep -E "(vmx|svm)" --color=always /proc/cpuinfo
    
  2. Make sure BIOS have enable “Virtualization Technology”.

  3. User access to /dev/kvm so add your account into kvm(78) group:

@diffficult
diffficult / ledger_nano_s_on_linux.md
Last active April 6, 2024 10:20
Ledger Nano S on Arch

Ledger Nano S on Linux

Requirement:

  • Ledger Nano
  • Ledger HW1
  • Ledger Nano S
  • Ledger Blue
  • Special Edition

You need to create a set of udev rules to allow access to the device on Linux. This can be done easily by running the following command:

@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 / perprogram_gtktheme.md
Created August 2, 2020 23:19
Use different GTK themes for specific programs

Use a different GTK2/3 theme for specific programs

Why would you want to specify a different theme for a program?

Most common scenario, you installed a program that looks horrible or unreadable on your current theme or variation of that theme (light, dark). There's a simple workaround for most programs to fix this problem.


GTK 2

@diffficult
diffficult / tweaks_x220.md
Last active January 8, 2024 22:10
Thinkpad x220 General Tweaks

Thinkpad x220 general

Power settings (powertop+tlp)

powertop setup

  1. Install powertop
sudo pacman -S powertop
@diffficult
diffficult / raspberrypi0_headless_setup.md
Last active December 24, 2023 00:06
Get your Pi 0 W up and running headless with Arch Linux

Installing Arch Linux ARM on a SD card for Raspberry Pi 0 W and loading wifi credentials for headless usage


Advice

Before starting I highly suggest you create a new directory on your /home/user directory with an appropiate name for this task like rpi0alarm so you can change directory to /home/user/rpi0alarm and go through the following steps.

As I wrote this guide after collecting info from different sources (listed at the end) be mindful of your current path and the commands you are running to not damage your current installation on the host computer you are creating the SD Card.


@diffficult
diffficult / w10_bcd_error_0xc0000098.md
Last active September 14, 2023 04:28
Windows 10 Error: BCD missing - error 0xc0000098

Fixing Boot Error 0xc0000098 on Windows 10 (8 & 7)

Method 1: Run Automatic/Startup Repair

  1. Insert the Windows 10 bootable installation DVD and restart your PC.

  2. When prompted to Press any key to boot from CD or DVD, press any key to continue.

  3. Select your language preferences, and click Next. Click Repair your computer in the bottom-left.

@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/