Skip to content

Instantly share code, notes, and snippets.

View helloimalemur's full-sized avatar
🦊

helloimalemur helloimalemur

🦊
View GitHub Profile
@helloimalemur
helloimalemur / interfaces
Created August 22, 2023 14:59 — forked from kernelsmith/interfaces
example etc/network/interfaces config
# always start with interface up
auth eth0
# Static
iface eth0 inet static
address 192.168.1.5
netmask 255.255.255.0
gateway 192.168.1.254
dns-nameservers 192.168.1.250
@helloimalemur
helloimalemur / BLAZINGLY_FAST_rsync.md
Created October 2, 2023 15:47
BLAZINGLY FAST rsync
rsync -e "ssh -p8888 -o Compression=no" 127.0.0.1:/mnt/1TB/backup.tar.gz -P ./backup.tar.gz
rsync -P ./backup.tar.gz -e "ssh -p8888 -o Compression=no" 127.0.0.1:/mnt/1TB/backup.tar.gz
@helloimalemur
helloimalemur / ssh_key_only_auth.conf
Last active November 9, 2023 15:26
Key Only SSHD
## key only auth
ChallengeResponseAuthentication no
PasswordAuthentication no
PermitRootLogin prohibit-password
PubkeyAuthentication yes
@helloimalemur
helloimalemur / Default_Debian_Bullseye_Repositories.txt
Created November 15, 2023 17:00
Default Debian Bullseye Repositories
deb http://deb.debian.org/debian bullseye main contrib non-free
deb http://deb.debian.org/debian bullseye-updates main contrib non-free
deb http://deb.debian.org/debian bullseye-backports main contrib non-free
deb http://security.debian.org/debian-security/ bullseye-security main contrib non-free
@helloimalemur
helloimalemur / gdb_cheat_sheet.txt
Created November 30, 2023 20:49
GDB cheat sheet
GDB commands by function - simple guide
---------------------------------------
More important commands have a (*) by them.
Startup
% gdb -help print startup help, show switches
*% gdb object normal debug
*% gdb object core core debug (must specify core file)
%% gdb object pid attach to running process
% gdb use file command to load object
@helloimalemur
helloimalemur / mac-linux-nfs.md
Last active December 18, 2023 23:34 — forked from betweenbrain/mac-linux-nfs.md
Mac backup to Linux NFS via Time Machine

Server

apt update
apt install nfs-kernel-server
mkdir /mnt/nfs -p
chown nobody:nogroup /mnt/nfs
chmod 777 /mnt/nfs
nano /etc/exports
@helloimalemur
helloimalemur / lets_encrypt_haproxy_certificates.md
Last active December 19, 2023 19:21
Fix Let's Encrypt Certificates for use with HAProxy
@helloimalemur
helloimalemur / lets_encrypt_dns_challenge.md
Created December 19, 2023 19:24
Let’s Encrypt Certificate with DNS Challenge and Namecheap

Install Let’s Encrypt Certbot

apt install certbot

Generate new certificate using Certbot

certbot certonly --manual --preferred-challenges dns -d "*.DOMAIN"

Setting DNX TXT ACME Challenge in Namecheap

@helloimalemur
helloimalemur / byomysql.sh
Last active January 22, 2024 17:45
Docker - MariaDB - Bring your own SQL server
## Bring your own SQL server;
export DOCKER_MARIADB_DBHOST="127.0.0.1";
export DOCKER_MARIADB_DBPORT="3306";
export DOCKER_MARIADB_DBNAME="mdb";
export DOCKER_MARIADB_DBHOSTPW="Password123!";
export DOCKER_MARIADB_DATABASE="mydatabase";
export DOCKER_MARIADB_USER="'devuser'";
export DOCKER_MARIADB_TABLE="mytable";
docker run -p "$DOCKER_MARIADB_DBHOST":"$DOCKER_MARIADB_DBPORT":"$DOCKER_MARIADB_DBPORT" --name "$DOCKER_MARIADB_DBNAME" -e MARIADB_ROOT_PASSWORD="$DOCKER_MARIADB_DBHOSTPW" -d mariadb:latest &
sleep 15s;
@helloimalemur
helloimalemur / react_iter_array.md
Created January 27, 2024 08:02
React Iter Array

You can just use map within the components render method.

render () {
   return (
       <div>
           {stations.map(station => <div key={station}> {station} </div>)} 
       </div>
 );