Skip to content

Instantly share code, notes, and snippets.

@willianfalbo
willianfalbo / README.md
Last active April 19, 2024 01:13
Install Zsh, Oh-My-Zsh, Fonts-Powerline & Plugins (Ubuntu 18.04+)

Install Zsh, Oh-My-Zsh, Fonts-Powerline & Plugins (Ubuntu 18.04+, MacOS)

Introduction

After following these steps, your terminal will look like:

1. Install Zsh

Zsh is a shell designed for interactive use, although it is also a powerful scripting language.

@arvati
arvati / . Qemu networking using TAP Interface on Windows 10.md
Last active February 28, 2024 03:23 — forked from extremecoders-re/qemu-networking.md
Setting up Qemu with a tap interface

Setting up Qemu with a tap interface

There are two parts to networking within QEMU:

  • The virtual network device that is provided to the guest (e.g. a PCI network card).
  • The network backend that interacts with the emulated NIC (e.g. puts packets onto the host's network).

Example: User mode network

@huntrar
huntrar / full-disk-encryption-arch-uefi.md
Last active April 28, 2024 11:25
Arch Linux Full-Disk Encryption Installation Guide [Encrypted Boot, UEFI, NVMe, Evil Maid]

Arch Linux Full-Disk Encryption Installation Guide

This guide provides instructions for an Arch Linux installation featuring full-disk encryption via LVM on LUKS and an encrypted boot partition (GRUB) for UEFI systems.

Following the main installation are further instructions to harden against Evil Maid attacks via UEFI Secure Boot custom key enrollment and self-signed kernel and bootloader.

Preface

You will find most of this information pulled from the Arch Wiki and other resources linked thereof.

Note: The system was installed on an NVMe SSD, substitute /dev/nvme0nX with /dev/sdX or your device as needed.

@stroebs
stroebs / make-chr.sh
Last active March 16, 2024 06:13
Install Mikrotik CHR on a Digital Ocean droplet (Ubuntu 20.04 tested working 29/03/2022)
#!/bin/bash
#
# Digital Ocean Ubuntu 18.04 x64 Droplet with "Regular Intel" CPU.
# Running:
# git clone https://gist.github.com/54fc09734a3911e91eeeb43434f117df.git
# cd 54fc09734a3911e91eeeb43434f117df/
# chmod +x make-chr.sh
# ./make-chr.sh
#
# Once the reboot is done, login with root/CHANGEME and change the password!
@OdinsPlasmaRifle
OdinsPlasmaRifle / arch_linux_installation.md
Last active March 29, 2024 14:12
LVM on LUKS Arch installation with systemd-boot
@snakeye
snakeye / exif_gps.py
Last active October 10, 2023 09:44
Python: get GPS latitude and longitude coordinates from JPEG EXIF using exifread
import exifread
# based on https://gist.github.com/erans/983821
def _get_if_exist(data, key):
if key in data:
return data[key]
return None
@mfrister
mfrister / remote-unlock.md
Created December 18, 2015 20:01
Remote unlock via SSH for encrypted root volume (Ubuntu 14.04.3)

Remote unlock via SSH for encrypted root volume

Ubuntu 14.04.3

Install dropbear SSH server with automated hooks for being included in an initramfs.

apt-get install dropbear

Remove default private/public key for login, clear dss key (would be regenererated otherwise), remove insecure 1024-bit RSA host key and generate a new 2048-bit RSA host key (we'll have to keep the DSA-key, dropbear won't start otherwise - make sure to use RSA when connecting):

@PuKoren
PuKoren / recompile-and-run.sh
Last active January 17, 2024 19:01
Recompile APK + Sign with apktool
# You must first install apktool (https://github.com/iBotPeaches/Apktool) and android SDK
# and decompile apk using it
# apktool d -rf my-app.apk
# then generate a key for sign in:
# keytool -genkey -v -keystore my-release-key.keystore -alias alias_name -keyalg RSA -keysize 2048 -validity 10000
rm signed-app.apk
apktool b -f -d com.myapp
jarsigner -verbose -sigalg SHA1withRSA -digestalg SHA1 -keystore my-release-key.keystore com.myapp/dist/com.myapp.apk alias_name
zipalign -v 4 com.myapp/dist/com.myapp.apk signed-app.apk
@gusennan
gusennan / crypt_unlock.sh
Created March 7, 2015 17:57
initramfs-hook for unlocking LUKS-encrypted LVM partition
#!/bin/sh
PREREQ="dropbear"
prereqs() {
echo "$PREREQ"
}
case "$1" in
prereqs)
@mullnerz
mullnerz / archive-website.md
Last active February 23, 2024 18:11
Archiving a website with wget

The command I use to archive a single website

wget -mpck --html-extension --user-agent="" -e robots=off --wait 1 -P . www.foo.com

Explanation of the parameters used

  • -m (Mirror) Turns on mirror-friendly settings like infinite recursion depth, timestamps, etc.