feat: re gen

main
sudo pacman -Syu 2023-09-22 23:40:26 +07:00
parent 580959d7f8
commit 68582e14b7
34 changed files with 1214 additions and 1960 deletions

View File

@ -28,15 +28,13 @@
<h2>
<a href="index.html"><code>~</code></a>
</h2>
<h1>
<a
id="user-content-backup-my-way"
class="anchor"
aria-hidden="true"
tabindex="-1"
href="#backup-my-way"
><span aria-hidden="true" class="octicon octicon-link"></span></a
>Backup my way
<h1 id="user-content-backup-my-way">
<a class="heading-link" href="#backup-my-way"
>Backup my way<span
aria-hidden="true"
class="octicon octicon-link"
></span
></a>
</h1>
<p>
First thing first, I want to list my own devices, which I have through the
@ -153,15 +151,13 @@
<strong>How to backup</strong>, the second is
<strong>Recovery strategy</strong>.
</p>
<h2>
<a
id="user-content-how-to-backup"
class="anchor"
aria-hidden="true"
tabindex="-1"
href="#how-to-backup"
><span aria-hidden="true" class="octicon octicon-link"></span></a
>How to backup
<h2 id="user-content-how-to-backup">
<a class="heading-link" href="#how-to-backup"
>How to backup<span
aria-hidden="true"
class="octicon octicon-link"
></span
></a>
</h2>
<p>
Before I talk about backup, I want to talk about data. In specifically,
@ -262,15 +258,13 @@ restic -r rclone:remote:PrivateData restore latest --target <span class="pl-k">~
<li>Store locally in my laptop</li>
<li>Don't store locally in phone (can not keep track easily)</li>
</ul>
<h3>
<a
id="user-content-backup-work-related-data"
class="anchor"
aria-hidden="true"
tabindex="-1"
href="#backup-work-related-data"
><span aria-hidden="true" class="octicon octicon-link"></span></a
>Backup work related data
<h3 id="user-content-backup-work-related-data">
<a class="heading-link" href="#backup-work-related-data"
>Backup work related data<span
aria-hidden="true"
class="octicon octicon-link"
></span
></a>
</h3>
<p>APIs tools:</p>
<ul>
@ -285,15 +279,13 @@ restic -r rclone:remote:PrivateData restore latest --target <span class="pl-k">~
Stay away from Postman, it's lag and you can accidentally upload private
data publicly.
</p>
<h2>
<a
id="user-content-recovery-strategy"
class="anchor"
aria-hidden="true"
tabindex="-1"
href="#recovery-strategy"
><span aria-hidden="true" class="octicon octicon-link"></span></a
>Recovery strategy
<h2 id="user-content-recovery-strategy">
<a class="heading-link" href="#recovery-strategy"
>Recovery strategy<span
aria-hidden="true"
class="octicon octicon-link"
></span
></a>
</h2>
<p>
There are many strategies that I process to react as if something strange
@ -316,15 +308,10 @@ restic -r rclone:remote:PrivateData restore latest --target <span class="pl-k">~
master password and OTP from Gmail, which I log in previously.
</li>
</ul>
<h2>
<a
id="user-content-misc"
class="anchor"
aria-hidden="true"
tabindex="-1"
href="#misc"
><span aria-hidden="true" class="octicon octicon-link"></span></a
>Misc
<h2 id="user-content-misc">
<a class="heading-link" href="#misc"
>Misc<span aria-hidden="true" class="octicon octicon-link"></span
></a>
</h2>
<p>
To backup everything is hard, so keep it simple and only backup important
@ -334,15 +321,10 @@ restic -r rclone:remote:PrivateData restore latest --target <span class="pl-k">~
<li>TODOis, Evernote, ... -&gt; Google Keep / Notion</li>
<li>Dropbox, OneDrive, ... -&gt; Google Drive</li>
</ul>
<h2>
<a
id="user-content-the-end"
class="anchor"
aria-hidden="true"
tabindex="-1"
href="#the-end"
><span aria-hidden="true" class="octicon octicon-link"></span></a
>The end
<h2 id="user-content-the-end">
<a class="heading-link" href="#the-end"
>The end<span aria-hidden="true" class="octicon octicon-link"></span
></a>
</h2>
<p>This guide will be updated regularly I promise.</p>

View File

@ -28,15 +28,13 @@
<h2>
<a href="index.html"><code>~</code></a>
</h2>
<h1>
<a
id="user-content-dockerfile-for-go"
class="anchor"
aria-hidden="true"
tabindex="-1"
href="#dockerfile-for-go"
><span aria-hidden="true" class="octicon octicon-link"></span></a
>Dockerfile for Go
<h1 id="user-content-dockerfile-for-go">
<a class="heading-link" href="#dockerfile-for-go"
>Dockerfile for Go<span
aria-hidden="true"
class="octicon octicon-link"
></span
></a>
</h1>
<p>
Each time I start a new Go project, I repeat many steps. Like set up
@ -165,15 +163,10 @@
<span class="pl-k">ENTRYPOINT</span> [<span class="pl-s">"/app"</span>]</pre>
</div>
<p>Finally, I copy <code>app</code> to Distroless base image.</p>
<h2>
<a
id="user-content-thanks"
class="anchor"
aria-hidden="true"
tabindex="-1"
href="#thanks"
><span aria-hidden="true" class="octicon octicon-link"></span></a
>Thanks
<h2 id="user-content-thanks">
<a class="heading-link" href="#thanks"
>Thanks<span aria-hidden="true" class="octicon octicon-link"></span
></a>
</h2>
<ul>
<li>

View File

