Skip to content

Instantly share code, notes, and snippets.


Olivier Bacs obax

  • The Economist @wegree
  • Birmingham, England
View GitHub Profile
obax / list.txt
Created Jun 16, 2020 — forked from shortjared/list.txt
List of AWS Service Principals
View list.txt
obax /
Last active Jun 9, 2020
Rebooting the Raspberry Pi when it loses wireless connection
# Source:
# Save under /usr/local/bin/
# The Raspberry Pi tends to drop network connection (especially wireless wifi) rather fast, which is a real pain when you're trying to do anything that has the RPi running constantly from a remote location (like our RaspEye does).
# However, it's possible to detect wifi connection loss and perform upon it. It's easiest to just do a full system reboot.
# Change the IP on the first line to the IP of your router, or some other device on your network that you can assume will be always online.
# First step is to ping your IP.
# On line three, the $? represents the exit code of the previous command, in this case the ping.
#!/usr/bin/env bash
#>>> EC2 user data
yum install -y docker mariadb iptraf-ng htop tmux
# Adding Oli's key (add Dom's and Matilde's)
echo "ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQCxFWqGO98YYuZowuuFF5XPX2hvTMK8C/gz/BVt5GCy60spByJ7j3QVc0YEPdzx1D//fLJAa8T34d9jBJorZqkkHtG7mXCp9kWSC4IluyOosg3Sg1Wd0WBZatboRgRlwMpCXnHOPQxAHdyDgNrpEZIL9B6v5wT95MDc5tITywhirgwRY48jZIjNmzHn8U9DTUCj9qGlAHGU6pTOnvQmjLVy54rIMTgrTykGdHcG1+YTnQq0/TPpM5WzN8Ep7nM7oKeg6+887raZkGb6a2zX0lDNG6LUaQXblJ2vgdHfrrtoHV/jnXo58dXMRoIGt2MliGGGJ5pM8T0EIS36eGk3g6gr obax@BMDIG0012.local" | tee -a /home/ec2-user/.ssh/authorized_keys
# execute as super user
usermod -aG docker ec2-user
You can’t perform that action at this time.