Skip to content

Instantly share code, notes, and snippets.

@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 / 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

# 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 {
@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
@juusujanar
juusujanar / Dockerfile
Last active August 15, 2017 11:35 — forked from mhubig/Dockerfile
Alpine Linux based cronjob runner
FROM alpine:latest
RUN apk add --update php python py-pip mysql-client \
&& pip install awscli \
&& rm -rf /var/cache/apk/*
RUN touch crontab.tmp \
&& echo '* */6 * * * /usr/bin/php /var/www/partkeepr/app/console partkeepr:cron:run' > crontab.tmp \
&& echo '0 2 * * * /usr/bin/sql_backup' >> crontab.tmp \
&& crontab crontab.tmp \