Skip to content

Instantly share code, notes, and snippets.

@karuego
karuego / catbox.sh
Last active June 5, 2025 14:02 — forked from MineBartekSA/catbox
CatBox - An implementation of catbox.moe API in Bash
#!/bin/bash
#
# CatBox v2.0
# An implementation of catbox.moe API in Bash
# Author: MineBartekSA
# Gist: https://gist.github.com/MineBartekSA/1d42d6973ddafb82793fd49b4fb06591
# Change log: https://gist.github.com/MineBartekSA/1d42d6973ddafb82793fd49b4fb06591?permalink_comment_id=4596132#gistcomment-4596132
#
# MIT License
#
eval $(ssh-agent)
ssh-add ~/.ssh/karuego
git config --local user.name karuego
git config --local user.email '[email protected]'
git config --local user.signingkey "$(cat ~/.ssh/karuego.pub)"
git config --local gpg.format ssh
git config --local commit.gpgsign true
git commit -S -m "Commit with SSH signature"
@karuego
karuego / zig_type_system.md
Created June 2, 2025 08:04 — forked from lobre/zig_type_system.md
Zig type system illustrated using ascii diagrams

Zig Type System

Zig aims to be a simple language. It is not easy to define what simple exactly means, but zig is also a low-level programming language that aims for c-compatibility. To reach this goal, it needs good semantics in its type system so that developers have a complete toolbox to manipulate data.

So types in zig are composable, but this can become rapidly overwhelming. See those examples. Are you able to understand them at a glance, as soon as you read them?

*const ?u8
?*const u8
*const [2]u8
//! kprotty(c) - MIT
//! src: https://github.com/kprotty/zap
const std = @import("std");
const assert = std.debug.assert;
const Atomic = std.atomic.Value;
pub const ThreadPool = struct {
stack_size: u32,
max_threads: u32,

Keybase proof

I hereby claim:

  • I am karuego on github.
  • I am karuego (https://keybase.io/karuego) on keybase.
  • I have a public key ASAAnFsLW3Q1N-rPWG1Wvq5rwXBtDLNmk_lxmlV3Ry3yGAo

To claim this, I am signing this object:

@karuego
karuego / install_tools.sh
Created June 5, 2024 17:57 — forked from allenyllee/install_tools.sh
mount vhdx in linux
#!/bin/bash
# install qemu utils
sudo apt install qemu-utils
# install nbd client
sudo apt install nbd-client
import os
import encoding.base64
import encoding.binary
import strings
import stbi
import term
struct App {
mut:
is_raw bool
-- nomor 1
create database tubes_21650122_adam;
use tubes_21650122_adam;
-- nomor 1 a
create table konsumen_122 (
id_konsumen int primary key auto_increment,
nama_konsumen varchar(25) not null,
alamat text not null