Skip to content

Instantly share code, notes, and snippets.

View KeyofBlueS's full-sized avatar
💭
I may be slow to respond.

KeyofBlueS

💭
I may be slow to respond.
View GitHub Profile
@madkoding
madkoding / pair-dual-boot-bluetooth.md
Last active May 18, 2024 11:25
Pairing bluetooth devices in dual boot with Linux Ubuntu and Windows 10/11

Pairing Bluetooth Devices in Dual Boot with Linux Ubuntu and Windows 10/11

Introduction

This guide provides updated instructions for pairing Bluetooth devices (such as keyboards or mice) in a dual-boot environment with Linux Ubuntu and Windows 10/11, incorporating community feedback and suggestions.

Instructions

1. Pair in Linux First

  • Pair your Bluetooth device in Linux. This is crucial to ensure the LinkKey remains consistent.
  • Note: Do not re-pair the device in Linux after completing the pairing in Windows.
@wmealing
wmealing / C-states.md
Last active May 17, 2024 07:53
What are CPU "C-states" and how to disable them if needed?

To limit a CPU to a certain C-state, you can pass the processor.max_cstate=X option in the kernel line of /boot/grub/grub.conf.

Here we limit the system to only C-State 1:

    kernel /vmlinuz-2.6.18-371.1.2.el5 ... processor.max_cstate=1

On some systems, the kernel can override the BIOS setting, and the parameter intel_idle.max_cstate=0 may be required to ensure sleep states are not entered:

@thesamesam
thesamesam / xz-backdoor.md
Last active May 16, 2024 19:46
xz-utils backdoor situation (CVE-2024-3094)

FAQ on the xz-utils backdoor (CVE-2024-3094)

This is a living document. Everything in this document is made in good faith of being accurate, but like I just said; we don't yet know everything about what's going on.

Background

On March 29th, 2024, a backdoor was discovered in xz-utils, a suite of software that

@fusetim
fusetim / protonvpn-wireguard-generator.py
Last active May 12, 2024 18:19
Generate lots of Wireguard configuration for your ProtonVPN Account.
import http.client
import http.cookies
import json
import base64
import hashlib
from cryptography.hazmat.primitives import serialization
from cryptography.hazmat.primitives.asymmetric import x25519
from cryptography.hazmat.primitives.asymmetric import ec
from cryptography.hazmat.primitives import hashes
@cjyar
cjyar / mbr-to-gpt-uefi.md
Last active May 11, 2024 09:47
Convert a disk from MBR to GPT+UEFI, in Linux.

Before starting, make sure you have a backup, and make sure to have a linux live boot ready to rescue your system. It's easy to mess this up!

  1. Use gdisk to convert the partition table to GPT.

    gdisk /dev/sda

  2. Create the "BIOS boot" partition that GRUB needs.

    n to create a new partition. Needs to be about 1MB. You can probably squeeze this in from sectors 34-2047. Use L or l to look up the code for "BIOS boot" (ef02).

  3. Write the new partition table.

    w

  4. Reload the partition table. > partprobe /dev/sda
@barncastle
barncastle / tex2dds.cpp
Last active September 21, 2023 09:18
Ghostbusters TEX converter by Jonathan Wilson - Fixed
/* Ghostbusters texture converter
Copyright 2010 Jonathan Wilson
The Ghostbusters texture converter is free software; you can redistribute it and/or modify it under
the terms of the GNU General Public License as published by the Free
Software Foundation; either version 2, or (at your option) any later
version. See the file COPYING for more details.
*/
#include <stdio.h>
#include <string.h>
@SirYodaJedi
SirYodaJedi / StripSmp.sh
Created September 10, 2021 00:26
Strips the `.smp` header from Ghostbusters Remastered audio files, resulting in plain Ogg files
#!/bin/bash
for i in $(ls *.smp)
do
tail -c +161 $i > "$i.ogg"
done
mkdir vorbis
mv *.ogg vorbis