Navigation Menu

Skip to content

Instantly share code, notes, and snippets.

View stellartux's full-sized avatar
😶

stellartux

😶
View GitHub Profile
@stellartux
stellartux / lua.tmLanguage.json
Created August 20, 2022 22:42
Redbean Lua TextMate Grammar
{"information_for_contributors":["This file has been converted from https://github.com/sumneko/lua.tmbundle/blob/master/Syntaxes/Lua.plist","It has then had two modifications, adding 'e' to the constant.character.escape.lua regex and","adding constant.numeric.integer.binary.lua"],"version":"https://github.com/sumneko/lua.tmbundle/commit/bc74f9230c3f07c0ecc1bc1727ad98d9e70aff5b","name":"Lua","scopeName":"source.lua","patterns":[{"begin":"\\b(?:(local)\\s+)?(function)\\b(?![,:])","beginCaptures":{"1":{"name":"keyword.local.lua"},"2":{"name":"keyword.control.lua"}},"end":"(?<=[\\)\\-{}\\[\\]\"'])","name":"meta.function.lua","patterns":[{"include":"#comment"},{"begin":"(\\()","beginCaptures":{"1":{"name":"punctuation.definition.parameters.begin.lua"}},"end":"(\\))|(?=[\\-\\.{}\\[\\]\"'])","endCaptures":{"1":{"name":"punctuation.definition.parameters.finish.lua"}},"name":"meta.parameter.lua","patterns":[{"include":"#comment"},{"match":"[a-zA-Z_][a-zA-Z0-9_]*","name":"variable.parameter.function.lua"},{"match":",",
@stellartux
stellartux / jskeymap.json
Last active April 4, 2022 17:15
Boilerplate JSON for remapping JS keycodes
{
"Backspace": 0,
"Tab": 0,
"Enter": 0,
"ShiftLeft": 0,
"ShiftRight": 0,
"ControlLeft": 0,
"ControlRight": 0,
"AltLeft": 0,
"AltRight": 0,
@stellartux
stellartux / ssg.jl
Created October 14, 2021 06:06
A very minimal static site generator in Julia
"""
A quick and easy static site generator. Just run `build("path/to/files")`.
"""
module SSG
using Markdown
export build
function build(path::AbstractString)
if isdir(path)
buildfile.(filter(endswith(".md"), readdir(path; join = true)))
@stellartux
stellartux / confetti.js
Last active April 27, 2021 17:05
Bookmarklets (Whimsical)
import('https://cdn.skypack.dev/pin/canvas-confetti@v1.4.0-RXPmBgwlGaqEvCqvGmjX/mode=imports,min/optimized/canvas-confetti.js').then(m=>m.default())
@stellartux
stellartux / update.sh
Last active December 17, 2020 08:46
Mindustry Server Update Script
#!/usr/bin/env sh
# Checks if latest version matches the last version downloaded, and if it doesn't, downloads the latest
downloadurl=$(curl -s https://github.com/Anuken/Mindustry/releases/latest/download/server-release.jar \
| grep -o -P '(?<=a href=").*(?=")' -)
latestversion=$(echo $downloadurl | grep -o -P '(?<=/)v[\d.]+(?=/)')
currentversion=$(if [ -f "version.txt" ]; then
cat version.txt
else
@stellartux
stellartux / default-programs.ps1
Last active September 21, 2020 20:17
Post Windows Reinstall Script
Set-ExecutionPolicy Bypass -Scope Process -Force
[System.Net.ServicePointManager]::SecurityProtocol = [System.Net.ServicePointManager]::SecurityProtocol -bor 3072
iex ((New-Object System.Net.WebClient).DownloadString('https://chocolatey.org/install.ps1'))
choco feature enable -n allowGlobalConfirmation
choco install 7zip brave compact-timer cura-new deno epicgameslauncher ffmpeg firacode foobar2000 git github-desktop goggalaxy itch jre8 libreoffice julia microsoft-windows-terminal nodejs openscad steam uplay vlc vscode
@stellartux
stellartux / bytebeat.txt
Last active April 14, 2020 12:37
Bytebeat I've found
127 +
((random() * 64 - 32) * ((1&~t>>(11-1&~t>>10))&(1&~t>>9))) +
((t>>16>0)?(((( t * (32-5*(1&~t>>13)) / 27 ) & 0x55 )*2/3 - 32 ) * (1&~t>>9) * ((1&~t>>13&~t>>11) ^ (1&t>>14))):0) +
(((4&(t*((7&t>>11)|(8&t>>12&t>>11))/2))<<5 % 256) /3 -16) * (1&(~t>>9&~t>>8)) * (1&(t>>(16-(15&t>>14))|(t>>17))) * (1&~t>>19) +
((~t*t*(t>>14-((1&t>>18)*7&t>>12)&t>>10)%64)/3) * (1&t>>19)