One of my colleagues shared an article on writing (good) Git commit messages today: How to Write a Git Commit Message. This excellent article explains why good Git commit messages are important, and explains what constitutes a good commit message. I wholeheartedly agree with what @cbeams writes in his article. (Have you read it yet? If not, go read it now. I'll wait.) It's sensible stuff. So I decided to start following the
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/sh | |
SWIFT=$(/usr/bin/env xcrun -f swift) | |
SCRIPTPATH=$1 | |
COMPILEDPATH="$SCRIPTPATH.o" | |
SDKPATH=$(/usr/bin/env xcrun --show-sdk-path --sdk macosx) | |
#compile if necessary |
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/sh | |
# Some things taken from here | |
# https://github.com/mathiasbynens/dotfiles/blob/master/.osx | |
# Set the colours you can use | |
black='\033[0;30m' | |
white='\033[0;37m' | |
red='\033[0;31m' | |
green='\033[0;32m' |
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
var root = app.activeDocument; | |
var result = getStyleByString(root, "Formatgruppe 2:Form\\:atgruppe 1:Zeichen\\:\\:format 1", "characterStyles"); | |
$.bp(); | |
function getStyleByString(root, string, property) { | |
stringResult = string.match (/^(.*?[^\\]):(.*)$/); | |
var cStyleName = (stringResult) ? stringResult[1] : string; | |
cStyleName = cStyleName.replace (/\\:/g, ":"); | |
remainingString = (stringResult) ? stringResult[2] : ""; |
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
<script> | |
window.ga=window.ga||function(){(ga.q=ga.q||[]).push(arguments)};ga.l=+new Date; | |
ga('create', 'UA-xxxxxxx-x', { 'storage': 'none' }); | |
ga('require', 'autotrack'); | |
ga('send', 'pageview'); | |
ga('set', 'anonymizeIp', true); | |
</script> | |
<script async src='//www.google-analytics.com/analytics.js'></script> | |
<script async src='…/js/autotrack.js'></script> // autotrack.js https://github.com/googleanalytics/autotrack |
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
$ brew install fish | |
$ echo "/usr/local/bin/fish" | sudo tee -a /etc/shells | |
$ chsh -s `which fish` |
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/sh | |
prog_name=${0##*/} | |
version=1.0 | |
version_text="Boilerplate for new scripts v$version" | |
options="h o: q v V" | |
help_text="Usage: $prog_name [-o <text>] [-hqvV] [<file>]... | |
Boilerplate for new scripts |
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
# Set pixoo_post_address in your secrets.yaml to your Pixoo64 rest api post address | |
# pixoo_post_address: http://192.168.foo.bar/post | |
# if you host Pixoo-Rest you could set url in the pixoo_rest_imageurl command | |
sensor: | |
- platform: rest | |
name: pixoo64 Data | |
resource: !secret pixoo_post_address | |
method: POST | |
payload: '{ "Command" : "Channel/GetAllConf" }' | |
value_template: "OK" |
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
# needs SSH active on ESXi host | |
# needs SSH public key from HomeAssistant in ESXi ssh authorized_keys config '/etc/ssh/keys-<username>/authorized_keys' Have a look here: https://kb.vmware.com/s/article/1002866 | |
# get VM ID on ESXi commandline by 'vim-cmd vmsvc/getallvms' You need to set this in the scripts commands where 00 is shown | |
# needs VMware Tools installed on the VM you want to control | |
# change in Switch: ESXi ip address, VM ID, switch name and switch friendly name | |
switch: | |
# https://www.home-assistant.io/integrations/switch.command_line/ | |
- platform: command_line |
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
# | |
# udev rule | |
# Mount USB drive to the media directory using the partition name as mount point | |
# | |
# Description: | |
# Created for Home Assistant OS, this rule mounts any USB drives | |
# into the Hassio media directory (/mnt/data/supervisor/media). | |
# When a USB drive is connected to the board, the rule creates one directory | |
# per partition under the media directory. The newly created partition is named | |
# as the partition name. If the partition does not have a name, then the following |
OlderNewer