@ -28,15 +28,13 @@
<h2>
<a href="index.html"><code>~</code></a>
</h2>
<h1>
<a
id="user-content-bootstrap-go"
class="anchor"
aria-hidden="true"
tabindex="-1"
href="#bootstrap-go"
><span aria-hidden="true" class="octicon octicon-link"></span></a
>Bootstrap Go
<h1 id="user-content-bootstrap-go">
<a class="heading-link" href="#bootstrap-go"
>Bootstrap Go<span
aria-hidden="true"
class="octicon octicon-link"
></span
></a>
</h1>
<p>
It is hard to write bootstrap tool to quickly create Go service. So I
@ -44,15 +42,10 @@
I need to write a Go service from scratch. Also, this is my personal
opinion, so feel free to comment.
</p>
<h2>
<a
id="user-content-structure"
class="anchor"
aria-hidden="true"
tabindex="-1"
href="#structure"
><span aria-hidden="true" class="octicon octicon-link"></span></a
>Structure
<h2 id="user-content-structure">
<a class="heading-link" href="#structure"
>Structure<span aria-hidden="true" class="octicon octicon-link"></span
></a>
</h2>
<div class="highlight highlight-text-adblock">
<pre>
@ -135,15 +128,13 @@ internal
<code>business</code>.
</li>
</ul>
<h2>
<a
id="user-content-do-not-repeat"
class="anchor"
aria-hidden="true"
tabindex="-1"
href="#do-not-repeat"
><span aria-hidden="true" class="octicon octicon-link"></span></a
>Do not repeat!
<h2 id="user-content-do-not-repeat">
<a class="heading-link" href="#do-not-repeat"
>Do not repeat!<span
aria-hidden="true"
class="octicon octicon-link"
></span
></a>
</h2>
<p>If we have too many services, some of the logic will be overlapped.</p>
<p>
@ -157,25 +148,21 @@ internal
Another bad practice is adapter service. No need to write a new service if
what we need is just common pkg libs.
</p>
<h2>
<a
id="user-content-taste-on-style-guide"
class="anchor"
aria-hidden="true"
tabindex="-1"
href="#taste-on-style-guide"
><span aria-hidden="true" class="octicon octicon-link"></span></a
>Taste on style guide
<h2 id="user-content-taste-on-style-guide">
<a class="heading-link" href="#taste-on-style-guide"
>Taste on style guide<span
aria-hidden="true"
class="octicon octicon-link"
></span
></a>
</h2>
<h3>
<a
id="user-content-stop-using-global-var"
class="anchor"
aria-hidden="true"
tabindex="-1"
href="#stop-using-global-var"
><span aria-hidden="true" class="octicon octicon-link"></span></a
>Stop using global var
<h3 id="user-content-stop-using-global-var">
<a class="heading-link" href="#stop-using-global-var"
>Stop using global var<span
aria-hidden="true"
class="octicon octicon-link"
></span
></a>
</h3>
<p>
If I see someone using global var, I swear I will shoot them twice in the
@ -186,15 +173,13 @@ internal
<li>Can not write unit test.</li>
<li>Is not thread safe.</li>
</ul>
<h3>
<a
id="user-content-use-functional-options-but-dont-overuse-it"
class="anchor"
aria-hidden="true"
tabindex="-1"
href="#use-functional-options-but-dont-overuse-it"
><span aria-hidden="true" class="octicon octicon-link"></span></a
>Use functional options, but don't overuse it!
<h3 id="user-content-use-functional-options-but-dont-overuse-it">
<a class="heading-link" href="#use-functional-options-but-dont-overuse-it"
>Use functional options, but don't overuse it!<span
aria-hidden="true"
class="octicon octicon-link"
></span
></a>
</h3>
<p>
For simple struct with 1 or 2 fields, no need to use functional options.
@ -240,19 +225,15 @@ internal
<code>WithB</code> option. No need to pass direct field inside
<code>s</code>.
</p>
<h3>
<a
id="user-content-use-errgroup-as-much-as-possible"
class="anchor"
aria-hidden="true"
tabindex="-1"
href="#use-errgroup-as-much-as-possible"
><span aria-hidden="true" class="octicon octicon-link"></span></a
>Use
<a href="https://pkg.go.dev/golang.org/x/sync/errgroup" rel="nofollow"
<h3 id="user-content-use-errgroup-as-much-as-possible">
<a class="heading-link" href="#use-errgroup-as-much-as-possible">Use </a
><a href="https://pkg.go.dev/golang.org/x/sync/errgroup" rel="nofollow"
>errgroup</a
>
as much as possible
as much as possible<span
aria-hidden="true"
class="octicon octicon-link"
></span>
</h3>
<p>
If business logic involves calling too many APIs, but they are not depend
@ -285,35 +266,33 @@ internal
<span class="pl-c">// Handle error</span>
}</pre>
</div>
<h3>
<h3 id="user-content-use-semaphore-when-need-to-implement-workerpool">
<a
id="user-content-use-semaphore-when-need-to-implement-workerpool"
class="anchor"
aria-hidden="true"
tabindex="-1"
class="heading-link"
href="#use-semaphore-when-need-to-implement-workerpool"
><span aria-hidden="true" class="octicon octicon-link"></span></a
>Use
<a href="https://pkg.go.dev/golang.org/x/sync/semaphore" rel="nofollow"
>Use </a
><a href="https://pkg.go.dev/golang.org/x/sync/semaphore" rel="nofollow"
>semaphore</a
>
when need to implement WorkerPool
when need to implement WorkerPool<span
aria-hidden="true"
class="octicon octicon-link"
></span>
</h3>
<p>
Please don't use external libs for WorkerPool, I don't want to deal with
dependency hell.
</p>
<h3>
<h3
id="user-content-use-syncpool-when-need-to-reuse-object-mainly-for-bytesbuffer"
>
<a
id="user-content-use-syncpool-when-need-to-reuse-object-mainly-for-bytesbuffer"
class="anchor"
aria-hidden="true"
tabindex="-1"
class="heading-link"
href="#use-syncpool-when-need-to-reuse-object-mainly-for-bytesbuffer"
><span aria-hidden="true" class="octicon octicon-link"></span></a
>Use
<a href="https://pkg.go.dev/sync#Pool" rel="nofollow">sync.Pool</a> when
>Use </a
><a href="https://pkg.go.dev/sync#Pool" rel="nofollow">sync.Pool</a> when
need to reuse object, mainly for <code>bytes.Buffer</code>
<span aria-hidden="true" class="octicon octicon-link"></span>
</h3>
<p>Example:</p>
<div class="highlight highlight-source-go">
@ -343,39 +322,33 @@ internal
<span class="pl-k">return</span> <span class="pl-s1">result</span>, <span class="pl-c1">nil</span>
}</pre>
</div>
<h2>
<a
id="user-content-external-libs"
class="anchor"
aria-hidden="true"
tabindex="-1"
href="#external-libs"
><span aria-hidden="true" class="octicon octicon-link"></span></a
>External libs
<h2 id="user-content-external-libs">
<a class="heading-link" href="#external-libs"
>External libs<span
aria-hidden="true"
class="octicon octicon-link"
></span
></a>
</h2>
<h3>
<a
id="user-content-no-need-vendor"
class="anchor"
aria-hidden="true"
tabindex="-1"
href="#no-need-vendor"
><span aria-hidden="true" class="octicon octicon-link"></span></a
>No need <code>vendor</code>
<h3 id="user-content-no-need-vendor">
<a class="heading-link" href="#no-need-vendor"
>No need <code>vendor</code>
<span aria-hidden="true" class="octicon octicon-link"></span
></a>
</h3>
<p>
Only need if you need something from <code>vendor</code>, to generate mock
or something else.
</p>
<h3>
<h3 id="user-content-use-buildgo-to-include-build-tools-in-gomod">
<a
id="user-content-use-buildgo-to-include-build-tools-in-gomod"
class="anchor"
aria-hidden="true"
tabindex="-1"
class="heading-link"
href="#use-buildgo-to-include-build-tools-in-gomod"
><span aria-hidden="true" class="octicon octicon-link"></span></a
>Use <code>build.go</code> to include build tools in go.mod
>Use <code>build.go</code> to include build tools in go.mod<span
aria-hidden="true"
class="octicon octicon-link"
></span
></a>
</h3>
<p>To easily control version of build tools.</p>
<p>For example <code>build.go</code>:</p>
@ -398,18 +371,16 @@ internal
We always get the version of build tools in <code>go.mod</code> each time
we install it. Future contributors will not cry anymore.
</p>
<h3>
<h3
id="user-content-dont-use-cli-libs-spf13cobra-urfavecli-just-for-go-service"
>
<a
id="user-content-dont-use-cli-libs-spf13cobra-urfavecli-just-for-go-service"
class="anchor"
aria-hidden="true"
tabindex="-1"
class="heading-link"
href="#dont-use-cli-libs-spf13cobra-urfavecli-just-for-go-service"
><span aria-hidden="true" class="octicon octicon-link"></span></a
>Don't use cli libs (<a href="https://github.com/spf13/cobra"
>spf13/cobra</a
>, <a href="https://github.com/urfave/cli">urfave/cli</a>) just for Go
service
>Don't use cli libs (</a
><a href="https://github.com/spf13/cobra">spf13/cobra</a>,
<a href="https://github.com/urfave/cli">urfave/cli</a>) just for Go
service<span aria-hidden="true" class="octicon octicon-link"></span>
</h3>
<p>
What is the point to pass many params (<code>do-it</code>,
@ -422,18 +393,13 @@ internal
<a href="https://12factor.net/" rel="nofollow">The Twelve Factors</a>
guide.
</p>
<h3>
<a
id="user-content-dont-use-grpc-ecosystemgrpc-gateway"
class="anchor"
aria-hidden="true"
tabindex="-1"
href="#dont-use-grpc-ecosystemgrpc-gateway"
><span aria-hidden="true" class="octicon octicon-link"></span></a
>Don't use
<a href="https://github.com/grpc-ecosystem/grpc-gateway"
<h3 id="user-content-dont-use-grpc-ecosystemgrpc-gateway">
<a class="heading-link" href="#dont-use-grpc-ecosystemgrpc-gateway"
>Don't use </a
><a href="https://github.com/grpc-ecosystem/grpc-gateway"
>grpc-ecosystem/grpc-gateway</a
>
<span aria-hidden="true" class="octicon octicon-link"></span>
</h3>
<p>Just don't.</p>
<p>
@ -446,31 +412,21 @@ internal
Write 1 for both gRPC, REST sounds good, but in the end, it is not worth
it.
</p>
<h3>
<a
id="user-content-dont-use-uberprototool-use-bufbuildbuf"
class="anchor"
aria-hidden="true"
tabindex="-1"
href="#dont-use-uberprototool-use-bufbuildbuf"
><span aria-hidden="true" class="octicon octicon-link"></span></a
>Don't use <a href="https://github.com/uber/prototool">uber/prototool</a>,
use <a href="https://github.com/bufbuild/buf">bufbuild/buf</a>
<h3 id="user-content-dont-use-uberprototool-use-bufbuildbuf">
<a class="heading-link" href="#dont-use-uberprototool-use-bufbuildbuf"
>Don't use </a
><a href="https://github.com/uber/prototool">uber/prototool</a>, use
<a href="https://github.com/bufbuild/buf">bufbuild/buf</a>
<span aria-hidden="true" class="octicon octicon-link"></span>
</h3>
<p>
prototool is deprecated, and buf can generate, lint, format as good as
prototool.
</p>
<h3>
<a
id="user-content-use-gin-gonicgin-for-rest"
class="anchor"
aria-hidden="true"
tabindex="-1"
href="#use-gin-gonicgin-for-rest"
><span aria-hidden="true" class="octicon octicon-link"></span></a
>Use <a href="https://github.com/gin-gonic/gin">gin-gonic/gin</a> for
REST.
<h3 id="user-content-use-gin-gonicgin-for-rest">
<a class="heading-link" href="#use-gin-gonicgin-for-rest">Use </a
><a href="https://github.com/gin-gonic/gin">gin-gonic/gin</a> for
REST.<span aria-hidden="true" class="octicon octicon-link"></span>
</h3>
<p>With <code>c *gin.Context</code>:</p>
<ul>
@ -491,16 +447,11 @@ internal
}
}()</pre>
</div>
<h3>
<a
id="user-content-if-you-want-log-just-use-uber-gozap"
class="anchor"
aria-hidden="true"
tabindex="-1"
href="#if-you-want-log-just-use-uber-gozap"
><span aria-hidden="true" class="octicon octicon-link"></span></a
>If you want log, just use
<a href="https://github.com/uber-go/zap">uber-go/zap</a>
<h3 id="user-content-if-you-want-log-just-use-uber-gozap">
<a class="heading-link" href="#if-you-want-log-just-use-uber-gozap"
>If you want log, just use </a
><a href="https://github.com/uber-go/zap">uber-go/zap</a>
<span aria-hidden="true" class="octicon octicon-link"></span>
</h3>
<p>It is fast!</p>
<ul>
@ -523,16 +474,11 @@ internal
for easily debug.
</li>
</ul>
<h3>
<a
id="user-content-to-read-config-use-spf13viper"
class="anchor"
aria-hidden="true"
tabindex="-1"
href="#to-read-config-use-spf13viper"
><span aria-hidden="true" class="octicon octicon-link"></span></a
>To read config, use
<a href="https://github.com/spf13/viper">spf13/viper</a>
<h3 id="user-content-to-read-config-use-spf13viper">
<a class="heading-link" href="#to-read-config-use-spf13viper"
>To read config, use </a
><a href="https://github.com/spf13/viper">spf13/viper</a>
<span aria-hidden="true" class="octicon octicon-link"></span>
</h3>
<p>
Only init config in main or cmd layer. Do not use
@ -547,15 +493,17 @@ internal
Also, be careful if config value is empty. You should decide to continue
or stop the service if there is empty config.
</p>
<h3>
<h3
id="user-content-dont-overuse-orm-libs-no-need-to-handle-another-layer-above-sql"
>
<a
id="user-content-dont-overuse-orm-libs-no-need-to-handle-another-layer-above-sql"
class="anchor"
aria-hidden="true"
tabindex="-1"
class="heading-link"
href="#dont-overuse-orm-libs-no-need-to-handle-another-layer-above-sql"
><span aria-hidden="true" class="octicon octicon-link"></span></a
>Don't overuse ORM libs, no need to handle another layer above SQL.
>Don't overuse ORM libs, no need to handle another layer above SQL.<span
aria-hidden="true"
class="octicon octicon-link"
></span
></a>
</h3>
<p>
Each ORM libs has each different syntax. To learn and use those libs
@ -577,16 +525,11 @@ internal
those cases. I hear that
<a href="https://github.com/go-gorm/gorm">go-gorm/gorm</a> is good.
</p>
<h3>
<a
id="user-content-connect-redis-with-redisgo-redis"
class="anchor"
aria-hidden="true"
tabindex="-1"
href="#connect-redis-with-redisgo-redis"
><span aria-hidden="true" class="octicon octicon-link"></span></a
>Connect Redis with
<a href="https://github.com/redis/go-redis">redis/go-redis</a>
<h3 id="user-content-connect-redis-with-redisgo-redis">
<a class="heading-link" href="#connect-redis-with-redisgo-redis"
>Connect Redis with </a
><a href="https://github.com/redis/go-redis">redis/go-redis</a>
<span aria-hidden="true" class="octicon octicon-link"></span>
</h3>
<p>
Be careful when use
@ -648,16 +591,11 @@ internal
<ul>
<li><code>ReadTimeout</code>, <code>WriteTimeout</code></li>
</ul>
<h3>
<a
id="user-content-connect-mysql-with-go-sql-drivermysql"
class="anchor"
aria-hidden="true"
tabindex="-1"
href="#connect-mysql-with-go-sql-drivermysql"
><span aria-hidden="true" class="octicon octicon-link"></span></a
>Connect MySQL with
<a href="https://github.com/go-sql-driver/mysql">go-sql-driver/mysql</a>
<h3 id="user-content-connect-mysql-with-go-sql-drivermysql">
<a class="heading-link" href="#connect-mysql-with-go-sql-drivermysql"
>Connect MySQL with </a
><a href="https://github.com/go-sql-driver/mysql">go-sql-driver/mysql</a>
<span aria-hidden="true" class="octicon octicon-link"></span>
</h3>
<p>Remember to config:</p>
<ul>
@ -669,18 +607,13 @@ internal
<li><code>CheckConnLiveness</code> to true.</li>
<li><code>ReadTimeout</code>, <code>WriteTimeout</code></li>
</ul>
<h3>
<a
id="user-content-connect-sqlite-with-moderncorgsqlite"
class="anchor"
aria-hidden="true"
tabindex="-1"
href="#connect-sqlite-with-moderncorgsqlite"
><span aria-hidden="true" class="octicon octicon-link"></span></a
>Connect SQLite with
<a href="https://gitlab.com/cznic/sqlite" rel="nofollow"
<h3 id="user-content-connect-sqlite-with-moderncorgsqlite">
<a class="heading-link" href="#connect-sqlite-with-moderncorgsqlite"
>Connect SQLite with </a
><a href="https://gitlab.com/cznic/sqlite" rel="nofollow"
>modernc.org/sqlite</a
>
<span aria-hidden="true" class="octicon octicon-link"></span>
</h3>
<p>Remember to config:</p>
<ul>
@ -694,15 +627,11 @@ internal
<a href="https://github.com/mattn/go-sqlite3">mattn/go-sqlite3</a>, it's
required <code>CGO_ENABLED</code>.
</p>
<h3>
<a
id="user-content-connect-kafka-with-ibmsarama"
class="anchor"
aria-hidden="true"
tabindex="-1"
href="#connect-kafka-with-ibmsarama"
><span aria-hidden="true" class="octicon octicon-link"></span></a
>Connect Kafka with <a href="https://github.com/IBM/sarama">IBM/sarama</a>
<h3 id="user-content-connect-kafka-with-ibmsarama">
<a class="heading-link" href="#connect-kafka-with-ibmsarama"
>Connect Kafka with </a
><a href="https://github.com/IBM/sarama">IBM/sarama</a>
<span aria-hidden="true" class="octicon octicon-link"></span>
</h3>
<p>
Use <code>sarama.V1_0_0_0</code>, because IBM decide to upgrade default
@ -714,32 +643,26 @@ internal
>confluentinc/confluent-kafka-go</a
>, it's required <code>CGO_ENABLED</code>.
</p>
<h3>
<a
id="user-content-if-you-want-test-just-use-stretchrtestify"
class="anchor"
<h3 id="user-content-if-you-want-test-just-use-stretchrtestify">
<a class="heading-link" href="#if-you-want-test-just-use-stretchrtestify"
>If you want test, just use </a
><a href="https://github.com/stretchr/testify">stretchr/testify</a>.<span
aria-hidden="true"
tabindex="-1"
href="#if-you-want-test-just-use-stretchrtestify"
><span aria-hidden="true" class="octicon octicon-link"></span></a
>If you want test, just use
<a href="https://github.com/stretchr/testify">stretchr/testify</a>.
class="octicon octicon-link"
></span>
</h3>
<p>
It is easy to write a suite test, thanks to testify. Also, for mocking,
there are many options out there. Pick 1 then sleep peacefully.
</p>
<h3>
<h3 id="user-content-if-need-to-mock-choose-matryermoq-or-ubermock">
<a
id="user-content-if-need-to-mock-choose-matryermoq-or-ubermock"
class="anchor"
aria-hidden="true"
tabindex="-1"
class="heading-link"
href="#if-need-to-mock-choose-matryermoq-or-ubermock"
><span aria-hidden="true" class="octicon octicon-link"></span></a
>If need to mock, choose
<a href="https://github.com/matryer/moq">matryer/moq</a> or
>If need to mock, choose </a
><a href="https://github.com/matryer/moq">matryer/moq</a> or
<a href="https://github.com/uber/mock">uber/mock</a>
<span aria-hidden="true" class="octicon octicon-link"></span>
</h3>
<p>
The first is easy to use but not powerful as the later. If you want to
@ -751,15 +674,11 @@ internal
<span class="pl-c">// https://jonwillia.ms/2019/12/22/conditional-gomock-mockgen</span>
<span class="pl-c">//go:generate sh -c "test service_mock_generated.go -nt $GOFILE &amp;&amp; exit 0; moq -rm -out service_mock_generated.go . Service"</span></pre>
</div>
<h3>
<a
id="user-content-be-careful-with-spf13cast"
class="anchor"
aria-hidden="true"
tabindex="-1"
href="#be-careful-with-spf13cast"
><span aria-hidden="true" class="octicon octicon-link"></span></a
>Be careful with <a href="https://github.com/spf13/cast">spf13/cast</a>
<h3 id="user-content-be-careful-with-spf13cast">
<a class="heading-link" href="#be-careful-with-spf13cast"
>Be careful with </a
><a href="https://github.com/spf13/cast">spf13/cast</a>
<span aria-hidden="true" class="octicon octicon-link"></span>
</h3>
<p>Don't cast proto enum:</p>
<div class="highlight highlight-source-go">
@ -769,21 +688,22 @@ internal
<span class="pl-c">// Good</span>
<span class="pl-s1">a</span> <span class="pl-c1">:=</span> <span class="pl-en">int32</span>(<span class="pl-s1">servicev1</span>.<span class="pl-c1">ReasonCode_ABC</span>)</pre>
</div>
<h3>
<h3
id="user-content-use-stringer-if-you-want-your-type-enum-can-be-print-as-string"
>
<a
id="user-content-use-stringer-if-you-want-your-type-enum-can-be-print-as-string"
class="anchor"
aria-hidden="true"
tabindex="-1"
class="heading-link"
href="#use-stringer-if-you-want-your-type-enum-can-be-print-as-string"
><span aria-hidden="true" class="octicon octicon-link"></span></a
>Use
<a
>Use </a
><a
href="https://pkg.go.dev/golang.org/x/tools/cmd/stringer"
rel="nofollow"
>stringer</a
>
if you want your type enum can be print as string
if you want your type enum can be print as string<span
aria-hidden="true"
class="octicon octicon-link"
></span>
</h3>
<div class="highlight highlight-source-go">
<pre><span class="pl-k">type</span> <span class="pl-smi">Drink</span> <span class="pl-smi">int</span>
@ -800,51 +720,40 @@ internal
<span class="pl-c"><span class="pl-c">#</span> Run inside directory which contains Drink</span>
stringer -type=Drink</pre>
</div>
<h3>
<h3
id="user-content-dont-waste-your-time-rewrite-rate-limiter-if-your-use-case-is-simple-use-rate-or-go-redisredis_rate"
>
<a
id="user-content-dont-waste-your-time-rewrite-rate-limiter-if-your-use-case-is-simple-use-rate-or-go-redisredis_rate"
class="anchor"
aria-hidden="true"
tabindex="-1"
class="heading-link"
href="#dont-waste-your-time-rewrite-rate-limiter-if-your-use-case-is-simple-use-rate-or-go-redisredis_rate"
><span aria-hidden="true" class="octicon octicon-link"></span></a
>Don't waste your time rewrite rate limiter if your use case is simple,
use
<a href="https://pkg.go.dev/golang.org/x/time/rate" rel="nofollow"
>Don't waste your time rewrite rate limiter if your use case is simple,
use </a
><a href="https://pkg.go.dev/golang.org/x/time/rate" rel="nofollow"
>rate</a
>
or
<a href="https://github.com/go-redis/redis_rate">go-redis/redis_rate</a>
<span aria-hidden="true" class="octicon octicon-link"></span>
</h3>
<p>
<strong>rate</strong> if you want rate limiter locally in your single
instance of service. <strong>redis_rate</strong> if you want rate limiter
distributed across all your instances of service.
</p>
<h3>
<a
id="user-content-replace-go-fmt-goimports-with-mvdangofumpt"
class="anchor"
<h3 id="user-content-replace-go-fmt-goimports-with-mvdangofumpt">
<a class="heading-link" href="#replace-go-fmt-goimports-with-mvdangofumpt"
>Replace <code>go fmt</code>, <code>goimports</code> with </a
><a href="https://github.com/mvdan/gofumpt">mvdan/gofumpt</a>.<span
aria-hidden="true"
tabindex="-1"
href="#replace-go-fmt-goimports-with-mvdangofumpt"
><span aria-hidden="true" class="octicon octicon-link"></span></a
>Replace <code>go fmt</code>, <code>goimports</code> with
<a href="https://github.com/mvdan/gofumpt">mvdan/gofumpt</a>.
class="octicon octicon-link"
></span>
</h3>
<p><code>gofumpt</code> provides more rules when format Go codes.</p>
<h3>
<a
id="user-content-use-golangcigolangci-lint"
class="anchor"
aria-hidden="true"
tabindex="-1"
href="#use-golangcigolangci-lint"
><span aria-hidden="true" class="octicon octicon-link"></span></a
>Use
<a href="https://github.com/golangci/golangci-lint"
<h3 id="user-content-use-golangcigolangci-lint">
<a class="heading-link" href="#use-golangcigolangci-lint">Use </a
><a href="https://github.com/golangci/golangci-lint"
>golangci/golangci-lint</a
>.
>.<span aria-hidden="true" class="octicon octicon-link"></span>
</h3>
<p>No need to say more. Lint or get the f out!</p>
<p>
@ -863,15 +772,13 @@ go install golang.org/x/tools/go/analysis/passes/fieldalignment/cmd/fieldalignme
<span class="pl-c"><span class="pl-c">#</span> Fix</span>
fieldalignment -fix ./internal/business/<span class="pl-k">*</span>.go</pre>
</div>
<h2>
<a
id="user-content-snippetscript"
class="anchor"
aria-hidden="true"
tabindex="-1"
href="#snippetscript"
><span aria-hidden="true" class="octicon octicon-link"></span></a
>Snippet/script
<h2 id="user-content-snippetscript">
<a class="heading-link" href="#snippetscript"
>Snippet/script<span
aria-hidden="true"
class="octicon octicon-link"
></span
></a>
</h2>
<p>Change import:</p>
<div class="highlight highlight-source-shell">
@ -881,15 +788,10 @@ fieldalignment -fix ./internal/business/<span class="pl-k">*</span>.go</pre>
<div class="highlight highlight-source-shell">
<pre>go clean -cache -testcache -modcache -fuzzcache -x</pre>
</div>
<h2>
<a
id="user-content-thanks"
class="anchor"
aria-hidden="true"
tabindex="-1"
href="#thanks"
><span aria-hidden="true" class="octicon octicon-link"></span></a
>Thanks
<h2 id="user-content-thanks">
<a class="heading-link" href="#thanks"
>Thanks<span aria-hidden="true" class="octicon octicon-link"></span
></a>
</h2>
<ul>
<li>

View File

@ -28,15 +28,13 @@
<h2>
<a href="index.html"><code>~</code></a>
</h2>
<h1>
<a
id="user-content-uuid-or-else"
class="anchor"
aria-hidden="true"
tabindex="-1"
href="#uuid-or-else"
><span aria-hidden="true" class="octicon octicon-link"></span></a
>UUID or else
<h1 id="user-content-uuid-or-else">
<a class="heading-link" href="#uuid-or-else"
>UUID or else<span
aria-hidden="true"
class="octicon octicon-link"
></span
></a>
</h1>
<p>
There are many use cases where we need to use a unique ID. In my
@ -56,15 +54,15 @@
<li><a href="https://github.com/segmentio/ksuid">segmentio/ksuid</a></li>
<li><a href="https://github.com/oklog/ulid">oklog/ulid</a></li>
</ul>
<h2>
<h2 id="user-content-first-use-case-is-trace-id-or-context-aware-id">
<a
id="user-content-first-use-case-is-trace-id-or-context-aware-id"
class="anchor"
aria-hidden="true"
tabindex="-1"
class="heading-link"
href="#first-use-case-is-trace-id-or-context-aware-id"
><span aria-hidden="true" class="octicon octicon-link"></span></a
>First use case is trace ID, or context aware ID
>First use case is trace ID, or context aware ID<span
aria-hidden="true"
class="octicon octicon-link"
></span
></a>
</h2>
<p>
The ID is used only for trace and log. If same ID is generated twice
@ -76,15 +74,15 @@
My choice for this use case is <strong>rs/xid</strong>. Because it is
small (not span too much on log line) and copy friendly.
</p>
<h2>
<h2 id="user-content-second-use-case-is-primary-key-also-hard-choice">
<a
id="user-content-second-use-case-is-primary-key-also-hard-choice"
class="anchor"
aria-hidden="true"
tabindex="-1"
class="heading-link"
href="#second-use-case-is-primary-key-also-hard-choice"
><span aria-hidden="true" class="octicon octicon-link"></span></a
>Second use case is primary key, also hard choice
>Second use case is primary key, also hard choice<span
aria-hidden="true"
class="octicon octicon-link"
></span
></a>
</h2>
<p>
Why I don't use auto increment key for primary key? The answer is simple,
@ -101,29 +99,19 @@
database is sensitive subject, and I need more testing and battle test
proof to trust those libs.
</p>
<h2>
<a
id="user-content-what-else"
class="anchor"
aria-hidden="true"
tabindex="-1"
href="#what-else"
><span aria-hidden="true" class="octicon octicon-link"></span></a
>What else?
<h2 id="user-content-what-else">
<a class="heading-link" href="#what-else"
>What else?<span aria-hidden="true" class="octicon octicon-link"></span
></a>
</h2>
<p>
I think about adding prefix to ID to identify which resource that ID
represents.
</p>
<h2>
<a
id="user-content-thanks"
class="anchor"
aria-hidden="true"
tabindex="-1"
href="#thanks"
><span aria-hidden="true" class="octicon octicon-link"></span></a
>Thanks
<h2 id="user-content-thanks">
<a class="heading-link" href="#thanks"
>Thanks<span aria-hidden="true" class="octicon octicon-link"></span
></a>
</h2>
<ul>
<li>

View File

