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/sh | |
fio --name=seqread --rw=read --direct=1 --ioengine=libaio --bs=8k --numjobs=8 --size=1G --runtime=600 --group_reporting | |
rm -f seq* | |
fio --name=seqwrite --rw=write --direct=1 --ioengine=libaio --bs=32k --numjobs=4 --size=2G --runtime=600 --group_reporting | |
rm -f seq* | |
fio --name=randread --rw=randread --direct=1 --ioengine=libaio --bs=8k --numjobs=16 --size=1G --runtime=600 --group_reporting | |
rm -f rand* | |
fio --name=randwrite --rw=randwrite --direct=1 --ioengine=libaio --bs=64k --numjobs=8 --size=512m --runtime=600 --group_reporting | |
rm -f rand* | |
fio --name=randrw --rw=randrw --direct=1 --ioengine=libaio --bs=16k --numjobs=8 --rwmixread=90 --size=1G --runtime=600 --group_reporting |
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/sh | |
set -e | |
echo Pulling latest image... | |
docker pull webdevops/php-apache-dev:7.4-alpine | |
echo Pruning old images... | |
docker image prune -f | |
[ -f ".docker-dev-server" ] && LOCALPORT=$(cat .docker-dev-server | tr -d " \t\n\r" ) | |
[ ! -z "$LOCALPORT" ] && PORTPARAM="$LOCALPORT:443" | |
[ -z "$PORTPARAM" ] && PORTPARAM=443 | |
WSLIP=$(ip addr show dev eth0 | grep "inet " | cut -f6 -d" " | cut -f1 -d/) |
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
This info is scarce on the web, so I'm posting it here for future reference: | |
1. Boot with a Linux LiveCD (eg: System-Rescue-CD). | |
2. Open the disk with cfdisk. | |
3. Change the partition type of the data partitions from Microsoft Dynamic Data to Microsoft Basic Data. | |
4. Delete the Microsoft LDM Metadata reserved partition | |
5. Delete the Microsoft Reserved partition (the LDM metadata partition is carved out of the Microsoft reserved partition | |
when the disk is converted from basic to dynamic, and what's left becomes a new Microsoft reserved partition). | |
6. Restart and boot with Windows Installation DVD, then enter the console (SHIFT+10). | |
7. DISKPART, SELECT the correct disk, you'll notice it is no longer considered a dynamic disk, but a basic GPT disk. |
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
param ( | |
[Parameter(Mandatory=$true)][string] $oldIp, | |
[Parameter(Mandatory=$true)][string] $newIp) | |
$zones = Get-DnsServerZone | |
$zoneNames = $zones | Select-Object -Property ZoneName | |
ForEach ($zoneName in $zoneNames) { | |
$records = Get-DnsServerResourceRecord $zoneName.ZoneName -RRType "A" | |
ForEach ($record in $records) { | |
If ($record.RecordData.IPv4Address -eq $oldIp) { |
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 file is replacement for the old WebMatrix / IIS Express / PHP stack | |
REM Put this file in %AppData%\Microsoft\Windows\SendTo | |
If NOT "%1"=="" cd /D "%2" | |
Echo Pulling latest image... | |
docker pull webdevops/php-apache-dev:7.4-alpine | |
Echo Pruning old images... | |
docker image prune -f | |
If exist .docker-dev-server for /F "usebackq tokens=1" %%i IN (`type .docker-dev-server`) Do SET LOCALPORT=%%i |
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/sh | |
BAND=${1:?Specify BAND (eg: 1, 3, 5, 7, 28) or 0 to unlock} | |
if [ "$BAND" != "0" ]; then | |
FREQ=${2:?Specify DL Frequency x 10 (eg: 18484 for 1848.4 MHz)} | |
PCI=${3:?Specify tower PCI} | |
else | |
echo "./balong-nvtool -m 53810:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00" | |
exit | |
fi |
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/sh | |
INTERVAL=10 | |
PACKETS=1 | |
USINGWAN=0 | |
WAN1=ppp0 | |
WAN2=eth3 | |
# We'll run this in the intervals given above | |
while sleep $INTERVAL | |
do |
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
hdiutil create -o /tmp/HighSierra.cdr -size 5530m -layout SPUD -fs HFS+J | |
hdiutil attach /tmp/HighSierra.cdr.dmg -noverify -mountpoint /Volumes/install_build | |
sudo /Applications/Install\ macOS\ High\ Sierra.app/Contents/Resources/createinstallmedia --volume /Volumes/install_build | |
mv /tmp/HighSierra.cdr.dmg ~/Desktop/InstallSystem.dmg | |
hdiutil detach /Volumes/Install\ macOS\ High\ Sierra | |
hdiutil convert ~/Desktop/InstallSystem.dmg -format UDTO -o ~/Desktop/HighSierra.iso | |
mv ~/Desktop/HighSierra.iso.cdr ~/Desktop/HighSierra.iso | |
rm ~/Desktop/InstallSystem.dmg |
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
' Source: http://www.anchor.com.au/hosting/dedicated/monitoring_windows_software_raid | |
' Software RAID status check script | |
Option Explicit | |
Dim WshShell, oExec | |
Dim Line, RE0, RE1, RE2, RE3 | |
Dim Failed | |
Failed = -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
#!/usr/bin/env python3 | |
# This Nagios plugin may be used to check the health of an RDP server, such | |
# as a Windows host offering remote desktop. Typically, a "strange" RDP | |
# response is a good indication of a Windows host is having trouble (while | |
# it is still responding to ping). | |
# It seems that the RDP protocol is based on a protocol called X.224, | |
# and this plugin only goes as far as checking very basic X.224 | |
# protocol operations. Hence, the somewhat strange name of the plugin. |
NewerOlder