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 | |
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
Get-Service *Exchange* | Where-Object {$_.Status -eq "Stopped" -and $_.StartType -eq "Automatic"} | Start-Service |
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
# show services | |
Get-Service *Exchange* | where {($_.name -notlike "*imap5*") -and ($_.name -notlike "*pop3*")} | |
# start services | |
Get-Service *Exchange* | where {($_.name -notlike "*imap5*") -and ($_.name -notlike "*pop3*")} | Start-Service | |
# restart services | |
Get-Service *Exchange* | where {($_.name -notlike "*imap5*") -and ($_.name -notlike "*pop3*")} | Restart-Service |
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
https://web.whatsapp.com/send?phone=[1+phone_number]&text= |
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
<?xml version="1.0" encoding="UTF-8"?> | |
<page name="LSPad"> | |
<pad1 name="S1" color="color 'darkred'">padfx 'loopSequence' 0% </pad1> | |
<pad2 name="S2" color="color 'darkred'">padfx 'loopSequence' 15% </pad2> | |
<pad3 name="S3" color="color 'darkred'">padfx 'loopSequence' 30% </pad3> | |
<pad4 name="S4" color="color 'darkred'">padfx 'loopSequence' 45% </pad4> | |
<pad5 name="S5" color="color 'darkred'">padfx 'loopSequence' 60% </pad5> | |
<pad6 name="S6" color="color 'darkred'">padfx 'loopSequence' 75% </pad6> | |
<pad7 name="S7" color="color 'darkred'">padfx 'loopSequence' 90% </pad7> | |
<pad8 name="S8" color="color 'darkred'">padfx 'loopSequence' 100% </pad8> |
NewerOlder