Skip to content

Instantly share code, notes, and snippets.

View LeonLenclos's full-sized avatar
💭
('<_ '

Léon LeonLenclos

💭
('<_ '
View GitHub Profile
@LeonLenclos
LeonLenclos / scrich-dl.py
Last active January 6, 2022 09:03
Download drawings from scri.ch
"""
# Run this script to download scri.ch drawings.
python3 scrich-dl.py
# You can then put all the drawing to the same size with imagemagick.
for f in *.png; do convert $f -gravity CENTER -extent 1920x1080 $f; done;
# And make a video from them with ffmpeg.
ffmpeg -r 25 -f image2 -s 1920x1080 -pattern_type glob -i "*.png" -vcodec libx264 -crf 25 -pix_fmt yuv420p anim.mp4
"""
import urllib.request
@LeonLenclos
LeonLenclos / face.logo
Last active May 27, 2021 12:51
logo face ('<_ '
@LeonLenclos
LeonLenclos / index.html
Created April 4, 2021 13:48
lovejs index.html for itch.io
<!doctype html>
<html lang="en-us">
<head>
<meta charset="utf-8">
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<title>The Mission</title>
<style>
body, html, canvas {
margin:0;
padding:0;
@LeonLenclos
LeonLenclos / game.txt
Created January 26, 2021 15:08
flickgame
{"gameLink":"www.flickgame.org","canvasses":[[1673,"f",22,"0",119,"f",20,"0",20,"4",1,"0",116,"f",3,"0",40,"4",1,"0",116,"f",1,"0",42,"4",1,"0",116,"f",1,"0",42,"4",1,"0",116,"f",1,"0",42,"4",1,"0",116,"f",1,"0",42,"4",1,"0",116,"f",1,"0",42,"4",1,"0",116,"f",1,"0",42,"4",1,"0",116,"f",1,"0",42,"4",1,"0",116,"f",1,"0",42,"4",1,"0",116,"f",1,"0",42,"4",1,"0",116,"f",1,"0",42,"4",1,"0",116,"f",1,"0",42,"4",1,"0",116,"f",1,"0",42,"4",1,"0",116,"f",1,"0",42,"4",1,"0",116,"f",1,"0",42,"4",1,"0",116,"f",1,"0",42,"4",1,"0",116,"f",1,"0",42,"4",1,"0",116,"f",1,"0",42,"4",1,"0",116,"f",1,"0",42,"4",1,"0",116,"f",1,"0",42,"4",1,"0",116,"f",1,"0",42,"4",1,"0",116,"f",1,"0",42,"4",1,"0",116,"f",1,"0",42,"4",1,"0",116,"f",1,"0",42,"4",1,"0",116,"f",1,"0",42,"4",1,"0",116,"f",1,"0",42,"4",1,"0",116,"f",1,"0",42,"4",1,"0",116,"f",1,"0",42,"4",1,"0",116,"f",1,"0",42,"4",1,"0",116,"f",1,"0",42,"4",1,"0",116,"f",1,"0",42,"4",1,"0",116,"f",1,"0",42,"4",1,"0",116,"f",1,"0",32,"4",5,"0",5,"4",1,"0",116,"f",1,"0",32,"4",1,"0",3,"7
@LeonLenclos
LeonLenclos / utils.lua
Last active January 31, 2021 01:11
Lua/Love utils
local utils = {}
-- My utils functions for developing games with Love2d
-- Numbers
function utils.mapvalue(val, min, max, mapmin, mapmax)
return ((val-min)/(max-min))*(mapmax-mapmin)+mapmin
end
function utils.constrain(val, min, max)
@LeonLenclos
LeonLenclos / inkscape2print.md
Last active October 21, 2020 15:17
Inkscape to print
  1. Save the document from inkscape foo.svg
  2. Convert the svg to pdf : rsvg-convert -f pdf -o foo.pdf foo.svg
  3. Convert the pdf to a cmyk pdf gs -o foo-cmyk.pdf -sDEVICE=pdfwrite -sProcessColorModel=DeviceCMYK -sColorConversionStrategy=CMYK -dOverrideICC foo.pdf

Check conversions : pdfimages -list foo-cmyk.pdf

@LeonLenclos
LeonLenclos / playwithcolor1.py
Last active March 27, 2019 15:42
Fill the terminal with shades of blue.
"""
Fill the terminal with shades of blue.
require the color module (`$ pip install color`).
"""
from random import choice
from shutil import get_terminal_size
from color import cyan, blue, magenta