Skip to content

Instantly share code, notes, and snippets.

@jcoutch
jcoutch / bt_light_control.sh
Created March 12, 2022 05:03
Bluetooth Light Strip Control
#!/bin/bash
# Based on information found at the following URLs:
# https://stackoverflow.com/questions/46169415/understanding-hsl-to-rgb-color-space-conversion-algorithm
# https://community.home-assistant.io/t/controlling-a-bluetooth-led-strip-with-ha/286029/5
# Parameters:
# bt_light_control.sh MAC_ADDRESS STATE PARAMETERS
#
# Turn on: bt_light_control.sh 00:00:00:00:00:00 on
@jcoutch
jcoutch / powershell_profile.ps1
Last active May 8, 2019 15:52
PowerShell profile for changing window titles based on folder name and elevation status
# This script overrides the default prompt behavior, and sets the title of the window to something like this:
# (admin) PS: current_folder_name
#
# To apply to your profile, open a PowerShell window and type:
#
# Windows: notepad $PROFILE
# Mac/Linux: vi $PROFILE
function Test-Administrator
{
@jcoutch
jcoutch / Generate-SignalrProxy.ps1
Last active January 9, 2020 13:53
Generate a SignalR hub proxy (taking into account any binding redirects in your project)
# This script is designed to be ran as a post-build step.
# If running directly, make sure you're in the root of your project's folder.
# This project also relies on the Microsoft.AspNet.SignalR.Utils package to be
# installed in your project, and packages restored prior to running this script
# Modify the variables below to correspond with your build settings
$packagesFolder = "..\packages" # Your NuGet packages
$appConfigFile = "app.config" # Your app/web.config to grab binding redirects from
$outputDir = "bin\debug" # The build output directory containing your SignalR hubs