Skip to content

Instantly share code, notes, and snippets.


Sytone sytone

View GitHub Profile
View simplesetup.ps1
$toolingRoot = "c:\idt"
$runLog = "$toolingRoot\run.log"
if(-not (Test-Path $toolingRoot)) {
New-Item -Path $toolingRoot -ItemType Directory -Force -ErrorAction SilentlyContinue
"Running as $($Env:USERNAME) at $(Get-Date)" | Set-Content -Path $runLog
function log($message) {
$message | Add-Content -Path $runLog
sytone / .gitconfig
Last active Mar 23, 2020
Aliases I have in my global git config
View .gitconfig
# standard checkout
co = checkout
# edit the global configuration
ec = config --global -e
# edit the local repo configuration
ecl = config -e
sytone / Get-AdUserAllDomains.ps1
Created Sep 24, 2018
Get user in AD from all domains in the forest
View Get-AdUserAllDomains.ps1
param (
$arrayOfFQDNs = ([System.DirectoryServices.ActiveDirectory.Forest]::GetCurrentForest() | select domains).Domains | select Name | % { $_.Name }
foreach ($FQDN in $arrayOfFQDNs) {
$adUser = get-aduser -Filter $Filter -properties * -server $FQDN -ErrorAction SilentlyContinue
if ($adUser -ne $null) {
sytone / FillCalendarForPeriod.ps1
Last active Sep 13, 2018
Fill empty blocks in your outlook calendar for the next week
View FillCalendarForPeriod.ps1
param (
[int] $DaysForward = 7,
# What hour of the day do you start?
[int] $DayStart = 8,
# How many hours after that are work hours?
[int] $DayLength = 10
function Get-OutlookCalendar {
param (
sytone /
Last active Nov 6, 2016
Developing Home Asisstant in Windows on the Windows Subsystem for Linux


Enable the Windows feature for the subsystem. Either do this via Add Remove Programs or open a PowerShell instance as a Administrator.

Run the following command to see if it is already enabled:

Get-WindowsOptionalFeature -online -FeatureName Microsoft-Windows-Subsystem-Linux

If it is not enabled then run the following to enable and reboot your computer.

sytone /
Last active May 2, 2018
Home Assistant Updater Script
## DESCRIPTION: Updates HA in a virtual environment
## AUTHOR: Jon Bullen
declare -r SCRIPT_NAME=$(basename "$BASH_SOURCE" .sh)
## exit the shell(default status code: 1) after printing the message to stderr
bail() {
echo -ne "$1" >&2
sytone / BackfillEmbyFromNPvr.ps1
Last active Jul 30, 2016
Used to schedule recordings in Next PVR to fill missing items in EMBY.
View BackfillEmbyFromNPvr.ps1
Set these values and uncomment.
$embyServerUrl = "http://localhost:8096"
$embyUsername = "user"
$embyPassword = "password"
$npvrServerUrl = "http://localhost:8866"
sytone / JasperOnPiNotes.txt
Last active Mar 3, 2016
Get Jasper running on PI
View JasperOnPiNotes.txt
#Set sound card to my USB one by default.
sudo nano /etc/modprobe.d/alsa-base.conf
:: ADD to FILE
options snd-usb-audio index=0
options snd_bcm2835 index=1
# Audio record test.
arecord --vumeter=stereo test2.wav --device=sysdefault:CARD=HD5000
sytone / LinuxOnPiNotes.txt
Created Feb 27, 2016
Generic Linux on Pi things
View LinuxOnPiNotes.txt
Using Putty or Kitty and getting lines to draw.
The problem is that PuTTY in UTF-8 mode ignores1 VT100 "Alternate character set" commands, and ncurses attempts to use the "graphical" character set for drawing the GUI. (The box drawing characters are in the same positions as klmqx would normally be.)
to your environment, it should fix the problem by telling ncurses to always use Unicode box drawing characters when a UTF-8 locale is selected.
sytone / SqueezeboxPlayerNotes.txt
Last active May 24, 2016
Raspberry Pi as a Squeezebox Player
View SqueezeboxPlayerNotes.txt
# Sound test setup
aplay -L
speaker-test -D sysdefault:CARD=Device
# Get out of jail free card
# sudo /etc/init.d/alsa-utils reset
# alsa configuration
sudo nano /usr/share/alsa/alsa.conf
You can’t perform that action at this time.