Skip to content

Instantly share code, notes, and snippets.

View blackle's full-sized avatar
🦈
Blackle is a Shark

Blackle Morisanchetto blackle

🦈
Blackle is a Shark
View GitHub Profile
@blackle
blackle / undertale.css
Last active December 16, 2017 01:43
Mastodon Undertale Theme
/*
* Download Determination Mono for the true undertale experience
* https://drive.google.com/open?id=0B9vhRblCzZOhVi13MC0xNnh0SnM
* if you cannot download this font, the stylesheet will fallback to the following web font
*/
@import url('https://fonts.googleapis.com/css?family=Press+Start+2P');
* {
border-radius: 0px !important;
box-shadow: none !important;
@blackle
blackle / clutter.py
Last active June 17, 2019 14:44
Open a shader in a window with ctypes and libclutter
#!/usr/bin/env python3
from ctypes import *
L=CDLL("libc.so.6")
C=CDLL("libclutter-1.0.so.0")
G=CDLL("libgobject-2.0.so.0")
def K(F,*V):
F.restype=c_void_p
F.argtypes=[c_void_p]*len(V)
return F(*V)
K(C.clutter_init,0)
Barnfinders 2
Scooby-doo Jeopardy
Are You Smarter Than a 5th Grader Gaiden: Revenge of Jeff Foxworthy
Cash Cab Online 2k17
Family Guy: Fates
Trembling Hand Perfect Equilibrium
Honey I Shrunk The Kids! Retribution
Twin Peaks for the Nintendo DSi
Pawnstars: Battle Royale
Professor Layton and the Inland Empire
//
// PUBLIC DOMAIN CRT STYLED SCAN-LINE SHADER
//
// by Timothy Lottes
//
// This is more along the style of a really good CGA arcade monitor.
// With RGB inputs instead of NTSC.
// The shadow mask example has the mask rotated 90 degrees for less chromatic aberration.
//
// Left it unoptimized to show the theory behind the algorithm.
@blackle
blackle / scanline.glsl
Created September 1, 2021 03:45
Scanline Filter for ShaderFilter Plus
// PUBLIC DOMAIN CRT STYLED SCAN-LINE SHADER
//
// by Timothy Lottes
//
// This is more along the style of a really good CGA arcade monitor.
// With RGB inputs instead of NTSC.
// The shadow mask example has the mask rotated 90 degrees for less chromatic aberration.
//
// Left it unoptimized to show the theory behind the algorithm.
@blackle
blackle / scanline.hlsl
Created September 1, 2021 05:10
Scanline Filter for ShaderFilter Plus Raw
// PUBLIC DOMAIN CRT STYLED SCAN-LINE SHADER
//
// by Timothy Lottes
//
// This is more along the style of a really good CGA arcade monitor.
// With RGB inputs instead of NTSC.
// The shadow mask example has the mask rotated 90 degrees for less chromatic aberration.
//
// Left it unoptimized to show the theory behind the algorithm.
I was thinking of what it would take to have a function like:
decrypt_if_input_valid(encrypted_data, input)
this function checks if the input satisfies some criteria, and if it does it will decrypt the data.
suppose our input is a list of numbers, and our criteria is "each number has to be at most 2 away from the number 378." writing this is fairly straightforward
however, if we want to distribute this function, it is trivial for someone to decompile it and see what it's checking for. is it possible to use cryptography to hide our validation criteria so we can run our code on insecure systems?
@blackle
blackle / cpu.txt
Created September 17, 2021 04:01
that time I tried making a fantasy console (circa 2015)
=== the cpu itself ===
registers:
unsigned, 16 bit.
user accessible:
ax,bx,cx,dx,ex,fx,gx,hx
inaccessible:
ip (instruction pointer)
#!/usr/bin/env python3
def printen(strr):
print(strr, end='')
adventure = [
'''welcome to the <b>choost adventure engine!</b>
would you like to play a game?''',
{
#!/usr/bin/env python3
import random
from math import floor, sin
def printen(strr):
print(strr, end='')
drawers = [
["https://staging.cohostcdn.org/attachment/d305d6ee-247d-4a2c-8554-08d1769271ca/0007.png",
"https://staging.cohostcdn.org/attachment/41f6e39e-a678-47dc-93f7-750045bf7004/0009.png",
"https://staging.cohostcdn.org/attachment/25d5915d-4757-4526-b303-996be4e24d1e/0008.png"],