Skip to content

Instantly share code, notes, and snippets.

View mhzawadi's full-sized avatar
🏝️
windmilling about

Matthew Horwood mhzawadi

🏝️
windmilling about
View GitHub Profile
@mhzawadi
mhzawadi / install.sh
Last active September 17, 2015 13:02 — forked from vjm/install.sh
Raspberry Pi Logstash
wget https://download.elastic.co/logstash/logstash/packages/debian/logstash_1.5.4-1_all.deb
dpkg --install logstash_1.5.4-1_all.deb
vi /etc/logstash/conf.d/logstash.conf
# https://github.com/jruby/jruby/issues/1561
cd /tmp/
sudo git clone https://github.com/jnr/jffi.git
cd jffi/
apt-get install -y ant
ant jar
@mhzawadi
mhzawadi / Slim-Raspbian.sh
Created November 23, 2015 13:54 — forked from samatjain/Slim-Raspbian.sh
Consistency…
# GUI-related packages
pkgs="
xserver-xorg-video-fbdev
xserver-xorg xinit
gstreamer1.0-x gstreamer1.0-omx gstreamer1.0-plugins-base
gstreamer1.0-plugins-good gstreamer1.0-plugins-bad gstreamer1.0-alsa
gstreamer1.0-libav
epiphany-browser
lxde lxtask menu-xdg gksu
xserver-xorg-video-fbturbo
#!/bin/bash
#
# This script will launch and configure a step-ca SSH Certificate Authority
# with OIDC and AWS provisioners
#
# See https://smallstep.com/blog/diy-single-sign-on-for-ssh/ for full instructions
OIDC_CLIENT_ID="[OAuth client ID]" # from Google
OIDC_CLIENT_SECRET="[OAuth client secret]" # from Google
ALLOWED_DOMAIN="[the domain name of accounts your users will use to sign to Google]"
#!/bin/bash
#
# This script will get an SSH host certificate from our CA and add a weekly
# cron job to rotate the host certificate.
#
# See https://smallstep.com/blog/diy-single-sign-on-for-ssh/ for full instructions
CA_URL="[Your CA's URL]"
ALLOWED_DOMAIN="[the domain name of accounts your users will use to sign to Google]"
CA_NAME="[A name for your CA]"
@mhzawadi
mhzawadi / steps.md
Last active January 11, 2021 11:32 — forked from tavalin/steps.md
UK Light Wiring with Shelly 1

Intro

This is a simple guide on how to automate UK lights with a Shelly 1 by installing the shelly 1 relay into the ceiling pendant which has both permanent live, neutral and a switched live back from the wall switch.

These steps are from my own experience making my lighting "smart" but also user friendly (it works via a wall switch!). This simple guide will go through replacing an a normal ceiling pendant with one with room for a Shelly 1. If you have a ceiling light with a bigger base it's even easier.

Warning Electrical regulations must be followed by law. If you are not a competent person under the regulations do not attempt electrical work. https://www.diydoctor.org.uk/projects/electrical_safety.htm

Wiring Diagram

This diagram has been taken from here and modified to include the Shelly 1. Wiring Diagram