Skip to content

Instantly share code, notes, and snippets.

@Kyonru
Kyonru / .gitignore
Last active February 16, 2026 15:57
Love2d HTML Deployment
# tools/.gitignore
# compiled output
/dist
/node_modules
/build
# Logs
logs
*.log
npm-debug.log*
@Kyonru
Kyonru / generate_assets_types.lua
Last active February 7, 2026 23:05
Cargo.lua Lua Language Server Types
local lfs = require("lfs")
local ROOT = "assets"
local OUTPUT = "types/assets.lua"
local typeMap = {
lua = "function",
png = "love.Image",
jpg = "love.Image",
dds = "love.Image",
@Kyonru
Kyonru / main.lua
Created October 18, 2025 17:43
Game reloader for love2d presentation https://github.com/Kyonru/love2d-barcamp
local socket = require("socket")
local serverUtils = require("server_utils")
local originalNewImage = love.graphics.newImage
local originalNewFont = love.graphics.newFont
local originalNewSource = love.audio.newSource
local game_path = "creating-games-with-love-demo/game/"
@Kyonru
Kyonru / server_utils.lua
Last active October 18, 2025 17:45
Server utils for love2d presentation https://github.com/Kyonru/love2d-barcamp
---@diagnostic disable: invisible
--- From https://github.com/rxi/json.lua
local json = require("json")
local server = {}
function server.allowedHeaders()
local response = [[
HTTP/1.1 204 No Content
@Kyonru
Kyonru / awesome_lua_cheatsheet.md
Last active October 17, 2025 20:32 — forked from JettIsOnTheNet/awesome_lua_cheatsheet.md
Awesome Lua Cheat Sheet

Lua Cheat Sheet

Lua is a lightweight, efficient, and versatile scripting language known for its simplicity and extensibility. It was created by Roberto Ierusalimschy, Waldemar Celes, and Luiz Henrique de Figueiredo at the Pontifical Catholic University of Rio de Janeiro in Brazil in 1993. The name "Lua" translates to "moon" in Portuguese, reflecting the language's intention to be a small and beautiful extension to existing systems. Lua is often used as an embedded scripting language in various applications and has gained popularity in the game development industry for its ease of integration and speed. Its clean and intuitive syntax, along with a powerful set of features, makes Lua a preferred choice for developers seeking a fast and efficient language for their projects.

1. Comments

-- This is a single-line comment

--[[
   This is a multi-line comment
@Kyonru
Kyonru / twitch-completion-2023-03-25T22:18:47.165Z
Created March 25, 2023 22:18
Twitch AI Completion 2023-03-25T22:18:47.165Z - https://www.twitch.tv/kyonru
transform.Rotate(Vector3.up, angulo);
@Kyonru
Kyonru / twitch-completion-2023-03-25T22:04:38.623Z.py
Created March 25, 2023 22:04
Twitch AI Completion 2023-03-25T22:04:38.623Z - https://www.twitch.tv/kyonru
print(numeros_palindromos(100, 200))
@Kyonru
Kyonru / twitch-completion-2023-03-25T22:04:37.912Z.py
Created March 25, 2023 22:04
Twitch AI Completion 2023-03-25T22:04:37.912Z - https://www.twitch.tv/kyonru
def es_palindromo(num):
return str(num) == str(num)[::-1]
def numeros_palindromos(minimo, maximo):
palindromos = []
for num in range(minimo, maximo+1):
if es_palindromo(num):
palindromos.append(num)
return palindromos
@Kyonru
Kyonru / twitch-completion-2023-03-25T22:02:09.667Z.js
Created March 25, 2023 22:02
Twitch AI Completion 2023-03-25T22:02:09.667Z - https://www.twitch.tv/kyonru
let resultado = 3 * 123 * 100 * 50 / 2.5;
console.log(resultado); // Output: 738000
@Kyonru
Kyonru / twitch-completion-2023-03-25T22:01:41.223Z.js
Created March 25, 2023 22:01
Twitch AI Completion 2023-03-25T22:01:41.223Z - https://www.twitch.tv/kyonru
let resultado = 3 * 123 * 100 * 50;
console.log(resultado); // Output: 1845000