Skip to content

Instantly share code, notes, and snippets.

View antoineMoPa's full-sized avatar

Antoine M-P antoineMoPa

  • Sherbrooke, Québec, Canada
View GitHub Profile
@antoineMoPa
antoineMoPa / retro-post-process-frag.glsl
Last active March 19, 2016 03:03
Some retro post process shader for use in https://github.com/antoineMoPa/ogl-js
#version 300 es
in highp vec2 UV;
out highp vec4 color;
uniform sampler2D renderedTexture;
uniform int time;
void main(){
highp vec2 uv = UV;
@antoineMoPa
antoineMoPa / inkscape-karnaugh-template.svg
Created February 23, 2016 19:42
Karnaugh diagrams Inkscape starter kit (For my future homeworks)
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
(setq-default indent-tabs-mode nil)
(setq c-default-style "linux"
c-basic-offset 4)
(custom-set-variables
'(tab-width 4))
(setq-default tab-width 4)
@antoineMoPa
antoineMoPa / PROGRAM:TRI
Created June 27, 2016 17:43
I might have made mistake while typing back here from pictures (It was somebody else's calculator I worked with).
ClrDraw
Pxl-On(1,20)
0->B
Lbl L
1->A
Lbl M
if pxl-Test(B,A)=1
then
Pxl-Change(B+1,A-1)
Pxl-Change(B+1,A+1)
@antoineMoPa
antoineMoPa / show-hn-bots.txt
Created July 7, 2016 04:19
These are some bots that visited my site after a small Show HN
# Show HN: https://news.ycombinator.com/item?id=12041226
# keyword: bot
HTTP/1.1" 200 756 "-" "Mozilla/5.0 (compatible; bingbot/2.0; +http://www.bing.com/bingbot.htm)"
HTTP/1.1" 200 756 "-" "Mozilla/5.0 (compatible; bingbot/2.0; +http://www.bing.com/bingbot.htm)"
HTTP/1.1" 200 755 "-" "Mozilla/5.0 (compatible; bingbot/2.0; +http://www.bing.com/bingbot.htm)"
HTTP/1.1" 200 756 "-" "Mozilla/5.0 (compatible; bingbot/2.0; +http://www.bing.com/bingbot.htm)"
HTTP/1.1" 200 756 "-" "Mozilla/5.0 (compatible; bingbot/2.0; +http://www.bing.com/bingbot.htm)"
HTTP/1.0" 200 719 "-" "Mozilla/5.0 (compatible; MJ12bot/v1.4.5; http://www.majestic12.co.uk/bot.php?+)"
HTTP/1.0" 200 719 "-" "Mozilla/5.0 (compatible; MJ12bot/v1.4.5; http://www.majestic12.co.uk/bot.php?+)"
@antoineMoPa
antoineMoPa / Mandelbrot.glsl
Last active July 12, 2016 02:08
Mandelbrot set for contourer
vec2 curr = vec2(0.0,0.0);
for(int i = 0; i < 10; i++){
curr = complexPow(curr,vec2(2.0,0.0)) + cPos;
}
res = curr;
@antoineMoPa
antoineMoPa / julia.glsl
Created July 12, 2016 02:09
Julia set for Contourer
vec2 curr = cPos;
for(int i = 0; i < 10; i++){
curr = complexPow(curr,vec2(2.0,0.0)) + vec2(time,0.2);
}
res = curr;
@antoineMoPa
antoineMoPa / Create touch icons with ImageMagick
Created August 2, 2016 16:30
Just have a big sized (ex: 1000px) original.png file. I used Gimp to create my favicon.ico from favicon.png
convert original.png -resize 32x32 favicon.png
convert original.png -resize 192x192 icon-192x192.png
convert original.png -resize 144x144 icon-144x144.png
convert original.png -resize 128x128 icon-128x128.png
convert original.png -resize 96x96 icon-96x96.png
convert original.png -resize 72x72 icon-72x72.png
convert original.png -resize 48x48 icon-48x48.png
convert original.png -resize 36x36 icon-36x36.png
convert original.png -resize 192x192 icon-192x192.png
convert original.png -resize 144x144 icon-144x144.png
shader("(y-0.6 > 0.2 * floor(sin(10x)+sin(14x)+sin(x)))? 0.3 * floor(cos(200x)*floor(cos(80y))):y + 0.1 * (y-0.2 < 0.05sin(x*8)*e**x)",400,400)
shader("x**4+y**4+0.4+cos(100x)+sin(100y)",600)