Navigation Menu

Skip to content

Instantly share code, notes, and snippets.

View MatheusAvellar's full-sized avatar
🍕
pizza pizza pizza

Matheus Avellar MatheusAvellar

🍕
pizza pizza pizza
View GitHub Profile
import asyncio
# next client id
client = 1
async def handler(r, w):
line = await r.readline()
try:
method, path, version = line.split(b' ', 2)
except:
@lunasorcery
lunasorcery / im-gay.txt
Created May 20, 2018 16:42
Compressed sprite data for the I'M GAY gba_bios.bin mod.
24 40 03 00 0F 00 40 01 01 00 01 42 42 43 43 C4
44 05 C4 04 C4 0F C4 02 0A 03 C3 01 0E 0C 08 0D
07 09 06 0B AA AB 48 75 EB B8 9C AA 0F FD 85 FA
4F 57 17 E9 79 E7 49 7C 5F 67 FD 47 FE 9C EE 24
FD ED 5F 46 94 57 7C 66 49 0B 40 84 0F AB 2B FA
57 67 24 DC A1 9F EC FF 2A 3E 54 F1 AD AB 52 C5
BE F2 75 91 82 81 2B D6 D6 8B 80 65 76 F2 3F EC
61 FF 1F 75 59 59 75 FC A2 24 D7 D6 0A 65 3C 11
E3 B3 66 A4 F9 5F 8E FF F9 BA FA 7F 10 A7 92 73
6E 39 4C 21 7F 9C 7F C4 FF AD FC B8 33 AE EE E2
@stereokai
stereokai / index.css
Created June 18, 2017 11:03
Trigonometry in CSS
//----------------------------------*\
// TRIGONOMETRY FUNCTIONS
//----------------------------------*/
// # Trigonometry in CSS
//
// - Through Taylor/Maclaurin polynomial representation: http://people.math.sc.edu/girardi/m142/handouts/10sTaylorPolySeries.pdf
// - Useful if you don't want to use JS.
// - With CSS Variables.
// - `calc()` can't do power (x ^ y) so I used multiplication instead.
@alexpchin
alexpchin / socket-cheatsheet.js
Created December 15, 2015 16:58
A quick cheatsheet for socket.io
// sending to sender-client only
socket.emit('message', "this is a test");
// sending to all clients, include sender
io.emit('message', "this is a test");
// sending to all clients except sender
socket.broadcast.emit('message', "this is a test");
// sending to all clients in 'game' room(channel) except sender
@endel
endel / getMoonPhase.js
Created March 25, 2015 16:04
Get Moon Phase by Date, written in JavaScript
/*
* modified from http://www.voidware.com/moon_phase.htm
*/
function getMoonPhase(year, month, day)
{
var c = e = jd = b = 0;
if (month < 3) {
year--;
@1wErt3r
1wErt3r / SMBDIS.ASM
Created November 9, 2012 22:27
A Comprehensive Super Mario Bros. Disassembly
;SMBDIS.ASM - A COMPREHENSIVE SUPER MARIO BROS. DISASSEMBLY
;by doppelganger (doppelheathen@gmail.com)
;This file is provided for your own use as-is. It will require the character rom data
;and an iNES file header to get it to work.
;There are so many people I have to thank for this, that taking all the credit for
;myself would be an unforgivable act of arrogance. Without their help this would
;probably not be possible. So I thank all the peeps in the nesdev scene whose insight into
;the 6502 and the NES helped me learn how it works (you guys know who you are, there's no