sudo lsblk
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |
Once in a while, you may need to cleanup resources (containers, volumes, images, networks) ...
// 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
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# 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 { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# /usr/local/share/usb_modeswitch/12d1:1f01 | |
# Huawei E353 (3.se) and others | |
TargetVendor=0x12d1 | |
TargetProductList="14db,14dc" | |
HuaweiNewMode=1 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 \ |