Skip to content

Instantly share code, notes, and snippets.

@rdebath
rdebath / Announce.cs
Last active December 7, 2021 05:00
Classicube API reader.
using System;
using MCGalaxy;
namespace Core {
public class Announce: Plugin {
public override string MCGalaxy_Version { get { return "1.8.0.0"; } }
public override string name { get { return "Announce"; } }
public override void Load(bool startup) {
Command.Register(new CmdAnnounce());
@rdebath
rdebath / NewbieFuck-99-bottles.nbf
Created September 17, 2020 18:37
99 Bottles of beer in newbiefuck
>>>>>>>>>+>>++[>>+<<-]>>[<+<+>>-]<-<->>>>+<<<<<<[>>]>>>>+[-]<<+[<<+>>-]<
<->>>>+<<<<<<[>>]>>>>+[-]<<+[<<+>>-]<<->>>>+<<<<<<[>>]>>>>+[-]<<+[<<+>>-
]<<->>>>+<<<<<<[>>]>>>>+[-]<<+[<<+>>-]<<->>>>+<<<<<<[>>]>>>>+[-]<<+[<<+>
>-]<<->>>>+<<<<<<[>>]>>>>+[-]<<+[<<+>>-]<<->>>>+<<<<<<[>>]>>>>+[-]<<+[<<
+>>-]<<-+[>>+<<-]>>[>>+<<<<<<[<<]<+>>>[>>]>>-]>>-<<<+[>+[<<+>>-]>>+[<<+>
>-]>>+<<<<-<<->-]>+[-]>>>>[<<<<<+>>>>>-]<<<<<-<[+[>>+<<-]>+>[<-<+>>-]<<-
+[>>>>+<<<<-]>>>>-<<<+[>+[<<+>>-]>>+[<<+>>-]>>+<<<<-<<->-]>+[-]>>>>[<<<<
<+>>>>>-]<<<<<-<]+[<<]<[>>>[>>]<<+[<<]<-]>>>[>>]<<-->>>>++++++++++[-<<<<
+[>>+<<-]>>[<+<+>>-]<-<->>>>]<<<<+[>>+<<-]>>[>>+<<<<<<[<<]<+>>>[>>]>>-]>
>-<<<+[>+[<<+>>-]>>+[<<+>>-]>>+<<<<-<<->-]>+[-]>>>>[<<<<<+>>>>>-]<<<<<-<
@rdebath
rdebath / mandelbrot.c
Last active April 1, 2018 18:21
mandelbrot.c
/* See: https://stackoverflow.com/questions/16124127/improvement-to-my-mandelbrot-set-code */
#include <math.h>
#include <stdlib.h>
#include <time.h>
#include <stdio.h>
unsigned char palette[48] = {
66, 30, 15,
25, 7, 26,
This interpreter has 64bit cells.
This interpreter has 11bit cells.
This interpreter has 64bit cells.
@rdebath
rdebath / mandelbrot.koko
Created October 3, 2015 09:41
Petooh Mandelbrot
xtKNFoLDKoPKNsoABKyzoMKUoKcNomEKPoKDoXmgKoKozKoKqoFKUiFoKxBcuVdkBMgyOKus
VsdaiRFzhKDotKoKQjPbtsPTuXFdahtcKBuTngfYHWfbdaZYhKuGdAQVDWahjyxEKoGVqKoK
oMGKsqoHFXURRKoqKucdjNPaJxhwKowKBoKudYUahKocLGBZNvLkWnXwudiIahcBBMnnklRT
MfIXsuUdytahkudahxkmDBudahEkxgudabqhIWbDbVfRkuQmmzdahfkfBuidGxKbuRdDGBpv
aIzhGHKEudsBahKCuZLnvgVdavAChKudHIEQTazfhKiEudECVpjqaMUHIEhKoKWzcxHlJoxC
yKoKoKYztoxcKzSMCoswzlGKGVfzTmuLMTQdaESZqhGHwIELLTPkgNZClAROJbBvYkqOkIOK
udXjlajhZZYbqSLKFudUaEhAsKAuTdvyqHaShyUIfztKtjuPRyjgcxzldGRahQBBsJtKuqda
vhvKuUdYBRaDVchfKMguAdADahKQjulZidahsjWMWKvIuEHRdaiqjhvNKVujRQHdtahKmoKf
oUzKcilXwoKoKoKoKlwMbofKoLKRotJKUNoZKZSoJXKJLofKoEKFgoiMxUyGZJyRKoKyQEzJ
uGdKWDGugdKuizcdgahqPSKudahTDRzpKuNZXLEDzdahpJXgNyCKSmStutXRdaZwRhPypjjK
@rdebath
rdebath / bf.rb
Created September 18, 2015 22:58
Brainfuck interpreter in ruby
eval 'm=Hash.new(p=0);'+ARGF.read.gsub(
/./,
'>' => 'p+=1;',
'<' => 'p-=1;',
'+' => 'm[p]+=1;',
'-' => 'm[p]-=1;',
'[' => '(',
']' => ')while((m[p]&=255)!=0);',
'.' => 'putc m[p];',
',' => 'm[p]=STDIN.getbyte if !STDIN.eof;')
@rdebath
rdebath / README
Last active September 2, 2024 23:03
Original brainfuck distribution by Urban Müller
This archive contains the following programs:
bfc The compiler for the 'brainfuck' language (240 bytes!)
bfc.asm Source for the compiler
bfi The interpreter for the 'brainfuck' language
bfi.c Source for the interpreter (portable)
src/ Some example programs in 'brainfuck'
src/atoi.b Reads a number from stdin
src/div10.b Divides the number under the pointer by 10
src/hello.b The ubiquitous "Hello World!"
@rdebath
rdebath / Buildrepo.sh
Last active August 29, 2015 14:07
Making CVS break it's rules.
#!/bin/sh
# CVS is a PITA (Useful, yes, but no I never did like it that much)
# It has obviously been specified by idiots who think THEY are in control.
# Make us run under nohup & fakeroot so it looks like we're a daemon.
# The 'cat' command allows up to see the output without being directly
# connected to the terminal (and so we have no ctty).
[ "`id -u`" -ne 0 ] && {
nohup fakeroot sh "$0" "$@" 2>&1 </dev/null | cat
exit
/*
* To compile:
* gcc -O3 -std=c99 -Wall -Wextra -Wshadow -fopenmp joust.c -o joust
*
*
* TODO
* Allow for (...)*0 comments.
* Allow (...{...}...}%3 format as alias for (...)*3...(...)*3
* Table like the proper joust versions.
* Full dump of match results
%c=qw(XX $p++ XZ $p-- XY D++ YX D-- ZY D&=255;while(D){ YZ D&=255;} YY print+chrD ZZ D=ord(getc) ZX print+join(",",@b),"\n");
$/=$,;$_=<>;s/[XYZ]//g;s/\(\.\)/X/g;s/\[\.\]/Y/g;s/{\.}/Z/g;s/[^XYZ]//g;s/../$c{$&}; /g;s[D]'$b[$p]'g;eval;
=begin comment
/* From: https://gist.github.com/ELLIOTTCABLE/402586 */
/* I wrote “Hello, world!” for whatever mad, mad genius wrote this version of Brainfuck:
http://pastie.org/private/siw6uoan1cd6shuao7r8hw (dead link)
*/
(.)[.] (.)[.] (.)[.] (.)[.] (.)[.] (.)[.] (.)[.] (.)[.] (.)[.] (.)[.] {.}[.] (.)(.) (.)[.] (.)[.] (.)[.] (.)[.]