Skip to content

Instantly share code, notes, and snippets.

View kokizzu's full-sized avatar

Kiswono Prayogo kokizzu

View GitHub Profile
@adtac
adtac / Dockerfile
Last active April 13, 2024 22:33
#!/usr/bin/env docker run
#!/usr/bin/env -S bash -c "docker run -p 8080:8080 -it --rm \$(docker build --progress plain -f \$0 . 2>&1 | tee /dev/stderr | grep -oP 'sha256:[0-9a-f]*')"
# syntax = docker/dockerfile:1.4.0
FROM node:20
WORKDIR /root
RUN npm install sqlite3
@codenoid
codenoid / wilayah.json
Last active February 14, 2024 18:03
Data Wilayah 38 Provinsi (Pemekaran Papua) (Lvl Prov-Kelurahan)
This file has been truncated, but you can view the full file.
{
"provinsi": {"11": "ACEH", "12": "SUMATERA UTARA", "13": "SUMATERA BARAT", "14": "RIAU", "15": "JAMBI", "16": "SUMATERA SELATAN", "17": "BENGKULU", "18": "LAMPUNG", "19": "KEPULAUAN BANGKA BELITUNG", "21": "KEPULAUAN RIAU", "31": "DKI JAKARTA", "32": "JAWA BARAT", "33": "JAWA TENGAH", "34": "DAERAH ISTIMEWA YOGYAKARTA", "35": "JAWA TIMUR", "36": "BANTEN", "51": "BALI", "52": "NUSA TENGGARA BARAT", "53": "NUSA TENGGARA TIMUR", "61": "KALIMANTAN BARAT", "92": "PAPUA BARAT", "62": "KALIMANTAN TENGAH", "63": "KALIMANTAN SELATAN", "64": "KALIMANTAN TIMUR", "65": "KALIMANTAN UTARA", "71": "SULAWESI UTARA", "72": "SULAWESI TENGAH", "73": "SULAWESI SELATAN", "74": "SULAWESI TENGGARA", "75": "GORONTALO", "76": "SULAWESI BARAT", "81": "MALUKU", "82": "MALUKU UTARA", "91": "PAPUA", "93": "PAPUA SELATAN", "94": "PAPUA TENGAH", "95": "PAPUA PEGUNUNGAN", "96": "PAPUA BARAT DAYA"},
"kabupaten": {"11": {"01": "ACEH SELATAN", "02": "ACEH TENGGARA", "03": "ACEH TIMUR", "04": "ACEH TENGAH", "05": "ACEH BARAT", "06": "
@ii64
ii64 / docker-compose.yml
Created April 23, 2023 11:32
Unpopular docker compose YAML template
version: '3'
x-tpl-nginx-lb: &tpl-nginx-lb
image: nginx:stable-alpine
restart: unless-stopped
expose: [ 80 ]
entrypoint:
- sh
- -c
- |
@braindevices
braindevices / #btrfs benchmark for daily used desktop OS
Last active May 6, 2024 14:27
which file sytem to use for daily work? should we turn on btrfs compression?
#btrfs benchmark for daily used desktop OS
@r0mdau
r0mdau / README.md
Last active December 28, 2023 23:33
Rust Actix vs Rust Hyper vs Go fasthttp vs Go net/http httprouter

Load tests

Injector

wrk is the binary used as injector, always used with these options:

./wrk -t12 -c1000 -d15s http://127.0.0.1:8080/

Results

@bketelsen
bketelsen / cleanup.sh
Created July 4, 2021 12:43
cleanup detritus from dev work
│ File: .zsh/includes/cleanup.sh
───────┼─────────────────────────────────────────────────────────────────────────────────────────────────────────
1 │ cleanup () {
2 │ find ~/src -name 'node_modules' -type d -prune -exec rm -rf '{}' +
3 │ find ~/src -name '.next' -type d -prune -exec rm -rf '{}' +
4 │ cargo sweep -r -t 30 ~/src
5 │ brew cleanup
6 │ is_bin_in_path docker && docker system prune -a -f --volumes || echo "skipping docker"
7 │ }
8 │ # https://stackoverflow.com/questions/6569478/detect-if-executable-file-is-on-users-path
@evalphobia
evalphobia / README.md
Last active December 19, 2022 04:15
Golang Benchmark: uuid(v4) vs cuid vs nanoid

Golang Benchmark: uuid(v4) vs cuid vs nanoid

Comparing these libraries

  • github.com/google/uuid
  • github.com/lucsky/cuid
  • github.com/matoous/go-nanoid

result

@codenoid
codenoid / go-resource.md
Created May 6, 2021 16:37
Some resources that have helped me learn golang over the last 3 years.

Some resources that have helped me learn golang over the last 3 years. I taught myself golang, it was a lot of grinding initially but I went through with it because I really liked the simplicity yet ability to be bare metal.

Here are some resources that have helped me in my journey. Sharing them here in case anyone is looking for study materials. [Disclaimer: These are links/notes collected over 3 years and not necessarily in order of expertise, but I will try my best to order them starting from basic ones and moving to more advanced resources]

Firstly - https://golang.org/ and https://golang.org/doc/ .Learn straight from the gophers mouth.

https://www.udemy.com/share/1013gw/ - Todd Mcloeds Course which I completed. Lays a strong and solid foundation of the most important golang concepts. I hope hes been updating his course. Highly recommend.

Tip: I created a repo while following the course. Helped drill the concepts in. Feel free to use this or or make something similar as your learn.

@wlib
wlib / LICENSE
Last active April 30, 2024 17:07
Run a shell script with bash, line-by-line, prompted on each command. Useful for running unknown scripts or debugging. Not a secure substitute for understanding a script beforehand.
MIT License
Copyright (c) 2021 Daniel Ethridge
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions: