Skip to content

Instantly share code, notes, and snippets.

View Francesco149's full-sized avatar
:shipit:
memes

lolisamurai Francesco149

:shipit:
memes
View GitHub Profile
@gullyn
gullyn / flappy.html
Last active November 28, 2023 18:23
Flappy bird in 205 bytes (improved!)
<body onload=z=c.getContext`2d`,setInterval(`c.width=W=150,Y<W&&P<Y&Y<P+E|9<p?z.fillText(S++${Y=`,9,9|z.fillRect(p`}*0,Y-=--M${Y+Y},P+E,9,W),P))):p=M=Y=S=6,p=p-6||(P=S%E,W)`,E=49) onclick=M=9><canvas id=c>
@SoulGirlJP
SoulGirlJP / .c
Created September 10, 2020 00:46
IDA Script for KMS (updated from Diamond25 Script)
#define RenameFunction(a, b) Message("Found %s at %a\r\n", b, a); MakeName(a, b)
#define START_ADDR 0x00400000
static main() {
// Decodes/Encodes
FindCInPacketDecodeFunction("83 F8 01", "CInPacket::Decode1");
FindCInPacketDecodeFunction("83 F8 02", "CInPacket::Decode2");
FindCInPacketDecodeFunction("83 F8 04", "CInPacket::Decode4");
@pxdl
pxdl / nps2pkgi.py
Last active January 24, 2023 20:03
Converts the NoPayStation TSV for PS3 Games to pkgi-ps3 format
import csv
import urllib.request
url = "http://nopaystation.com/tsv/PS3_GAMES.tsv"
print('Downloading PS3_GAMES.tsv...')
urllib.request.urlretrieve(url, 'PS3_GAMES.tsv')
newlist = []
with open('PS3_GAMES.tsv', newline='', encoding="utf8") as csvfile:
listreader = csv.reader(csvfile, delimiter=' ', quotechar='"')
@munificent
munificent / generate.c
Last active March 18, 2024 08:31
A random dungeon generator that fits on a business card
#include <time.h> // Robert Nystrom
#include <stdio.h> // @munificentbob
#include <stdlib.h> // for Ginny
#define r return // 2008-2019
#define l(a, b, c, d) for (i y=a;y\
<b; y++) for (int x = c; x < d; x++)
typedef int i;const i H=40;const i W
=80;i m[40][80];i g(i x){r rand()%x;
}void cave(i s){i w=g(10)+5;i h=g(6)
+3;i t=g(W-w-2)+1;i u=g(H-h-2)+1;l(u
@ddevault
ddevault / Makefile
Last active February 20, 2024 14:17
Tiny Wayland compositor
WAYLAND_PROTOCOLS=/usr/share/wayland-protocols
# wayland-scanner is a tool which generates C headers and rigging for Wayland
# protocols, which are specified in XML. wlroots requires you to rig these up
# to your build system yourself and provide them in the include path.
xdg-shell-protocol.h:
wayland-scanner server-header \
$(WAYLAND_PROTOCOLS)/stable/xdg-shell/xdg-shell.xml $@
xdg-shell-protocol.c: xdg-shell-protocol.h
@xsot
xsot / instructions.md
Last active March 3, 2024 13:42
sed maze solver

Usage

sed -E -f solver.sed input where input is a file containing the maze.

For best results, resize your terminal to match the height of the maze. To disable animations, delete the lines containing p.

Maze format

The solver assumes the following:

  • The maze only contains the characters # \nSE
  • Every line has the same number of characters
  • There is only one start (S) and end (E)
@kvanbere
kvanbere / logger.js
Last active November 21, 2017 09:39
// ~ 120k log op/s
(function() {
var originalArrayValueOf = Array.prototype.valueOf;
var logs = {};
var index = 1;
function hasher(str) {
var target = Array.from(str);
target.length > 16 && (target = target.slice(0, 16)); // perf: avoid alloc
return target
.reduce(function(acc, i) {
@xerpi
xerpi / 3DS_Linux_build_instructions.md
Last active March 27, 2024 12:02
3DS Linux build instructions

Step 1: Compiling or Downloading the toolchain

Step 1.a: If you choose to download a pre-compiled toolchain (only for Linux x86-64)

  • Go to https://toolchains.bootlin.com
  • Select arch: armv6-eabihf
  • Select libc: glibc
  • Download bleeding-edge
  • Uncompress it (for example to /opt)
  • Add the bin/directory of the toolchain to $PATH
  • In my case: export PATH=$PATH:/opt/armv6-eabihf--glibc--bleeding-edge-2020.08-1
@xsot
xsot / gen.rb
Last active January 18, 2019 13:22
Minimal charset quine
names = {
43 => 'e',
'prog' => 'x', # the program will be stored in this variable
'template' => 'c',
0 => 'ee', # register?
1 => 'ex',
2 => 'ec',
4 => 'xe',
8 => 'xx',
16 => 'xc',
@wasabili
wasabili / aznyan.c
Created October 22, 2010 15:40
Aznyan AA
int
stk
[ 2 << 14
]; int ps = 0; int kofi(){char
a [ 2 << 15 ]; int c[ 2<<
15 ];int n;
int s;char d[ 2<<
14 ];int p ; int