Skip to content

Instantly share code, notes, and snippets.

@Kyonru
Kyonru / LICENSE
Last active November 1, 2026 17:09
PEAK on MACOS
MIT License
Copyright (c) 2026 Roberto Amarante
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 conditions:
@Kyonru
Kyonru / lucide_excalidraw.js
Created July 7, 2026 20:04
Load Lucide icons into Excalidraw
(async () => {
const FILTER = ""; // "" = all, or "arrow", "home", etc.
const MAX_ICONS = Infinity;
const ICON_SIZE = 96;
const OPEN_LIBRARY_MENU = true;
const DEFAULT_STATUS = "unpublished";
const uid = () => crypto.randomUUID().replace(/-/g, "").slice(0, 21);
const rand = () => Math.floor(Math.random() * 2 ** 31);
const now = Date.now();
@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