Skip to content

Instantly share code, notes, and snippets.

View vdloo's full-sized avatar

Rick van de Loo vdloo

  • Amsterdam, the Netherlands
  • X @vdloo_
View GitHub Profile
# 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
# 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
@vdloo
vdloo / fibint.scm
Last active August 29, 2015 14:03
Fibonacci in finite fields, in racket
#!/usr/bin/env racket
#lang racket
(define (addmod a b p)
(if (> (- p b) a)
(+ a b)
(- (+ a b) p)
)
)
@vdloo
vdloo / scrub.sh
Last active August 29, 2015 14:02 — forked from ruuda/scrub.sh
#!/bin/sh
unset MAILTO
unset MAILFROM
DIRECTORY="."
while getopts d:t:f: option
do
case "${option}"
in
d) DIRECTORY=${OPTARG};; # Directory to scrub