Install Homebrew prereqs:
xcode-select --install
Install Homebrew
$ # Use Live CD to boot | |
$ sudo su # Switch to root | |
$ fdisk -l # Get names of root, boot & EFI partition names. you can also use blkid | |
$ # http://dadadom.de/2020/04/11/fix-fedora-uefi-boot-with-encrypted-partitions/ | |
$ udiskctl unlock -b /dev/nvme0n1p6 # unlock root luks partition | |
$ mount /dev/mapper/fedora_fedora-root /mnt # mount root partition | |
$ mount /dev/mapper/fedora_fedora-var /mnt/var | |
$ mount /dev/nvme0n1p5 /mnt/boot # mount boot partition |
# Gawk version | |
# Remote | |
grep -v "rem_address" /proc/net/tcp | awk '{x=strtonum("0x"substr($3,index($3,":")-2,2)); for (i=5; i>0; i-=2) x = x"."strtonum("0x"substr($3,i,2))}{print x":"strtonum("0x"substr($3,index($3,":")+1,4))}' | |
# Local | |
grep -v "rem_address" /proc/net/tcp | awk '{x=strtonum("0x"substr($2,index($2,":")-2,2)); for (i=5; i>0; i-=2) x = x"."strtonum("0x"substr($2,i,2))}{print x":"strtonum("0x"substr($2,index($2,":")+1,4))}' | |
# No Gawk | |
# Local | |
grep -v "rem_address" /proc/net/tcp | awk 'function hextodec(str,ret,n,i,k,c){ |
sqlite3 /etc/pihole/gravity.db -header -csv 'select * from adlist' > adlist.csv | |
sqlite3 /etc/pihole/gravity.db -header -csv 'select * from vw_whitelist' > whitelist.csv | |
sqlite3 /etc/pihole/gravity.db -header -csv 'select * from vw_blacklist' > blacklist.csv |
When VPNs Just Work™, they're a fantastic way of allowing access to a private network from remote locations. When they don't work it can be an experience in frustration. I've had situations where I can connect to a VPN from my Mac, but various networking situations cause routing conflicts. Here are a couple of cases and how I've been able to get around them.
In this example the VPN we are connecting to has a subnet that does not conflict with our local IP, but has additional routes that conflict in some way with our local network's routing. In my example the remote subnet is 10.0.x.0/24, my local subnet is 10.0.y.0/24, and the conflicting route is 10.0.0.0/8. Without the later route, I can't access all hosts on the VPN without manually adding the route after connecting to the VPN:
Tutorial and tips for GitHub Actions workflows
#!/usr/bin/env bash | |
## Copyright (C) 2017, Oleksandr Kucherenko | |
## Last revisit: 2017-09-29 | |
# For help: | |
# ./versionip.sh --help | |
# For developer / references: | |
# https://ryanstutorials.net/bash-scripting-tutorial/bash-functions.php | |
# http://tldp.org/LDP/abs/html/comparison-ops.html |