Create new sudo user with home dir
sudo useradd -d /home/<user> -s /bin/bash -m <user>
sudo usermod -a -G sudo <user>
SSH key
sudo chown <user> -R /home/<user>/.ssh
sudo chmod 700 /home//.ssh
New-PSDrive -Name HKCR -PSProvider Registry -Root HKEY_CLASSES_ROOT -ErrorAction SilentlyContinue | Out-Null | |
$count = 0 | |
try { | |
Get-ChildItem HKCR: -ErrorAction SilentlyContinue | ForEach-Object { | |
if((Get-ItemProperty $_.PSPath -ErrorAction SilentlyContinue).PSObject.Properties.Name -contains "URL Protocol") { | |
$name = $_.PSChildName | |
$count += 1 | |
$line = "URI Handler {0:d4}: {1}" -f $count, $name | |
Write-Host $line | |
} |
#!/usr/bin/env osascript | |
-- Version 2, now with attachments! | |
-- Note, the first couple times you run this script, the Messages app may prompt you to approve a couple things, one of which will be the ability to send SMS messages through your phone | |
-- Run via osascript on the command line like this: | |
-- osascript sendText.scpt --to ########## "this is" "a text message" --attachment "/path/to/image.png" "sent via applescript" | |
-- Where ########## is the phone number to send to | |
-- If you leave out `--to ##########`, it defaults to the value of an environment variable named MYPHONE in your .bashrc file (add the line "export MYPHONE=##########" to ~/.bashrc, entering your default phone number in place of ##########) | |
-- The 3 quoted strings will appear on separate lines and the image will be inserted between the lines "a text message" and "sent via applescript" | |
on run argv |
Create new sudo user with home dir
sudo useradd -d /home/<user> -s /bin/bash -m <user>
sudo usermod -a -G sudo <user>
SSH key
sudo chown <user> -R /home/<user>/.ssh
sudo chmod 700 /home//.ssh