For the LCD/Joystick HAT: https://www.waveshare.com/1.44inch-lcd-hat.htm
PIN Mapping:
Symbol | Raspberry Pi PIN (BCM) | Description |
---|---|---|
KEY1 | P21 | Button 1/GPIO |
KEY2 | P20 | Button 2/GPIO |
KEY3 | P16 | Button 3/GPIO |
Joystick Up | P6 | Joystick Up |
For the LCD/Joystick HAT: https://www.waveshare.com/1.44inch-lcd-hat.htm
PIN Mapping:
Symbol | Raspberry Pi PIN (BCM) | Description |
---|---|---|
KEY1 | P21 | Button 1/GPIO |
KEY2 | P20 | Button 2/GPIO |
KEY3 | P16 | Button 3/GPIO |
Joystick Up | P6 | Joystick Up |
#!/usr/bin/env python | |
import os, sys | |
sys.path.append(os.getcwd()) | |
import logging | |
import rq | |
MAX_FAILURES = 3 |
A quick "how to" on what you need to do to both setup AND recover a single-server PostgreSQL database using WAL-E
GetObject
, ListBucket
and PutObject
on the bucket you want to use (and that it's not public).WAL-E needs to be installed on all machines, masters and slaves.
Only one machine, the master, writes WAL segments via continuous archiving. The configuration for the master postgresql.conf
is:
archive_mode = on
archive_command = 'envdir /etc/wal-e.d/env wal-e wal-push %p'
archive_timeout = 60
WITH RECURSIVE | |
x(i) AS ( VALUES (0) | |
UNION ALL SELECT i + 1 | |
FROM x | |
WHERE i < 101), | |
Z(Ix, Iy, Cx, Cy, X, Y, I) AS ( | |
SELECT | |
Ix, | |
Iy, | |
X :: FLOAT, |
importPackage(Packages.com.sk89q.worldedit.blocks); | |
importPackage(Packages.com.sk89q.worldedit); | |
//joins up blocks in the dimension dim | |
function squash(blockarray, dim, arraysize){ | |
var i = new Array(); | |
var dims = new Array(); | |
for (var y = 0; y <= arraysize*2; y++){ |
# Two-phased template rendering. | |
# See http://www.holovaty.com/writing/django-two-phased-rendering/ | |
# LICENSE: Public domain. | |
################ | |
# TEMPLATE TAG # | |
################ | |
from django import template | |
register = template.Library() |