Skip to content

Instantly share code, notes, and snippets.

View neofob's full-sized avatar

Tuan T. Pham neofob

View GitHub Profile
@neofob
neofob / pxe_tftp_openwrt.md
Created February 21, 2025 02:04 — forked from rikka0w0/pxe_tftp_openwrt.md
PXE on OpenWrt with a different TFTP server

In this configuration, DHCP will run on the OpenWrt Box, while the TFTP server (the one serves the boot files) runs on a different computer.

1. Add to /etc/config/dhcp on OpenWrt Box

config boot linux
        option filename 'pxelinux.0'
        option serveraddress '192.168.?.?'
        option servername '?'
@neofob
neofob / mkisofs.md
Created February 7, 2025 16:04
mkisofs.md
mkisofs -U -A "Custom OS" -V "Custom OS" -volset "Custom OS" -J -joliet-long -r -v -T -x ./lost+found  -x ./.git -b isolinux/isolinux.bin -c isolinux/boot.cat -no-emul-boot -boot-load-size 4 -boot-info-table -eltorito-alt-boot -e images/efiboot.img -no-emul-boot -allow-limited-size -o /tmp/CustomOS.iso .
@neofob
neofob / AMD-GPU.md
Last active January 29, 2025 05:42
AMD GPU links
@neofob
neofob / openssl_commands.md
Created December 7, 2024 21:01 — forked from Hakky54/openssl_commands.md
OpenSSL Cheat Sheet - Some list of openssl commands for check and verify your keys

OpenSSL Cheat Sheet 🔐

Install

Install the OpenSSL on Debian based systems

sudo apt-get install openssl
@neofob
neofob / 00-netplan.yml
Created December 7, 2024 05:13
Netplan example
network:
version: 2
ethernets:
eth0:
dhcp4: true
dhcp6: false
match:
macaddress: ab:cd:ef:01:23:45
set-name: eth0
mtu: 9000
@neofob
neofob / lockerstor-debian.md
Created October 9, 2024 21:36 — forked from johndavisnz/lockerstor-debian.md
Installing Debian on the Nimbustor4/2 ( as5304t/as5202t )

Whilst Asustor's ADM suits most people, it is possible to install ANY intel operating system on the nimbustor4/2 (as5202t/as5304t) as they run fairly generic intel hardware (asmedia sata controller, rtl8125 2.5gbe nic and ite system management chip)

in this gist I'll detail the steps needed to install and configure Debian11

Before proceeding you need to decide where you're going to install Debian.

Most people will choose to install it to a usb3 attached drive - either a usb3 ssd ( samsung t5 or similar ) or a usb3 hdd. This gives the most straightforward install ( just tell Debian to use the entire usb3 drive to install to ) and maximises available space on the NAS HDDs

The other option is to install Debian direct to the NAS hard drives - that means no extra drive hanging off the nas, and you can raid1 mirror the system partition across all drives for added resiliency ( though this is somewhat limited as the EFI boot partition is only on sda - so in the case of sda failing you'd need to boot off i

@neofob
neofob / pip_download.sh
Created June 6, 2024 03:08
Download pip packages
#!/usr/bin/env bash
REQ=${REQ:-requirements.txt}
PY_VERSIONS=${PY_VERSION:-"3.9"}
PLATFORMS=${PLATFORMS:-"any"}
PY_INDEX_URL=${PY_INDEX_URL:-https:}
pip download --only-binary :all: -r ${REQ} --dest . --platform ${PLATFORMS} --python-version ${PY_VERSIONS}
@neofob
neofob / createrepo.sh
Created May 4, 2024 23:57
Create Rocky Linux 9 repo mirror
#!/usr/bin/env bash
dnf install -y rsync createrepo yum-utils
yum install epel-release -y
mkdir -p /var/www/html/rocky-9-mirror
reposync -gpgcheck -n -d 1 -m \
--repoid=appstream \
--repoid=baseos \
--repoid=epel \
@neofob
neofob / requirements.txt
Last active February 7, 2024 08:38
pip packages
absl-py~=2.1.0
affine~=2.4.0
aiohttp~=3.9.3
aiosignal~=1.3.1
annotated-types~=0.6.0
anyio~=4.2.0
astunparse~=1.6.3
attrs~=23.2.0
backoff~=2.2.1
beautifulsoup4~=4.12.3
@neofob
neofob / kubernetes.md
Last active January 28, 2024 19:33
Kubernetes

Code

kubectl get pods -o=jsonpath='{.items..resources.limits}' -A

output

{"cpu":"200m","memory":"1Gi"} {"cpu":"200m","memory":"1Gi"} {"cpu":"200m","memory":"512Mi"} {"cpu":"500m","memory":"250Mi"} {"memory":"170Mi"} {"memory":"170Mi"} {"cpu":"2","memory":"2Gi"} {"cpu":"2","memory":"2Gi"} {"cpu":"2","memory":"2Gi"} {"cpu":"1","memory":"1Gi"} {"cpu":"1","memory":"1Gi"} {"cpu":"2","memory":"2Gi"} {"cpu":"100m","memory":"128Mi"} {"cpu":"100m","memory":"128Mi"} {"cpu":"500m","memory":"600Mi"} {"cpu":"1","memory":"1Gi"} {"cpu":"100m","memory":"25Mi"} {"cpu":"100m","memory":"25Mi"}

Use plugin