Skip to content

Instantly share code, notes, and snippets.

View Yolwoocle's full-sized avatar
💭
(。•̀ᴗ-)✧

Léo Bernard Yolwoocle

💭
(。•̀ᴗ-)✧
View GitHub Profile
@thacuber2a03
thacuber2a03 / canvas.lua
Last active November 10, 2024 18:14
a Love2D 11.x simple wrapper library for rendering games with a fixed update rate and chunky pixels
local floor = math.floor
local canvas = {}
canvas._version = "0.1.0"
canvas.frame, canvas.time = 0, 0
canvas.width = 240
canvas.height = floor(canvas.width / (16 / 9))
canvas.pixelPerfect = true
canvas.backgroundColor = { 0, 0, 0, 1 }
canvas.xOffset, canvas.yOffset = 0, 0
@TasfiqulTapu
TasfiqulTapu / get_itch_index.js
Last active August 25, 2024 11:10
Find rank in itch.io game jam "/entries" tab
// Please, make sure it is sorted by Popularity, Most rated, least rated or Karma
// Paste in your game id inside the string
const ID = "YOUR_ITCH_GAME_ID"
function find_rank(id){
let index = 0;
let quit = false;
// load all the games in list and find the game with matching id
document.querySelectorAll(".index_game_cell_widget").forEach((child, )=>{
@torcado194
torcado194 / cleanEdge-shadertoy.glsl
Last active April 24, 2025 09:48
cleanEdge, a pixel art upscaling algorithm for clean rotations
/*** MIT LICENSE
Copyright (c) 2022 torcado
Permission is hereby granted, free of charge, to any person
obtaining a copy of this software and associated documentation
files (the "Software"), to deal in the Software without
restriction, including without limitation the rights to use,
copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the
Software is furnished to do so, subject to the following
@liquidev
liquidev / class.md
Last active February 8, 2025 21:44
My attempt at explaining how to implement classes in Lua

NOTE (2025-02-08)

I've since moved the tutorial over to my website. Clarified some of the wording, added exercises at the end, added links to useful resources.

For historical reasons, I'm keeping the original text here. But if you've just stumbled upon this tutorial for the first time, you may want to check out the revised version!

https://riki.house/programming/lua/classes


-- https://github.com/Stepets/utf8.lua
-- $Id: utf8.lua 179 2009-04-03 18:10:03Z pasta $
--
-- Provides UTF-8 aware string functions implemented in pure lua:
-- * utf8len(s)
-- * utf8sub(s, i, j)
-- * utf8reverse(s)
-- * utf8char(unicode)
-- * utf8unicode(s, i, j)
-- * utf8gensub(s, sub_len)
@jasemagee
jasemagee / fortune-rnd-cowsay-lolcat.sh
Created May 30, 2015 09:42
Fortune with random cowsay character and lolcat
fortune | cowsay -f "$(ls /usr/share/cowsay/cows | sort -R | head -1)" | lolcat