Skip to content

Instantly share code, notes, and snippets.

View ii64's full-sized avatar
🏫
College Student

Maple ii64

🏫
College Student
View GitHub Profile
@ii64
ii64 / docker-compose.yml
Last active March 30, 2024 06:58
Docker / Swarm usage example of ExternalDNS (https://github.com/ii64/external-dns docker-engine source driver)
services:
external-dns:
image: "ii64/external-dns:v0.12.2-docker-mini"
container_name: external-dns
user: root
environment:
- CF_API_KEY=XXX
- CF_API_EMAIL=XXX
volumes:
- "/var/run/docker.sock:/var/run/docker.sock:ro"
@ii64
ii64 / install_waydroid.sh
Created August 27, 2022 14:48 — forked from cniw/install_waydroid.sh
Install Waydroid on unsupported Debian based distro caused by incompatible python3-gbinder package
#!/bin/bash
# script name: install_waydroid.sh
# description: Install Waydroid on unsupported Debian based distro caused by incompatible python3-gbinder package
# related to : https://github.com/waydroid/waydroid/issues/214#issuecomment-1120926304
# author : Wachid Adi Nugroho <wachidadinugroho.maya@gmail.com>
# date : 2022-07-07
export distro=$(grep -oP '(?<=^NAME=).*' /etc/os-release)
if [[ -f /usr/bin/dpkg ]];
@ii64
ii64 / jni_all.h
Created August 24, 2022 06:54 — forked from Jinmo/jni_all.h
Useful when reversing JNI on IDA Pro
/*
* Copyright (c) 1996, 1998, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License version 2 only, as
* published by the Free Software Foundation. Oracle designates this
* particular file as subject to the "Classpath" exception as provided
* by Oracle in the LICENSE file that accompanied this code.
*
@ii64
ii64 / http_simple.go
Last active July 1, 2022 17:34
Simple http server written in Go using gouringasm (liburing 2.1 not via CGo)
package main
import (
"fmt"
"log"
"net"
"os"
"os/signal"
"runtime"
"sync"
@ii64
ii64 / pyheif.py
Created May 28, 2022 12:49
SImple HEIF to PNG
import io
import sys
import pyheif
from PIL import Image
files = sys.argv[1:]
fio = [ open(filename, "rb") for filename in files ]
fout = [ open(filename+".png", "wb") for filename in files ]
for i, fbuf in enumerate(fio):
@ii64
ii64 / main.go
Created May 14, 2022 22:34
"circular" encoding/gob example no-copy data.
package main
import (
"bytes"
"encoding/gob"
"fmt"
"reflect"
unsafeX "github.com/ii64/go-unsafe"
)
@ii64
ii64 / build.cmd
Created May 8, 2022 07:20
ReinterpretPtr, mutating pointer with unsafe.Pointer with generic Go 1.18
go build main.go
go tool objdump -S main.exe > main.asm
go tool compile -S -N main.go > main.asm2
package golang
import "testing"
var lookupMap = map[string]int{
"Constant": 1,
"Bool": 2,
"Byte": 3,
"I16": 4,
"I32": 5,
@ii64
ii64 / a.md
Last active March 24, 2022 10:52
E-FORM endpoint
@ii64
ii64 / evloop_v2.go
Created March 5, 2022 02:45
gouring evloop implementation
package main
import (
"fmt"
"io"
"log"
"net"
"net/http"
"runtime"
"sync/atomic"