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
| aws s3 ls s3://<bucket>/AWSLogs/<accountnumber>/elasticloadbalancing/<region>/2019/10/ --recursive | grep <search-string> | awk '{print $4}'| xargs -I FNAME sh -c 'aws s3 cp s3://<bucket-name>/AWSLogs"$FNAME" .' |
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 ./production/ -name "*-schema.sql" -print | xargs sed -ri 's/CREATE\sTABLE\s`([a-zA-Z0-1_]+)`\s/DROP TABLE IF EXISTS `\1`;\nCREATE TABLE `\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
| import nodemailer from "nodemailer"; | |
| import { defaultProvider } from "@aws-sdk/credential-provider-node"; | |
| import sesClient from "@aws-sdk/client-ses"; | |
| async function wrapedSendMail(mailOptions){ | |
| return new Promise((resolve,reject)=>{ | |
| const ses = new sesClient.SES({ | |
| apiVersion: "2010-12-01", | |
| defaultProvider, | |
| }); |
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
| TOKEN="XXXX" # Telegram both token | |
| IDF="XXX" # DM / GROUP ID 1 | |
| IDS="XXX" # DM / GROUP ID 2 | |
| URL="https://api.telegram.org/bot$TOKEN/sendMessage" | |
| LOCATION1=5020 # Blaine | |
| LOCATION2=16764 # Blaine New | |
| PREV1="" | |
| PREV2="" |
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
| <# | |
| .SYNOPSIS | |
| Color-coded Windows Internet Connectivity Diagnostic (read-only) | |
| .DESCRIPTION | |
| Prints quick PASS/FAIL checks in color and writes a detailed report to C:\Temp. | |
| Checks: adapter up, IP/default gateway, DNS resolve, TCP 443, HTTP/HTTPS fetch, | |
| proxy (user + winhttp), VPN-ish adapters, NCSI hints. | |
| #> |
OlderNewer