@ -28,15 +28,11 @@
<h2>
<a href="index.html"><code>~</code></a>
</h2>
<h1>
<a
id="user-content-migrate-to-buf-from-prototool"
class="anchor"
aria-hidden="true"
tabindex="-1"
href="#migrate-to-buf-from-prototool"
><span aria-hidden="true" class="octicon octicon-link"></span></a
>Migrate to <code>buf</code> from <code>prototool</code>
<h1 id="user-content-migrate-to-buf-from-prototool">
<a class="heading-link" href="#migrate-to-buf-from-prototool"
>Migrate to <code>buf</code> from <code>prototool</code>
<span aria-hidden="true" class="octicon octicon-link"></span
></a>
</h1>
<p>
Why? Because <code>prototool</code> is outdated, and can not run on M1
@ -146,15 +142,10 @@
sed -i "" -e "s/import \"marshal-zap\.proto\";//g" ./raw/api.proto
sed -i "" -e "s/\[(marshal_zap\.mask) = true]//g" ./raw/api.proto</pre>
</div>
<h2>
<a
id="user-content-faq"
class="anchor"
aria-hidden="true"
tabindex="-1"
href="#faq"
><span aria-hidden="true" class="octicon octicon-link"></span></a
>FAQ
<h2 id="user-content-faq">
<a class="heading-link" href="#faq"
>FAQ<span aria-hidden="true" class="octicon octicon-link"></span
></a>
</h2>
<p>
Remember <code>bufbuild/protoc-gen-validate</code>,
@ -204,15 +195,10 @@
compatibility.
</li>
</ul>
<h1>
<a
id="user-content-tips"
class="anchor"
aria-hidden="true"
tabindex="-1"
href="#tips"
><span aria-hidden="true" class="octicon octicon-link"></span></a
>Tips
<h1 id="user-content-tips">
<a class="heading-link" href="#tips"
>Tips<span aria-hidden="true" class="octicon octicon-link"></span
></a>
</h1>
<p>Some experience I got after writing proto files for a living:</p>
<ul>
@ -225,15 +211,10 @@
<code>sed</code> to fix the damn things.
</li>
</ul>
<h2>
<a
id="user-content-thanks"
class="anchor"
aria-hidden="true"
tabindex="-1"
href="#thanks"
><span aria-hidden="true" class="octicon octicon-link"></span></a
>Thanks
<h2 id="user-content-thanks">
<a class="heading-link" href="#thanks"
>Thanks<span aria-hidden="true" class="octicon octicon-link"></span
></a>
</h2>
<ul>
<li><a href="https://github.com/uber/prototool">uber/prototool</a></li>

View File

@ -28,29 +28,29 @@
<h2>
<a href="index.html"><code>~</code></a>
</h2>
<h1>
<a
id="user-content-experiment-go"
class="anchor"
aria-hidden="true"
tabindex="-1"
href="#experiment-go"
><span aria-hidden="true" class="octicon octicon-link"></span></a
>Experiment Go
<h1 id="user-content-experiment-go">
<a class="heading-link" href="#experiment-go"
>Experiment Go<span
aria-hidden="true"
class="octicon octicon-link"
></span
></a>
</h1>
<p>
There come a time when you need to experiment new things, new style, new
approach. So this post serves as it is named.
</p>
<h1>
<h1
id="user-content-design-api-by-trimming-down-the-interfacestruct-or-whatever"
>
<a
id="user-content-design-api-by-trimming-down-the-interfacestruct-or-whatever"
class="anchor"
aria-hidden="true"
tabindex="-1"
class="heading-link"
href="#design-api-by-trimming-down-the-interfacestruct-or-whatever"
><span aria-hidden="true" class="octicon octicon-link"></span></a
>Design API by trimming down the interface/struct or whatever
>Design API by trimming down the interface/struct or whatever<span
aria-hidden="true"
class="octicon octicon-link"
></span
></a>
</h1>
<p>Instead of:</p>
<div class="highlight highlight-source-go">
@ -104,16 +104,11 @@
This pattern is used by
<a href="https://github.com/google/go-github">google/go-github</a>.
</p>
<h2>
<a
id="user-content-find-alternative-to-grpcgrpc-go"
class="anchor"
aria-hidden="true"
tabindex="-1"
href="#find-alternative-to-grpcgrpc-go"
><span aria-hidden="true" class="octicon octicon-link"></span></a
>Find alternative to
<a href="https://github.com/grpc/grpc-go">grpc/grpc-go</a>
<h2 id="user-content-find-alternative-to-grpcgrpc-go">
<a class="heading-link" href="#find-alternative-to-grpcgrpc-go"
>Find alternative to </a
><a href="https://github.com/grpc/grpc-go">grpc/grpc-go</a>
<span aria-hidden="true" class="octicon octicon-link"></span>
</h2>
<p>
Why?
@ -146,15 +141,10 @@
<li><a href="https://github.com/twitchtv/twirp">twitchtv/twirp</a></li>
<li><a href="https://github.com/storj/drpc">storj/drpc</a></li>
</ul>
<h1>
<a
id="user-content-thanks"
class="anchor"
aria-hidden="true"
tabindex="-1"
href="#thanks"
><span aria-hidden="true" class="octicon octicon-link"></span></a
>Thanks
<h1 id="user-content-thanks">
<a class="heading-link" href="#thanks"
>Thanks<span aria-hidden="true" class="octicon octicon-link"></span
></a>
</h1>
<ul>
<li>

View File

