Skip to content

Instantly share code, notes, and snippets.

oofnikj / tcpdump.log
Created January 23, 2021 08:55
DHCPv6 [odhcp6c]
View tcpdump.log
09:40:25.907561 02:42:c0:xx:xx:xx > 33:33:00:01:00:02, ethertype IPv6 (0x86dd), length 193: (flowlabel 0xca875, hlim 1, next-header UDP (17) payload length: 139) fe80::42:c0ff:fexx:xx.546 > ff02::1:2.547: [udp sum ok] dhcp6 solicit (xid=bc7f9b (elapsed-time 0) (option-request SIP-servers-domain SIP-servers-address DNS-server DNS-search-list SNTP-servers NTP-server AFTR-Name opt_67 opt_94 opt_95 opt_96 opt_82) (client-ID hwaddr type 1 0242c0xxxxxx) (reconfigure-accept) (Client-FQDN) (IA_NA IAID:1 T1:0 T2:0) (IA_PD IAID:1 T1:0 T2:0 (IA_PD-prefix ::/64 pltime:0 vltime:0)))
09:40:25.925243 00:13:5f:04:9c:d9 > 02:42:c0:xx:xx:xx, ethertype IPv6 (0x86dd), length 250: (class 0xe0, hlim 255, next-header UDP (17) payload length: 196) fe80::213:5fff:fe04:9cd9.547 > fe80::42:c0ff:fexx:xx.546: [udp sum ok] dhcp6 advertise (xid=bc7f9b (client-ID hwaddr type 1 0242c0xxxxxx) (server-ID hwaddr/time type 1 time 661197566 005056a7b22b) (IA_NA IAID:1 T1:1000 T2:2000 (IA_ADDR 2a00:7c40:ffcc:xx::xx pltime:3000 vltime:4000)) (DNS
oofnikj / .gitlab-ci.yml
Created August 26, 2020 06:08
GitLab multiarch docker build
View .gitlab-ci.yml
# GitLab multi-arch docker build template
- docker login -u $DOCKER_HUB_USER -p $DOCKER_HUB_TOKEN
- docker run --rm --privileged multiarch/qemu-user-static --reset -p yes
- docker buildx create --use
oofnikj / answerfile
Last active June 2, 2023 01:46
Install Docker on Termux
View answerfile
HOSTNAMEOPTS="-n alpine"
iface lo inet loopback
auto eth0
iface eth0 inet dhcp
hostname alpine
oofnikj / awsp.bash
Created July 3, 2020 20:15
awsp: AWS profile switcher
View awsp.bash
### This file is intended to be sourced from ~/.bashrc ###
# quickly switch between AWS profiles with auto-completion
# uses to obtain credentials
# if using static credentials, just comment out lines 13-15
awsp() {
if [[ -n $1 ]] ; then
# validate input
grep -q -w "\[profile ${1}\]" ~/.aws/config || { echo "No such profile $1"; return 1; }
oofnikj / totp
Created June 21, 2020 06:20
TOTP CLI generator
View totp
#!/usr/bin/env python
# put this file in your $PATH to generate TOTP from command line (don't forget to `chmod +x`)
import os
import sys
import pyotp
import pyperclip
oofnikj /
Last active May 2, 2023 11:37
Generate OpenWrt 19.07.2 EFI-compatible image
#!/usr/bin/env bash
# Generates an EFI-compatible x86-64 disk image for OpenWrt
# by combining the rootfs and kernel from the latest stable release
# with the EFI image available in snapshot since @a6b7c3e.
oofnikj /
Created January 24, 2020 07:18
network config

network config

HostA$ ip -d link
1: lo: <LOOPBACK,UP,LOWER_UP> mtu 65536 qdisc noqueue state UNKNOWN mode DEFAULT group default qlen 1000
    link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00 promiscuity 0 addrgenmode eui64 
2: eth0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc pfifo_fast master br0 state UP mode DEFAULT group default qlen 1000
    link/ether 94:c6:91:xx:xx:xx brd ff:ff:ff:ff:ff:ff promiscuity 1 
    bridge_slave state forwarding priority 32 cost 4 hairpin off guard off root_block off fastleave off learning on flood on addrgenmode eui64 
3: tun0: <POINTOPOINT,MULTICAST,NOARP,UP,LOWER_UP> mtu 1500 qdisc pfifo_fast state UNKNOWN mode DEFAULT group default qlen 100
    link/none  promiscuity 0 
# Script to reset wifi on a Raspberry Pi Zero W
# Outputs a message to systemd-journal every time it resets
# nothing else seemed to work
# Run it with crontab every minute
oofnikj /
Last active December 28, 2022 09:21
Arch linux install notes

Installing Arch

set up wireless networking

wpa_supplicant -B -i wlan0 -c <(wpa_passphrase *SSID *password*)
dhcpcd --ipv4only


  • use cfdisk:
oofnikj /
Last active December 28, 2022 09:22
Download and install latest google-cloud-sdk on Alpine / Debian / Ubuntu
#!/bin/sh -e
# Tested with various flavors of Alpine, Ubuntu and Debian. CentOS / RedHat not supported (yet).
# Use:
# wget -qO- | sh
which apt && apt update && apt install -y wget jq python3 ca-certificates --no-install-recommends || true