Skip to content

Instantly share code, notes, and snippets.

View kitgrose's full-sized avatar

Kit Grose kitgrose

View GitHub Profile
@altrive
altrive / ToastNotification_Windows10.ps1
Last active May 12, 2024 09:34
Windows 10 toast notification sample
$ErrorActionPreference = "Stop"
$notificationTitle = "Notification: " + [DateTime]::Now.ToShortTimeString()
[Windows.UI.Notifications.ToastNotificationManager, Windows.UI.Notifications, ContentType = WindowsRuntime] > $null
$template = [Windows.UI.Notifications.ToastNotificationManager]::GetTemplateContent([Windows.UI.Notifications.ToastTemplateType]::ToastText01)
#Convert to .NET type for XML manipuration
$toastXml = [xml] $template.GetXml()
$toastXml.GetElementsByTagName("text").AppendChild($toastXml.CreateTextNode($notificationTitle)) > $null
@bigonese
bigonese / vpn.sh
Created January 11, 2017 13:06
Script to start sstp-client on a Mac, connecting to Microsoft VPN, with ability to use Apple's KeyChain
#!/bin/bash
SERVICE_NAME='my-example-vpn'
SERVICE_URL='my-example-vpn.com'
if [[ ${#USER} > 1 ]]
then
read -p "Log in as ${USER}? [y/n] " LIA
else
LIA = 'n'
@renatoathaydes
renatoathaydes / create_github_pages_branch.sh
Created October 29, 2018 20:12
Use git worktree to maintain GitHub Pages branch
# Initialize a gh-pages branch... GitHub expects this branch to exist to publish a project website from it.
git checkout --orphan gh-pages
git reset --hard
git commit --allow-empty -m "Initializing gh-pages branch"
git push origin gh-pages
git checkout master
# Define a directory where the static website files will reside
WEBSITE_DIR=target