@ -28,15 +28,10 @@
<h2>
<a href="index.html"><code>~</code></a>
</h2>
<h1>
<a
id="user-content-sql"
class="anchor"
aria-hidden="true"
tabindex="-1"
href="#sql"
><span aria-hidden="true" class="octicon octicon-link"></span></a
>SQL
<h1 id="user-content-sql">
<a class="heading-link" href="#sql"
>SQL<span aria-hidden="true" class="octicon octicon-link"></span
></a>
</h1>
<p>
Previously in my fresher software developer time, I rarely write SQL, I
@ -48,29 +43,25 @@
This guide is not kind of guide which cover all cases. Just my little
tricks when I work with SQL.
</p>
<h2>
<a
id="user-content-stay-away-from-database-unique-id"
class="anchor"
aria-hidden="true"
tabindex="-1"
href="#stay-away-from-database-unique-id"
><span aria-hidden="true" class="octicon octicon-link"></span></a
>Stay away from database unique id
<h2 id="user-content-stay-away-from-database-unique-id">
<a class="heading-link" href="#stay-away-from-database-unique-id"
>Stay away from database unique id<span
aria-hidden="true"
class="octicon octicon-link"
></span
></a>
</h2>
<p>
Use UUID instead. If you can, and you should, choose UUID type which can
be sortable.
</p>
<h2>
<a
id="user-content-stay-away-from-database-timestamp"
class="anchor"
aria-hidden="true"
tabindex="-1"
href="#stay-away-from-database-timestamp"
><span aria-hidden="true" class="octicon octicon-link"></span></a
>Stay away from database timestamp
<h2 id="user-content-stay-away-from-database-timestamp">
<a class="heading-link" href="#stay-away-from-database-timestamp"
>Stay away from database timestamp<span
aria-hidden="true"
class="octicon octicon-link"
></span
></a>
</h2>
<p>
Stay away from all kind of database timestamp (MySQL timestmap, SQLite
@ -89,15 +80,13 @@
[Business] time, data -&gt; convert to unix timestamp milliseconds -&gt; [Database] int64</pre
>
</div>
<h2>
<a
id="user-content-extra-field-for-extra-things"
class="anchor"
aria-hidden="true"
tabindex="-1"
href="#extra-field-for-extra-things"
><span aria-hidden="true" class="octicon octicon-link"></span></a
>Extra field for extra things
<h2 id="user-content-extra-field-for-extra-things">
<a class="heading-link" href="#extra-field-for-extra-things"
>Extra field for extra things<span
aria-hidden="true"
class="octicon octicon-link"
></span
></a>
</h2>
<p>
Create new column in database is scary, so I suggest avoid it if you can.
@ -106,15 +95,13 @@
</p>
<p>I always use MySQL json data type for extra field.</p>
<p>JSON data type also used for dumping request, response data.</p>
<h2>
<a
id="user-content-use-index"
class="anchor"
aria-hidden="true"
tabindex="-1"
href="#use-index"
><span aria-hidden="true" class="octicon octicon-link"></span></a
>Use index!!!
<h2 id="user-content-use-index">
<a class="heading-link" href="#use-index"
>Use index!!!<span
aria-hidden="true"
class="octicon octicon-link"
></span
></a>
</h2>
<p>
You should use index for faster query, but not too much. Don't create
@ -157,15 +144,13 @@
>
</li>
</ul>
<h2>
<a
id="user-content-be-careful-with-null"
class="anchor"
aria-hidden="true"
tabindex="-1"
href="#be-careful-with-null"
><span aria-hidden="true" class="octicon octicon-link"></span></a
>Be careful with NULL
<h2 id="user-content-be-careful-with-null">
<a class="heading-link" href="#be-careful-with-null"
>Be careful with NULL<span
aria-hidden="true"
class="octicon octicon-link"
></span
></a>
</h2>
<p>
If compare with field which can be NULL, remember to check NULL for
@ -185,46 +170,36 @@
<span class="pl-k">WHERE</span> (field_something IS <span class="pl-k">NULL</span> <span class="pl-k">OR</span> field_something <span class="pl-k">!=</span> <span class="pl-c1">1</span>)</pre>
</div>
<p>Need clarify why this happpen? Idk :(</p>
<h2>
<a
id="user-content-varchar-or-text"
class="anchor"
aria-hidden="true"
tabindex="-1"
href="#varchar-or-text"
><span aria-hidden="true" class="octicon octicon-link"></span
<h2 id="user-content-varchar-or-text">
<a class="heading-link" href="#varchar-or-text">
<code>VARCHAR</code> or <code>TEXT</code>
<span aria-hidden="true" class="octicon octicon-link"></span
></a>
<code>VARCHAR</code> or <code>TEXT</code>
</h2>
<p>
Prefer <code>VARCHAR</code> if you need to query and of course use index,
and make sure size of value will never hit the limit. Prefer
<code>TEXT</code> if you don't care, just want to store something.
</p>
<h2>
<a
id="user-content-limit"
class="anchor"
aria-hidden="true"
tabindex="-1"
href="#limit"
><span aria-hidden="true" class="octicon octicon-link"></span></a
><code>LIMIT</code>
<h2 id="user-content-limit">
<a class="heading-link" href="#limit"
><code>LIMIT</code
><span aria-hidden="true" class="octicon octicon-link"></span
></a>
</h2>
<p>
Prefer <code>LIMIT 10 OFFSET 5</code> to <code>LIMIT 5, 10</code> to avoid
misunderstanding.
</p>
<h2>
<h2
id="user-content-be-super-careful-when-migrate-update-database-on-production-and-online"
>
<a
id="user-content-be-super-careful-when-migrate-update-database-on-production-and-online"
class="anchor"
aria-hidden="true"
tabindex="-1"
class="heading-link"
href="#be-super-careful-when-migrate-update-database-on-production-and-online"
><span aria-hidden="true" class="octicon octicon-link"></span></a
>Be super careful when migrate, update database on production and
online!!!
>Be super careful when migrate, update database on production and
online!!!<span aria-hidden="true" class="octicon octicon-link"></span
></a>
</h2>
<p>
Plase read docs about online ddl operations before do anything online
@ -257,26 +232,16 @@
>
</li>
</ul>
<h2>
<a
id="user-content-heathcheck"
class="anchor"
aria-hidden="true"
tabindex="-1"
href="#heathcheck"
><span aria-hidden="true" class="octicon octicon-link"></span></a
>Heathcheck
<h2 id="user-content-heathcheck">
<a class="heading-link" href="#heathcheck"
>Heathcheck<span aria-hidden="true" class="octicon octicon-link"></span
></a>
</h2>
<p>Use <code>SELECT 1</code> to check if database failed yet.</p>
<h2>
<a
id="user-content-tools"
class="anchor"
aria-hidden="true"
tabindex="-1"
href="#tools"
><span aria-hidden="true" class="octicon octicon-link"></span></a
>Tools
<h2 id="user-content-tools">
<a class="heading-link" href="#tools"
>Tools<span aria-hidden="true" class="octicon octicon-link"></span
></a>
</h2>
<ul>
<li>
@ -289,15 +254,10 @@
database reality :)
</li>
</ul>
<h2>
<a
id="user-content-thanks"
class="anchor"
aria-hidden="true"
tabindex="-1"
href="#thanks"
><span aria-hidden="true" class="octicon octicon-link"></span></a
>Thanks
<h2 id="user-content-thanks">
<a class="heading-link" href="#thanks"
>Thanks<span aria-hidden="true" class="octicon octicon-link"></span
></a>
</h2>
<ul>
<li>

View File

@ -28,26 +28,16 @@
<h2>
<a href="index.html"><code>~</code></a>
</h2>
<h1>
<a
id="user-content-gitignore"
class="anchor"
aria-hidden="true"
tabindex="-1"
href="#gitignore"
><span aria-hidden="true" class="octicon octicon-link"></span></a
>gitignore
<h1 id="user-content-gitignore">
<a class="heading-link" href="#gitignore"
>gitignore<span aria-hidden="true" class="octicon octicon-link"></span
></a>
</h1>
<p>My quick check for <code>.gitignore</code>.</p>
<h2>
<a
id="user-content-base"
class="anchor"
aria-hidden="true"
tabindex="-1"
href="#base"
><span aria-hidden="true" class="octicon octicon-link"></span></a
>Base
<h2 id="user-content-base">
<a class="heading-link" href="#base"
>Base<span aria-hidden="true" class="octicon octicon-link"></span
></a>
</h2>
<div class="highlight highlight-text-adblock">
<pre><span class="pl-c"># macOS</span>
@ -62,15 +52,10 @@
<span class="pl-c"># VSCode</span>
.vscode/</pre>
</div>
<h2>
<a
id="user-content-go"
class="anchor"
aria-hidden="true"
tabindex="-1"
href="#go"
><span aria-hidden="true" class="octicon octicon-link"></span></a
>Go
<h2 id="user-content-go">
<a class="heading-link" href="#go"
>Go<span aria-hidden="true" class="octicon octicon-link"></span
></a>
</h2>
<div class="highlight highlight-text-adblock">
<pre><span class="pl-c"># Go</span>
@ -80,15 +65,10 @@ coverage.out
<span class="pl-c"># Should ignore vendor</span>
vendor</pre>
</div>
<h2>
<a
id="user-content-python"
class="anchor"
aria-hidden="true"
tabindex="-1"
href="#python"
><span aria-hidden="true" class="octicon octicon-link"></span></a
>Python
<h2 id="user-content-python">
<a class="heading-link" href="#python"
>Python<span aria-hidden="true" class="octicon octicon-link"></span
></a>
</h2>
<div class="highlight highlight-text-adblock"><pre>venv</pre></div>

View File

@ -28,15 +28,13 @@
<h2>
<a href="index.html"><code>~</code></a>
</h2>
<h1>
<a
id="user-content-reload-config"
class="anchor"
aria-hidden="true"
tabindex="-1"
href="#reload-config"
><span aria-hidden="true" class="octicon octicon-link"></span></a
>Reload config
<h1 id="user-content-reload-config">
<a class="heading-link" href="#reload-config"
>Reload config<span
aria-hidden="true"
class="octicon octicon-link"
></span
></a>
</h1>
<p>This serves as design draft of reload config system</p>
<div class="highlight highlight-source-wsd">

View File

@ -28,15 +28,13 @@
<h2>
<a href="index.html"><code>~</code></a>
</h2>
<h1>
<a
id="user-content-install-arch-linux"
class="anchor"
aria-hidden="true"
tabindex="-1"
href="#install-arch-linux"
><span aria-hidden="true" class="octicon octicon-link"></span></a
>Install Arch Linux
<h1 id="user-content-install-arch-linux">
<a class="heading-link" href="#install-arch-linux"
>Install Arch Linux<span
aria-hidden="true"
class="octicon octicon-link"
></span
></a>
</h1>
<p>
Install Arch Linux is thing I always want to do for my laptop/PC since I
@ -46,29 +44,21 @@
This is not a guide for everyone, this is just save for myself in a future
and for anyone who want to walk in my shoes.
</p>
<h2>
<a
id="user-content-installation-guide"
class="anchor"
aria-hidden="true"
tabindex="-1"
href="#installation-guide"
><span aria-hidden="true" class="octicon octicon-link"></span></a
<h2 id="user-content-installation-guide">
<a class="heading-link" href="#installation-guide"></a
><a
href="https://wiki.archlinux.org/index.php/Installation_guide"
rel="nofollow"
>Installation guide</a
>
><span aria-hidden="true" class="octicon octicon-link"></span>
</h2>
<h3>
<a
id="user-content-pre-installation"
class="anchor"
aria-hidden="true"
tabindex="-1"
href="#pre-installation"
><span aria-hidden="true" class="octicon octicon-link"></span></a
>Pre-installation
<h3 id="user-content-pre-installation">
<a class="heading-link" href="#pre-installation"
>Pre-installation<span
aria-hidden="true"
class="octicon octicon-link"
></span
></a>
</h3>
<p>Check disks carefully:</p>
<div class="highlight highlight-source-shell"><pre>lsblk</pre></div>
@ -79,43 +69,37 @@
>USB flash installation medium</a
>
</p>
<h4>
<a
id="user-content-verify-the-boot-mode"
class="anchor"
aria-hidden="true"
tabindex="-1"
href="#verify-the-boot-mode"
><span aria-hidden="true" class="octicon octicon-link"></span></a
>Verify the boot mode
<h4 id="user-content-verify-the-boot-mode">
<a class="heading-link" href="#verify-the-boot-mode"
>Verify the boot mode<span
aria-hidden="true"
class="octicon octicon-link"
></span
></a>
</h4>
<p>Check UEFI mode:</p>
<div class="highlight highlight-source-shell">
<pre>ls /sys/firmware/efi/efivars</pre>
</div>
<h4>
<a
id="user-content-connect-to-the-internet"
class="anchor"
aria-hidden="true"
tabindex="-1"
href="#connect-to-the-internet"
><span aria-hidden="true" class="octicon octicon-link"></span></a
>Connect to the internet
<h4 id="user-content-connect-to-the-internet">
<a class="heading-link" href="#connect-to-the-internet"
>Connect to the internet<span
aria-hidden="true"
class="octicon octicon-link"
></span
></a>
</h4>
<p>
For wifi, use
<a href="https://wiki.archlinux.org/index.php/Iwd" rel="nofollow">iwd</a>.
</p>
<h4>
<a
id="user-content-partition-the-disks"
class="anchor"
aria-hidden="true"
tabindex="-1"
href="#partition-the-disks"
><span aria-hidden="true" class="octicon octicon-link"></span></a
>Partition the disks
<h4 id="user-content-partition-the-disks">
<a class="heading-link" href="#partition-the-disks"
>Partition the disks<span
aria-hidden="true"
class="octicon octicon-link"
></span
></a>
</h4>
<p>
<a href="https://wiki.archlinux.org/index.php/GPT_fdisk" rel="nofollow"
@ -240,15 +224,13 @@ mount --mkdir /dev/efi_system_partition /mnt/efi
<span class="pl-c"><span class="pl-c">#</span> boot</span>
mount --mkdir /dev/extended_boot_loader_partition /mnt/boot</pre>
</div>
<h3>
<a
id="user-content-installation"
class="anchor"
aria-hidden="true"
tabindex="-1"
href="#installation"
><span aria-hidden="true" class="octicon octicon-link"></span></a
>Installation
<h3 id="user-content-installation">
<a class="heading-link" href="#installation"
>Installation<span
aria-hidden="true"
class="octicon octicon-link"
></span
></a>
</h3>
<div class="highlight highlight-source-shell">
<pre>pacstrap -K /mnt base linux linux-firmware
@ -268,53 +250,32 @@ pacstrap -K /mnt lvm2
<span class="pl-c"><span class="pl-c">#</span> Text editor</span>
pacstrap -K /mnt neovim</pre>
</div>
<h3>
<a
id="user-content-configure"
class="anchor"
aria-hidden="true"
tabindex="-1"
href="#configure"
><span aria-hidden="true" class="octicon octicon-link"></span></a
>Configure
<h3 id="user-content-configure">
<a class="heading-link" href="#configure"
>Configure<span aria-hidden="true" class="octicon octicon-link"></span
></a>
</h3>
<h4>
<a
id="user-content-fstab"
class="anchor"
aria-hidden="true"
tabindex="-1"
href="#fstab"
><span aria-hidden="true" class="octicon octicon-link"></span></a
<h4 id="user-content-fstab">
<a class="heading-link" href="#fstab"></a
><a href="https://wiki.archlinux.org/index.php/Fstab" rel="nofollow"
>fstab</a
>
><span aria-hidden="true" class="octicon octicon-link"></span>
</h4>
<div class="highlight highlight-source-shell">
<pre>genfstab -U /mnt <span class="pl-k">&gt;&gt;</span> /mnt/etc/fstab</pre>
</div>
<h4>
<a
id="user-content-chroot"
class="anchor"
aria-hidden="true"
tabindex="-1"
href="#chroot"
><span aria-hidden="true" class="octicon octicon-link"></span></a
>Chroot
<h4 id="user-content-chroot">
<a class="heading-link" href="#chroot"
>Chroot<span aria-hidden="true" class="octicon octicon-link"></span
></a>
</h4>
<div class="highlight highlight-source-shell">
<pre>arch-chroot /mnt</pre>
</div>
<h4>
<a
id="user-content-time-zone"
class="anchor"
aria-hidden="true"
tabindex="-1"
href="#time-zone"
><span aria-hidden="true" class="octicon octicon-link"></span></a
>Time zone
<h4 id="user-content-time-zone">
<a class="heading-link" href="#time-zone"
>Time zone<span aria-hidden="true" class="octicon octicon-link"></span
></a>
</h4>
<div class="highlight highlight-source-shell">
<pre>
@ -323,15 +284,13 @@ ln -sf /usr/share/zoneinfo/Region/City /etc/localtime
hwclock --systohc</pre
>
</div>
<h4>
<a
id="user-content-localization"
class="anchor"
aria-hidden="true"
tabindex="-1"
href="#localization"
><span aria-hidden="true" class="octicon octicon-link"></span></a
>Localization:
<h4 id="user-content-localization">
<a class="heading-link" href="#localization"
>Localization:<span
aria-hidden="true"
class="octicon octicon-link"
></span
></a>
</h4>
<p>Edit <code>/etc/locale.gen</code>:</p>
<div class="highlight highlight-text-adblock">
@ -343,27 +302,20 @@ hwclock --systohc</pre
<div class="highlight highlight-text-adblock">
<pre>LANG=en_US.UTF-8</pre>
</div>
<h4>
<a
id="user-content-network-configuration"
class="anchor"
aria-hidden="true"
tabindex="-1"
href="#network-configuration"
><span aria-hidden="true" class="octicon octicon-link"></span></a
>Network configuration
<h4 id="user-content-network-configuration">
<a class="heading-link" href="#network-configuration"
>Network configuration<span
aria-hidden="true"
class="octicon octicon-link"
></span
></a>
</h4>
<p>Edit <code>/etc/hostname</code>:</p>
<div class="highlight highlight-text-adblock"><pre>myhostname</pre></div>
<h4>
<a
id="user-content-initramfs"
class="anchor"
aria-hidden="true"
tabindex="-1"
href="#initramfs"
><span aria-hidden="true" class="octicon octicon-link"></span></a
>Initramfs
<h4 id="user-content-initramfs">
<a class="heading-link" href="#initramfs"
>Initramfs<span aria-hidden="true" class="octicon octicon-link"></span
></a>
</h4>
<p>Edit <code>/etc/mkinitcpio.conf</code>:</p>
<div class="highlight highlight-text-adblock">
@ -375,38 +327,25 @@ HOOKS=(base udev ... block lvm2 filesystems)
<span class="pl-c"># Replace udev with systemd</span></pre>
</div>
<div class="highlight highlight-source-shell"><pre>mkinitcpio -P</pre></div>
<h4>
<a
id="user-content-root-password"
class="anchor"
aria-hidden="true"
tabindex="-1"
href="#root-password"
><span aria-hidden="true" class="octicon octicon-link"></span></a
>Root password
<h4 id="user-content-root-password">
<a class="heading-link" href="#root-password"
>Root password<span
aria-hidden="true"
class="octicon octicon-link"
></span
></a>
</h4>
<div class="highlight highlight-source-shell"><pre>passwd</pre></div>
<h4>
<a
id="user-content-addition"
class="anchor"
aria-hidden="true"
tabindex="-1"
href="#addition"
><span aria-hidden="true" class="octicon octicon-link"></span></a
>Addition
<h4 id="user-content-addition">
<a class="heading-link" href="#addition"
>Addition<span aria-hidden="true" class="octicon octicon-link"></span
></a>
</h4>
<h5>
<a
id="user-content-networkmanager-wip"
class="anchor"
aria-hidden="true"
tabindex="-1"
href="#networkmanager-wip"
><span aria-hidden="true" class="octicon octicon-link"></span></a
<h5 id="user-content-networkmanager-wip">
<a class="heading-link" href="#networkmanager-wip"></a
><a href="https://wiki.archlinux.org/title/NetworkManager" rel="nofollow"
>NetworkManager (WIP)</a
>
><span aria-hidden="true" class="octicon octicon-link"></span>
</h5>
<div class="highlight highlight-source-shell">
<pre>pacman -Syu networkmanager dhcpcd iwd
@ -441,56 +380,35 @@ noarp
nohook resolv.conf</pre
>
</div>
<h5>
<a
id="user-content-bluetooth"
class="anchor"
aria-hidden="true"
tabindex="-1"
href="#bluetooth"
><span aria-hidden="true" class="octicon octicon-link"></span></a
>Bluetooth
<h5 id="user-content-bluetooth">
<a class="heading-link" href="#bluetooth"
>Bluetooth<span aria-hidden="true" class="octicon octicon-link"></span
></a>
</h5>
<div class="highlight highlight-source-shell">
<pre>pacman -Syu bluez
systemctl <span class="pl-c1">enable</span> bluetooth.service</pre>
</div>
<h5>
<a
id="user-content-clock"
class="anchor"
aria-hidden="true"
tabindex="-1"
href="#clock"
><span aria-hidden="true" class="octicon octicon-link"></span></a
>Clock
<h5 id="user-content-clock">
<a class="heading-link" href="#clock"
>Clock<span aria-hidden="true" class="octicon octicon-link"></span
></a>
</h5>
<div class="highlight highlight-source-shell">
<pre>timedatectl set-ntp <span class="pl-c1">true</span></pre>
</div>
<h4>
<a
id="user-content-boot-loader"
class="anchor"
aria-hidden="true"
tabindex="-1"
href="#boot-loader"
><span aria-hidden="true" class="octicon octicon-link"></span></a
>Boot loader
<h4 id="user-content-boot-loader">
<a class="heading-link" href="#boot-loader"
>Boot loader<span aria-hidden="true" class="octicon octicon-link"></span
></a>
</h4>
<h5>
<a
id="user-content-systemd-boot"
class="anchor"
aria-hidden="true"
tabindex="-1"
href="#systemd-boot"
><span aria-hidden="true" class="octicon octicon-link"></span></a
<h5 id="user-content-systemd-boot">
<a class="heading-link" href="#systemd-boot"></a
><a
href="https://wiki.archlinux.org/index.php/Systemd-boot"
rel="nofollow"
>systemd-boot</a
>
><span aria-hidden="true" class="octicon octicon-link"></span>
</h5>
<p>Install using XBOOTLDR:</p>
<div class="highlight highlight-source-shell">
@ -538,33 +456,25 @@ initrd /initramfs-linux.img
<span class="pl-c"># nvidia-drm.modeset=1</span>
options root="LABEL=ROOT" rw</pre>
</div>
<h2>
<a
id="user-content-general-recommendations"
class="anchor"
aria-hidden="true"
tabindex="-1"
href="#general-recommendations"
><span aria-hidden="true" class="octicon octicon-link"></span></a
<h2 id="user-content-general-recommendations">
<a class="heading-link" href="#general-recommendations"></a
><a
href="https://wiki.archlinux.org/index.php/General_recommendations"
rel="nofollow"
>General recommendations</a
>
><span aria-hidden="true" class="octicon octicon-link"></span>
</h2>
<p>
Always remember to check <strong>dependencies</strong> when install
packages.
</p>
<h3>
<a
id="user-content-system-administration"
class="anchor"
aria-hidden="true"
tabindex="-1"
href="#system-administration"
><span aria-hidden="true" class="octicon octicon-link"></span></a
>System administration
<h3 id="user-content-system-administration">
<a class="heading-link" href="#system-administration"
>System administration<span
aria-hidden="true"
class="octicon octicon-link"
></span
></a>
</h3>
<p>
<a href="https://wiki.archlinux.org/index.php/sudo" rel="nofollow">Sudo</a
@ -604,15 +514,13 @@ homectl update joker --shell=/usr/bin/zsh</pre>
<strong>Note</strong>: Can not run <code>homectl</code> when install Arch
Linux. Should run on the first boot.
</p>
<h3>
<a
id="user-content-desktop-environment"
class="anchor"
aria-hidden="true"
tabindex="-1"
href="#desktop-environment"
><span aria-hidden="true" class="octicon octicon-link"></span></a
>Desktop Environment
<h3 id="user-content-desktop-environment">
<a class="heading-link" href="#desktop-environment"
>Desktop Environment<span
aria-hidden="true"
class="octicon octicon-link"
></span
></a>
</h3>
<p>
Install
@ -622,17 +530,11 @@ homectl update joker --shell=/usr/bin/zsh</pre>
<div class="highlight highlight-source-shell">
<pre>pacman -Syu xorg-server</pre>
</div>
<h4>
<a
id="user-content-gnome"
class="anchor"
aria-hidden="true"
tabindex="-1"
href="#gnome"
><span aria-hidden="true" class="octicon octicon-link"></span></a
<h4 id="user-content-gnome">
<a class="heading-link" href="#gnome"></a
><a href="https://wiki.archlinux.org/index.php/GNOME" rel="nofollow"
>GNOME</a
>
><span aria-hidden="true" class="octicon octicon-link"></span>
</h4>
<div class="highlight highlight-source-shell">
<pre>pacman -Syu gnome-shell \
@ -645,31 +547,19 @@ homectl update joker --shell=/usr/bin/zsh</pre>
pacman -Syu gdm
systemctl <span class="pl-c1">enable</span> gdm.service</pre>
</div>
<h2>
<a
id="user-content-list-of-applications"
class="anchor"
aria-hidden="true"
tabindex="-1"
href="#list-of-applications"
><span aria-hidden="true" class="octicon octicon-link"></span></a
<h2 id="user-content-list-of-applications">
<a class="heading-link" href="#list-of-applications"></a
><a
href="https://wiki.archlinux.org/index.php/List_of_applications"
rel="nofollow"
>List of applications</a
>
><span aria-hidden="true" class="octicon octicon-link"></span>
</h2>
<h3>
<a
id="user-content-pacman"
class="anchor"
aria-hidden="true"
tabindex="-1"
href="#pacman"
><span aria-hidden="true" class="octicon octicon-link"></span></a
<h3 id="user-content-pacman">
<a class="heading-link" href="#pacman"></a
><a href="https://wiki.archlinux.org/index.php/pacman" rel="nofollow"
>pacman</a
>
><span aria-hidden="true" class="octicon octicon-link"></span>
</h3>
<p>Uncomment in <code>/etc/pacman.conf</code>:</p>
<div class="highlight highlight-text-adblock">
@ -677,17 +567,11 @@ systemctl <span class="pl-c1">enable</span> gdm.service</pre>
Color
ParallelDownloads</pre>
</div>
<h3>
<a
id="user-content-pipewire-wip"
class="anchor"
aria-hidden="true"
tabindex="-1"
href="#pipewire-wip"
><span aria-hidden="true" class="octicon octicon-link"></span></a
<h3 id="user-content-pipewire-wip">
<a class="heading-link" href="#pipewire-wip"></a
><a href="https://wiki.archlinux.org/title/PipeWire" rel="nofollow"
>Pipewire (WIP)</a
>
><span aria-hidden="true" class="octicon octicon-link"></span>
</h3>
<div class="highlight highlight-source-shell">
<pre>
@ -707,34 +591,22 @@ pacman -Syu pipewire wireplumber \
<div class="highlight highlight-source-shell">
<pre>pacman -Syu sof-firmware</pre>
</div>
<h3>
<a
id="user-content-flatpak-wip"
class="anchor"
aria-hidden="true"
tabindex="-1"
href="#flatpak-wip"
><span aria-hidden="true" class="octicon octicon-link"></span></a
<h3 id="user-content-flatpak-wip">
<a class="heading-link" href="#flatpak-wip"></a
><a href="https://wiki.archlinux.org/title/Flatpak" rel="nofollow"
>Flatpak (WIP)</a
>
><span aria-hidden="true" class="octicon octicon-link"></span>
</h3>
<div class="highlight highlight-source-shell">
<pre>pacman -Syu flatpak</pre>
</div>
<h2>
<a
id="user-content-improving-performance"
class="anchor"
aria-hidden="true"
tabindex="-1"
href="#improving-performance"
><span aria-hidden="true" class="octicon octicon-link"></span></a
<h2 id="user-content-improving-performance">
<a class="heading-link" href="#improving-performance"></a
><a
href="https://wiki.archlinux.org/index.php/improving_performance"
rel="nofollow"
>Improving performance</a
>
><span aria-hidden="true" class="octicon octicon-link"></span>
</h2>
<ul>
<li>
@ -787,15 +659,13 @@ pacman -Syu pipewire wireplumber \
>
</li>
</ul>
<h2>
<a
id="user-content-hardware-dependent"
class="anchor"
aria-hidden="true"
tabindex="-1"
href="#hardware-dependent"
><span aria-hidden="true" class="octicon octicon-link"></span></a
>Hardware dependent
<h2 id="user-content-hardware-dependent">
<a class="heading-link" href="#hardware-dependent"
>Hardware dependent<span
aria-hidden="true"
class="octicon octicon-link"
></span
></a>
</h2>
<ul>
<li>
@ -814,15 +684,10 @@ pacman -Syu pipewire wireplumber \
>
</li>
</ul>
<h2>
<a
id="user-content-experiment"
class="anchor"
aria-hidden="true"
tabindex="-1"
href="#experiment"
><span aria-hidden="true" class="octicon octicon-link"></span></a
>Experiment
<h2 id="user-content-experiment">
<a class="heading-link" href="#experiment"
>Experiment<span aria-hidden="true" class="octicon octicon-link"></span
></a>
</h2>
<p>Do it at your own risk!!!</p>
<ul>
@ -837,15 +702,10 @@ pacman -Syu pipewire wireplumber \
>
</li>
</ul>
<h2>
<a
id="user-content-in-the-end"
class="anchor"
aria-hidden="true"
tabindex="-1"
href="#in-the-end"
><span aria-hidden="true" class="octicon octicon-link"></span></a
>In the end
<h2 id="user-content-in-the-end">
<a class="heading-link" href="#in-the-end"
>In the end<span aria-hidden="true" class="octicon octicon-link"></span
></a>
</h2>
<p>This guide is updated regularly I promise.</p>

View File

@ -28,15 +28,13 @@
<h2>
<a href="index.html"><code>~</code></a>
</h2>
<h1>
<a
id="user-content-speed-up-writing-go-test-asap"
class="anchor"
aria-hidden="true"
tabindex="-1"
href="#speed-up-writing-go-test-asap"
><span aria-hidden="true" class="octicon octicon-link"></span></a
>Speed up writing Go test ASAP
<h1 id="user-content-speed-up-writing-go-test-asap">
<a class="heading-link" href="#speed-up-writing-go-test-asap"
>Speed up writing Go test ASAP<span
aria-hidden="true"
class="octicon octicon-link"
></span
></a>
</h1>
<p>
Imagine your project currently have 0% unit test code coverage. And your
@ -57,15 +55,13 @@
just make sure your code is running excatly as you intent it to be. If you
don't think about edge case before, unit test won't help you.
</p>
<h2>
<a
id="user-content-first-rewrite-the-impossible-to-test-out"
class="anchor"
aria-hidden="true"
tabindex="-1"
href="#first-rewrite-the-impossible-to-test-out"
><span aria-hidden="true" class="octicon octicon-link"></span></a
>First, rewrite the impossible (to test) out
<h2 id="user-content-first-rewrite-the-impossible-to-test-out">
<a class="heading-link" href="#first-rewrite-the-impossible-to-test-out"
>First, rewrite the impossible (to test) out<span
aria-hidden="true"
class="octicon octicon-link"
></span
></a>
</h2>
<p>
When I learn programming, I encounter very interesting idea, which become
@ -89,15 +85,13 @@
all global var to fields inside some struct.
</li>
</ul>
<h2>
<a
id="user-content-let-the-fun-writing-test-begin"
class="anchor"
aria-hidden="true"
tabindex="-1"
href="#let-the-fun-writing-test-begin"
><span aria-hidden="true" class="octicon octicon-link"></span></a
>Let the fun (writing test) begin
<h2 id="user-content-let-the-fun-writing-test-begin">
<a class="heading-link" href="#let-the-fun-writing-test-begin"
>Let the fun (writing test) begin<span
aria-hidden="true"
class="octicon octicon-link"
></span
></a>
</h2>
<p>
If you code Go long enough, you know table driven tests and how is that so

View File

@ -28,26 +28,22 @@
<h2>
<a href="index.html"><code>~</code></a>
</h2>
<h1>
<a
id="user-content-incident-come-and-go"
class="anchor"
aria-hidden="true"
tabindex="-1"
href="#incident-come-and-go"
><span aria-hidden="true" class="octicon octicon-link"></span></a
>Incident come and go
<h1 id="user-content-incident-come-and-go">
<a class="heading-link" href="#incident-come-and-go"
>Incident come and go<span
aria-hidden="true"
class="octicon octicon-link"
></span
></a>
</h1>
<p>This is collect of all incidents I created in the past :(</p>
<h2>
<a
id="user-content-service-starts-with-empty-port"
class="anchor"
aria-hidden="true"
tabindex="-1"
href="#service-starts-with-empty-port"
><span aria-hidden="true" class="octicon octicon-link"></span></a
>Service starts with empty port
<h2 id="user-content-service-starts-with-empty-port">
<a class="heading-link" href="#service-starts-with-empty-port"
>Service starts with empty port<span
aria-hidden="true"
class="octicon octicon-link"
></span
></a>
</h2>
<p>Because all configs is read from file.</p>
<p>
@ -58,15 +54,13 @@
<strong>Solution</strong>: For some configs, make sure to failed first if
it's empty.
</p>
<h2>
<a
id="user-content-race-condition-of-series-of-apis"
class="anchor"
aria-hidden="true"
tabindex="-1"
href="#race-condition-of-series-of-apis"
><span aria-hidden="true" class="octicon octicon-link"></span></a
>Race condition of series of APIs
<h2 id="user-content-race-condition-of-series-of-apis">
<a class="heading-link" href="#race-condition-of-series-of-apis"
>Race condition of series of APIs<span
aria-hidden="true"
class="octicon octicon-link"
></span
></a>
</h2>
<p>For example I have 2 APIs:</p>
<ul>

View File

@ -28,15 +28,13 @@
<h2>
<a href="index.html"><code>~</code></a>
</h2>
<h1>
<a
id="user-content-ekyc---the-battle-never-ends"
class="anchor"
aria-hidden="true"
tabindex="-1"
href="#ekyc---the-battle-never-ends"
><span aria-hidden="true" class="octicon octicon-link"></span></a
>EKYC - The battle never ends
<h1 id="user-content-ekyc---the-battle-never-ends">
<a class="heading-link" href="#ekyc---the-battle-never-ends"
>EKYC - The battle never ends<span
aria-hidden="true"
class="octicon octicon-link"
></span
></a>
</h1>
<p>TODO</p>

View File

@ -28,15 +28,10 @@
<h2>
<a href="index.html"><code>~</code></a>
</h2>
<h1>
<a
id="user-content-fonts"
class="anchor"
aria-hidden="true"
tabindex="-1"
href="#fonts"
><span aria-hidden="true" class="octicon octicon-link"></span></a
>Fonts
<h1 id="user-content-fonts">
<a class="heading-link" href="#fonts"
>Fonts<span aria-hidden="true" class="octicon octicon-link"></span
></a>
</h1>
<p>
I always want the best fonts for my terminal, my text editor, my ... But
@ -68,15 +63,10 @@
All images belows is either official images I got from fonts website or my
own screenshots. I'm too lazy to screenshot anw :D
</p>
<h2>
<a
id="user-content-jetbrains-mono"
class="anchor"
aria-hidden="true"
tabindex="-1"
href="#jetbrains-mono"
><span aria-hidden="true" class="octicon octicon-link"></span></a
><a href="https://github.com/JetBrains/JetBrainsMono">JetBrains Mono</a>
<h2 id="user-content-jetbrains-mono">
<a class="heading-link" href="#jetbrains-mono"></a
><a href="https://github.com/JetBrains/JetBrainsMono">JetBrains Mono</a
><span aria-hidden="true" class="octicon octicon-link"></span>
</h2>
<p>JetBrains branding font.</p>
<ul>
@ -101,15 +91,10 @@
<code>cv16</code>, <code>cv18</code>, <code>cv19</code>,
<code>cv20</code>.
</p>
<h2>
<a
id="user-content-iosevka"
class="anchor"
aria-hidden="true"
tabindex="-1"
href="#iosevka"
><span aria-hidden="true" class="octicon octicon-link"></span></a
><a href="https://github.com/be5invis/Iosevka">Iosevka</a>
<h2 id="user-content-iosevka">
<a class="heading-link" href="#iosevka"></a
><a href="https://github.com/be5invis/Iosevka">Iosevka</a
><span aria-hidden="true" class="octicon octicon-link"></span>
</h2>
<p>
I often choose SS08 variant because I also love
@ -140,15 +125,10 @@
style="max-width: 100%"
/></a>
</p>
<h2>
<a
id="user-content-recursive"
class="anchor"
aria-hidden="true"
tabindex="-1"
href="#recursive"
><span aria-hidden="true" class="octicon octicon-link"></span></a
><a href="https://github.com/arrowtype/recursive">Recursive</a>
<h2 id="user-content-recursive">
<a class="heading-link" href="#recursive"></a
><a href="https://github.com/arrowtype/recursive">Recursive</a
><span aria-hidden="true" class="octicon octicon-link"></span>
</h2>
<p>I often choose Casual variant.</p>
<ul>
@ -171,15 +151,10 @@
style="max-width: 100%"
/></a>
</p>
<h2>
<a
id="user-content-martian-mono"
class="anchor"
aria-hidden="true"
tabindex="-1"
href="#martian-mono"
><span aria-hidden="true" class="octicon octicon-link"></span></a
><a href="https://github.com/evilmartians/mono">Martian Mono</a>
<h2 id="user-content-martian-mono">
<a class="heading-link" href="#martian-mono"></a
><a href="https://github.com/evilmartians/mono">Martian Mono</a
><span aria-hidden="true" class="octicon octicon-link"></span>
</h2>
<ul>
<li>No Vietnamese</li>
@ -202,15 +177,10 @@
style="max-width: 100%"
/></a>
</p>
<h2>
<a
id="user-content-agave"
class="anchor"
aria-hidden="true"
tabindex="-1"
href="#agave"
><span aria-hidden="true" class="octicon octicon-link"></span></a
><a href="https://github.com/blobject/agave">agave</a>
<h2 id="user-content-agave">
<a class="heading-link" href="#agave"></a
><a href="https://github.com/blobject/agave">agave</a
><span aria-hidden="true" class="octicon octicon-link"></span>
</h2>
<ul>
<li>No Vietnamese</li>
@ -223,15 +193,10 @@
Font is small, can display much more on small screen. I like its curved
look.
</p>
<h2>
<a
id="user-content-hermit"
class="anchor"
aria-hidden="true"
tabindex="-1"
href="#hermit"
><span aria-hidden="true" class="octicon octicon-link"></span></a
><a href="https://github.com/pcaro90/hermit">Hermit</a>
<h2 id="user-content-hermit">
<a class="heading-link" href="#hermit"></a
><a href="https://github.com/pcaro90/hermit">Hermit</a
><span aria-hidden="true" class="octicon octicon-link"></span>
</h2>
<ul>
<li>No Vietnamese</li>
@ -239,17 +204,11 @@
<li>No ligatures</li>
</ul>
<p>Looks unique to me, with some sharp look.</p>
<h2>
<a
id="user-content-apl-385-and-apl386"
class="anchor"
aria-hidden="true"
tabindex="-1"
href="#apl-385-and-apl386"
><span aria-hidden="true" class="octicon octicon-link"></span
></a>
<a href="https://apl385.com/fonts/index.htm" rel="nofollow">APL-385</a>
<h2 id="user-content-apl-385-and-apl386">
<a class="heading-link" href="#apl-385-and-apl386"> </a
><a href="https://apl385.com/fonts/index.htm" rel="nofollow">APL-385</a>
and <a href="https://github.com/abrudz/APL386">APL386</a>
<span aria-hidden="true" class="octicon octicon-link"></span>
</h2>
<ul>
<li>No Vietnamese</li>
@ -258,15 +217,10 @@
<li>Has display font (APL333)</li>
</ul>
<p>I love its wide look, also it's feel nostalgic.</p>
<h2>
<a
id="user-content-sudo"
class="anchor"
aria-hidden="true"
tabindex="-1"
href="#sudo"
><span aria-hidden="true" class="octicon octicon-link"></span></a
><a href="https://github.com/jenskutilek/sudo-font">Sudo</a>
<h2 id="user-content-sudo">
<a class="heading-link" href="#sudo"></a
><a href="https://github.com/jenskutilek/sudo-font">Sudo</a
><span aria-hidden="true" class="octicon octicon-link"></span>
</h2>
<p>Small fonts, saving space.</p>
<ul>
@ -280,16 +234,15 @@
Unique to me. Strange <code>#</code>, looks same as <code>4</code> (I
don't like it for now).
</p>
<h2>
<h2
id="user-content-murr-fonts-but-i-dont-use-much-now-some-fonts-i-already-try-in-the-past"
>
<a
id="user-content-murr-fonts-but-i-dont-use-much-now-some-fonts-i-already-try-in-the-past"
class="anchor"
aria-hidden="true"
tabindex="-1"
class="heading-link"
href="#murr-fonts-but-i-dont-use-much-now-some-fonts-i-already-try-in-the-past"
><span aria-hidden="true" class="octicon octicon-link"></span></a
>Murr fonts, but I don't use much now (some fonts I already try in the
past)
>Murr fonts, but I don't use much now (some fonts I already try in the
past)<span aria-hidden="true" class="octicon octicon-link"></span
></a>
</h2>
<ul>
<li>

