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
# Note that this is very bad 'weekend project' | |
# Python and is not at all representative | |
# of how things should be programmed in any | |
# serious environment. | |
# This is snake on an ESP8266 with this | |
# I2C oled (I got it from here https://www.banggood.com/Geekcreit-WiFi-ESP8266-Starter-Kit-IoT-NodeMCU-Wireless-I2C-OLED-Display-DHT11-Temperature-Humidity-Sensor-Module-p-1544116.html) | |
# and an analog joystick (mine is from here https://www.banggood.com/Geekcreit-37-In-1-Sensor-Module-Board-Set-Starter-Kits-Geekcreit-products-that-work-with-official-Arduino-boards-p-1137051.html) | |
# Because the ESP8266 only has one analog |
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
# https://github.com/ByteInternet/hypernode-vagrant/issues/179 | |
# | |
# The vagrant/provisioning/hypernode.sh shell provisioner script can not finish because of the PrivateDevices=no issue. | |
# To work around it until we fix that in the box you can comment out the varnish restart and not load the nocache vcl | |
# in that script but do it manually later. | |
# | |
# # remove the restart from hypernode.sh | |
# sed -i 's/service varnish restart/echo "not (re)starting varnish"/g' vagrant/provisioning/hypernode.sh | |
# | |
# 'Enable' varnish in the settings so it does not try to load the nocache vcl |
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
#!/usr/bin/env racket | |
#lang racket | |
(define (addmod a b p) | |
(if (> (- p b) a) | |
(+ a b) | |
(- (+ a b) p) | |
) | |
) |
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 | |
unset MAILTO | |
unset MAILFROM | |
DIRECTORY="." | |
while getopts d:t:f: option | |
do | |
case "${option}" | |
in | |
d) DIRECTORY=${OPTARG};; # Directory to scrub |