#!/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 |
{ | |
"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"}, |
version: '3' | |
x-tpl-nginx-lb: &tpl-nginx-lb | |
image: nginx:stable-alpine | |
restart: unless-stopped | |
expose: [ 80 ] | |
entrypoint: | |
- sh | |
- -c | |
- | |
#btrfs benchmark for daily used desktop OS |
wrk is the binary used as injector, always used with these options:
./wrk -t12 -c1000 -d15s http://127.0.0.1:8080/
│ 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 |
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.
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: |