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
| #!/bin/bash | |
| # https://cloud.google.com/compute/docs/faq#find_ip_range | |
| # nslookup -q=TXT _cloud-netblocks.googleusercontent.com 8.8.8.8 | |
| myarray=() | |
| for LINE in `dig txt _cloud-netblocks.googleusercontent.com +short | tr " " "\n" | grep include | cut -f 2 -d :` | |
| do | |
| myarray+=($LINE) | |
| for LINE2 in `dig txt $LINE +short | tr " " "\n" | grep include | cut -f 2 -d :` |
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
| package main | |
| import ( | |
| "bufio" | |
| "errors" | |
| "fmt" | |
| "os" | |
| "os/exec" | |
| "strconv" | |
| "strings" |
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
| # /etc/udev/rules.d/99-usb-serial.rules | |
| # udevadm info --attribute-walk -n /dev/ttyUSB0 |grep serial (can be used to get serial number) | |
| # udevadm control --reload-rules (reload rules) | |
| # udevadm trigger (re-add all devices) | |
| # see https://wiki.archlinux.org/index.php/Bus_pirate | |
| # for some reason, ATTRS{bInterfaceNumber}=="00" is not working, hence the use of ENV{} | |
| # single USB/serial adapters | |
| SUBSYSTEM=="tty", ATTRS{serial}=="A900TUKZ", SYMLINK+="ttyUSB_bub_1" | |
| SUBSYSTEM=="tty", ATTRS{serial}=="A700fdWb", SYMLINK+="ttyUSB_bub_2" |
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
| #!/bin/bash | |
| cat /var/lib/dbus/machine-id && exit | |
| # Provided by dbus, hence available on all systemd systems. | |
| # Any user can read it and it is persistent accross boots. | |
| # It is unique per installation, and works well in VMs. | |
| # Not all systems (i.e. stage3 gentoo/handbook install) | |
| # have dbus installed by default. | |
| cat /sys/class/dmi/id/product_uuid && exit |
NewerOlder