Skip to content

Instantly share code, notes, and snippets.

View bluebear94's full-sized avatar
🦊
fluffy fox

+merlan #flirora bluebear94

🦊
fluffy fox
View GitHub Profile
use v6;
#use IO::Handle;
#use IO::Socket;
#say $*IN.t;
shell "stty raw -echo";
loop {
my $c = $*IN.getc;
100006$01K
140006$01K
180006$01K
1104$23P.
1204$23P.
1304$23P.
#x08
01-:!000A$?
:xX$23P.
010007$?
@bluebear94
bluebear94 / mystery.c
Last active January 9, 2016 03:37
ヒバルーメンはいいぞ
#include <stdio.h>
int main(){int i=32,_;while(--i)putchar((_="#s\\#s$2#sA!s>2#sS!ss0#sO!\255sK#s$!"[(6-i*13)&31])+(_>112?112:96));}
use v6;
my %stats =
:boss-hp(51),
:player-hp(50),
:player-mana(500),
:shield(0),
:poison(0),
:recharge(0),
:elapsed(0);
@bluebear94
bluebear94 / lulz.md
Last active May 12, 2018 08:16
Fluffy8x / Uruwi's Danmakufu Coding Style

Inspired by Sparen's personal guidelines, though I have followed this style guide for quite a long time.

  • Use the extension .dnh for any Danmakufu files.
  • Encode sources in Shift-JIS only if there are no characters in the source outside ASCII. Otherwise, use UTF-16LE (the only other encoding supported by Danmakufu, unfortunately).
  • In single-line comments, leave one space before and after the //.
  • Start and end multi-line comments on lines that do not contain any code. Leave a space after /* and before */.
  • Leave a space between the #include directive and the file you wish to include.
  • Paths to files to #include should start with either . or ...
  • Use tabs for indentation.
  • Leave one space after a comma.
use v6;
my @adjacentVertices =
0, 1,
0, 2,
1, 3,
2, 3,
4, 5,
4, 6,
5, 7,
@bluebear94
bluebear94 / shit.sh
Created April 18, 2016 08:40
Shit - a distributed stink control system
# Define these two functions in your .bashrc.
function subshit {
sed -b "s/git/shit/g;s/Git/Shit/g;s/GIT/SHIT/g"
}
function shit {
set -o pipefail
(git $@ | subshit) 3>&1 1>&2 2>&3 | subshit 3>&1 1>&2 2>&3
}
@bluebear94
bluebear94 / gist:f5a7afe5396b2626d63546bda400bffa
Created May 5, 2016 23:36
ph3 .dat reverse engineering notes
(mirrored from http://pastebin.com/raw/nt7bbcs0)
0x0 - 0xA: "ArchiveFile"; simple enough.
0xB - 0xE: The number of files, little endian.
0xF: Always 0x1 for some reason.
0x10 - 0x13: The size of the next section, in bytes.
0x14 on: Filename section. Zlib compressed format per RFC 1950.
> Repeated for each file:
> 0x0 - 0x3: The number of bytes that follow
> 0x4 - 0x7: The number of characters in the directory name (dlen).
/*
post-dev comment:
This is an image editor for the TI-89 (Titanium) that I worked on from 2012 to 2013.
This is its source as of May 4, 2013.
(taken from https://www.omnimaga.org/ti-68k-projects/kraphyko-decthyth-and-the-illusiat-12-port/15/)
Everything is included in one source file, since TIGCC / GCC4TI on Windows had a bug with finding
header files.
This will likely still work if you create a new GCC4TI project and apply the sprite routine fix
@bluebear94
bluebear94 / gist:490648a2b6e3677d61e135d19e7e1741
Created May 27, 2016 03:07
I, too, have enough food to feed an army
Comestibles
q - 3 apples
r - 2 bananas
s - 46 C-rations
t - a carrot
u - 13 cram rations
v - 27 food rations
w - 5 fortune cookies
x - 21 K-rations
y - 3 uncursed lembas wafers