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

Folder Structure

Motivations

  • Clear feature ownership
  • Module usage predictibility (refactoring, maintainence, you know what's shared, what's not, prevents accidental regressions, avoids huge directories of not-actually-reusable modules, etc)
@zainfathoni
zainfathoni / config.zsh
Created November 6, 2018 12:03
Zsh Configuration Example
# powerlevel9k configurations
# https://github.com/bhilburn/powerlevel9k#customizing-prompt-segments
POWERLEVEL9K_MODE='awesome-patched'
POWERLEVEL9K_PROMPT_ON_NEWLINE=true
POWERLEVEL9K_MULTILINE_FIRST_PROMPT_PREFIX="%{%F{249}%}\u250f"
POWERLEVEL9K_MULTILINE_SECOND_PROMPT_PREFIX="%{%F{249}%}\u2517%{%F{default}%} "
POWERLEVEL9K_SHORTEN_DIR_LENGTH=4
POWERLEVEL9K_SHORTEN_STRATEGY="truncate_middle"
POWERLEVEL9K_OS_ICON_BACKGROUND="black"
@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 / macosx_remove_java9.sh
Created February 21, 2018 08:39 — forked from schnell18/macosx_remove_java9.sh
MacOS X remove Java 9
sudo rm -fr /Library/Java/JavaVirtualMachines/jdk-9.jdk/
sudo rm -fr /Library/Internet\ Plug-Ins/JavaAppletPlugin.plugin
sudo rm -fr /Library/PreferencePanes/JavaControlPanel.prefPane
@zainfathoni
zainfathoni / gist:5559ff7db51af4c21259c177c62672c4
Created May 31, 2017 15:44 — forked from rxaviers/gist:7360908
Complete list of github markdown emoji markup

People

:bowtie: :bowtie: 😄 :smile: 😆 :laughing:
😊 :blush: 😃 :smiley: ☺️ :relaxed:
😏 :smirk: 😍 :heart_eyes: 😘 :kissing_heart:
😚 :kissing_closed_eyes: 😳 :flushed: 😌 :relieved:
😆 :satisfied: 😁 :grin: 😉 :wink:
😜 :stuck_out_tongue_winking_eye: 😝 :stuck_out_tongue_closed_eyes: 😀 :grinning:
😗 :kissing: 😙 :kissing_smiling_eyes: 😛 :stuck_out_tongue:
package main
import (
"fmt"
"sync"
)
type Fetcher interface {
// Fetch returns the body of URL and
// a slice of URLs found on that page.
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) {
package main
import (
"golang.org/x/tour/pic"
"image"
"image/color"
)
type Image struct {
Width, Height int
package main
import (
"io"
"os"
"strings"
)
type rot13Reader struct {
r io.Reader
package main
import "golang.org/x/tour/reader"
type MyReader struct{}
func (r MyReader) Read(b []byte) (n int, err error) {
b[0] = 'A'
return 1, nil