Skip to content

Instantly share code, notes, and snippets.

@iacore
iacore / index.tsx
Created February 5, 2023 14:15
Qwik + RxJs
import {
component$,
useSignal,
$,
} from "@builder.io/qwik"
import { loader$, DocumentHead } from "@builder.io/qwik-city"
import { scan, Subject } from "rxjs"
export const timeLoader = loader$(() => new Date())
@iacore
iacore / readme.txt
Created February 24, 2023 05:35
Indigestion (Puzzlescript Plus Script)
Play this game by pasting the script in https://auroriax.github.io/PuzzleScript/editor.html
@iacore
iacore / mod.rs
Created March 30, 2023 05:50
opencolor for femtovg
pub use inner::*;
#[rustfmt::skip]
mod inner {
use femtovg::Color;
use lazy_static::lazy_static;
lazy_static!{ pub static ref WHITE: Color = Color::rgb(0xff, 0xff, 0xff); }
lazy_static!{ pub static ref BLACK: Color = Color::rgb(0x00, 0x00, 0x00); }
lazy_static!{ pub static ref GRAY_0: Color = Color::rgb(0xf8, 0xf9, 0xfa); }
import std/[cmdline, base64]
proc writePng(f: File; pngdata: string) =
let bytes = pngdata.encode
const CHUNK_SIZE = 4096
var remaining = bytes.len
var i = 0
while remaining > 0:
# (c) 04/11/2016, Rolf Rolles, Mobius Strip Reverse Engineering
import z3
import struct
# XOR key for src.bin
KEY_SECTOR = 0x37
# Counter position, as two words
CNTLO = 0
CNTHI = 0
@iacore
iacore / dinitctl.fish
Created June 25, 2023 09:49
dinitctl fish completion
# dinitctl
# Autogenerated from man page /usr/share/man/man8/dinitctl.8.gz
# Manually edited
set commands start stop status restart wake release unpin unload reload list shutdown add-dep rm-dep enable disable setenv
complete -f -c dinitctl -n "not __fish_seen_subcommand_from $commands" -l help -d 'Display brief help text and then exit'
complete -f -c dinitctl -n "not __fish_seen_subcommand_from $commands" -l version -d 'Display version and then exit'
complete -f -c dinitctl -n "not __fish_seen_subcommand_from $commands" -s s -l system -d 'Control the system init process (this is the default when run as root)'
complete -f -c dinitctl -n "not __fish_seen_subcommand_from $commands" -s u -l user -d 'Control the user init process (this is the default when not run as root)'
@iacore
iacore / readability.go
Last active March 20, 2024 11:49
Readability: Turn web page into plain text and image (from yarr)
// Copyright 2017 Frédéric Guillot. All rights reserved.
// Use of this source code is governed by the Apache 2.0
// license that can be found in the LICENSE file.
package readability
import (
"bytes"
"errors"
"fmt"
@iacore
iacore / dotenv.zig
Created July 28, 2023 19:44
Zig dotenv
pub const EnvMap = struct {
arena: std.heap.ArenaAllocator,
pairs: std.ArrayList(Pair),
pub const Pair = struct {
k: []const u8,
v: []const u8,
};
@iacore
iacore / alt-tab-fix.reg
Created August 10, 2023 09:15
Wine Registry File that fixes the game freezing when switching windows in X11
Windows Registry Editor Version 5.00
[HKEY_CURRENT_USER\Software\Wine\X11 Driver]
"UseTakeFocus"="N"