Skip to content

Instantly share code, notes, and snippets.

View MCMXCIII's full-sized avatar
👑
I am bad at git.

Christopher Crawford MCMXCIII

👑
I am bad at git.
View GitHub Profile

Exhero install(on vps)

the current lsblk config

root@vultr ~ # lsblk
NAME   MAJ:MIN RM   SIZE RO TYPE MOUNTPOINTS
loop0    7:0    0 757.8M  1 loop /run/archiso/airootfs
sr0     11:0    1 883.3M  0 rom  /run/archiso/bootmnt
vda    254:0    0    50G  0 disk 
├─vda1 254:1    0   512M  0 part 
@MCMXCIII
MCMXCIII / install.sh
Created February 28, 2024 14:51
Script
#!/bin/bash
# Function to prompt user for boot method selection
prompt_boot_method() {
echo "Select boot method:"
echo "1. BIOS"
echo "2. UEFI"
read -p "Enter your choice (1 or 2): " boot_choice
case $boot_choice in
@MCMXCIII
MCMXCIII / exherbo-1.sh
Created January 22, 2024 12:06
Exherbo Script.
#!/bin/bash
# Prompt for BIOS or UEFI booting
echo "Select the boot mode:"
echo "1. BIOS/Legacy booting"
echo "2. UEFI booting"
read -p "Enter the number (1 or 2): " boot_mode
# Validate user input
if [[ $boot_mode != "1" && $boot_mode != "2" ]]; then
@MCMXCIII
MCMXCIII / gentoo-start.sh
Created October 13, 2023 12:11
a new gentoo machine.
#!/bin/bash
# Check if the script is run with root privileges
if [ "$(id -u)" -ne 0 ]; then
echo "This script must be run as root."
exit 1
fi
# Enable SSH (sshd) and start the service
rc-update add sshd default
#!/bin/bash
# Function to mount necessary filesystems
mount_filesystems() {
mount -o rbind /dev /mnt/exherbo/dev/
mount -o rbind /sys /mnt/exherbo/sys/
mount -t proc none /mnt/exherbo/proc/
mount /dev/sda1 /mnt/exherbo/boot/
mount /dev/sda3 /mnt/exherbo/home/
cp /etc/resolv.conf /mnt/exherbo/etc/resolv.conf
# This version is just a clean up of the script. I used it while developing, uses functions and
# and has an Error Handling system. Thought you might find it use full.
import string
from typing import ContextManager
from selenium import webdriver
from selenium.webdriver.common.keys import Keys
from bs4 import BeautifulSoup
import csv
import time
@MCMXCIII
MCMXCIII / Latest-Build.py
Last active February 7, 2021 19:16
Scraping script
from selenium import webdriver
from selenium.webdriver.common.keys import Keys
from bs4 import BeautifulSoup
import csv
import time
import os
import re
no_last_weeks = str(input("Number of last weeks: ")).strip()
file_name = str(input("Name of the output file to be saved: ")).strip()
@MCMXCIII
MCMXCIII / 1.py
Created January 4, 2021 03:52
Code block Regex
py import csv
import re
address_filter=[] #an empty list to store the second column
with open('122023jan.csv', 'r', encoding="utf8") as rf:
reader = csv.reader(rf, delimiter=',')
# Generated by Selenium IDE
import pytest
import time
import json
from selenium import webdriver
from selenium.webdriver.common.by import By
from selenium.webdriver.common.action_chains import ActionChains
from selenium.webdriver.support import expected_conditions
from selenium.webdriver.support.wait import WebDriverWait
from selenium.webdriver.common.keys import Keys
func main() {
reader := rand.Reader
bitSize := 2048
key, err := rsa.GenerateKey(reader, bitSize)
checkError(err)
publicKey := key.PublicKey
saveGobKey("private.key", key)