OpenBSD - USB

dmesg show disks dmesg |grep ^sd. sd0 at scsibus1 targ 0 lun 0: <ATA, KingFast, T031> t10.ATA_KingFast_04xxxxxxxxxxxx sd0: 114473MB, 512 bytes/sector, 234441648 sectors, thin sd1 at scsibus4 targ 1 lun 0: <JetFlash, Transcend 8GB, 1100> removable serial.85xxxxxxxxxxxxxxxxxx sd1: 7450MB, 512 bytes/sector, 15257600 sectors Show DiskLabel sysctl hw.disknames hw.disknames=sd0:9axxxxxxxxxxxxxx,sd1:60xxxxxxxxxxxxxx Show Disklabel sd1 disklabel sd1 disklabel sd1 # /dev/rsd1c: type: SCSI disk: SCSI disk label: Transcend 8GB duid: 60xxxxxxxxxxxxxx flags: bytes/sector: 512 sectors/track: 63 tracks/cylinder: 255 sectors/cylinder: 16065 cylinders: 949 total sectors: 15257600 boundstart: 64 boundend: 15257600 16 partitions: # size offset fstype [fsize bsize cpg] c: 15257600 0 unused Fdisk kill everything

Hetzner - Arm64 OpenBSD

OpenBSD on ARM64 at Hetzner DC Price/Performance is unbeatable at Hetzner for arm64 virtual machines. A Server (CAX21) with 4 CPU, 8 GB RAM, 80 GB Disk, 20 TB Traffic/month cost around 7 Euros/Month. Let’s build a Template for OpenBSD. Here is how todo it: Get Server with CAX21 (4 CPU, 8 GB RAM, 80 GB Disk), with Debian or Ubuntu Menu “ISO-Images”, mount Image “OpenBSD 7.4-current 2023-11-03 (arm64)” Reboot the VM Install OpenBSD as usual Disk: sd0 Use (W)hole disk (E)dit auto layout Delete all Partitions execpt Partition “i” (MSDOS) Build Disk Layout as you like.

APU - Firmware Upgrade

intro as we all know, the apu’s from pcengines are eol. but it’s worth to bring the existing ones to the latest firmware. if you have openbsd running on your boxes, you can upgrade it with like this: add packages doas pkg_add -i flashrom pciutils set hostname based on apu version and mac of em0 type=$(dmesg |grep ^bios0: |tail -1 |sed 's/.*gines //') mac=$(ifconfig em0 |awk '/lladdr/ {print $2}' |awk -F':' '{printf "%s-%s-%s\n",$4, $5, $6}') echo "${type}-${mac}" |tee /etc/myname; hostname $(cat /etc/myname) sample

macos - hdiutil

Intro hdiutil is a command-line utility on macOS that allows users to create, manipulate, and convert disk images. Disk images are virtual disk files that can contain the entire file system structure, including files, folders, and metadata. hdiutil provides a variety of functions related to disk images, and it’s a powerful tool for managing disk-related tasks on a Mac. Basic Usage create echo -n "geheim" |hdiutil create -encryption -stdinpass -size 10m -volname encdata test.

Hugo Canonical

A canonical URL is the URL of the best representative page from a group of duplicate pages, according to Google. For example, if you have two URLs for the same page (such as example.com?dress=1234 and example.com/dresses/1234), Google chooses one as canonical. Similarly, if you have multiple pages that are nearly identical, Google can group them together (for example, pages that differ only by the sorting or filtering of the contents, such as by price or item color) and choose one as canonical.

Nginx - IP

sometimes, you wanna restrict access to a webserver based on ip addresses. here a little howto. Update nginx Config for your vhost and forward temporary/permanent to a sorry host. --->8- snip -8<--- location / { allow 192.0.2.0/24; allow 2001:db8::/32; deny all; error_page 403 =301 https://sorry.your.domain; } or move the ip’s to a dedicated file and include it here … --->8- snip -8<--- location / { include incl/admin_ip.txt; deny all; error_page 403 =301 https://sorry.

K8s - DigitalOcean

Deploy Sampleapp on Kuberentes … Prerequisite Domain “kubbi.xyz”, ns1.digitalocean.com, ns2, ns3 … Digital Ocean Login Doku https://docs.digitalocean.com/products/kubernetes/getting-started/operational-readiness/ Build Kubbi Cluster Build Cluster with WebGUI or CLI via CLI time doctl kubernetes cluster create prod001 --region fra1 --node-pool "size=s-2vcpu-2gb;auto-scale=true;min-nodes=3;max-nodes=5" FRA1 3 Nodes 2 CPU 2 GB RAM 60 GB Disk Costs: 54 USD/Mt! Connecting and managing this cluster doctl kubernetes cluster kubeconfig save 4375b470-ebe8-4ccb-925a-345df364dfbd user@mac % doctl kubernetes cluster kubeconfig save 4375b470-ebe8-4ccb-925a-345df364dfbd Notice: Adding cluster credentials to kubeconfig file found in "/Users/user/.

macos - vnstat

vnstat wanna install vnstat on your mac ? install brew install vnstat gsed and you’ll get the following Message after installation: ==> vnstat To monitor interfaces other than "en0" edit /opt/homebrew/etc/vnstat.conf To start vnstat now and restart at startup: sudo brew services start vnstat Or, if you don't want/need a background service you can just run: /opt/homebrew/opt/vnstat/bin/vnstatd --nodaemon --config /opt/homebrew/etc/vnstat.conf Service Location Let’s build a directory for the Database mkdir ~/Library/vnstat Path Depending where you’re config files got installed …

Python Versions

History Long time ago, there were huge discussions about Python 2.7 or Python 3.xx. Fortunately, these times are gone and we’ve all gotten over the hurdle to Python 3. But are you on 3.6, 3.7, 3.8 ? or even 3.11 or 3.12 ? That’s the current Version you should use for your daily Projects ? Status of Python versions A good indicator is this Website: https://devguide.python.org/versions/ OpenBSD It’s also recommended to check what our Operating System is installing by default, or what you can get from their Package Repository.

Monaspace

Monaspace Do you like it ? I do … Install macOS brew tap homebrew/cask-fonts brew install font-monaspace Any Comments ? sha256: 9f088f3023c2e5c26817ccddbfb49ea25dd6f08d0ba3ac6e7ca9038f0d2e2547