Skip to content

Instantly share code, notes, and snippets.

View imkk000's full-sized avatar
:shipit:
Meow Meow

NB imkk000

:shipit:
Meow Meow
  • Thailand
  • 14:04 (UTC +07:00)
View GitHub Profile
@pboyd
pboyd / redefine_func_amd64.go
Last active February 27, 2026 19:03
Redefine a Go function
package main
import (
"encoding/binary"
"fmt"
"reflect"
"syscall"
"time"
"unsafe"
)
@Silica163
Silica163 / thai font on linux.md
Last active January 21, 2026 00:36
install thai font in linux

How to install Thai font on linux

Download font files

Go to fonts.google.com then search for Thai font family, select the one you like or many as you want. Click Download, you will got a zip file contains that font.

I don't know about other distro, but don't use aur/ttf-google-thai because it doesn't contain any glyph of Thai font.

You can also use noto-fonts but it is 108MiB large, to large if you only want thai font.

@awadhwana
awadhwana / main.go
Last active March 7, 2026 05:39
Golang: aes-256-cbc ecrypt/decrypt examples (with iv, blockSize)
package main
// Working example: https://goplay.space/#Sa7qCLm6w65
import (
"bytes"
"crypto/aes"
"crypto/cipher"
"encoding/hex"
"fmt"
@jrbergen
jrbergen / proton_compat_coh2_syncerror.md
Last active February 10, 2026 12:37
Instructions to resolve Company Of Heroes 2 Sync-Error for Proton (Tested on 5.0-10)

Instructions to resolve Company Of Heroes 2 Sync-Error for Proton (Tested on 5.0-10 and 6.3-2)

In support of this comment on Proton's CoH2 issues thread: Company of Heroes 2 (231430) #3875

Based on original solution by @Cytomax55 in the same thread.

Edit Feb 2023: this may also work for CoH3 (the paths are different of course). I haven't tested this for CoH 3 yet and hope either Proton / Relic will make this fix unnecessary. See also @sfxworks's comment.

Instructions for automatic fix with a script by TechT10n

@chhh
chhh / ArchLinuxWSL2.md
Created April 29, 2021 06:59 — forked from ld100/ArchLinuxWSL2.md
Steps for setting up Arch Linux on WSL2

Migrating from Ubuntu on WSL to ArchLinux on WSL2

Upgrading to WSL 2

  • Download WSL2 Kernel
  • run wsl --set-default-version 2 in windows command line, so that all future WSL machine will use WSL2.

Installing Arch Linux

@ld100
ld100 / ArchLinuxWSL2.md
Last active February 13, 2026 17:03
Steps for setting up Arch Linux on WSL2

Migrating from Ubuntu on WSL to ArchLinux on WSL2

Obsolete notice

This document was created back in 2020 and might not be actual nowadays. It is not supported anymore, so use thise information at your own risk.

Upgrading to WSL 2

  • Download WSL2 Kernel
  • run wsl --set-default-version 2 in windows command line, so that all future WSL machine will use WSL2.
@marcojahn
marcojahn / conventional-commit-regex.md
Last active November 20, 2025 14:29
Conventional Commit Regex

the following regex will validate all examples provided here: https://www.conventionalcommits.org/en/v1.0.0/

  ^(build|chore|ci|docs|feat|fix|perf|refactor|revert|style|test){1}(\([\w\-\.]+\))?(!)?: ([\w ])+([\s\S]*)

a grep/posix compatible variant

  ^(build|chore|ci|docs|feat|fix|perf|refactor|revert|style|test){1}(\([[:alnum:]._-]+\))?(!)?: ([[:alnum:]])+([[:space:][:print:]]*)
# ---------------------------------------------------------------------
# The first stage container, for building the application
# ---------------------------------------------------------------------
FROM golang:1.12.1-stretch as builder
COPY . /app
# Add the keys
ARG bitbucket_id
ENV bitbucket_id=$bitbucket_id
@miguelmota
miguelmota / crypto.go
Last active June 5, 2024 14:28
Golang SHA256 hash example
package crypto
import (
"crypto/sha256"
)
// NewSHA256 ...
func NewSHA256(data []byte) []byte {
hash := sha256.Sum256(data)
return hash[:]