Skip to content

Instantly share code, notes, and snippets.

@Th3On3
Th3On3 / remove-all-from-docker.sh
Created June 3, 2025 08:06 — forked from beeman/remove-all-from-docker.sh
Remove all from Docker
# Stop all containers
docker stop `docker ps -qa`
# Remove all containers
docker rm `docker ps -qa`
# Remove all images
docker rmi -f `docker images -qa `
# Remove all volumes
@Th3On3
Th3On3 / systemd.md
Created May 30, 2025 08:32 — forked from gtitov/systemd.md
How to create a systemd service
@Th3On3
Th3On3 / listings-settings.tex
Created April 30, 2025 14:39 — forked from mpdehnel/listings-settings.tex
Nice(ish) settings for LaTeX Package Listings
% All in preamble:
\usepackage{listings}
\usepackage{courier}
\usepackage{color}
\definecolor{mygreen}{rgb}{0,0.6,0}
\definecolor{mygray}{rgb}{0.5,0.5,0.5}
\definecolor{mymauve}{rgb}{0.58,0,0.82}

Problem

I have two Github accounts: oanhnn (personal) and superman (for work). I want to use both accounts on same computer (without typing password everytime, when doing git push or pull).

Solution

Use ssh keys and define host aliases in ssh config file (each alias for an account).

How to?

  1. Generate ssh key pairs for accounts and add them to GitHub accounts.
@Th3On3
Th3On3 / README.md
Created December 11, 2024 12:12 — forked from rutcreate/README.md
Install Python 3.10.x on Ubuntu 20.04

Prerequisite

sudo apt update
sudo apt install software-properties-common -y

Add custom APT repository

@Th3On3
Th3On3 / move-var-part-ubuntu.md
Created November 26, 2024 16:05 — forked from iambryancs/move-var-part-ubuntu.md
Move /var to another partition in Ubuntu

Move /var to another partition in Ubuntu

Create partition with fdisk or gparted

fdisk /dev/sdb
...
...

Create fs

@Th3On3
Th3On3 / root_mi_box_s_2nd_gen.md
Created September 25, 2024 11:21 — forked from supechicken/root_mi_box_s_2nd_gen.md
A tutorial for rooting Xiaomi TV Box S 2nd Gen (jaws) without UART/teardown

Rooting Xiaomi TV Box S 2nd Gen (jaws) without UART/teardown

Table of contents

  • Prerequisites
  • Step 1: Download the stock ROM for Xiaomi TV Box S 2nd Gen
  • Step 2: Extract boot image from the OTA archive
  • Step 3: Update the system with downloaded OTA archive
  • Step 4: Patch boot image with Magisk
  • Step 5: Unlock bootloader with fastboot
  • Step 6: Reboot to system and complete setup
@Th3On3
Th3On3 / lineage-signing-builds.md
Created June 20, 2024 11:31 — forked from A2L5E0X1/lineage-signing-builds.md
Signing LineageOS builds with your own dev-keys

Generating dev-keys to sign android builds

All you need is an Android buildsystem (LineageOS is recommended)
NOTE: For Lineage 21 and newer, different steps are required.

PART 1: GENERATING KEYS

  1. Export your infos (replace examples with your infos)
subject='/C=US/ST=California/L=Mountain View/O=Android/OU=Android/CN=Android/[email protected]'

C: Country shortform

@Th3On3
Th3On3 / private_fork.md
Created May 27, 2024 13:02 — forked from 0xjac/private_fork.md
Create a private fork of a public repository

The repository for the assignment is public and Github does not allow the creation of private forks for public repositories.

The correct way of creating a private frok by duplicating the repo is documented here.

For this assignment the commands are:

  1. Create a bare clone of the repository. (This is temporary and will be removed so just do it wherever.)

git clone --bare [email protected]:usi-systems/easytrace.git