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
# Creates a tunnel using AWS session manager to an AWS instance so that you can connect with a local client over the tunnel | |
# https://github.com/broo0ose 24/08/2021 | |
# pre-reqs for this script | |
# - AWS CLI environment on powershell | |
# - the AWS Session Manager plugin https://docs.aws.amazon.com/systems-manager/latest/userguide/session-manager-working-with-install-plugin.html | |
# - I use SSO to connect to AWS so I needed to use 'aws configure sso' to the correct account and profile. | |
# - logged in using 'aws login sso' Or however you connect to AWS, eg IAM account. | |
# - the instance must be set up to use AWS Session Manager, and you must have the rights to run the client connection eg. remote admin group. |
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
+ write raspbian to the card | |
+ create a file called ssh in the boot partition (the only bit you can see in Windows), | |
No extension, right click properties make sure it is not ending in .txt ot anything like that. | |
+ using Notepad++ create a file called wpa_supplicant.conf in the boot partition. | |
+ paste this into the file changing it for your WiFi parameters | |
country=GB | |
ctrl_interface=DIR=/var/run/wpa_supplicant GROUP=netdev | |
update_config=1 |
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
#!/usr/bin/env python3 | |
# needs python v3 for argparse | |
# needs energenie module from https://pythonhosted.org/energenie/ | |
from energenie import switch_on, switch_off | |
import argparse | |
parser = argparse.ArgumentParser() | |
# TOGGLE -u UNIT_NUMBER |
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
in_thread do | |
loop do | |
sample :drum_heavy_kick | |
sleep 0.5 | |
end | |
end | |
in_thread do | |
loop do | |
sleep 0.5 |
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
# info from http://www.averagemanvsraspberrypi.com/2014/10/how-to-set-up-wifi-on-raspberry-pi.html | |
# I just made it a one-liner. | |
echo 'options 8192cu rtw_power_mgnt=0 rtw_enusbss=0 rtw_ips_mode=1' | sudo tee /etc/modprobe.d/8192cu.conf |