Skip to content

Instantly share code, notes, and snippets.

View zainfathoni's full-sized avatar
:octocat:
Revamping www.zainfathoni.com

Zain Fathoni zainfathoni

:octocat:
Revamping www.zainfathoni.com
View GitHub Profile
@zainfathoni
zainfathoni / git.mermaid
Created July 12, 2023 09:00
Git branching strategy
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
package main
import (
"fmt"
"golang.org/x/tour/tree"
)
// Walk walks the tree t sending all values
// from the tree to the channel ch.
func Walk(t *tree.Tree, ch chan int) {
@zainfathoni
zainfathoni / cloudSettings
Last active March 13, 2021 12:54
Visual Studio Code Settings Sync Gist
{"lastUpload":"2019-11-20T03:47:53.433Z","extensionVersion":"v3.4.3"}
@zainfathoni
zainfathoni / extensions.json
Created October 1, 2020 04:55
VS Code Extensions
[
{
"identifier": {
"id": "chenglou.rescript-language-server"
},
"installed": true
},
{
"identifier": {
"id": "vscode.bat"
@zainfathoni
zainfathoni / node-gyp.md
Created March 31, 2020 07:41
node-gyp issue

node-gyp

schnerd/d3-scale-cluster#7 (comment)

$ sudo rm -rf $(xcode-select -print-path)
$ xcode-select --install
$ /usr/sbin/pkgutil --packages | grep CL
$ npm install -g node-gyp
@zainfathoni
zainfathoni / machine.js
Last active January 25, 2020 00:56
Generated by XState Viz: https://xstate.js.org/viz
// Available variables:
// - Machine
// - interpret
// - assign
// - send
// - sendParent
// - spawn
// - raise
// - actions
@zainfathoni
zainfathoni / machine.js
Created January 9, 2020 08:53
Generated by XState Viz: https://xstate.js.org/viz
// Available variables:
// - Machine
// - interpret
// - assign
// - send
// - sendParent
// - spawn
// - raise
// - actions
@zainfathoni
zainfathoni / README.md
Last active November 15, 2019 22:04
macOS Initial Setup

macOS Initial Setup

My personal macOS setup guide for a new fresh installation

Notes

This repository was ported from Gist to GitHub repository due to these reasons:

  1. Gist does not support directories. 😢 I want to be able to customize my VS Code experience in this repository through configurations in a .vscode folder.
  2. The number of files are getting larger than I was planning. 😅
@zainfathoni
zainfathoni / iterm2-solarized.md
Created November 9, 2019 12:15 — forked from kevin-smets/iterm2-solarized.md
iTerm2 + Oh My Zsh + Solarized color scheme + Source Code Pro Powerline + Font Awesome + [Powerlevel10k] - (macOS)

Default

Default

Powerlevel10k

Powerlevel10k

@zainfathoni
zainfathoni / WhyReact.md
Created October 26, 2019 03:00 — forked from sebmarkbage/WhyReact.md
Why is React doing this?

I heard some points of criticism to how React deals with reactivity and it's focus on "purity". It's interesting because there are really two approaches evolving. There's a mutable + change tracking approach and there's an immutability + referential equality testing approach. It's difficult to mix and match them when you build new features on top. So that's why React has been pushing a bit harder on immutability lately to be able to build on top of it. Both have various tradeoffs but others are doing good research in other areas, so we've decided to focus on this direction and see where it leads us.

I did want to address a few points that I didn't see get enough consideration around the tradeoffs. So here's a small brain dump.

"Compiled output results in smaller apps" - E.g. Svelte apps start smaller but the compiler output is 3-4x larger per component than the equivalent VDOM approach. This is mostly due to the code that is usually shared in the VDOM "VM" needs to be inlined into each component. The tr