This file contains 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 os | |
import boto3 | |
import time | |
from datetime import datetime | |
import urllib.request | |
import json | |
def round_minute(date: datetime = None, round_to: int = 1): |
This file contains 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 sys | |
import re | |
import time | |
import argparse | |
import logging | |
import psutil | |
import statsd | |
import requests | |
import os |
This file contains 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
// ==UserScript== | |
// @name aws-format-sso | |
// @namespace signin.aws.amazon.com | |
// @description reformats that page | |
// @include https://signin.aws.amazon.com/saml | |
// @version 1.2 | |
// @grant none | |
// ==/UserScript== | |
$('#saml_form').css('max-width', '500px'); | |
$('fieldset').css('width', '500px'); |
This file contains 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 | |
set -e -u | |
FILE=$1 | |
NAME=$(echo "$FILE" | sed 's/\.[^.]*$//') | |
EXTENSION=$(echo "$FILE" | sed 's/^.*\.//') | |
rm -rf $NAME | |
rm -rf $NAME.zip |
This file contains 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 | |
curl 'https://172.16.0.223:8443/api/login' --data '{"username":"admin","password":"password"}' --compressed --insecure -c cookies.txt -b cookies.txt -sS |jq . | |
curl 'https://172.16.0.223:8443/api/s/default/cmd/devmgr' --data-binary '{"cmd":"speedtest"}' --compressed --insecure -c cookies.txt -b cookies.txt -sS | jq . |
This file contains 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
### put the 3 files anywhere in and run as /path/to/files/merge BRANCH | |
#!/bin/sh | |
#findup | |
pwd="`pwd`" | |
start="$pwd" | |
while [ ! "$pwd" -ef .. ]; do | |
[ -e "$1" ] && echo -n "$pwd" && exit | |
cd .. || exit 1 | |
pwd="`pwd`" |
This file contains 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
#!/usr/bin/env bash | |
for a in `ls -1 /sys/class/net/` | |
do | |
declare pre_${a}_rxbytes=`cat /sys/class/net/$a/statistics/rx_bytes` | |
declare pre_${a}_txbytes=`cat /sys/class/net/$a/statistics/tx_bytes` | |
done | |
while true |