Skip to content

Instantly share code, notes, and snippets.

View discatte's full-sized avatar
💾

.:/ DiSCATTe \:. discatte

💾
View GitHub Profile
@discatte
discatte / spaceships.py
Created August 30, 2020 01:30 — forked from atarola/spaceships.py
Pixel Spaceships!
#!/usr/bin/env python
import random
import pygame
from pygame.locals import *
#
# Pixel Spaceships!
# Original Idea: http://web.archive.org/web/20080228054410/http://www.davebollinger.com/works/pixelspaceships/
@discatte
discatte / instructions.md
Created October 29, 2020 05:33 — forked from atoponce/instructions.md
Convert any binary to an image

Convert any binary to PNG

This walk through comes from @GalacticFurball who tweeted two images representing the youtube_dl source code as of 2020-09-20. They mentioned later in the thread that they struggled converting the gzip-compressed tarball of the source code with Imagemagick to a PNG, so they ended up using a 3rd party website to do the work. This Gist will show you how to do it cleanly and exactly.

Instructions

If you would like to convert any non-image binary into PNG, Imagemagick makes this trivial. I will be executing the commands on a Debian Linux system, so you may need to adjust the commands for BSD, macOS, or Windows as necessary.

@discatte
discatte / 3D_piano_from_midi.py
Created March 20, 2022 21:52 — forked from Zulko/3D_piano_from_midi.py
Turn a piano MIDI file into a basic 3D animated piano video.
"""
Turn a piano MIDI file into a basic 3D animated piano video.
See the result here:
I am leaving it as a script because it is not tested on enough MIDI files yet.
Zulko 2014
This script is released under a Public Domain (Creative Commons 0) licence.
// by dave @beesandbombs :)
float[][] result;
float t, c;
float ease(float p) {
p = c01(p);
return 3*p*p - 2*p*p*p;
}
@discatte
discatte / decoder.py
Created August 1, 2022 17:40 — forked from LucasVanDongen/decoder.py
KORG Monotribe AFSK firmware decoder
# -*- coding: utf-8 -*-
# KORG monotribe firmware decoder by:
# Ludovic Lacoste (aka Ludo6431) -- http://ludolacoste.com
#
# thanks to :
# Th0mas @ http://gravitronic.blogspot.com/2011/12/decoding-korg-monotribe-firmware.html
# nitro2k01 @ http://blog.gg8.se/wordpress/2011/12/04/korg-monotribe-firmware-20-analysis/
# decoder.py <input ascii bits file> <output file prefix>