View File

@ -28,15 +28,10 @@
<h2>
<a href="index.html"><code>~</code></a>
</h2>
<h1>
<a
id="user-content-games-4-fun"
class="anchor"
aria-hidden="true"
tabindex="-1"
href="#games-4-fun"
><span aria-hidden="true" class="octicon octicon-link"></span></a
>Games 4 fun
<h1 id="user-content-games-4-fun">
<a class="heading-link" href="#games-4-fun"
>Games 4 fun<span aria-hidden="true" class="octicon octicon-link"></span
></a>
</h1>
<p>
Just a little note about apps, games, settings for next time playing :D
@ -47,15 +42,13 @@
<li>My work laptop (Macbook Pro M1 (2020)).</li>
</ul>
<p>If below links die, I will try to scrape Internet to get a new link.</p>
<h2>
<a
id="user-content-ps2-emulator"
class="anchor"
aria-hidden="true"
tabindex="-1"
href="#ps2-emulator"
><span aria-hidden="true" class="octicon octicon-link"></span></a
>PS2 emulator
<h2 id="user-content-ps2-emulator">
<a class="heading-link" href="#ps2-emulator"
>PS2 emulator<span
aria-hidden="true"
class="octicon octicon-link"
></span
></a>
</h2>
<p>
I use <a href="https://github.com/PCSX2/pcsx2">PCSX2</a>. Currently it
@ -103,17 +96,11 @@
For cover art of games, please use
<a href="https://github.com/xlenore/ps2-covers">xlenore/ps2-covers</a>.
</p>
<h3>
<a
id="user-content-resident-evil-4"
class="anchor"
aria-hidden="true"
tabindex="-1"
href="#resident-evil-4"
><span aria-hidden="true" class="octicon octicon-link"></span></a
<h3 id="user-content-resident-evil-4">
<a class="heading-link" href="#resident-evil-4"></a
><a href="https://wiki.pcsx2.net/Resident_Evil_4" rel="nofollow"
>Resident Evil 4</a
>
><span aria-hidden="true" class="octicon octicon-link"></span>
</h3>
<p>
<a
@ -228,15 +215,13 @@ patch=1,EE,2012009C,extended,00000000</pre
style="max-width: 100%"
/></a>
</p>
<h3>
<a
id="user-content-mega-man-x-collection"
class="anchor"
aria-hidden="true"
tabindex="-1"
href="#mega-man-x-collection"
><span aria-hidden="true" class="octicon octicon-link"></span></a
>Mega Man X Collection
<h3 id="user-content-mega-man-x-collection">
<a class="heading-link" href="#mega-man-x-collection"
>Mega Man X Collection<span
aria-hidden="true"
class="octicon octicon-link"
></span
></a>
</h3>
<p>
<a
@ -245,45 +230,33 @@ patch=1,EE,2012009C,extended,00000000</pre
>CDROMANCE</a
>
</p>
<h3>
<a
id="user-content-mega-man-x8"
class="anchor"
aria-hidden="true"
tabindex="-1"
href="#mega-man-x8"
><span aria-hidden="true" class="octicon octicon-link"></span></a
>Mega Man X8
<h3 id="user-content-mega-man-x8">
<a class="heading-link" href="#mega-man-x8"
>Mega Man X8<span aria-hidden="true" class="octicon octicon-link"></span
></a>
</h3>
<p>
<a href="https://cdromance.com/ps2-iso/mega-man-x8-usa/" rel="nofollow"
>CDROMANCE</a
>
</p>
<h3>
<a
id="user-content-god-of-war"
class="anchor"
aria-hidden="true"
tabindex="-1"
href="#god-of-war"
><span aria-hidden="true" class="octicon octicon-link"></span></a
>God of War
<h3 id="user-content-god-of-war">
<a class="heading-link" href="#god-of-war"
>God of War<span aria-hidden="true" class="octicon octicon-link"></span
></a>
</h3>
<p>
<a href="https://cdromance.com/ps2-iso/god-of-war-usa/" rel="nofollow"
>CDROMANCE</a
>
</p>
<h3>
<a
id="user-content-god-of-war-ii"
class="anchor"
aria-hidden="true"
tabindex="-1"
href="#god-of-war-ii"
><span aria-hidden="true" class="octicon octicon-link"></span></a
>God of War II
<h3 id="user-content-god-of-war-ii">
<a class="heading-link" href="#god-of-war-ii"
>God of War II<span
aria-hidden="true"
class="octicon octicon-link"
></span
></a>
</h3>
<p>
<a
@ -292,15 +265,13 @@ patch=1,EE,2012009C,extended,00000000</pre
>CDROMANCE</a
>
</p>
<h3>
<a
id="user-content-shadow-of-the-colossus"
class="anchor"
aria-hidden="true"
tabindex="-1"
href="#shadow-of-the-colossus"
><span aria-hidden="true" class="octicon octicon-link"></span></a
>Shadow of the Colossus
<h3 id="user-content-shadow-of-the-colossus">
<a class="heading-link" href="#shadow-of-the-colossus"
>Shadow of the Colossus<span
aria-hidden="true"
class="octicon octicon-link"
></span
></a>
</h3>
<p>
<a
@ -309,15 +280,13 @@ patch=1,EE,2012009C,extended,00000000</pre
>CDROMANCE</a
>
</p>
<h2>
<a
id="user-content-ps3-emulator"
class="anchor"
aria-hidden="true"
tabindex="-1"
href="#ps3-emulator"
><span aria-hidden="true" class="octicon octicon-link"></span></a
>PS3 emulator
<h2 id="user-content-ps3-emulator">
<a class="heading-link" href="#ps3-emulator"
>PS3 emulator<span
aria-hidden="true"
class="octicon octicon-link"
></span
></a>
</h2>
<p>
I use <a href="https://github.com/RPCS3/rpcs3">RPCS3</a>. Currently it

View File

