Skip to content

Instantly share code, notes, and snippets.

@shageman
shageman / link_multiple_devices.yaml
Last active December 28, 2024 14:38 — forked from dankarization/link_multiple_devices_v1.1.yaml
Select multiple entities to link their on/off state. If any selected entity is turned on or off, the other selected entities will be sent a matching on or off command.
#Sort the Ruby files in your project by number of has_many
ack " has_many " -c | awk -F ":" '{print $2,$1}' | grep -v "0" | sort -rn
#Sort the Ruby files in your project by LOC
find . -iname "*.rb" -type f -exec wc -l {} \; | sort -rn
#Count the lines of Ruby code in your app
find . -iname "*.rb" -type f -exec cat {} \; | wc -l