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 . -iregex ".*.\(mp4\|mkv\)" -exec ~/medialanguage.sh "{}" \; | jq '. | select(.Languages | index("English") | not)' |
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
#!/usr/bin/env bash | |
mkdir -p /etc/systemd/system/amazon-ssm-agent.service.d | |
echo "[Service]" > /etc/systemd/system/amazon-ssm-agent.service.d/override.conf | |
echo 'Environment="https_proxy=http://proxy:3128"' >> /etc/systemd/system/amazon-ssm-agent.service.d/override.conf | |
echo 'Environment="http_proxy=http://proxy:3128"' >> /etc/systemd/system/amazon-ssm-agent.service.d/override.conf | |
echo 'Environment="no_proxy=169.254.169.254"' >> /etc/systemd/system/amazon-ssm-agent.service.d/override.conf | |
chmod 777 /etc/systemd/system/amazon-ssm-agent.service.d/override.conf | |
systemctl stop amazon-ssm-agent | |
systemctl daemon-reload | |
systemctl restart amazon-ssm-agent |
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 sys | |
import boto3 | |
import datetime | |
cw = boto3.client('cloudwatch') | |
list_metrics_paginator = cw.get_paginator('list_metrics') | |
function_stats = [] |
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 dynamodb scan --table-name TABLE > export.json | |
import json | |
import boto3 | |
dynamo = boto3.client('dynamodb') | |
TABLE_NAME = 'TABLE_NAME' | |
JSON_PATH = '/Users/USERNAME/git/GitHub/dynamodump/export.json' | |
with open(JSON_PATH, 'r') as file: | |
data = file.read() | |
parsed_file = json.loads(data) | |
for item_to_import in parsed_file['Items']: |
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 json | |
from bson import json_util # pip install pymongo | |
from datetime import datetime | |
from rightmove_webscraper import rightmove_data | |
class rightmove_list(list): | |
def __init__(self, rightmove_object_results): | |
new_list = [] | |
for key in rightmove_object_results.keys(): |
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
from __future__ import division | |
import sys | |
import collections | |
import boto3 | |
import pprint | |
import re | |
from datetime import datetime, timedelta | |
ec2 = boto3.client('ec2', region_name='eu-west-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
#!/usr/bin/env python2 | |
from __future__ import print_function | |
import sys, re | |
from pprint import pprint | |
from collections import OrderedDict | |
import sys | |
def eprint(*args, **kwargs): | |
print(*args, file=sys.stderr, **kwargs) |
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
$RadarrURL = 'http://127.0.0.1:7878' | |
$RadarrAPIKey = 'aaaaaaaaaaaaaaaaaaaaaaaaaaaa' | |
#$MovieName = "I Called Him Morgan" | |
$qualityProfileId = 1 | |
$rootFolderPath = '/data/Movies/' | |
$rottenTomatoesLink = 'https://www.rottentomatoes.com/top/bestofrt/?year=2017' | |
function Search-RadarrForFilm{ |
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
$Server='192.168.1.9:32400' | |
$PlexToken = 'FGir5aQ5yfpRZZ4ZqxAg' | |
$libraries = Invoke-RestMethod -Uri "http://$server/library/sections/all?X-Plex-Token=$PlexToken" | |
$VideoLibraries = $libraries.MediaContainer.Directory | ?{$_.type -eq 'show'} | |
$Resolutions = @{ | |
"sd" = 1 | |
"420" = 10 | |
"720" = 20 | |
"1080" = 30 | |
} |
NewerOlder