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
| check host gateway with address 192.168.1.1 | |
| restart program = "/usr/bin/systemctl restart NetworkManager.service" | |
| if failed | |
| port 443 | |
| protocol https | |
| timeout 10 seconds | |
| retry 3 | |
| with ssl options {verify: disable} | |
| then restart |
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 | |
| for device in /sys/bus/usb/devices/*; do | |
| grep "NIC" "$device/product" &>/dev/null | |
| if [ "$?" == 0 ]; then | |
| echo -n "Resetting " | |
| cat "$device/product" | |
| sh -c "echo 0 > $device/authorized" | |
| sh -c "echo 1 > $device/authorized" | |
| echo "Device reset." |
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
| echo '' > "/Library/Group Containers/group.com.apple.AppleSpell/Library/Spelling/LocalDictionary" |
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
| check network WIFI with interface wlan0 | |
| restart program = "/usr/sbin/service networking restart" | |
| if failed link then restart |
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
| find /volume1/scanned -type d \( -path '**/@eaDir' -o -path '**/#recycle' \) -prune -o -type f -newer /volume1/paperless/sync_last_run.lock -print | sed 's/\/volume1\/scanned\///g' > /volume1/paperless/sync_last_run.log | |
| touch /volume1/paperless/sync_last_run.lock | |
| rsync --files-from=/volume1/paperless/sync_last_run.log /volume1/scanned /volume1/paperless/consume |
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
| * * * * * pi raspistill -n -q 80 -w 960 -h 720 -e jpg -t 1000 -o - | curl -v -H 'Token: TOKEN' -H 'Content-Type: application/jpg' -H 'Fingerprint: FINGERPRINT' https://webcam.connect.prusa3d.com/c/snapshot -T - |
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 | |
| openssl s_client -servername token.actions.githubusercontent.com -showcerts -connect token.actions.githubusercontent.com:443 2>/dev/null < /dev/null | \ | |
| openssl x509 -fingerprint -sha1 -noout | \ | |
| grep Fingerprint | \ | |
| tr -d ':' | \ | |
| tr '[:upper:]' '[:lower:]' | \ | |
| cut -f2 -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
| locals { | |
| public_zones = { | |
| "domainone.egg" = "FEEDFACEBEEF" | |
| "domaintwo.egg" = "BEEFBEEFFACE" | |
| "domainthree.egg" = "FACEFEEDFACE" | |
| } | |
| } | |
| resource "aws_default_vpc" "default" {} |
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
| locals { | |
| www_zones = { | |
| "www.domainone.egg" = "FEEDFACEBEEFFEED" | |
| "www.domaintwo.egg" = "BEEFBEEFFEEDFACE" | |
| "www.domainthree.egg" = "FACEFACEFEEDFACE" | |
| } | |
| } | |
| resource "aws_s3_bucket" "redirect-www-bucket" { | |
| for_each = local.www_zones |
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
| function getIPv4Range(networkString) { | |
| const networkdef = networkString.split('/'); | |
| const netmask = parseInt(networkdef[1]) | |
| const bitmask = 32 - netmask; | |
| const quads = networkdef[0].split('.'); | |
| const addrbin = | |
| (parseInt(quads[0]) << 24) + | |
| (parseInt(quads[1]) << 16) + | |
| (parseInt(quads[2]) << 8) + | |
| parseInt(quads[3]); |
NewerOlder