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 subprocess | |
import datetime | |
# PARAMETERS | |
powershell_exe = 'C:\\Windows\\system32\\WindowsPowerShell\\v1.0\\powershell.exe' | |
def custom_print(severity, message): | |
print('{0} - [{1}] - {2}'.format(datetime.datetime.now(), severity, message)) | |
def createFolder(path, name): |
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
#!/bin/bash | |
# Add to crontab for periodic check: | |
# Storj disk check every 4 hours - remounts and restarts storagenode if disk is unavailable | |
# 0 */4 * * * /bin/bash /root/scripts/storj_disk_check.sh | |
# Variables | |
SCRIPT_NAME=`basename "$0"` | |
SCRIPT_DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" &> /dev/null && pwd )" | |
LOG_FILE="$SCRIPT_DIR/$(echo $SCRIPT_NAME | cut -d'.' -f1).log" |
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, hmac, hashlib, time, requests | |
import numpy as np | |
from requests.auth import AuthBase | |
import matplotlib.pyplot as plt | |
# Name of account holder (only for displaying) | |
USER = 'My name' | |
# API key and secret. Create these in your Coinbase account with all read permissions selected for all accounts | |
API_KEY = 'xxx' |
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 uuid | |
import random | |
import base64 | |
def generateThreadIndex(seed): | |
# Generates a Microsoft Outlook thread index based on a seed. | |
# Add the thread index with the 'Thread-Index' header when sending an email to group the emails into conversations | |
rd = random.Random() | |
rd.seed(seed) |