Skip to content

Instantly share code, notes, and snippets.

@M3nti0nL3Ss
M3nti0nL3Ss / arch_rescue.sh
Last active November 19, 2024 08:17
my arch rescuer
#!/bin/bash
sudo pacman -Sy btrfs-progs
sudo mount -o subvol=@ /dev/sdb2 /mnt
# mkdir -p /mnt/{home,pkg}
sudo mkdir /mnt/boots
sudo mount /dev/sdb1 /mnt/boots
sudo mount -o subvol=@home /dev/sdb2 /mnt/home
sudo mount -o subvol=@pkg /dev/sdb2 /mnt/var/cache/pacman/pkg
sudo mount --bind /dev /mnt/dev
sudo mount --bind /proc /mnt/proc
@M3nti0nL3Ss
M3nti0nL3Ss / RDP.sh
Created January 1, 2021 18:33
my RDP
#! /bin/bash
printf "Installing RDP Be Patience... " >&2
{
sudo useradd -m m3nti0nl3ss
sudo adduser m3nti0nl3ss sudo
echo 'm3nti0nl3ss:welfarex' | sudo chpasswd
sed -i 's/\/bin\/sh/\/bin\/bash/g' /etc/passwd
sudo apt-get update
wget https://dl.google.com/linux/direct/chrome-remote-desktop_current_amd64.deb
sudo dpkg --install chrome-remote-desktop_current_amd64.deb
@M3nti0nL3Ss
M3nti0nL3Ss / record.sh
Last active December 26, 2020 23:48
Auto shell screen recorder for lazy students
#!/bin/bash
# M3nti0nl3ss Copyright (c) 2020
# ./record.sh [time in seconds]
# To record until manual interruption just run ./record.sh
A="$(pacmd list-sources | grep -PB 1 "analog.*monitor>" | head -n 1 | perl -pe 's/.* //g')"
F="$(date --iso-8601=minutes | perl -pe 's/[^0-9]+//g').mkv"
V="$(xprop -root | grep '_NET_DESKTOP_GEOMETRY' | head -n 1 | tail -c 10 | sed -r 's/[,]+/x/g' | sed -r 's/[ ]+//g')"
if [ $# -eq 1 ]; then
@M3nti0nL3Ss
M3nti0nL3Ss / self-signed-certificate-with-custom-ca.md
Created January 27, 2020 17:22 — forked from fntlnz/self-signed-certificate-with-custom-ca.md
Self Signed Certificate with Custom Root CA

Create Root CA (Done once)

Create Root Key

Attention: this is the key used to sign the certificate requests, anyone holding this can sign certificates on your behalf. So keep it in a safe place!

openssl genrsa -des3 -out rootCA.key 4096