@ -28,52 +28,38 @@
<h2>
<a href="index.html"><code>~</code></a>
</h2>
<h1>
<a
id="user-content-keeb"
class="anchor"
aria-hidden="true"
tabindex="-1"
href="#keeb"
><span aria-hidden="true" class="octicon octicon-link"></span></a
>Keeb
<h1 id="user-content-keeb">
<a class="heading-link" href="#keeb"
>Keeb<span aria-hidden="true" class="octicon octicon-link"></span
></a>
</h1>
<p>My collection of mechanical keyboards.</p>
<h2>
<a
id="user-content-keyboard"
class="anchor"
aria-hidden="true"
tabindex="-1"
href="#keyboard"
><span aria-hidden="true" class="octicon octicon-link"></span></a
>Keyboard
<h2 id="user-content-keyboard">
<a class="heading-link" href="#keyboard"
>Keyboard<span aria-hidden="true" class="octicon octicon-link"></span
></a>
</h2>
<p>
QMK custom keymaps is
<a href="https://github.com/haunt98/qmk_keymaps">here</a>
</p>
<h3>
<a
id="user-content-ikbc-cd87-cherry-mx-blue"
class="anchor"
aria-hidden="true"
tabindex="-1"
href="#ikbc-cd87-cherry-mx-blue"
><span aria-hidden="true" class="octicon octicon-link"></span></a
>iKBC CD87 Cherry MX Blue
<h3 id="user-content-ikbc-cd87-cherry-mx-blue">
<a class="heading-link" href="#ikbc-cd87-cherry-mx-blue"
>iKBC CD87 Cherry MX Blue<span
aria-hidden="true"
class="octicon octicon-link"
></span
></a>
</h3>
<p>My first keeb.</p>
<p>Damn it's so loud :D</p>
<h3>
<a
id="user-content-kbdfans-x-lazurite-d60lite"
class="anchor"
aria-hidden="true"
tabindex="-1"
href="#kbdfans-x-lazurite-d60lite"
><span aria-hidden="true" class="octicon octicon-link"></span></a
>KBDfans X Lazurite D60Lite
<h3 id="user-content-kbdfans-x-lazurite-d60lite">
<a class="heading-link" href="#kbdfans-x-lazurite-d60lite"
>KBDfans X Lazurite D60Lite<span
aria-hidden="true"
class="octicon octicon-link"
></span
></a>
</h3>
<p>I bought it from my friend.</p>
<p>
@ -114,15 +100,10 @@
style="max-width: 100%"
/></a>
</p>
<h4>
<a
id="user-content-specs"
class="anchor"
aria-hidden="true"
tabindex="-1"
href="#specs"
><span aria-hidden="true" class="octicon octicon-link"></span></a
>Specs
<h4 id="user-content-specs">
<a class="heading-link" href="#specs"
>Specs<span aria-hidden="true" class="octicon octicon-link"></span
></a>
</h4>
<p>
<a
@ -184,15 +165,10 @@
</ul>
</li>
</ul>
<h4>
<a
id="user-content-layout"
class="anchor"
aria-hidden="true"
tabindex="-1"
href="#layout"
><span aria-hidden="true" class="octicon octicon-link"></span></a
>Layout
<h4 id="user-content-layout">
<a class="heading-link" href="#layout"
>Layout<span aria-hidden="true" class="octicon octicon-link"></span
></a>
</h4>
<p>My layout is based on:</p>
<ul>
@ -223,15 +199,10 @@
</li>
<li>1 <code>Space</code> 7U.</li>
</ul>
<h4>
<a
id="user-content-review"
class="anchor"
aria-hidden="true"
tabindex="-1"
href="#review"
><span aria-hidden="true" class="octicon octicon-link"></span></a
>Review
<h4 id="user-content-review">
<a class="heading-link" href="#review"
>Review<span aria-hidden="true" class="octicon octicon-link"></span
></a>
</h4>
<p>
Things I don't like, also
@ -258,15 +229,13 @@
</ul>
</li>
</ul>
<h4>
<a
id="user-content-support-links"
class="anchor"
aria-hidden="true"
tabindex="-1"
href="#support-links"
><span aria-hidden="true" class="octicon octicon-link"></span></a
>Support links
<h4 id="user-content-support-links">
<a class="heading-link" href="#support-links"
>Support links<span
aria-hidden="true"
class="octicon octicon-link"
></span
></a>
</h4>
<ul>
<li>
@ -325,15 +294,10 @@
>
</li>
</ul>
<h3>
<a
id="user-content-guide"
class="anchor"
aria-hidden="true"
tabindex="-1"
href="#guide"
><span aria-hidden="true" class="octicon octicon-link"></span></a
>Guide
<h3 id="user-content-guide">
<a class="heading-link" href="#guide"
>Guide<span aria-hidden="true" class="octicon octicon-link"></span
></a>
</h3>
<ul>
<li>
@ -349,25 +313,18 @@
>
</li>
</ul>
<h2>
<a
id="user-content-switch"
class="anchor"
aria-hidden="true"
tabindex="-1"
href="#switch"
><span aria-hidden="true" class="octicon octicon-link"></span></a
>Switch
<h2 id="user-content-switch">
<a class="heading-link" href="#switch"
>Switch<span aria-hidden="true" class="octicon octicon-link"></span
></a>
</h2>
<h3>
<a
id="user-content-ktt-strawberry"
class="anchor"
aria-hidden="true"
tabindex="-1"
href="#ktt-strawberry"
><span aria-hidden="true" class="octicon octicon-link"></span></a
>KTT Strawberry
<h3 id="user-content-ktt-strawberry">
<a class="heading-link" href="#ktt-strawberry"
>KTT Strawberry<span
aria-hidden="true"
class="octicon octicon-link"
></span
></a>
</h3>
<p>I choose this switch because I prefer linear (please be silent).</p>
<p>
@ -381,15 +338,10 @@
style="max-width: 100%"
/></a>
</p>
<h4>
<a
id="user-content-specs-1"
class="anchor"
aria-hidden="true"
tabindex="-1"
href="#specs-1"
><span aria-hidden="true" class="octicon octicon-link"></span></a
>Specs
<h4 id="user-content-specs-1">
<a class="heading-link" href="#specs-1"
>Specs<span aria-hidden="true" class="octicon octicon-link"></span
></a>
</h4>
<ul>
<li>Type: Linear</li>
@ -401,15 +353,13 @@
<li>Spring: Gold plated spring</li>
<li>Total travel: 4.0mm</li>
</ul>
<h4>
<a
id="user-content-support-links-1"
class="anchor"
aria-hidden="true"
tabindex="-1"
href="#support-links-1"
><span aria-hidden="true" class="octicon octicon-link"></span></a
>Support links
<h4 id="user-content-support-links-1">
<a class="heading-link" href="#support-links-1"
>Support links<span
aria-hidden="true"
class="octicon octicon-link"
></span
></a>
</h4>
<ul>
<li>
@ -434,15 +384,13 @@
>
</li>
</ul>
<h3>
<a
id="user-content-skyloong-glacier-silent-red-switch"
class="anchor"
aria-hidden="true"
tabindex="-1"
href="#skyloong-glacier-silent-red-switch"
><span aria-hidden="true" class="octicon octicon-link"></span></a
>SKYLOONG Glacier Silent Red Switch
<h3 id="user-content-skyloong-glacier-silent-red-switch">
<a class="heading-link" href="#skyloong-glacier-silent-red-switch"
>SKYLOONG Glacier Silent Red Switch<span
aria-hidden="true"
class="octicon octicon-link"
></span
></a>
</h3>
<p>
I was given this switch by my friend. Currently using for alpha keys. Love
@ -459,15 +407,10 @@
style="max-width: 100%"
/></a>
</p>
<h4>
<a
id="user-content-specs-2"
class="anchor"
aria-hidden="true"
tabindex="-1"
href="#specs-2"
><span aria-hidden="true" class="octicon octicon-link"></span></a
>Specs
<h4 id="user-content-specs-2">
<a class="heading-link" href="#specs-2"
>Specs<span aria-hidden="true" class="octicon octicon-link"></span
></a>
</h4>
<ul>
<li>Type: Linear</li>
@ -477,15 +420,13 @@
<li>Pre travel: 1.5-2.0mm</li>
<li>Total travel: 3.8mm</li>
</ul>
<h4>
<a
id="user-content-support-links-2"
class="anchor"
aria-hidden="true"
tabindex="-1"
href="#support-links-2"
><span aria-hidden="true" class="octicon octicon-link"></span></a
>Support links
<h4 id="user-content-support-links-2">
<a class="heading-link" href="#support-links-2"
>Support links<span
aria-hidden="true"
class="octicon octicon-link"
></span
></a>
</h4>
<ul>
<li>
@ -496,15 +437,13 @@
>
</li>
</ul>
<h3>
<a
id="user-content-jwick-yellow-linear-switch"
class="anchor"
aria-hidden="true"
tabindex="-1"
href="#jwick-yellow-linear-switch"
><span aria-hidden="true" class="octicon octicon-link"></span></a
>JWICK Yellow Linear Switch
<h3 id="user-content-jwick-yellow-linear-switch">
<a class="heading-link" href="#jwick-yellow-linear-switch"
>JWICK Yellow Linear Switch<span
aria-hidden="true"
class="octicon octicon-link"
></span
></a>
</h3>
<p>
<a
@ -518,15 +457,10 @@
/></a>
</p>
<p>I was given this switch by my friend, full mod (lube + film).</p>
<h4>
<a
id="user-content-specs-3"
class="anchor"
aria-hidden="true"
tabindex="-1"
href="#specs-3"
><span aria-hidden="true" class="octicon octicon-link"></span></a
>Specs
<h4 id="user-content-specs-3">
<a class="heading-link" href="#specs-3"
>Specs<span aria-hidden="true" class="octicon octicon-link"></span
></a>
</h4>
<ul>
<li>Type: Linear</li>
@ -537,15 +471,13 @@
<li>Actuation force: 65g</li>
<li>Total travel: 4 mm</li>
</ul>
<h4>
<a
id="user-content-support-links-3"
class="anchor"
aria-hidden="true"
tabindex="-1"
href="#support-links-3"
><span aria-hidden="true" class="octicon octicon-link"></span></a
>Support links
<h4 id="user-content-support-links-3">
<a class="heading-link" href="#support-links-3"
>Support links<span
aria-hidden="true"
class="octicon octicon-link"
></span
></a>
</h4>
<ul>
<li>
@ -554,15 +486,10 @@
>
</li>
</ul>
<h2>
<a
id="user-content-keycap"
class="anchor"
aria-hidden="true"
tabindex="-1"
href="#keycap"
><span aria-hidden="true" class="octicon octicon-link"></span></a
>Keycap
<h2 id="user-content-keycap">
<a class="heading-link" href="#keycap"
>Keycap<span aria-hidden="true" class="octicon octicon-link"></span
></a>
</h2>
<p>
Currently, I use Akko 9009 Cherry Profile and EnjoyPBT 9009 Cherry
@ -577,15 +504,13 @@
</li>
<li>Check is keycap is tight on switch or not.</li>
</ul>
<h3>
<a
id="user-content-enjobpbt-9009"
class="anchor"
aria-hidden="true"
tabindex="-1"
href="#enjobpbt-9009"
><span aria-hidden="true" class="octicon octicon-link"></span></a
>EnjobPBT 9009
<h3 id="user-content-enjobpbt-9009">
<a class="heading-link" href="#enjobpbt-9009"
>EnjobPBT 9009<span
aria-hidden="true"
class="octicon octicon-link"
></span
></a>
</h3>
<p>
<a
@ -609,15 +534,13 @@
style="max-width: 100%"
/></a>
</p>
<h4>
<a
id="user-content-support-links-4"
class="anchor"
aria-hidden="true"
tabindex="-1"
href="#support-links-4"
><span aria-hidden="true" class="octicon octicon-link"></span></a
>Support links
<h4 id="user-content-support-links-4">
<a class="heading-link" href="#support-links-4"
>Support links<span
aria-hidden="true"
class="octicon octicon-link"
></span
></a>
</h4>
<ul>
<li>
@ -635,15 +558,13 @@
>
</li>
</ul>
<h3>
<a
id="user-content-color-i-love"
class="anchor"
aria-hidden="true"
tabindex="-1"
href="#color-i-love"
><span aria-hidden="true" class="octicon octicon-link"></span></a
>Color I love
<h3 id="user-content-color-i-love">
<a class="heading-link" href="#color-i-love"
>Color I love<span
aria-hidden="true"
class="octicon octicon-link"
></span
></a>
</h3>
<ul>
<li>
@ -725,15 +646,10 @@
>
</li>
</ul>
<h2>
<a
id="user-content-thanks"
class="anchor"
aria-hidden="true"
tabindex="-1"
href="#thanks"
><span aria-hidden="true" class="octicon octicon-link"></span></a
>Thanks
<h2 id="user-content-thanks">
<a class="heading-link" href="#thanks"
>Thanks<span aria-hidden="true" class="octicon octicon-link"></span
></a>
</h2>
<ul>
<li>

View File

@ -28,25 +28,21 @@
<h2>
<a href="index.html"><code>~</code></a>
</h2>
<h1>
<a
id="user-content-naming-things"
class="anchor"
aria-hidden="true"
tabindex="-1"
href="#naming-things"
><span aria-hidden="true" class="octicon octicon-link"></span></a
>Naming things
<h1 id="user-content-naming-things">
<a class="heading-link" href="#naming-things"
>Naming things<span
aria-hidden="true"
class="octicon octicon-link"
></span
></a>
</h1>
<h2>
<a
id="user-content-filename-in-storage-s3-"
class="anchor"
aria-hidden="true"
tabindex="-1"
href="#filename-in-storage-s3-"
><span aria-hidden="true" class="octicon octicon-link"></span></a
>Filename in storage (S3, ...)
<h2 id="user-content-filename-in-storage-s3-">
<a class="heading-link" href="#filename-in-storage-s3-"
>Filename in storage (S3, ...)<span
aria-hidden="true"
class="octicon octicon-link"
></span
></a>
</h2>
<p>Always have year, month, day in filename to easily sort it out.</p>
<p>
@ -67,15 +63,13 @@
backup (as they say, idk if true or not, but less folder mean less
complicated to me).
</p>
<h2>
<a
id="user-content-time-variable"
class="anchor"
aria-hidden="true"
tabindex="-1"
href="#time-variable"
><span aria-hidden="true" class="octicon octicon-link"></span></a
>Time variable
<h2 id="user-content-time-variable">
<a class="heading-link" href="#time-variable"
>Time variable<span
aria-hidden="true"
class="octicon octicon-link"
></span
></a>
</h2>
<p>Add time postfix to make sense.</p>
<p>Instead of <code>create_at</code>, use <code>create_at_ms</code>.</p>

View File

