Skip to content

Instantly share code, notes, and snippets.

@noelukwa
noelukwa / encode.py
Created October 26, 2020 02:36 — forked from gasman/encode.py
Encoding a file as a Youtube video - https://www.youtube.com/watch?v=hyqLv2_zBdA
# Encode inputfile.tar.gz as a series of video frames
# Frames are written to frames/frameNNNN.png
from PIL import Image
with open('inputfile.tar.gz', 'rb') as f:
data = f.read()
WIDTH = 120
HEIGHT = 90
CHUNK_SIZE = int((WIDTH * HEIGHT) / 8)
@noelukwa
noelukwa / .travis.yml
Created January 6, 2020 15:03 — forked from ryboe/.travis.yml
Example .travis.yml for Golang
# use the latest ubuntu environment (18.04) available on travis
dist: bionic
language: go
# Force-enable Go modules. Also force go to use the code in vendor/
# These will both be unnecessary when Go 1.14 lands.
env: GO111MODULE=on GOFLAGS='-mod vendor'
# You don't need to test on very old versions of the Go compiler. It's the user's