Skip to content

Instantly share code, notes, and snippets.

View KianYang-Lee's full-sized avatar

Kian Yang Lee KianYang-Lee

View GitHub Profile
@rhnvrm
rhnvrm / iterator_benchmark_test.go
Last active June 23, 2026 07:25
Go Iterators: Complete Performance Guide & Comparison
// Go 1.23 Iterator Patterns: Complete Performance Guide
//
// This comprehensive benchmark compares 5 different iteration patterns in Go:
// 1. Go 1.23 Range-over-Function Iterators (NEW) ⭐
// 2. Copy-Everything Pattern (TRADITIONAL)
// 3. Callback Pattern (PRE-ITERATOR)
// 4. Channel Pattern (GOROUTINE-BASED)
// 5. Manual Iterator Struct (EXPLICIT STATE)
//
// 🏆 KEY FINDINGS:
@mitchellh
mitchellh / merge_vs_rebase_vs_squash.md
Last active June 19, 2026 04:47
Merge vs. Rebase vs. Squash

I get asked pretty regularly what my opinion is on merge commits vs rebasing vs squashing. I've typed up this response so many times that I've decided to just put it in a gist so I can reference it whenever it comes up again.

I use merge, squash, rebase all situationally. I believe they all have their merits but their usage depends on the context. I think anyone who says any particular strategy is the right answer 100% of the time is wrong, but I think there is considerable acceptable leeway in when you use each. What follows is my personal and professional opinion:

@trongnghia203
trongnghia203 / install_pyenv.md
Last active February 9, 2026 15:47
Install pyenv
@accessnash
accessnash / boosting.py
Created August 22, 2018 21:14
Machine Learning with Tree-Based Models in Python : Ch - 4 - Adaboosting, Gradient boosting and Stochastic Gradient boosting - Datacamp
# Import DecisionTreeClassifier
from sklearn.tree import DecisionTreeClassifier
# Import AdaBoostClassifier
from sklearn.ensemble import AdaBoostClassifier
# Instantiate dt
dt = DecisionTreeClassifier(max_depth=2, random_state=1)
# Instantiate ada
@bag-man
bag-man / post.md
Created February 4, 2017 00:01
fzf + rgrep + vim mini tutorial

I've always had fzf and ripgrep on my radar, and I've finally gotten around to using them together. Good lord it makes a world of difference, especially when added to Vim as well as Bash.

Add the following snippet to your ~/.bashrc, this add's fzf keybindings to bash and gets fzf to use ripgrep by default for faster searching.

[ -f ~/.fzf.bash ] && source ~/.fzf.bash
export FZF_DEFAULT_COMMAND='rg --files --no-ignore --hidden --follow --glob "!.git/*"'
bind -x '"\C-p": vim $(fzf);'

Okay now what can you do?

@rxaviers
rxaviers / gist:7360908
Last active June 24, 2026 02:41
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: