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
import utime | |
import urandom | |
# Reset everything | |
pen();cursor();camera();clip();alpha() | |
# Reset so we have a 2-block snake and food | |
def game_reset(): | |
global snake, move | |
snake = [[55,60], [60,60]] |
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
# CamJam EduKit 3 - Robotics | |
# Motor Test Code | |
import time # Import the Time library | |
from gpiozero import CamJamKitRobot # Import the CamJam GPIO Zero Library | |
robot = CamJamKitRobot() | |
# Turn the motors on | |
robot.forward() |
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
[Unit] | |
Description=Minecraft Server | |
After=network.target | |
[Service] | |
User=minecraft | |
Nice=1 | |
KillMode=none | |
SuccessExitStatus=0 1 | |
ProtectHome=true |
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
[http] | |
hostname = 0.0.0.0 | |
[audio] | |
output = alsasink | |
[local] | |
media_dir = /home/pi/Music |
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
wget -q -O - https://apt.mopidy.com/mopidy.gpg | sudo apt-key add - | |
sudo wget -q -O /etc/apt/sources.list.d/mopidy.list https://apt.mopidy.com/bullseye.list | |
sudo apt update | |
sudo apt install mopidy python3-pip | |
sudo adduser mopidy video | |
sudo pip3 install Mopidy-Iris | |
sudo pip3 install Mopidy-Local | |
sudo sh -c 'echo "mopidy ALL=NOPASSWD: /usr/local/lib/python3.9/dist-packages/mopidy_iris/system.sh" >> /etc/sudoers’ | |
mkdir -p ~/Music | |
sudo systemctl enable mopidy |
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 support macOS Time Machine backups in Samba | |
# Create a share that has the following properties | |
# in /etc/samba/smb.conf | |
# In this example we have a mounted drive called 'huge' | |
# with a directory called 'Time Machine' | |
[Time Machine] | |
comment = Time Machine | |
path = /mnt/huge/Time Machine | |
read only = no |
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
Please run the following commands line-by-line, not as a script: | |
sudo apt -y update && sudo apt -y upgrade | |
sudo apt install -y python3 python3-dev python3-venv python3-pip libffi-dev libssl-dev libjpeg-dev zlib1g-dev autoconf build-essential libopenjp2-7 libtiff5 libturbojpeg0 tzdata | |
sudo useradd -rm homeassistant -G dialout,gpio,i2c | |
sudo mkdir /srv/homeassistant | |
sudo chown homeassistant:homeassistant /srv/homeassistant | |
sudo -u homeassistant -H -s | |
cd /srv/homeassistant | |
python3 -m venv . |
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/sh | |
# Add Mopidy repo and install | |
wget -q -O - https://apt.mopidy.com/mopidy.gpg | sudo apt-key add - | |
sudo wget -q -O /etc/apt/sources.list.d/mopidy.list https://apt.mopidy.com/buster.list | |
sudo apt update | |
sudo apt install mopidy | |
sudo adduser mopidy video | |
# Configure (be careful with this line!) |
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/sh | |
# Plex's repository uses HTTPS as the transport, so we need to install support | |
sudo apt update | |
sudo apt install apt-transport-https ca-certificates curl | |
# Get Plex's public key and add the Plex repo | |
curl https://downloads.plex.tv/plex-keys/PlexSign.key | sudo apt-key add - | |
echo deb https://downloads.plex.tv/repo/deb public main | sudo tee /etc/apt/sources.list.d/plexmediaserver.list |
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
[Huge] | |
comment = Huge | |
path = /mnt/huge | |
read only = no | |
browsable = yes |
NewerOlder