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
REM Rules are from here: http://www.veeam.com/kb1518 | |
REM On Hyper-V Host Server open these ports | |
netsh advfirewall firewall add rule name="VEEAM Backup and Replication TCP" dir=in action=allow protocol=TCP localport=135,137-139,445 | |
netsh advfirewall firewall add rule name="VEEAM Backup and Replication UDP" dir=in action=allow protocol=UDP localport=135,137-139,445 | |
netsh advfirewall firewall add rule name="VEEAM Installer Service" dir=in action=allow protocol=TCP localport=6160 | |
netsh advfirewall firewall add rule name="VEEAM Backup Proxy Service" dir=in action=allow protocol=TCP localport=6162 | |
netsh advfirewall firewall add rule name="VEEAM vPower NFS Service" dir=in action=allow protocol=TCP localport=6161 | |
netsh advfirewall firewall add rule name="VEEAM vPower NFS Service" dir=in action=allow protocol=TCP localport=6161 | |
netsh advfirewall firewall add rule name="VEEAM Standard NFS Ports TCP" dir=in action=allow protocol=TCP localport=111,2049-2059,1058-1068 | |
netsh advfirewall firewall add rule name="VEEAM Stand |
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
def get_or_create(session, model, **kwargs): | |
''' | |
Creates an object or returns the object if exists | |
credit to Kevin @ StackOverflow | |
from: http://stackoverflow.com/questions/2546207/does-sqlalchemy-have-an-equivalent-of-djangos-get-or-create | |
''' | |
instance = session.query(model).filter_by(**kwargs).first() | |
if instance: | |
return instance | |
else: |
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 | |
# Update library | |
curl --data-binary '{ "jsonrpc": "2.0", "method": "VideoLibrary.Scan", "id": "mybash"}' -H 'content-type: application/json;' http://localhost:8080/jsonrpc | |
# Clean library | |
curl --data-binary '{ "jsonrpc": "2.0", "method": "VideoLibrary.Clean", "id": "mybash"}' -H 'content-type: application/json;' http://localhost:8080/jsonrpc | |
# Export library to separate files: | |
curl --data-binary '{ "jsonrpc": "2.0", "method": "VideoLibrary.Export", "params": { "options": { "overwrite": false, "actorthumbs": false, "images": true } }, "id": 1 }' -H 'content-type: application/json;' http://localhost:8080/jsonrpc |
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
/* | |
GPC Online Library | |
COD Black Ops 3(BO3) Script | |
============================================================================= | |
Device: Titan One | |
Author: Terry (aka UK_Wildcats_Fans) | |
Game: Call of Duty Black Ops 3 (BO3) | |
System: PlayStation 4 (PS4) | |
Controller: DualShock 4 (DS4) |
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 requests | |
from requests.auth import HTTPDigestAuth | |
def get_json(cgi, user, password, headers={'Accept': 'application/json'}): | |
response = requests.get(cgi, auth=HTTPDigestAuth(user, password), headers) | |
response_json = response.json() | |
return response | |
# in the case of Heatmap, if want to get key values, | |
# heatmap_response_json['HeatMap'][0].keys() |
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
<# | |
Script to reset user folder permissions. | |
Uses: icacls.exe and takeown.exe | |
Tested on Server 2008 R2 X64 | |
For all folders in base folder: | |
1. Recursively resets owner to Administrators | |
2. Reset folder to inherit permissions and apply to subfolders/files, clearing any existing perms | |
3. Add user (based on folder name) with full control and apply to subfolders/files | |
4. Recursivley reset owener to user (based on folder name) | |
#> |
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
^(?!([0-9a-f]{2}[:-]){5}([0-9a-f]{2})).* |
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/sh | |
# add extension to all files in this path | |
find . -type f ! -name "*.*" -exec mv {} {}.mp4 \; |
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/sh | |
# add extension to all files in this path | |
find . -type f ! -name "*.*" -exec mv {} {}.mp4 \; |
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
# Backup | |
docker exec CONTAINER /usr/bin/mysqldump -u root --password=root DATABASE > backup.sql | |
# Restore | |
cat backup.sql | docker exec -i CONTAINER /usr/bin/mysql -u root --password=root DATABASE | |
NewerOlder