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 boto3 | |
from datetime import datetime | |
import logging | |
logger = logging.getLogger() | |
logger.setLevel(logging.INFO) | |
def lambda_handler(event, context): |
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 pyzabbix import ZabbixAPI | |
import os | |
import json | |
import logging, sys | |
from pprint import pprint | |
# | |
# | |
# WARNING | |
# THIS |
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
{ | |
"annotations": { | |
"list": [ | |
{ | |
"$$hashKey": "object:1373", | |
"builtIn": 1, | |
"datasource": "-- Grafana --", | |
"enable": true, | |
"hide": true, | |
"iconColor": "rgba(0, 211, 255, 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
if(test-path C:\chef\){ | |
Write-Host "C:\chef exists!" | |
Start-Sleep -Seconds 3600 | |
} | |
Set-ExecutionPolicy unrestricted -force | |
$VerbosePreference = 'continue' | |
$InstallPS1 = "https://omnitruck.chef.io/install.ps1" | |
$InstallPS1LocalPath = "$env:temp\install-chef.ps1" | |
$orgName = 'CHEF ORG NAME' | |
$ChefPackageUri = 'https://packages.chef.io/files/stable/chef/12.21.31/windows/2012r2/chef-client-12.21.31-1-x64.msi' |
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 | |
} |
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
#!/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
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
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
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']: |