Skip to content

Instantly share code, notes, and snippets.

View daxxog's full-sized avatar

David Volm daxxog

View GitHub Profile
# typescript code generator for my cringe university assignments
_example_input = \
"""class Product {
code: string;
name: string;
category: string;
price: number;
}
"""
@daxxog
daxxog / ls-colors-linux
Created January 17, 2022 22:31
my LS_COLORS for linux
export LS_COLORS='di=36:ln=34:so=35:pi=1;32;47:ex=32:bd=1;30;47:cd=1;31;47:su=30;41:sg=1;30;45:tw=1;30;46:ow=1;31'
@daxxog
daxxog / substitution-cipher.py
Created November 17, 2021 15:53
If you use this in production you are stupid.
from functools import cache
from typing import List, Tuple
from string import ascii_uppercase
def generate_sub(start: str = 'Z') -> Tuple[str]:
_l: List[str] = list(ascii_uppercase)
start_index: int = _l.index(start)
_o_list: List[str] = list(_l)
@daxxog
daxxog / genpass-fips.py
Created July 8, 2021 14:44
Generate a FIPS Compliant secure password
#!/usr/bin/env python3
from string import (
ascii_lowercase,
ascii_uppercase,
digits,
punctuation
)
from secrets import choice
@daxxog
daxxog / mac-ls-colors.zshrc
Created May 22, 2021 12:31
ls colors on mac
# ls colors on mac
export CLICOLOR=1
export LSCOLORS=gxexfxChcxAhBhabAfAgBx
@daxxog
daxxog / fix-arch-glibc
Created March 6, 2021 14:31
fix archlinux docker glibc
curl -fsSL "https://repo.archlinuxcn.org/x86_64/glibc-linux4-2.33-4-x86_64.pkg.tar.zst" | bsdtar -C / -xvf -
@daxxog
daxxog / hamachi-installer-armhf.sh
Created November 21, 2020 17:46
Install Hamachi on Rasperry PI 4 Ubuntu 20.04 32 bit armhf
#!/bin/bash
#hamachi installer script
#armhf=32 bit ARM
#tested on Ubuntu 20.04
INSTALLER_PACKAGE=logmein-hamachi_2.1.0.203-1_armhf.deb
if [ ! -f "${INSTALLER_PACKAGE}" ]; then
wget https://www.vpn.net/installers/${INSTALLER_PACKAGE}
fi
# curl -L tinyurl.com/recoverymodehelp
csrutil
csrutil disable
csrutil enable
@daxxog
daxxog / no-ip-service-install.sh
Created August 8, 2020 16:11
install no-ip noip noip2 service
#!/bin/bash
# first install noip2: https://www.noip.com/support/knowledgebase/installing-the-linux-dynamic-update-client/
# then, run this as root (su)
wget https://gist.githubusercontent.com/NathanGiesbrecht/da6560f21e55178bcea7fdd9ca2e39b5/raw/b5594a39e908548f4319294553497d2db3053e0a/noip2.service
mv noip2.service /etc/systemd/system/
sudo systemctl daemon-reload
sudo systemctl enable noip2
sudo systemctl start noip2
https://www.youtube.com/playlist?list=PLn3ukorJv4vs_eSJUQPxBRaDS8PrVmIri
https://www.youtube.com/playlist?list=PLGKIkAXk1OeSRZ7_xhz_TvUgudrL8_yJt
https://www.youtube.com/playlist?list=PLaGRTLvEbVzybijtYZRy4EoGrx6Bq_xOG