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
sudo apt install python3-virtualenv | |
virtualenv kasa | |
source ~/kasa/bin/activate | |
pip3 install python-kasa | |
# Turn off indicator light | |
kasa --host 192.168.1.65 led 0 | |
# Turn on indicator light | |
kasa --host 192.168.1.65 led 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
--- | |
# Example hosts file for https-certificate-check lambda. | |
# https://github.com/joehack3r/aws/tree/master/lambdas/https-certificate-check | |
hosts: | |
- www.facebook.com | |
- www.google.com | |
- www.ssllabs.com | |
- www.verisign.com | |
- doesnotexist.foo |
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 python | |
import re | |
import requests | |
import json | |
import calendar | |
from datetime import datetime, timedelta | |
_days_to_keep = 180 | |
_token = "" |
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 | |
if [ -n "$1" ]; then | |
minutesBeforeTerminate=$1 | |
else | |
minutesBeforeTerminate=1440 | |
fi | |
decimal=0 | |
secondsUptime=`awk {'print $1'} /proc/uptime` |
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 python | |
# This is how I used to write Python scripts. I'm trying to improve: | |
# https://github.com/joehack3r/aws/blob/master/scripts/s3/getS3BucketSize.py | |
import argparse | |
import boto | |
# Arguments | |
parser = argparse.ArgumentParser(description='Calcualte S3 bucket size in GB') |
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 ruby | |
require 'rubygems' | |
require 'uri' | |
require 'net/https' | |
require 'json' | |
api_key='' | |
app_key='' | |
uri = URI.parse("https://app.datadoghq.com") |