Skip to content

Instantly share code, notes, and snippets.

View SamPovilus's full-sized avatar
💭
In need of donuts

Sam Povilus SamPovilus

💭
In need of donuts
View GitHub Profile
@SamPovilus
SamPovilus / gist:b857f5969256c78129b938b17fddc935
Created March 28, 2018 13:46
Django migrate error after adding new CharField
[2018-03-27 20:39:01 spovilus@irascible humidity (pressure)]
$ python3 manage.py migrate
Operations to perform:
Apply all migrations: admin, auth, contenttypes, humidity_display, polls, sessions
Running migrations:
Applying humidity_display.0003_auto_20180327_1813...Traceback (most recent call last):
File "/home/spovilus/.local/lib/python3.5/site-packages/django/db/backends/utils.py", line 85, in _execute
return self.cursor.execute(sql, params)
psycopg2.DataError: value too long for type character varying(20)
@SamPovilus
SamPovilus / bcm2836-rpi-2-b-sam.dtb
Created March 22, 2017 01:23
ads7828 on raspberry pi 2 test device tree
/dts-v1/;
/ {
compatible = "raspberrypi,2-model-b", "brcm,bcm2836";
model = "Raspberry Pi 2 Model B";
interrupt-parent = <0x1>;
#address-cells = <0x1>;
#size-cells = <0x1>;
chosen {
@SamPovilus
SamPovilus / snake.py
Created March 20, 2016 14:45 — forked from sanchitgangwar/snake.py
Snakes Game using Python
# SNAKES GAME
# Use ARROW KEYS to play, SPACE BAR for pausing/resuming and Esc Key for exiting
import curses
from curses import KEY_RIGHT, KEY_LEFT, KEY_UP, KEY_DOWN
from random import randint
curses.initscr()
win = curses.newwin(20, 60, 0, 0)