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 April 20, 2024 06:06
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 / pi_mount_usb.md
Last active August 1, 2021 22:38 — forked from etes/pi_mount_usb.md
How to setup mount / auto-mount USB Hard Drive on Raspberry Pi

How to setup mount / auto-mount USB Hard Drive on Raspberry Pi

Follow the simple steps in the order mentioned below to have your USB drive mounted on your Raspberry Pi every time you boot it.

These steps are required especially if your are setting up a Samba share, or a 24x7 torrent downloader, or alike where your Raspberry Pi must have your external storage already mounted and ready for access by the services / daemons.

Step 0. Plug in your USB HDD / Drive to Raspberry Pi If you are using a NTFS formatted drive, install the following

@diffficult
diffficult / x220_update_bios_from_linux.md
Created May 15, 2019 13:01
Updating the BIOS on Lenovo laptops from Linux using a USB flash stick
  1. Go to support.lenovo.com (or better use a search engine because the Lenovo website is beautiful but technically pretty broken and slow) and search for the BIOS upgrade of your laptop model.

  2. Download the most recent ISO file. Look for “BIOS bootable update CD”.

  3. Convert the ISO image using the geteltorito utility

Example:

geteltorito -o bios.img g2uj18us.iso
@diffficult
diffficult / pihole_grafana.md
Created May 11, 2019 16:15
Pi-hole Dashboard on Grafana
@diffficult
diffficult / stow_4_idiots.md
Last active December 2, 2022 01:12
Basic stow guide for idiots

KISS instructions on how stow works and how to easily set it up

Create a git repo directly in your home folder, .g. ~/dotfiles

In this directory, you create a folder with a "package name" and in it the exact folder structure this app has it's config files in your home folder.

Let's take i3 for example, which has its config file in ~/.config/i3/config

Move this file into ~/dotfiles/i3/.config/i3/config. Now you can git add and git commit it, like usual.

@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 / move_install_to_encrypted_disk.md
Created April 21, 2019 00:47
Move Arch install to Encrypted Disk

Hi, guys.

Thanks to this guide and Arch Wiki I was able to move my existing Arch installation to an encrypted SDD.

Step 1: Preparing new disk drive (UEFI/GPT)

parted /dev/sdX

To create a new EFI System Partition, use the following commands (a size of 512MiB is suggested):

@diffficult
diffficult / docker-cleanup-resources.md
Created February 18, 2019 15:34 — forked from bastman/docker-cleanup-resources.md
docker cleanup guide: containers, images, volumes, networks

Docker - How to cleanup (unused) resources

Once in a while, you may need to cleanup resources (containers, volumes, images, networks) ...

delete volumes

// see: https://github.com/chadoe/docker-cleanup-volumes

$ docker volume rm $(docker volume ls -qf dangling=true)

$ docker volume ls -qf dangling=true | xargs -r docker volume rm

@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 / hikvision_rtsp.md
Last active December 22, 2021 22:24
Hik Vision RTSP feeds

Live View URL

rtsp://<address>:<port>/Streaming/Channels/<id>/

rtsp://<username>:<password>@<address>:<port>/Streaming/Channels/<id>/

Where <address> is the IP address of your camera, <port> is the RTSP port of the camera, and <username> and <password> refer to the login credentials of your camera.