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
@ECHO OFF | |
REM | This script will take all files and subdirectories in | |
REM | C:\Source and copy them into a new folder called "Config" in | |
REM | all subdirectories of C:\Dest. If there are no subdirectories, | |
REM | nothing will happen | |
REM | | |
REM | ie - C:\Source\*.* will be copied to C:\Dest\Folder\Config\*.* | |
REM | assuming "Folder" was a preexisting subdirectory | |
REM :: Define Variables Here :: |
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
@ECHO OFF | |
for /f "usebackq" %%x in (`powershell "get-date -f yyyy-MM-dd_HH:mm:ss"`) do set datetimestamp=%%x | |
echo %datetimestamp% | |
pause |
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
<# | |
Script: newvm.ps1 | |
Description: Script to automagically create new VM from a template VM | |
Usage from CMD: powershell -noexit "& "newvm.ps1" | |
#> | |
## Configure Variables Here ## | |
[String]$templateVMName = "Template.vhdx" | |
[String]$templateVMPath = "D:\Hyper-V\VHD\" | |
[String]$setNIC = "Broadcom Netxtreme 57xx Gigabit Controller - Virtual Switch" |
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
openssl pkcs12 -in ./cert.pfx -clcerts -nokeys -out public.crt | |
openssl pkcs12 -in ./cert.pfx -nocerts -nodes -out private.rsa | |
cat public.crt ca-bundle.crt >> bundle.crt |
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
for f in /etc/init.d/redis*; do $f status; done |
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
REM Delete all Websites | |
%windir%\system32\inetsrv\appcmd list site /xml | %windir%\system32\inetsrv\appcmd delete site /in | |
REM Delete all App Pools | |
%windir%\system32\inetsrv\appcmd list apppool /xml | %windir%\system32\inetsrv\appcmd delete apppool /in | |
REM Export all the Application Pools: | |
%windir%\system32\inetsrv\appcmd list apppool /config /xml > C:\apppools.xml | |
REM Import all the Application Pools: |
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
tar -cvzf filename.tar.gz -C /path/to/archive . |
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
<# | |
Name: makewebm.ps1 | |
Version: 1.0 | |
Description: This script will take all image files in a folder and automagically generate a webm video file using some open source tools. | |
Usage: | |
powershell "& "C:\Scripts\makewebm.ps1" | |
Required Binaries: | |
- vpxenc.exe: https://github.com/balistof/NVP8/tree/master/vpx-vp8-debug-src-x86-win32mt-vs9-v1.0.0/bin/Win32 |
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 | |
iptables -F #Warning. Removes all rules | |
iptables --delete-chain trustedIPs | |
iptables -A INPUT -m state --state ESTABLISHED,RELATED -j ACCEPT | |
iptables -A INPUT -p tcp --dport ssh -j ACCEPT | |
iptables -N trustedIPs | |
iptables -A trustedIPs --src 1.1.1.1/32 -j ACCEPT #CIDR example | |
iptables -A trustedIPs --src 2.2.2.2 -j ACCEPT #Single IP Example | |
iptables -A INPUT -j DROP |
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/python | |
# Modified from https://github.com/fake-name/DSP-W215-Poller | |
import time | |
import urllib.parse | |
import urllib.request | |
import random | |
DSP_OUTLET_IP = '192.168.1.2' | |
UPDATE_INTERVAL = 2 |