This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| blueprint: | |
| name: ZHA - IKEA Symfonisk sound controller for lights | |
| description: 'Control lights with an IKEA Symfonisk sound controller (the spinny ones). | |
| You can set functions for single press, double press and triple press. This allows you to assign, | |
| e.g., a scene or anything else. | |
| Rotating left/right will change the brightness smoothly of the selected light.' | |
| domain: automation |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <# | |
| .SYNOPSIS | |
| Bootstraps the Powershell Universal Dashboard with per-folder configurations on a random port | |
| .DESCRIPTION | |
| Saves a copy of Universal Dashboard to the LocalAppData/UniversalDashboard folder and starts it for the current folder. | |
| This is useful for rapid testing, or integrating into scripts for easy deployment | |
| .EXAMPLE | |
| Start-UD -DashboardVersion 1.2.9 | |
| Bootstraps version 1.2.9 of the dashboard specifically | |
| .EXAMPLE |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/bin/bash | |
| # Logging utility that simplifies user of bash logger command | |
| # # First source the script | |
| # source ~/scripts/logr.bash | |
| # # Start the logger, generates log name from scripts filename | |
| # logr start | |
| # # or define your own | |
| # logr start LOG_NAME |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/usr/bin/ruby -W1 | |
| # frozen_string_literal: true | |
| require 'optparse' | |
| require 'shellwords' | |
| # A script to automate changelog generation from Git commit messages | |
| # | |
| # For use with a git-flow workflow, it will take changes from the last tagged | |
| # release where commit messages contain NEW, FIXED, CHANGED, and IMPROVED |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # Currently sets the metadata but .DS_Store isn't updated and comment doesn't show up in Finder | |
| # Likely have to go with osascript `osascript -e 'tell application "Finder" to set comment of (file) to "comment"' | |
| plist =<<ENDPLIST | |
| <!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd"> | |
| <plist version="1.0"> | |
| <string>#{comment}</string> | |
| </plist> | |
| ENDPLIST | |
| plist = `echo #{Shellwords.escape(plist)}|plutil -convert binary1 -o - -|xxd -ps` | |
| %x{xattr -wx "com.apple.metadata:kMDItemFinderComment" "#{plist}" #{Shellwords.escape(@file)}} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # Truncate each line of the input to X characters | |
| # flag -s STRING (optional): add STRING when truncated | |
| # switch -l (optional): truncate from left instead of right | |
| # param 1: (optional, default 70) length to truncate to | |
| shorten () { | |
| local helpstring="Truncate each line of the input to X characters\n\t-l Shorten from left side\n\t-s STRING replace truncated characters with STRING\n\n\t$ ls | shorten -s ... 15" | |
| local ellip="" left=false | |
| OPTIND=1 | |
| while getopts "hls:" opt; do | |
| case $opt in |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| @echo off | |
| set VIDEO="video.ts" | |
| set MEDIAINFO="MediaInfo.exe" | |
| set FFMPEG="ffmpeg.exe" | |
| %FFMPEG% -analyzeduration 100M -probesize 100M -i %VIDEO% -acodec copy -vn %VIDEO%.aac | |
| set time1=%1 | |
| set sec0=%time1:~-5,-3% |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # /etc/network/interfaces | |
| # | |
| auto lo | |
| iface lo inet loopback | |
| # device: eth0 | |
| iface eth0 inet manual | |
| # IPv4 bridge | |
| # (connect ONLY your firewall/router KVM instance here, this is the WAN device!) |