Skip to content

Instantly share code, notes, and snippets.

View cliv's full-sized avatar

Charlie Livingston cliv

View GitHub Profile
@fjlopezs
fjlopezs / create_user.sh
Last active August 4, 2020 16:32 — forked from dimitardanailov/create_user.sh
Creating a Mac OS X user via shell script
#!/bin/sh
# https://apple.stackexchange.com/questions/82472/what-steps-are-needed-to-create-a-new-user-from-the-command-line/84039#84039
LastID=`dscl . -list /Users UniqueID | awk '{print $2}' | sort -n | tail -1`;
NextID=$((LastID + 1));
NewUser=administrator
. /etc/rc.common
dscl . create /Users/$NewUser
dscl . create /Users/$NewUser RealName "Admin"
# dscl . create /Users/$NewUser hint "Password Hint"
# curl -LJO "http://site.com/Picture.png"
@christrotter
christrotter / Filebeat-IIS-Setup.ps1
Last active June 7, 2017 17:45
Powershell install of filebeat for IIS in EC2
function PostToSlack {
Param([string]$message)
$wc = New-Object net.webclient
$wc.UploadString("https://hooks.slack.com/services/random/moreRandom", (ConvertTo-Json @{ text = ("$message") }))
}
###################################
### Modules ###
Import-Module WebAdministration
###################################