This file contains 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 | |
# (This isn't really a shell script - you can't run 'sudo' in a script, I don't think.) | |
# | |
# Boot/kernel problems 19/Oct/2020 | |
# (On pi3, which boots from SD card, but then mounts the SSD to /boot, | |
# resulting in the wrong partition gettting updated.) | |
# | |
# SOLUTION: | |
# https://www.raspberrypi.org/forums/viewtopic.php?t=262963 |
This file contains 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
# | |
# Copyright (c) 2009-2020 Tom Keffer <[email protected]> | |
# | |
# See the file LICENSE.txt for your full rights. | |
# | |
# ** Hacked on by cranfill for sftp, July 2020 - based on weewx v. 4.1.1 | |
# | |
"""For uploading files to a remove server via FTP or sftp""" | |
from __future__ import absolute_import |
This file contains 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 | |
# livestream the livingroom cam? | |
raspivid -o - -t 0 -fps 30 -b 6000000 | \ | |
avconv -re -ar 44100 -ac 2 -acodec pcm_s16le -f s16le -ac 2 -i /dev/zero -f h264 -i - \ | |
-vcodec copy -acodec aac -ab 128k -g 50 -strict experimental \ | |
-f flv rtmp://a.rtmp.youtube.com/live2/YOUTUBE-THINGY-HERE |
This file contains 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
# cranfill - udev rules for mapping X10 CM11 device to /dev/cm11, and Vantage data logger to /dev/vantageVue | |
# Lives in /etc/udev/rules.d | |
# | |
# serial to /dev/cm11a | |
ACTION=="add",SUBSYSTEM=="tty",ATTRS{idVendor}=="067b",ATTRS{product}=="USB-Serial Controller D",SYMLINK+="cm11a",MODE="0777" | |
# UART to /dev/vantageVue | |
# ACTION=="add",ATTRS{idVendor}=="10c4",ATTRS{product}=="CP2102 USB to UART Bridge Controller",MODE="0666",SYMLINK+="/sys/dev/vantageVue" | |
ACTION=="add",ATTRS{product}=="CP2102 USB to UART Bridge Controller",MODE="0666",SYMLINK+="vantageVue" |
This file contains 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
title: Chez Cran | |
views: | |
- path: default_view | |
title: Home | |
badges: | |
- person.rob | |
- sun.sun | |
cards: | |
- type: entities | |
title: Lights |
This file contains 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 | |
# extract all zip files in parallel | |
find . -name "*zip" | parallel --jobs 8 --progress unzip {} -d {/.}.out |
This file contains 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 | |
# [email protected] for Todd S | |
# uses 'xmlstarlet' to extract XML data to CSV | |
# fix input file - example | |
# sed 's/\x0d\xEF\xBB\xBF/\x0a/g' <ut-landmarks.gpx >ut-landmarks-good.gpx | |
# - will still have one ^M at start of file? | |
# rock art - this one is different |
This file contains 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
To activate the environment, | |
sudo su -s /bin/bash homeassistant | |
source /srv/homeassistant/bin/activate | |
This file contains 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
# 'source' this file to incorporate the aliai in your shell env | |
alias hadown='sudo systemctl stop home-assistant@homeassistant' | |
alias halogin='sudo su -s /bin/bash homeassistant' | |
alias harestart='sudo systemctl restart home-assistant@homeassistant' | |
alias hastatus='sudo systemctl status home-assistant@homeassistant'n | |
alias haup='sudo systemctl start home-assistant@homeassistant' | |
alias hawatch='tail -f /var/log/syslog | grep homeassistant' |
This file contains 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
In /etc/apache2/apache2.conf | |
# change allowoverride none to all | |
<Directory /var/www/> | |
Options Indexes FollowSymLinks | |
AllowOverride All | |
Require all granted | |
</Directory> |