Skip to content

Instantly share code, notes, and snippets.

View Godzil's full-sized avatar
🏠
Feeling alone "WFH"

Manoël Trapier Godzil

🏠
Feeling alone "WFH"
View GitHub Profile
@Godzil
Godzil / gist:8115534
Created December 24, 2013 16:50
My Kano's Pong : Pongito
if (gameEvents.key.W) {
game.players.a.move( -1 );
}
if (gameEvents.hit) {
if (game.balls[0].velocity.x * (Math.abs(game.balls[0].velocity.x) + 5) > 0) {
var x = (Math.abs(game.balls[0].velocity.x) + 5);
} else {
var x = -(Math.abs(game.balls[0].velocity.x) + 5);
}
typedef unsigned char u8;
typedef unsigned int u32;
u8 substitution[512]={
0xac,0xd1,0x25,0x94,0x1f,0xb3,0x33,0x28,0x7c,0x2b,0x17,0xbc,0xf6,0xb0,0x55,0x5d,
0x8f,0xd2,0x48,0xd4,0xd3,0x78,0x62,0x1a,0x02,0xf2,0x01,0xc9,0xaa,0xf0,0x83,0x71,
0x72,0x4b,0x6a,0xe8,0xe9,0x42,0xc0,0x53,0x63,0x66,0x13,0x4a,0xc1,0x85,0xcf,0x0c,
0x24,0x76,0xa5,0x6e,0xd7,0xa1,0xec,0xc6,0x04,0xc2,0xa2,0x5c,0x81,0x92,0x6c,0xda,
0xc6,0x86,0xba,0x4d,0x39,0xa0,0x0e,0x8c,0x8a,0xd0,0xfe,0x59,0x96,0x49,0xe6,0xea,
0x69,0x30,0x52,0x1c,0xe0,0xb2,0x05,0x9b,0x10,0x03,0xa8,0x64,0x51,0x97,0x02,0x09,
@Godzil
Godzil / # libpng - 2016-07-17_01-43-23.txt
Created July 16, 2016 23:46
libpng on Mac OS X 10.12 - Homebrew build logs
Homebrew build logs for libpng on Mac OS X 10.12
Build date: 2016-07-17 01:43:23
Nom de l’exception : NSRangeException
Description : -[__NSCFString characterAtIndex:]: Range or index out of bounds
Informations sur l’utilisateur : (null)
0 CoreFoundation 0x00007fff943875eb __exceptionPreprocess + 171
1 libobjc.A.dylib 0x00007fffa8bfd9ba objc_exception_throw + 48
2 CoreFoundation 0x00007fff94404955 +[NSException raise:format:] + 197
3 CoreFoundation 0x00007fff94300546 -[__NSCFString characterAtIndex:] + 102
4 ChatCore 0x0000000109151216 -[MVIRCChatConnection(MVIRCChatConnectionPrivate) _sendCommand:withArguments:withEncoding:toTarget:] + 896
5 Colloquy 0x0000000108f5bae0 -[JVDirectChatPanel send:] + 3787
00000000 loc_0:
00000000 bsr.s loc_10+1
00000000 ; ---------------------------------------------------------------------------
00000002 dc.b 1
00000003 dc.b 1
00000004 dc.b $43 ; C
00000005 dc.b $76 ; v
00000006 dc.b $73 ; s
00000007 dc.b $6C ; l
00000008 dc.b 4
@Godzil
Godzil / picolour.py
Last active March 14, 2018 13:51
Generating Pi Colours
import colorsys
from PIL import Image, ImageDraw
pi = [3, 1, 4, 1, 5, 9, 2, 6, 5, 3, 5, 9]
image_height = 40
image_width = len(pi) * 10
img = Image.new("RGB", (image_width, image_height))
@Godzil
Godzil / orange.py
Created September 5, 2018 14:25
Rotating Orange
# Translated from PICO-8 Lua code to Python/PyGame
# Original: https://twitter.com/2DArray/status/1037052263091658752
import sys
import pygame
import math
import random
pygame.init()
clk = pygame.time.Clock()
screen = pygame.display.set_mode((128, 128))
@Godzil
Godzil / Bluething.py
Created September 5, 2018 14:38
Blue moving things....
# Translated from PICO-8 Lua code to Python/PyGame
# Original: https://twitter.com/TedAjax/status/1036295369968115713
# _set_fps(60)::_::cls(1)for q=48,12,-1 do
# for i=0,1,.1 do r=q+12*sin(t()/2+i*3)x=cos(i)*r+64
# y=sin(i)*r+64
# z=cos(i+.1)*r+64
# w=sin(i+.1)*r+64line(x,y,z,w,12)end
# end
# flip()goto _
# Translated from PICO-8 Lua code to Python/Pyco8
# Original: https://twitter.com/lexaloffle/status/1052826402322403328
"""
function b(u,v,a,l)
if(l<3)circfill(u,v,1,13+q%3)return
local x,y=u+cos(a)*l,v+sin(a)*l
line(u,v,x,y,13+q%3)q+=1
for i=0,1,0.34 do b(x,y,a+i+0.25+t()/16,l*0.6)end end
::🐱::q=0 cls()for i=0,1,.34 do
b(64,64,i+t()/8,30,7)end
assert_equal(self.operations == [])
assert_equal(str(self.maps_code), self.description)
assert_(this.startswith('data'))
# Find the servers to specify a Security what
self.is_equal_start(insert_code='G')
class Comment(object):
def __init__(self, func):
for c in self: