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
-- Found at http://stackoverflow.com/a/17922821/597349 | |
DROP TABLE IF EXISTS urlcodemap; | |
CREATE TABLE `urlcodemap` ( | |
`id` INT(11) NOT NULL AUTO_INCREMENT, | |
`encoded` VARCHAR(128) NOT NULL, | |
`decoded` VARCHAR(128) NOT NULL, | |
UNIQUE KEY urlcodemapUIdx1(encoded), | |
PRIMARY KEY (`id`) |
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
.PHONY: all plan apply destroy | |
all: help | |
# Add the following 'help' target to your Makefile | |
# And add help text after each target name starting with '\#\#' | |
help: ## Show this help | |
@fgrep -h "##" $(MAKEFILE_LIST) | fgrep -v fgrep | sed -e 's/\\$$//' | sed -e 's/##//' |
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 | |
# efa.sh - Departure Monitor for public transportiation using EFA | |
# | |
# Copyright (c) 2018 Jan Holthuis | |
# | |
# Permission is hereby granted, free of charge, to any person obtaining a copy | |
# of this software and associated documentation files (the "Software"), to deal | |
# in the Software without restriction, including without limitation the rights | |
# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell | |
# copies of the Software, and to permit persons to whom the Software is |
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 sys # import sys | |
sys.path.insert(1, "./lib") # add the lib folder to sys so python can find the libraries | |
import epd2in7b # import the display drivers | |
from PIL import Image,ImageDraw,ImageFont # import the image libraries | |
import time | |
from gpiozero import Button # import the Button control from gpiozero | |
btn1 = Button(5) # assign each button to a variable | |
btn2 = Button(6) # by passing in the pin number |