I hereby claim:
- I am mtrimarchi on github.
- I am mtrimarchi (https://keybase.io/mtrimarchi) on keybase.
- I have a public key ASC0bKswvvtpyABcGRV7cI8869hG5R1yn4bVfq1Y1OPMwAo
To claim this, I am signing this object:
| Verifying that +mtrimarchi is my blockchain ID. https://onename.com/mtrimarchi |
I hereby claim:
To claim this, I am signing this object:
| <?php | |
| /** | |
| * | |
| * PinDecrypt - Convert encrypted data with DES_ECB using a key | |
| * | |
| * @param String $Key - The key with which the data was encrypted. | |
| * If the provided key size is not supported by the cipher, | |
| * the function will emit a warning and return FALSE | |
| * @param String $Data - The data that will be decrypted with the given cipher and mode. |
| #!/bin/sh | |
| # Debian 7 MIPS Toolchain | |
| ARCH=${ARCH:-mips} | |
| # Update | |
| mkdir /usr/src/$ARCH-toolchain && cd /usr/src/$ARCH-toolchain | |
| apt-get update | |
| apt-get upgrade |
Enable systemd-networkd-wait-online
systemctl enable systemd-networkd-wait-online.service
And modify /usr/lib/systemd/system/keepalived.service
find . -type f -name "*.conf" -print0 | xargs -0 sed -i "s/foo/bar/g"
| <?php | |
| /** | |
| * alertPapertrail.php | |
| */ | |
| // Require https://github.com/Eleirbag89/TelegramBotPHP | |
| include 'Telegram.php'; | |
| // Set the bot TOKEN |
| function U | |
| { | |
| param | |
| ( | |
| [int] $Code | |
| ) | |
| if ((0 -le $Code) -and ($Code -le 0xFFFF)) | |
| { | |
| return [char] $Code |
If you're coming to this page in search of jq related AWS commands, but come from xpath or e4x (jsonpath) domains, then you may find this article helpful: https://github.com/stedolan/jq/wiki/For-JSONPath-users.
Another good learning site: https://shapeshed.com/jq-json/
The jq playground (live testing): https://jqplay.org
A lovely tutorial: https://programminghistorian.org/lessons/json-and-jq
| # request all prefixes for a specific AS | |
| # ARGS: AS | |
| # example: $ prefixes AS123 | |
| function prefixes() { | |
| curl -sS https://stat.ripe.net/data/announced-prefixes/data.json\?resource\=$1 | TODAY_DATE=$(date -u +"%Y-%m-%d") jq --raw-output --arg v "$TODAY_DATE" '.data | .prefixes[] | select(.timelines[].endtime | startswith($v)) | select(.prefix|test(":")|not) | .prefix' | |
| } | |
| # aggregate prefixes for a specific AS | |
| # dependency: from https://github.com/lamehost/aggregate-prefixes/ |