Skip to content

Instantly share code, notes, and snippets.

View desantis's full-sized avatar
💭
Hello, world wide web!

#!de : <os> :: $I.am : DESANTIS.SJ desantis

💭
Hello, world wide web!
View GitHub Profile
@desantis
desantis / blocktoimg.py
Created September 16, 2018 09:18 — forked from laanwj/blocktoimg.py
tools to write (block) data to png files and vice versa
#!/usr/bin/env python3
# Distributed under the MIT software license
import binascii, struct, sys, io, argparse
from PIL import Image
IMG_WIDTH = 512 # could be made adaptive...
MIN_HEIGHT = 4 # minimum height of image; twitter won't let us upload anything smaller
BYTES_PER_PIXEL = 4 # RGBA, 8 bit
def div_roundup(x,y):
@desantis
desantis / gitian.md
Created September 16, 2018 09:18
gitian buildling on debian 9.5

Some changes are needed to build on debian because of the switch of the guest OS to bionic.

lxc that comes with debian is not high enough version to support bionic (the minimum is 2.1.1), so need to build from scratch.

debootstrap that comes with debian will give the following error:

    $ bin/make-base-vm --lxc --suite bionic --arch amd64                                                                                              
 E: No such script: /usr/share/debootstrap/scripts/bionic
! Action Spaces
CoalMine, WheatField, GoldMine: [Current(2), Addition(5), Maximum(10), SpaceTaken(0)].
CoalMine'Addition(2).
WheatField'Addition(3).
GoldMine'Addition(1).
! Player info
PlayerCoal(0).
PlayerWheat(0).