Skip to content

Instantly share code, notes, and snippets.

View Coltonton's full-sized avatar
🚗
There’s no turning back

Coltonton - D3ADCRU7R Coltonton

🚗
There’s no turning back
  • OHIO
View GitHub Profile
@myusuf3
myusuf3 / delete_git_submodule.md
Created November 3, 2014 17:36
How effectively delete a git submodule.

To remove a submodule you need to:

  • Delete the relevant section from the .gitmodules file.
  • Stage the .gitmodules changes git add .gitmodules
  • Delete the relevant section from .git/config.
  • Run git rm --cached path_to_submodule (no trailing slash).
  • Run rm -rf .git/modules/path_to_submodule (no trailing slash).
  • Commit git commit -m "Removed submodule "
  • Delete the now untracked submodule files rm -rf path_to_submodule
@ncflagg
ncflagg / continue.sh
Last active June 16, 2020 10:51
openpilot: OG Eon tri-state switch mod + auto-enable WiFi hotspot
#!/usr/bin/bash
# Adapted from Erich's tri-state switch mod which allows choosing from three installed openpilot locations on boot
# I've only really added some error-checking and fallback options
# Boot locations:
# /data/openpilot.1
# /data/openpilot.2
# /data/openpilot.3
#
# Moves existing real /data/openpilot dir (I.E not a symlink) to /data/openpilot.backup
@da-n
da-n / usb-unlock-luks.md
Created August 24, 2019 13:11
Unlock LUKS full disk with USB stick

Configuration for passwordless root filesystem

Source: https://www.howtoforge.com/tutorial/passwordless-encryption-of-linux-root-partition/

The process of entering the passphrase at boot time will now be automated using an USB memory stick. Instead of using a passphrase , the secret key on the USB will decrypt the encrypted volumes. Connect an USB stick to the VM and locate it using the dmesg command. It is detected as /dev/sdb in my VM.

The secret key of 8192 random byte is extracted from the usb stick using the dd command.

dd if=/dev/sdb of=/root/secret.key bs=512 skip=4 count=16