all repos — gemini-redirect @ ec61e19ce05cd061c58177dbdbe0e59a35e29ea7

blog/index.html (view raw)

 1<!DOCTYPE html><html lang=en><head><meta charset=utf-8><meta name=description content="Official Lonami's website"><meta name=viewport content="width=device-width, initial-scale=1.0, user-scalable=yes"><title> Lonami's Blog </title><link rel=stylesheet href=/style.css><body><article><nav class=sections><ul><li><a href=/>lonami's site</a><li><a href=/blog class=selected>blog</a><li><a href=/golb>golb</a><li><a href=/blog/atom.xml>rss</a></ul></nav><main><h1 class=title>My Blog</h1><p id=welcome onclick=pls_stop()>Welcome to my blog!<p>Here I occasionally post new entries, mostly tech related. Perhaps it's tips for a new game I'm playing, perhaps it has something to do with FFI, or perhaps I'm fighting the borrow checker (just kidding, I'm over that. Mostly).<hr><ul><li><a href=https://lonami.dev/blog/woce-1/>Writing our own Cheat Engine: Introduction</a><span class=dim> [mod sw; 'windows, 'rust, 'hacking] </span><li><a href=https://lonami.dev/blog/university/>Data Mining, Warehousing and Information Retrieval</a><span class=dim> [mod algos; 'series, 'bigdata, 'databases] </span><li><a href=https://lonami.dev/blog/new-computer/>My new computer</a><span class=dim> [mod hw; 'showoff] </span><li><a href=https://lonami.dev/blog/tips-outpost/>Tips for Outpost</a><span class=dim> [mod games; 'tips] </span><li><a href=https://lonami.dev/blog/ctypes-and-windows/>Python ctypes and Windows</a><span class=dim> [mod sw; 'python, 'ffi, 'windows] </span><li><a href=https://lonami.dev/blog/pixel-dungeon/>Shattered Pixel Dungeon</a><span class=dim> [mod games; 'tips] </span><li><a href=https://lonami.dev/blog/installing-nixos-2/>Installing NixOS, Take 2</a><span class=dim> [mod sw; 'os, 'nixos] </span><li><a href=https://lonami.dev/blog/breaking-ror/>Breaking Risk of Rain</a><span class=dim> [mod games; 'tips] </span><li><a href=https://lonami.dev/blog/world-edit/>WorldEdit Commands</a><span class=dim> [mod games; 'minecraft, 'worldedit, 'tips] </span><li><a href=https://lonami.dev/blog/asyncio/>An Introduction to Asyncio</a><span class=dim> [mod sw; 'python, 'asyncio] </span><li><a href=https://lonami.dev/blog/posts/>Atemporal Blog Posts</a><span class=dim> [mod algos; 'algorithms, 'culture, 'debate, 'foodforthought, 'graphics, 'optimization] </span><li><a href=https://lonami.dev/blog/graphs/>Graphs</a><span class=dim> [mod algos; 'graphs] </span><li><a href=https://lonami.dev/blog/installing-nixos/>Installing NixOS</a><span class=dim> [mod sw; 'os, 'nixos] </span></ul><script>
 2    const WELCOME_EN = 'Welcome to my blog!'
 3    const WELCOME_ES = '¡Bienvenido a mi blog!'
 4    const APOLOGIES = "ok sorry i'll stop"
 5    const REWRITE_DELAY = 5000
 6    const CHAR_DELAY = 30
 7    const welcome = document.getElementById('welcome')
 8
 9    let deleting = true
10    let english = false
11    let stopped = false
12
13    const pls_stop = () => {
14        stopped = true
15        welcome.innerHTML = APOLOGIES
16    }
17
18    const begin_rewrite = () => {
19        if (stopped) {
20            // now our visitor is angry :(
21        } else if (deleting) {
22            if (welcome.innerHTML == '…') {
23                deleting = false
24            } else {
25                welcome.innerHTML = welcome.innerHTML.slice(0, -1) || '…'
26            }
27            setTimeout(begin_rewrite, CHAR_DELAY)
28        } else {
29            let text = english ? WELCOME_EN : WELCOME_ES
30            welcome.innerHTML = text.slice(0, welcome.innerHTML.length + 1)
31            deleting = welcome.innerHTML.length == text.length
32            english = deleting - english
33            setTimeout(begin_rewrite, deleting ? REWRITE_DELAY : CHAR_DELAY)
34        }
35    }
36
37    setTimeout(begin_rewrite, REWRITE_DELAY)
38</script></main><footer><div><p>Share your thoughts, or simply come hang with me <a href=https://t.me/LonamiWebs><img src=/img/telegram.svg alt=Telegram></a> <a href=mailto:totufals@hotmail.com><img src=/img/mail.svg alt=Mail></a></div></footer></article><p class=abyss>Glaze into the abyss… Oh hi there!