Skip to content

Instantly share code, notes, and snippets.


Travis Illig tillig

View GitHub Profile
tillig /
Last active Jul 29, 2020
Automated environment setup for Mac
# Check that Homebrew is installed and install if not
if test ! $(which brew)
echo " Installing Homebrew for you."
ruby -e "$(curl -fsSL" > /tmp/homebrew-install.log
# Prep for Homebrew install
echo " Taking ownership of pkgconfig"
sudo chown -R $(whoami) /usr/local/lib/pkgconfig
tillig / Switch-NodeJs.ps1
Last active Oct 19, 2020
Switch versions of Node.js using Homebrew
View Switch-NodeJs.ps1
# From
# See node versions
brew search node
# Remove the existing symlinks
brew unlink node
# Install node at specific version
tillig / UnitTest.sublime-commands
Created Mar 15, 2019
User-level script to convert NUnit test fixtures to Xunit with simple regex replacement.
View UnitTest.sublime-commands
"caption": "Unit Test: NUnit to XUnit",
"command": "nunit_to_xunit"
"caption": "Unit Test: NUnit to XUnit (Batch)",
"command": "nunit_to_xunit_batch"
tillig / Install-DotnetCliTools.ps1
Created Mar 5, 2019
PowerShell script for installing/updating my dotnet CLI global tools
View Install-DotnetCliTools.ps1
# Tool lists:
$tools = @(
tillig /
Last active Jul 9, 2019
Helpful snippets for working with kubectl


Get all pod names in a namespace:

kubectl get pods -n mynamespace -o jsonpath='{}'


Delete all running pods in a namespace:

tillig /
Last active Jan 23, 2019
Pi Lights install/update script
sudo apt-get update
sudo apt-get upgrade -y
sudo apt-get install \
apt-transport-https \
ca-certificates \
curl \
software-properties-common \
scons \
tillig /
Last active Dec 10, 2018
Send Email Alert on Windows Backup

This allows you to use the Windows Task Scheduler to send an email via PowerShell script when a Windows Backup succeeds or fails.

  • Put the two PowerShell scripts in a secure folder that only the administrator can access. They will have credentials to send email in them.
  • Update the placeholders in each script to allow email to send. Run the scripts to ensure the email goes out.
  • Create a scheduled task that is triggered on an event from the event log. Set up a custom filter and use the backup-failed-filter.xml as the filter. This catches all the backup failure events and will trigger the script. Attach that to the Send-BackupFail.ps1.
  • Create a scheduled task that is triggered on an event from the event log. Attach Send-BackupSuccess.ps1 to that.
    • Log: Microsoft-Windows-Backup/Operational
    • Source: Backup
    • Event ID: 4
tillig / Get-M3u8Content.ps1
Last active Dec 7, 2018
Download .m3u8 contents for ffmpeg concatenation
View Get-M3u8Content.ps1
Downloads an M3U8 playlist and the subsequent TS files, ready for combining.
Using the headers from an authenticated session with a video provider, download the
contents of a playlist and prepare the TS files in the playlist for merging.
Assuming you have your headers exported as JSON like this...
tillig / Get-KubectlAll.ps1
Last active Jun 20, 2019
kubectl get all - namespaced items
View Get-KubectlAll.ps1
Gets all the entities from a Kubernetes namespace; or, alternatively, the set of all non-namespaced items.
.PARAMETER Namespace
The namespace from which entities should be retrieved. Omit this parameter to retrieve non-namespaced items.
Gets a list of all the API resources available in the Kubernetes cluster that are namespaced (or non-namespaced,
as the case may be.) Once that list has been retrieved, removes the 'events' objects if there are any (these get
too long and numerous to be valuable), then gets everything as requested.
tillig / Vagrantfile
Last active Dec 12, 2018
Vagrantfile for a Google/Azure management environment
View Vagrantfile
# -*- mode: ruby -*-
# vi: set ft=ruby :
# Most boxes use 'vagrant' as the username
# but recent Ubuntu builds use 'ubuntu'.
$username = "vagrant"
# Check for required plugins.
# Vagrant 2.1.3, 2.1.4 plugin checks are broken.
You can’t perform that action at this time.