@ -28,15 +28,13 @@
<h2>
<a href="index.html"><code>~</code></a>
</h2>
<h1>
<a
id="user-content-my-neovim-workflow"
class="anchor"
aria-hidden="true"
tabindex="-1"
href="#my-neovim-workflow"
><span aria-hidden="true" class="octicon octicon-link"></span></a
>My neovim workflow
<h1 id="user-content-my-neovim-workflow">
<a class="heading-link" href="#my-neovim-workflow"
>My neovim workflow<span
aria-hidden="true"
class="octicon octicon-link"
></span
></a>
</h1>
<p>
<a
@ -53,15 +51,13 @@
All configs are in
<a href="https://github.com/haunt98/dotfiles">my dotfiles</a>.
</p>
<h2>
<a
id="user-content-trick-or-treat"
class="anchor"
aria-hidden="true"
tabindex="-1"
href="#trick-or-treat"
><span aria-hidden="true" class="octicon octicon-link"></span></a
>Trick or treat
<h2 id="user-content-trick-or-treat">
<a class="heading-link" href="#trick-or-treat"
>Trick or treat<span
aria-hidden="true"
class="octicon octicon-link"
></span
></a>
</h2>
<p>Search current word: <code>*</code></p>
<p>Search multiple words:</p>
@ -98,15 +94,10 @@
<div class="highlight highlight-source-viml">
<pre>:<span class="pl-k">!</span>column <span class="pl-k">-</span><span class="pl-c1">t</span></pre>
</div>
<h2>
<a
id="user-content-jumpo"
class="anchor"
aria-hidden="true"
tabindex="-1"
href="#jumpo"
><span aria-hidden="true" class="octicon octicon-link"></span></a
>Jumpo
<h2 id="user-content-jumpo">
<a class="heading-link" href="#jumpo"
>Jumpo<span aria-hidden="true" class="octicon octicon-link"></span
></a>
</h2>
<p>Basic:</p>
<ul>
@ -146,29 +137,19 @@
</ul>
</li>
</ul>
<h2>
<a
id="user-content-fold"
class="anchor"
aria-hidden="true"
tabindex="-1"
href="#fold"
><span aria-hidden="true" class="octicon octicon-link"></span></a
>Fold
<h2 id="user-content-fold">
<a class="heading-link" href="#fold"
>Fold<span aria-hidden="true" class="octicon octicon-link"></span
></a>
</h2>
<ul>
<li><code>zR</code>: open all folds.</li>
<li><code>za</code>, <code>zA</code>: toggle fold</li>
</ul>
<h2>
<a
id="user-content-keymap"
class="anchor"
aria-hidden="true"
tabindex="-1"
href="#keymap"
><span aria-hidden="true" class="octicon octicon-link"></span></a
>Keymap
<h2 id="user-content-keymap">
<a class="heading-link" href="#keymap"
>Keymap<span aria-hidden="true" class="octicon octicon-link"></span
></a>
</h2>
<p>Use both <code>\</code> and <code>;</code> as leader key:</p>
<div class="highlight highlight-source-lua">
@ -327,15 +308,13 @@ vim.<span class="pl-smi">keymap</span>.<span class="pl-c1">set</span>(<span clas
</ul>
</li>
</ul>
<h2>
<a
id="user-content-references--thanks"
class="anchor"
aria-hidden="true"
tabindex="-1"
href="#references--thanks"
><span aria-hidden="true" class="octicon octicon-link"></span></a
>References / Thanks
<h2 id="user-content-references--thanks">
<a class="heading-link" href="#references--thanks"
>References / Thanks<span
aria-hidden="true"
class="octicon octicon-link"
></span
></a>
</h2>
<ul>
<li>

View File

@ -28,25 +28,21 @@
<h2>
<a href="index.html"><code>~</code></a>
</h2>
<h1>
<a
id="user-content-things-i-like"
class="anchor"
aria-hidden="true"
tabindex="-1"
href="#things-i-like"
><span aria-hidden="true" class="octicon octicon-link"></span></a
>Things I like
<h1 id="user-content-things-i-like">
<a class="heading-link" href="#things-i-like"
>Things I like<span
aria-hidden="true"
class="octicon octicon-link"
></span
></a>
</h1>
<h2>
<a
id="user-content-discord-old-naming"
class="anchor"
aria-hidden="true"
tabindex="-1"
href="#discord-old-naming"
><span aria-hidden="true" class="octicon octicon-link"></span></a
>Discord (old) naming
<h2 id="user-content-discord-old-naming">
<a class="heading-link" href="#discord-old-naming"
>Discord (old) naming<span
aria-hidden="true"
class="octicon octicon-link"
></span
></a>
</h2>
<p>
The way Discord naming user like<code>Joker#1234</code> is so interesting.
@ -58,15 +54,13 @@
Why it's interesting? Each time I join a new platform, all names I want
are taken :D
</p>
<h2>
<a
id="user-content-interesting-website"
class="anchor"
aria-hidden="true"
tabindex="-1"
href="#interesting-website"
><span aria-hidden="true" class="octicon octicon-link"></span></a
>Interesting website
<h2 id="user-content-interesting-website">
<a class="heading-link" href="#interesting-website"
>Interesting website<span
aria-hidden="true"
class="octicon octicon-link"
></span
></a>
</h2>
<ul>
<li><a href="https://deskto.ps/" rel="nofollow">deskto.ps</a></li>

View File

@ -28,15 +28,13 @@
<h2>
<a href="index.html"><code>~</code></a>
</h2>
<h1>
<a
id="user-content-swagger-or-openapi"
class="anchor"
aria-hidden="true"
tabindex="-1"
href="#swagger-or-openapi"
><span aria-hidden="true" class="octicon octicon-link"></span></a
>Swagger or OpenAPI
<h1 id="user-content-swagger-or-openapi">
<a class="heading-link" href="#swagger-or-openapi"
>Swagger or OpenAPI<span
aria-hidden="true"
class="octicon octicon-link"
></span
></a>
</h1>
<p>My company currently use Swagger 2 to document API.</p>
<p>
@ -65,15 +63,10 @@ bunx prettier --write ./docs/swagger.yaml ./docs/swagger.json
<span class="pl-c"><span class="pl-c">#</span> Render locally</span>
bunx @redocly/cli preview-docs ./docs/swagger.json</pre>
</div>
<h2>
<a
id="user-content-thanks"
class="anchor"
aria-hidden="true"
tabindex="-1"
href="#thanks"
><span aria-hidden="true" class="octicon octicon-link"></span></a
>Thanks
<h2 id="user-content-thanks">
<a class="heading-link" href="#thanks"
>Thanks<span aria-hidden="true" class="octicon octicon-link"></span
></a>
</h2>
<ul>
<li><a href="https://github.com/mikefarah/yq">mikefarah/yq</a></li>

View File

@ -28,45 +28,37 @@
<h2>
<a href="index.html"><code>~</code></a>
</h2>
<h1>
<a
id="user-content-my-terminal-workflow"
class="anchor"
aria-hidden="true"
tabindex="-1"
href="#my-terminal-workflow"
><span aria-hidden="true" class="octicon octicon-link"></span></a
>My terminal workflow
<h1 id="user-content-my-terminal-workflow">
<a class="heading-link" href="#my-terminal-workflow"
>My terminal workflow<span
aria-hidden="true"
class="octicon octicon-link"
></span
></a>
</h1>
<p>
All configs are in
<a href="https://github.com/haunt98/dotfiles">my dotfiles</a>.
</p>
<h2>
<a
id="user-content-use-junegunnfzf"
class="anchor"
aria-hidden="true"
tabindex="-1"
href="#use-junegunnfzf"
><span aria-hidden="true" class="octicon octicon-link"></span></a
>Use <a href="https://github.com/junegunn/fzf">junegunn/fzf</a>
<h2 id="user-content-use-junegunnfzf">
<a class="heading-link" href="#use-junegunnfzf">Use </a
><a href="https://github.com/junegunn/fzf">junegunn/fzf</a>
<span aria-hidden="true" class="octicon octicon-link"></span>
</h2>
<ul>
<li><code>CTRL-T</code> to fuzzy find files.</li>
<li><code>ALT-C</code> to fuzzy find directories.</li>
</ul>
<h2>
<h2 id="user-content-use-zellij-orgzellij-as-alternative-to-tmux">
<a
id="user-content-use-zellij-orgzellij-as-alternative-to-tmux"
class="anchor"
aria-hidden="true"
tabindex="-1"
class="heading-link"
href="#use-zellij-orgzellij-as-alternative-to-tmux"
><span aria-hidden="true" class="octicon octicon-link"></span></a
>Use
<a href="https://github.com/zellij-org/zellij">zellij-org/zellij</a> as
alternative to tmux
>Use </a
><a href="https://github.com/zellij-org/zellij">zellij-org/zellij</a> as
alternative to tmux<span
aria-hidden="true"
class="octicon octicon-link"
></span>
</h2>
<p>
<a
@ -88,15 +80,10 @@
<li><code>ALT-]</code>/<code>ALT-[</code>: next/previous tab</li>
<li>Hold <code>SHIFT</code> and click on links, text, ...</li>
</ul>
<h2>
<a
id="user-content-use-wezwezterm"
class="anchor"
aria-hidden="true"
tabindex="-1"
href="#use-wezwezterm"
><span aria-hidden="true" class="octicon octicon-link"></span></a
>Use <a href="https://github.com/wez/wezterm">wez/wezterm</a>
<h2 id="user-content-use-wezwezterm">
<a class="heading-link" href="#use-wezwezterm">Use </a
><a href="https://github.com/wez/wezterm">wez/wezterm</a>
<span aria-hidden="true" class="octicon octicon-link"></span>
</h2>
<ul>
<li><code>CTRL-SHIFT-F</code>/<code>CMD-F</code>: search mode</li>
@ -104,15 +91,10 @@
<li><code>CTRL-SHIFT-X</code>: copy mode</li>
<li><code>CMD-SHIFT-[</code>/<code>CMD-SHIFT-]</code>: switch tabs</li>
</ul>
<h2>
<a
id="user-content-use-nnn"
class="anchor"
aria-hidden="true"
tabindex="-1"
href="#use-nnn"
><span aria-hidden="true" class="octicon octicon-link"></span></a
>Use <a href="https://github.com/jarun/nnn">nnn</a>
<h2 id="user-content-use-nnn">
<a class="heading-link" href="#use-nnn">Use </a
><a href="https://github.com/jarun/nnn">nnn</a>
<span aria-hidden="true" class="octicon octicon-link"></span>
</h2>
<ul>
<li><code>;-p</code>: preview mode</li>

View File

@ -28,27 +28,20 @@
<h2>
<a href="index.html"><code>~</code></a>
</h2>
<h1>
<a
id="user-content-another-day-another-incident-02"
class="anchor"
aria-hidden="true"
tabindex="-1"
href="#another-day-another-incident-02"
><span aria-hidden="true" class="octicon octicon-link"></span></a
>Another day another incident #02
<h1 id="user-content-another-day-another-incident-02">
<a class="heading-link" href="#another-day-another-incident-02"
>Another day another incident #02<span
aria-hidden="true"
class="octicon octicon-link"
></span
></a>
</h1>
<p>Today's incident is all about Go context.</p>
<p>TLDR: context got canceled, but it shouldn't.</p>
<h2>
<a
id="user-content-the-problem"
class="anchor"
aria-hidden="true"
tabindex="-1"
href="#the-problem"
><span aria-hidden="true" class="octicon octicon-link"></span></a
>The problem
<h2 id="user-content-the-problem">
<a class="heading-link" href="#the-problem"
>The problem<span aria-hidden="true" class="octicon octicon-link"></span
></a>
</h2>
<p>Imagine a chain of APIs:</p>
<ul>
@ -123,15 +116,13 @@ doB context deadline exceeded</pre
>
</div>
<p>As you see both <code>doA</code> and <code>doB</code> are canceled.</p>
<h2>
<a
id="user-content-the-temporary-solution"
class="anchor"
aria-hidden="true"
tabindex="-1"
href="#the-temporary-solution"
><span aria-hidden="true" class="octicon octicon-link"></span></a
>The (temporary) solution
<h2 id="user-content-the-temporary-solution">
<a class="heading-link" href="#the-temporary-solution"
>The (temporary) solution<span
aria-hidden="true"
class="octicon octicon-link"
></span
></a>
</h2>
<p>
Quick Google search leads me to
@ -246,15 +237,10 @@ doB</pre
As you see only <code>doA</code> is canceled, <code>doB</code> is done
perfectly. And that what we want in this case.
</p>
<h2>
<a
id="user-content-thanks"
class="anchor"
aria-hidden="true"
tabindex="-1"
href="#thanks"
><span aria-hidden="true" class="octicon octicon-link"></span></a
>Thanks
<h2 id="user-content-thanks">
<a class="heading-link" href="#thanks"
>Thanks<span aria-hidden="true" class="octicon octicon-link"></span
></a>
</h2>
<ul>
<li>

View File

@ -28,15 +28,13 @@
<h2>
<a href="index.html"><code>~</code></a>
</h2>
<h1>
<a
id="user-content-khoan-cắt-bê-tông-101"
class="anchor"
aria-hidden="true"
tabindex="-1"
href="#khoan-cắt-bê-tông-101"
><span aria-hidden="true" class="octicon octicon-link"></span></a
>Khoan cắt bê tông 101
<h1 id="user-content-khoan-cắt-bê-tông-101">
<a class="heading-link" href="#khoan-cắt-bê-tông-101"
>Khoan cắt bê tông 101<span
aria-hidden="true"
class="octicon octicon-link"
></span
></a>
</h1>
<p>The title is a joke.</p>
<p>

View File

@ -28,36 +28,24 @@
<h2>
<a href="index.html"><code>~</code></a>
</h2>
<h1>
<a
id="user-content-userful-tools"
class="anchor"
aria-hidden="true"
tabindex="-1"
href="#userful-tools"
><span aria-hidden="true" class="octicon octicon-link"></span></a
>Userful tools
<h1 id="user-content-userful-tools">
<a class="heading-link" href="#userful-tools"
>Userful tools<span
aria-hidden="true"
class="octicon octicon-link"
></span
></a>
</h1>
<p>This just a raw list.</p>
<h2>
<a
id="user-content-tools"
class="anchor"
aria-hidden="true"
tabindex="-1"
href="#tools"
><span aria-hidden="true" class="octicon octicon-link"></span></a
>Tools
<h2 id="user-content-tools">
<a class="heading-link" href="#tools"
>Tools<span aria-hidden="true" class="octicon octicon-link"></span
></a>
</h2>
<h3>
<a
id="user-content-terminal"
class="anchor"
aria-hidden="true"
tabindex="-1"
href="#terminal"
><span aria-hidden="true" class="octicon octicon-link"></span></a
>Terminal
<h3 id="user-content-terminal">
<a class="heading-link" href="#terminal"
>Terminal<span aria-hidden="true" class="octicon octicon-link"></span
></a>
</h3>
<ul>
<li>
@ -364,15 +352,32 @@
>
</li>
</ul>
<h3>
<a
id="user-content-ui"
class="anchor"
aria-hidden="true"
tabindex="-1"
href="#ui"
><span aria-hidden="true" class="octicon octicon-link"></span></a
>UI
<h4 id="user-content-windows">
<a class="heading-link" href="#windows"
>Windows<span aria-hidden="true" class="octicon octicon-link"></span
></a>
</h4>
<ul>
<li>
<a href="https://github.com/abbodi1406/KMS_VL_ALL_AIO"
>https://github.com/abbodi1406/KMS_VL_ALL_AIO</a
>
</li>
<li>
<a href="https://github.com/massgravel/Microsoft-Activation-Scripts"
>https://github.com/massgravel/Microsoft-Activation-Scripts</a
>
</li>
<li>
<a href="https://github.com/abbodi1406/vcredist"
>https://github.com/abbodi1406/vcredist</a
>
</li>
</ul>
<h3 id="user-content-ui">
<a class="heading-link" href="#ui"
>UI<span aria-hidden="true" class="octicon octicon-link"></span
></a>
</h3>
<ul>
<li>
@ -422,15 +427,10 @@
>
</li>
</ul>
<h4>
<a
id="user-content-macos"
class="anchor"
aria-hidden="true"
tabindex="-1"
href="#macos"
><span aria-hidden="true" class="octicon octicon-link"></span></a
>macOS
<h4 id="user-content-macos">
<a class="heading-link" href="#macos"
>macOS<span aria-hidden="true" class="octicon octicon-link"></span
></a>
</h4>
<ul>
<li>
@ -516,25 +516,18 @@
>
</li>
</ul>
<h2>
<a
id="user-content-developement"
class="anchor"
aria-hidden="true"
tabindex="-1"
href="#developement"
><span aria-hidden="true" class="octicon octicon-link"></span></a
>Developement
<h2 id="user-content-developement">
<a class="heading-link" href="#developement"
>Developement<span
aria-hidden="true"
class="octicon octicon-link"
></span
></a>
</h2>
<h3>
<a
id="user-content-terminal-1"
class="anchor"
aria-hidden="true"
tabindex="-1"
href="#terminal-1"
><span aria-hidden="true" class="octicon octicon-link"></span></a
>Terminal
<h3 id="user-content-terminal-1">
<a class="heading-link" href="#terminal-1"
>Terminal<span aria-hidden="true" class="octicon octicon-link"></span
></a>
</h3>
<ul>
<li>
@ -669,15 +662,10 @@
>
</li>
</ul>
<h4>
<a
id="user-content-go"
class="anchor"
aria-hidden="true"
tabindex="-1"
href="#go"
><span aria-hidden="true" class="octicon octicon-link"></span></a
>Go
<h4 id="user-content-go">
<a class="heading-link" href="#go"
>Go<span aria-hidden="true" class="octicon octicon-link"></span
></a>
</h4>
<ul>
<li>
@ -721,15 +709,10 @@
>
</li>
</ul>
<h3>
<a
id="user-content-ui-1"
class="anchor"
aria-hidden="true"
tabindex="-1"
href="#ui-1"
><span aria-hidden="true" class="octicon octicon-link"></span></a
>UI
<h3 id="user-content-ui-1">
<a class="heading-link" href="#ui-1"
>UI<span aria-hidden="true" class="octicon octicon-link"></span
></a>
</h3>
<ul>
<li>
@ -783,15 +766,10 @@
>
</li>
</ul>
<h3>
<a
id="user-content-macos-1"
class="anchor"
aria-hidden="true"
tabindex="-1"
href="#macos-1"
><span aria-hidden="true" class="octicon octicon-link"></span></a
>macOS
<h3 id="user-content-macos-1">
<a class="heading-link" href="#macos-1"
>macOS<span aria-hidden="true" class="octicon octicon-link"></span
></a>
</h3>
<p>Memory</p>
<ul>
@ -799,15 +777,10 @@
<a href="https://gpgtools.org/" rel="nofollow">https://gpgtools.org/</a>
</li>
</ul>
<h2>
<a
id="user-content-games"
class="anchor"
aria-hidden="true"
tabindex="-1"
href="#games"
><span aria-hidden="true" class="octicon octicon-link"></span></a
>Games
<h2 id="user-content-games">
<a class="heading-link" href="#games"
>Games<span aria-hidden="true" class="octicon octicon-link"></span
></a>
</h2>
<ul>
<li>
@ -826,15 +799,10 @@
>
</li>
</ul>
<h2>
<a
id="user-content-notes"
class="anchor"
aria-hidden="true"
tabindex="-1"
href="#notes"
><span aria-hidden="true" class="octicon octicon-link"></span></a
>Notes
<h2 id="user-content-notes">
<a class="heading-link" href="#notes"
>Notes<span aria-hidden="true" class="octicon octicon-link"></span
></a>
</h2>
<p>MacPorts/native package manager &gt; go/rust/pip.</p>
<p>Ignore HomeBrew, nix (for now).</p>
@ -846,26 +814,16 @@
<li>Docker Desktop</li>
<li>Any JetBrains IDE beside DataGrip</li>
</ul>
<h2>
<a
id="user-content-misc"
class="anchor"
aria-hidden="true"
tabindex="-1"
href="#misc"
><span aria-hidden="true" class="octicon octicon-link"></span></a
>Misc
<h2 id="user-content-misc">
<a class="heading-link" href="#misc"
>Misc<span aria-hidden="true" class="octicon octicon-link"></span
></a>
</h2>
<p>Don't enable plugin <code>git</code> in ohmyzsh.</p>
<h3>
<a
id="user-content-macos-2"
class="anchor"
aria-hidden="true"
tabindex="-1"
href="#macos-2"
><span aria-hidden="true" class="octicon octicon-link"></span></a
>macOS
<h3 id="user-content-macos-2">
<a class="heading-link" href="#macos-2"
>macOS<span aria-hidden="true" class="octicon octicon-link"></span
></a>
</h3>
<p>Hide Developer in Spotlight:</p>
<div class="highlight highlight-source-shell">
@ -875,15 +833,10 @@ touch Xcode.app
<span class="pl-c"><span class="pl-c">#</span> Xcode mini version</span>
xcode-select --install</pre>
</div>
<h3>
<a
id="user-content-linux"
class="anchor"
aria-hidden="true"
tabindex="-1"
href="#linux"
><span aria-hidden="true" class="octicon octicon-link"></span></a
>Linux
<h3 id="user-content-linux">
<a class="heading-link" href="#linux"
>Linux<span aria-hidden="true" class="octicon octicon-link"></span
></a>
</h3>
<p>
Fix black screen when open game in fullscreen in external monitor with
@ -892,15 +845,10 @@ xcode-select --install</pre>
>kazysmaster/gnome-shell-extension-disable-unredirect</a
>
</p>
<h3>
<a
id="user-content-firefox"
class="anchor"
aria-hidden="true"
tabindex="-1"
href="#firefox"
><span aria-hidden="true" class="octicon octicon-link"></span></a
>Firefox
<h3 id="user-content-firefox">
<a class="heading-link" href="#firefox"
>Firefox<span aria-hidden="true" class="octicon octicon-link"></span
></a>
</h3>
<p><code>about:config</code>:</p>
<ul>
@ -938,15 +886,10 @@ xcode-select --install</pre>
</ul>
</li>
</ul>
<h2>
<a
id="user-content-thanks"
class="anchor"
aria-hidden="true"
tabindex="-1"
href="#thanks"
><span aria-hidden="true" class="octicon octicon-link"></span></a
>Thanks
<h2 id="user-content-thanks">
<a class="heading-link" href="#thanks"
>Thanks<span aria-hidden="true" class="octicon octicon-link"></span
></a>
</h2>
<ul>
<li>

View File

@ -28,26 +28,20 @@
<h2>
<a href="index.html"><code>~</code></a>
</h2>
<h1>
<a
id="user-content-throw-away-pastebin"
class="anchor"
aria-hidden="true"
tabindex="-1"
href="#throw-away-pastebin"
><span aria-hidden="true" class="octicon octicon-link"></span></a
>Throw away pastebin
<h1 id="user-content-throw-away-pastebin">
<a class="heading-link" href="#throw-away-pastebin"
>Throw away pastebin<span
aria-hidden="true"
class="octicon octicon-link"
></span
></a>
</h1>
<p>Just a place to throw away some text.</p>
<h2>
<a
id="user-content-gitignore"
class="anchor"
aria-hidden="true"
tabindex="-1"
href="#gitignore"
><span aria-hidden="true" class="octicon octicon-link"></span></a
><code>.gitignore</code>
<h2 id="user-content-gitignore">
<a class="heading-link" href="#gitignore"
><code>.gitignore</code
><span aria-hidden="true" class="octicon octicon-link"></span
></a>
</h2>
<div class="highlight highlight-text-adblock">
<pre><span class="pl-c"># macOS</span>
@ -69,15 +63,13 @@ vendor
<span class="pl-c"># GoReleaser</span>
dist</pre>
</div>
<h2>
<a
id="user-content-github-actions"
class="anchor"
aria-hidden="true"
tabindex="-1"
href="#github-actions"
><span aria-hidden="true" class="octicon octicon-link"></span></a
>GitHub Actions
<h2 id="user-content-github-actions">
<a class="heading-link" href="#github-actions"
>GitHub Actions<span
aria-hidden="true"
class="octicon octicon-link"
></span
></a>
</h2>
<p><code>dependabot.yml</code>:</p>
<div class="highlight highlight-source-yaml">
@ -152,15 +144,10 @@ dist</pre>
<span class="pl-ent">with</span>:
<span class="pl-ent">version</span>: <span class="pl-s">latest</span></pre>
</div>
<h2>
<a
id="user-content-go"
class="anchor"
aria-hidden="true"
tabindex="-1"
href="#go"
><span aria-hidden="true" class="octicon octicon-link"></span></a
>Go
<h2 id="user-content-go">
<a class="heading-link" href="#go"
>Go<span aria-hidden="true" class="octicon octicon-link"></span
></a>
</h2>
<p><code>.golangci.yml</code>:</p>
<div class="highlight highlight-source-yaml">
@ -282,15 +269,13 @@ dist</pre>
<span class="pl-ent">skip</span>: <span class="pl-c1">false</span>
<span class="pl-ent">use</span>: <span class="pl-s">github</span></pre>
</div>
<h1>
<a
id="user-content-git-clean-up"
class="anchor"
aria-hidden="true"
tabindex="-1"
href="#git-clean-up"
><span aria-hidden="true" class="octicon octicon-link"></span></a
>Git clean up
<h1 id="user-content-git-clean-up">
<a class="heading-link" href="#git-clean-up"
>Git clean up<span
aria-hidden="true"
class="octicon octicon-link"
></span
></a>
</h1>
<div class="highlight highlight-source-shell">
<pre><span class="pl-c"><span class="pl-c">#</span> Delete untracked</span>
@ -298,15 +283,11 @@ git clean -fdx
git gc</pre>
</div>
<h2>
<a
id="user-content-delete-ds_store"
class="anchor"
aria-hidden="true"
tabindex="-1"
href="#delete-ds_store"
><span aria-hidden="true" class="octicon octicon-link"></span></a
>Delete <code>.DS_Store</code>
<h2 id="user-content-delete-ds_store">
<a class="heading-link" href="#delete-ds_store"
>Delete <code>.DS_Store</code>
<span aria-hidden="true" class="octicon octicon-link"></span
></a>
</h2>
<p>
With
@ -319,29 +300,19 @@ git gc</pre>
<div class="highlight highlight-source-shell">
<pre>fd -H <span class="pl-s"><span class="pl-pds">'</span>^\.DS_Store$<span class="pl-pds">'</span></span> -tf -X rm</pre>
</div>
<h2>
<a
id="user-content-fdupes"
class="anchor"
aria-hidden="true"
tabindex="-1"
href="#fdupes"
><span aria-hidden="true" class="octicon octicon-link"></span></a
><a href="https://github.com/adrianlopezroche/fdupes">fdupes</a>
<h2 id="user-content-fdupes">
<a class="heading-link" href="#fdupes"></a
><a href="https://github.com/adrianlopezroche/fdupes">fdupes</a
><span aria-hidden="true" class="octicon octicon-link"></span>
</h2>
<p>Remove duplicated files:</p>
<div class="highlight highlight-source-shell">
<pre>fdupes -rdN <span class="pl-c1">.</span></pre>
</div>
<h2>
<a
id="user-content-rsync"
class="anchor"
aria-hidden="true"
tabindex="-1"
href="#rsync"
><span aria-hidden="true" class="octicon octicon-link"></span></a
><a href="https://github.com/WayneD/rsync">rsync</a>
<h2 id="user-content-rsync">
<a class="heading-link" href="#rsync"></a
><a href="https://github.com/WayneD/rsync">rsync</a
><span aria-hidden="true" class="octicon octicon-link"></span>
</h2>
<div class="highlight highlight-source-shell">
<pre><span class="pl-c"><span class="pl-c">#</span> Result is dst/src</span>
@ -371,30 +342,20 @@ rsync -avzP src/ dst</pre>
in <strong>src</strong>, useful to sync dst with src
</li>
</ul>
<h2>
<a
id="user-content-f2"
class="anchor"
aria-hidden="true"
tabindex="-1"
href="#f2"
><span aria-hidden="true" class="octicon octicon-link"></span></a
><a href="https://github.com/ayoisaiah/f2">F2</a>
<h2 id="user-content-f2">
<a class="heading-link" href="#f2"></a
><a href="https://github.com/ayoisaiah/f2">F2</a
><span aria-hidden="true" class="octicon octicon-link"></span>
</h2>
<p>Rename:</p>
<div class="highlight highlight-source-shell">
<pre><span class="pl-c"><span class="pl-c">#</span> If want dry run, remove -x</span>
f2 -r <span class="pl-s"><span class="pl-pds">"</span>{mtime.YYYY}{mtime.MM}{mtime.DD}.{mtime.H}{mtime.mm}{mtime.ss}{ext}<span class="pl-pds">"</span></span> -x</pre>
</div>
<h2>
<a
id="user-content-instaloader"
class="anchor"
aria-hidden="true"
tabindex="-1"
href="#instaloader"
><span aria-hidden="true" class="octicon octicon-link"></span></a
><a href="https://github.com/instaloader/instaloader">Instaloader</a>
<h2 id="user-content-instaloader">
<a class="heading-link" href="#instaloader"></a
><a href="https://github.com/instaloader/instaloader">Instaloader</a
><span aria-hidden="true" class="octicon octicon-link"></span>
</h2>
<p><code>args.txt</code>:</p>
<div class="highlight highlight-text-adblock">
@ -420,15 +381,10 @@ f2 -r <span class="pl-s"><span class="pl-pds">"</span>{mtime.YYYY}{mtime.MM}{mti
<div class="highlight highlight-text-adblock">
<pre>instaloader +login.txt +args.txt +targets.txt</pre>
</div>
<h2>
<a
id="user-content-grpcurl"
class="anchor"
aria-hidden="true"
tabindex="-1"
href="#grpcurl"
><span aria-hidden="true" class="octicon octicon-link"></span></a
><a href="https://github.com/fullstorydev/grpcurl">gRPCurl</a>
<h2 id="user-content-grpcurl">
<a class="heading-link" href="#grpcurl"></a
><a href="https://github.com/fullstorydev/grpcurl">gRPCurl</a
><span aria-hidden="true" class="octicon octicon-link"></span>
</h2>
<div class="highlight highlight-source-shell">
<pre>grpcurl -proto path/file.proto \

View File

@ -28,28 +28,21 @@
<h2>
<a href="index.html"><code>~</code></a>
</h2>
<h1>
<a
id="user-content-fan-android"
class="anchor"
aria-hidden="true"
tabindex="-1"
href="#fan-android"
><span aria-hidden="true" class="octicon octicon-link"></span></a
>F(an) android
<h1 id="user-content-fan-android">
<a class="heading-link" href="#fan-android"
>F(an) android<span
aria-hidden="true"
class="octicon octicon-link"
></span
></a>
</h1>
<p>You know what I mean :D</p>
<p>Just a collection/checklist while using Android phone.</p>
<p>All Android phones are bloat.</p>
<h2>
<a
id="user-content-apps"
class="anchor"
aria-hidden="true"
tabindex="-1"
href="#apps"
><span aria-hidden="true" class="octicon octicon-link"></span></a
>Apps
<h2 id="user-content-apps">
<a class="heading-link" href="#apps"
>Apps<span aria-hidden="true" class="octicon octicon-link"></span
></a>
</h2>
<p>
Use <a href="https://f-droid.org/en/" rel="nofollow">F-Droid</a> with

View File

@ -28,26 +28,19 @@
<h2>
<a href="index.html"><code>~</code></a>
</h2>
<h1>
<a
id="user-content-redis"
class="anchor"
aria-hidden="true"
tabindex="-1"
href="#redis"
><span aria-hidden="true" class="octicon octicon-link"></span></a
>Redis
<h1 id="user-content-redis">
<a class="heading-link" href="#redis"
>Redis<span aria-hidden="true" class="octicon octicon-link"></span
></a>
</h1>
<p>Just to save my noted for future me using Redis again.</p>
<h2>
<a
id="user-content-redis-does-not-store-creation-time-of-keys"
class="anchor"
aria-hidden="true"
tabindex="-1"
href="#redis-does-not-store-creation-time-of-keys"
><span aria-hidden="true" class="octicon octicon-link"></span></a
>Redis does not store creation time of keys
<h2 id="user-content-redis-does-not-store-creation-time-of-keys">
<a class="heading-link" href="#redis-does-not-store-creation-time-of-keys"
>Redis does not store creation time of keys<span
aria-hidden="true"
class="octicon octicon-link"
></span
></a>
</h2>
<p>Why? Because TODO</p>
<p>

View File

@ -28,15 +28,13 @@
<h2>
<a href="index.html"><code>~</code></a>
</h2>
<h1>
<a
id="user-content-cache-shenanigan"
class="anchor"
aria-hidden="true"
tabindex="-1"
href="#cache-shenanigan"
><span aria-hidden="true" class="octicon octicon-link"></span></a
>Cache shenanigan
<h1 id="user-content-cache-shenanigan">
<a class="heading-link" href="#cache-shenanigan"
>Cache shenanigan<span
aria-hidden="true"
class="octicon octicon-link"
></span
></a>
</h1>
<p>
My notes/mistakes/... when using cache (mainly Redis) from time to time
@ -84,15 +82,10 @@
database has new value, but cache has old value Then when we read again,
we read cache first with old value, and that is disaster.
</p>
<h2>
<a
id="user-content-thanks"
class="anchor"
aria-hidden="true"
tabindex="-1"
href="#thanks"
><span aria-hidden="true" class="octicon octicon-link"></span></a
>Thanks
<h2 id="user-content-thanks">
<a class="heading-link" href="#thanks"
>Thanks<span aria-hidden="true" class="octicon octicon-link"></span
></a>
</h2>
<ul>
<li>

View File

@ -28,15 +28,10 @@
<h2>
<a href="index.html"><code>~</code></a>
</h2>
<h1>
<a
id="user-content-vscode"
class="anchor"
aria-hidden="true"
tabindex="-1"
href="#vscode"
><span aria-hidden="true" class="octicon octicon-link"></span></a
>VSCode
<h1 id="user-content-vscode">
<a class="heading-link" href="#vscode"
>VSCode<span aria-hidden="true" class="octicon octicon-link"></span
></a>
</h1>
<p>Favortite settings everytime I install VSCode.</p>
<p>

View File

@ -28,15 +28,13 @@
<h2>
<a href="index.html"><code>~</code></a>
</h2>
<h1>
<a
id="user-content-hardware-101"
class="anchor"
aria-hidden="true"
tabindex="-1"
href="#hardware-101"
><span aria-hidden="true" class="octicon octicon-link"></span></a
>Hardware 101
<h1 id="user-content-hardware-101">
<a class="heading-link" href="#hardware-101"
>Hardware 101<span
aria-hidden="true"
class="octicon octicon-link"
></span
></a>
</h1>
<p>
Just kidding. It's only my collect data about which hardware to use/buy.

View File

@ -28,15 +28,13 @@
<h2>
<a href="index.html"><code>~</code></a>
</h2>
<h1>
<a
id="user-content-real-world-crypto-101"
class="anchor"
aria-hidden="true"
tabindex="-1"
href="#real-world-crypto-101"
><span aria-hidden="true" class="octicon octicon-link"></span></a
>Real World Crypto 101
<h1 id="user-content-real-world-crypto-101">
<a class="heading-link" href="#real-world-crypto-101"
>Real World Crypto 101<span
aria-hidden="true"
class="octicon octicon-link"
></span
></a>
</h1>
<p>
My notes when reading
@ -46,16 +44,16 @@
>Real-World Cryptography</a
>
</p>
<h2>
<h2 id="user-content-hash-function-convert-from-input-to-digest">
<a
id="user-content-hash-function-convert-from-input-to-digest"
class="anchor"
aria-hidden="true"
tabindex="-1"
class="heading-link"
href="#hash-function-convert-from-input-to-digest"
><span aria-hidden="true" class="octicon octicon-link"></span
>
<strong>Hash</strong> function convert from input to digest<span
aria-hidden="true"
class="octicon octicon-link"
></span
></a>
<strong>Hash</strong> function convert from input to digest
</h2>
<ul>
<li>Pre-image resistance: Given digest, can not find input</li>
@ -65,17 +63,19 @@
</li>
<li>Collision resistance: Can not find 2 input produce same digest.</li>
</ul>
<h2>
<h2
id="user-content-mac-aka-message-authentication-code-produce-from-key-message-to-authentication-tag"
>
<a
id="user-content-mac-aka-message-authentication-code-produce-from-key-message-to-authentication-tag"
class="anchor"
aria-hidden="true"
tabindex="-1"
class="heading-link"
href="#mac-aka-message-authentication-code-produce-from-key-message-to-authentication-tag"
><span aria-hidden="true" class="octicon octicon-link"></span
>
<strong>MAC</strong> aka Message Authentication Code produce from key,
message to authentication tag.<span
aria-hidden="true"
class="octicon octicon-link"
></span
></a>
<strong>MAC</strong> aka Message Authentication Code produce from key,
message to authentication tag.
</h2>
<ul>
<li>A send B message with MAC (generate from message and A key).</li>

View File

@ -28,15 +28,13 @@
<h2>
<a href="index.html"><code>~</code></a>
</h2>
<h1>
<a
id="user-content-vietnam-survivor"
class="anchor"
aria-hidden="true"
tabindex="-1"
href="#vietnam-survivor"
><span aria-hidden="true" class="octicon octicon-link"></span></a
>Vietnam survivor
<h1 id="user-content-vietnam-survivor">
<a class="heading-link" href="#vietnam-survivor"
>Vietnam survivor<span
aria-hidden="true"
class="octicon octicon-link"
></span
></a>
</h1>
<p>Written by Vietnamese for Vietnamese.</p>
<p>Every Vietnamese person must/should has:</p>

View File

@ -25,15 +25,10 @@
}
</style>
<body class="markdown-body">
<h1>
<a
id="user-content-index"
class="anchor"
aria-hidden="true"
tabindex="-1"
href="#index"
><span aria-hidden="true" class="octicon octicon-link"></span></a
>Index
<h1 id="user-content-index">
<a class="heading-link" href="#index"
>Index<span aria-hidden="true" class="octicon octicon-link"></span
></a>
</h1>
<p>This is where I dump my thoughts.</p>
<ul>

View File

@ -69,6 +69,12 @@ Fun memory
- https://github.com/instaloader/instaloader
- https://gitlab.com/phoneybadger/pokemon-colorscripts
#### Windows
- https://github.com/abbodi1406/KMS_VL_ALL_AIO
- https://github.com/massgravel/Microsoft-Activation-Scripts
- https://github.com/abbodi1406/vcredist
### UI
- https://github.com/kovidgoyal/kitty