Skip to content

Instantly share code, notes, and snippets.

View vaguinerg's full-sized avatar
🎯
Focusing

Vaguiner Gonzalez dos Santos vaguinerg

🎯
Focusing
View GitHub Profile
@vaguinerg
vaguinerg / gemini.lua
Last active June 28, 2025 19:35
lite-xl gemini code assist plugin
-- mod-version:3
local core = require "core"
local common = require "core.common"
local config = require "core.config"
local DocView = require "core.docview"
local command = require "core.command"
local keymap = require "core.keymap"
local www = require "libraries.www"
local json = require "libraries.dkjson"
@vaguinerg
vaguinerg / Object.nim
Last active July 13, 2025 16:05
Nim-lang GCC Auto vectorization (SIMD)
import random, raylib
randomize()
type
Unit = object
pos: Vector2
hp: int
let size = rand(5..22)
@vaguinerg
vaguinerg / router.py
Last active July 24, 2025 17:50
micropython tp-link wr 840n v6
import socket
import requests
import re
import binascii
import hashlib
def get_salt(ip):
response = requests.get(f"http://{ip}/cgi/getParm", headers={"Referer": f"http://{ip}/"})
match = re.search(r'var ss="([^"]+)"', response.text)
return match.group(1)
@vaguinerg
vaguinerg / tinydb.nim
Last active August 13, 2025 08:10
Tiny key value db in im. inspired by https://github.com/capocasa/limdb
import tables, strutils, os
type
TinyDB* = object
filename: string
data: Table[string, string]
proc init*(filename: string): TinyDB =
result.filename = filename
result.data = initTable[string, string]()
import std/[times, math, strformat]
const
SIZE = 50_000_000
proc initSeqs(): (seq[float32], seq[float32], seq[float32]) =
var A = newSeq[float32](SIZE)
var B = newSeq[float32](SIZE)
var D = newSeq[float32](SIZE)
for i in 0..<SIZE: