Skip to content

Instantly share code, notes, and snippets.

Confirmation: bmffgag46bd6s - I am using TruAnon to claim my GitHub.
@juusujanar
juusujanar / wsl2-network.ps1
Created May 31, 2022 20:16 — forked from xmeng1/wsl2-network.ps1
WSL2 Port forwarding port to linux
New-NetFireWallRule -DisplayName 'WSL 2 Firewall Unlock' -Direction Inbound -LocalPort 4000 -Action Allow -Protocol TCP
New-NetFireWallRule -DisplayName 'WSL 2 Firewall Unlock' -Direction Outbound -LocalPort 4000 -Action Allow -Protocol TCP
netsh interface portproxy add v4tov4 listenport=4000 listenaddress=0.0.0.0 connectport=4000 connectaddress=172.18.226.134
@juusujanar
juusujanar / README.md
Created April 7, 2022 10:48 — forked from craftyc0der/README.md
Setup Snapper on Fedora 34

How to setup RAID1 with BTRFS on Fedora

Here we list our disks for future use.

sudo lsblk
@juusujanar
juusujanar / delete-all-devices-in-ttn-application.sh
Created December 8, 2021 14:34
Things Network CLI scripts
#!/bin/sh
applicationName=$1
ttn-lw-cli end-devices list $applicationName | jq -r '.[].ids.device_id' | xargs -L1 -I'{}' ttn-lw-cli end-devices delete $applicationName {}
@juusujanar
juusujanar / docker-cleanup-resources.md
Created November 12, 2021 09:40 — forked from bastman/docker-cleanup-resources.md
docker cleanup guide: containers, images, volumes, networks

Docker - How to cleanup (unused) resources

Once in a while, you may need to cleanup resources (containers, volumes, images, networks) ...

delete volumes

// see: https://github.com/chadoe/docker-cleanup-volumes

$ docker volume rm $(docker volume ls -qf dangling=true)

$ docker volume ls -qf dangling=true | xargs -r docker volume rm

@juusujanar
juusujanar / contacts.py
Created July 29, 2021 11:22
Generate CSV for importing into Google Contacts, containing known salesman phone numbers in Estonia
#!/usr/bin/env python3
numbers = [
"+3726980665",
"+3726980666",
"+3726980667",
"+3726980668",
"+3726980669",
"+3726980670",
"+3726980671",
"+3726980672",
# Gets the IP address of a computer via the MAC address. This will only work on LAN
# segments. By default we'll scan the ARP table, but then defer to an IP scan to
# as needed.
#
# Usage: $returnIpAddress = GetIPFromMAC "12-43-de-52-a9-99" "192.168.10."
# Pass in the mac address with dashes (-) as the first parameter
# Pass in an IP address with the last number missing, be sure to include the trailing "."
# Be sure to check the value if $returnIpAddress -eq $null to see if a value was actually returned
#
function GetIPFromMAC {
apiVersion: v1
data:
Corefile: |
.:53 {
errors
health {
lameduck 5s
}
ready
kubernetes cluster.local in-addr.arpa ip6.arpa {
@juusujanar
juusujanar / README.md
Created December 3, 2020 14:07
Go logging framework benchmark
@juusujanar
juusujanar / 12d1:1f01
Created July 10, 2020 10:07 — forked from elupus/12d1:1f01
Setup of e3372 modem on pfsense
# /usr/local/share/usb_modeswitch/12d1:1f01
# Huawei E353 (3.se) and others
TargetVendor=0x12d1
TargetProductList="14db,14dc"
HuaweiNewMode=1