Skip to content

Instantly share code, notes, and snippets.

View discatte's full-sized avatar
💾

.:/ DiSCATTe \:. discatte

💾
View GitHub Profile
// by dave @beesandbombs :)
float[][] result;
float t, c;
float ease(float p) {
p = c01(p);
return 3*p*p - 2*p*p*p;
}
@atoponce
atoponce / instructions.md
Last active March 8, 2022 08:04
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.

@atarola
atarola / spaceships.py
Last active August 30, 2020 01:30
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/