Skip to content

Instantly share code, notes, and snippets.

View pr1ntf's full-sized avatar

Trent pr1ntf

View GitHub Profile
//; "Super Keftendo" 256-byte SNES intro source code
//; by Revenant
//; http://www.pouet.net/prod.php?which=70163
//; This is an attempt at implementing the "Kefrens bars" effect on the SNES, using less than
//; 256 bytes of ROM. The technique used here is to set up a 256-color line buffer using
//; Mode 7, then rendering a few pixels directly to CGRAM every scanline and resetting the
//; Y-scroll position to display the same buffer on every visible scanline as it is repeatedly
//; rendered to. Some more information about specific size optimizations are detailed later.
requires FreeBSD kernel with
https://github.com/freebsd/freebsd/commit/cac3f209134f9f95a431a8480d1275c640d86d7d#diff-f4318c2cf4a50c29e6990f3e8a8a5286
https://github.com/freebsd/freebsd/commit/7ab2b8809cd93e9b6da4f2284f4a5851deeff012#diff-f4318c2cf4a50c29e6990f3e8a8a5286
or pfense 2.3 snapshot from 8 Jan 2016 or later
1. Launch the first vm with a NIC configured as a vale port:
$ bhyve -A -H -P \
-s 0:0,hostbridge \
@size = (1920, 1080);
@center = (-.743653135, .131826563);
$zoom = .000014628;
$max_it = 700;
$oversample = 2;
$_ *= $oversample for (@size);
open $fh, "|-", "convert -size ".join("x",@size)." -depth 8 gray:- ".
"-resize ".(100/$oversample)."% mandel.png";
for $py (1 .. $size[1]) {
@Viss
Viss / gist:f4ceb460d98555565097
Last active August 31, 2015 00:53
threatbutt 3
,,,,;-;,,
,,;#################,
,########################,
,###########################>
,###############################,
,##################################>
,####################################>
,######################"^`,````$#######,
,####################%,;#####%##;"$#####>
$#################"`,##$%%%$$ `%#,$#####> ,;#####,,,
@0xabad1dea
0xabad1dea / weird-machines-video-games.md
Last active December 28, 2021 17:38
Weird Machines in Video Games

Abadidea's Index of Weird Machines in Video Games

A "weird machine" is when user-supplied input is able to create an arbitrary new program running within an existing program due to Turing-completeness being exposed. Sometimes such functionality was deliberately included but it is often the result of exploitation of memory corruption. You can learn more at the langsec site. There is a good argument for weird machines being inherently dangerous, but this index is just for fun.

It is broken into two categories: intentional gameplay features which may be used as weird machines, and exploit-based machines which can be triggered by ordinary player input (tool-assisted for speed and precision is acceptable). Games with the sole purpose of programming (such as Core Wars) are not eligible and plugin APIs don't count. If you know of more, feel free to add a comment to this gist.

Intentional Gameplay Mechanics

@snipe
snipe / gist:5512408
Created May 3, 2013 18:25
ASCII Goatse
* g o a t s e x * g o a t s e x * g o a t s e x *
g g
o / \ \ / \ o
a| | \ | | a
t| `. | | : t
s` | | \| | s
e \ | / / \\\ --__ \\ : e
x \ \/ _--~~ ~--__| \ | x
* \ \_-~ ~-_\ | *
g \_ \ _.--------.______\| | g
@snipe
snipe / goatse
Created March 14, 2013 08:03
Goatse ASCII art that won't break your W3C validation. (The original used double-hyphens inside the HTML comment, which would not validate.)
<!--
* * * * * * * * * * * * * * * * * * * * * * * * *
* *
* / \ \ / \ *
*| | \ | | *
*| `. | | : *
*` | | \| | *
* \ | / / \\\ ____ \\ : *
* \ \/ ___~~ ~____| \ | *
* \ \__~ ~__\ | *
@MohamedAlaa
MohamedAlaa / tmux-cheatsheet.markdown
Last active April 27, 2024 00:18
tmux shortcuts & cheatsheet

tmux shortcuts & cheatsheet

start new:

tmux

start new with session name:

tmux new -s myname
@fernandoaleman
fernandoaleman / Linux Static IP
Created March 23, 2012 16:20
How To Configure Static IP On CentOS 6
## Configure eth0
#
# vi /etc/sysconfig/network-scripts/ifcfg-eth0
DEVICE="eth0"
NM_CONTROLLED="yes"
ONBOOT=yes
HWADDR=A4:BA:DB:37:F1:04
TYPE=Ethernet
BOOTPROTO=static
@mattmanning
mattmanning / drugwars.txt
Created June 1, 2011 16:09
Drugwars for the TI-82/83/83+ Calculators
Lbl G
ClrHome
Disp " J.M.'S DRUGWAR"," SIMULATION",""," VERSION 2.00",""," JUST SAY NO."
2000→Z
5000→Y
0→V
100→K
1→B
2→N
0→I