Shrink SQL Server Database

dbcc shrinkdatabase (DataBase) …

SQL Server Alter Database File Growth

ALTER DATABASE [DBNAME] MODIFY FILE ( NAME = N'LogicalFileName', FILEGROWTH = 10%) …

Execute Bash Script via PHP

<?php $message=shell_exec("/home/username/script.sh 2>&1"); print_r($message); ?> …

PowerShell Directory Comparison

$dir1 = "\\SERVER\e$\DIR\" $dir2 = "\\SERVER\e$\DIR\" $d1 = get-childitem -path $dir1 -recurse $d2 = get-childitem -path $dir2 -recurse $results = @(compare-object $d1 $d2) foreach($result in $results) { $result.InputObject } …

Graylog2 POST HTTP GELF via Windows CURL

Execute via PowerShell - Note all the annoying escapes. .\curl.exe -X POST "http://GRAYLOG-HOST:PORT/gelf" -p0 -d '{\"short_message\":\"Hello there\",\"host\":\"$hostname\",\"facility\":\"test\"}' -H "Content-Type: application/json" …

Digital Ocean API - Use Bash to Add DNS CNAME Record

curl -s "https://api.digitalocean.com/domains/YOUR-DOMAIN-ID/records/new?client_id=YOUR-CLIENT-ID&api_key=YOUR-API-KEY&record_type=CNAME&data=CNAME.YOURDOMAIN.COM&name=YOUR-NEW-RECORD" …