Skip to content

Instantly share code, notes, and snippets.

View kylelong's full-sized avatar
🌴
On vacation

Kyle Long kylelong

🌴
On vacation
View GitHub Profile
@underscoDe
underscoDe / LeetcodeBlind75.md
Last active March 31, 2025 12:01
Customized LeetCode study plans. Grind all 169 questions. This is a gist to help you track your progress.

Grind 169 Leetcode questions

An updated version of Blind 75

Filters:

  • View All Questions
  • Order by Difficulty
  • Group by Topics

Array

#
# <Node tree=Array.new([value, left, right]) parent=Node node_index=(1|2)>
#
class Node < Struct.new(:tree, :parent, :node_index)
def value
@value ||= tree[0]
end
def leaf(index)
tree[index] ? Node.new(Array(tree[index]), self, index) : nil
@wojteklu
wojteklu / clean_code.md
Last active April 21, 2025 06:12
Summary of 'Clean code' by Robert C. Martin

Code is clean if it can be understood easily – by everyone on the team. Clean code can be read and enhanced by a developer other than its original author. With understandability comes readability, changeability, extensibility and maintainability.


General rules

  1. Follow standard conventions.
  2. Keep it simple stupid. Simpler is always better. Reduce complexity as much as possible.
  3. Boy scout rule. Leave the campground cleaner than you found it.
  4. Always find root cause. Always look for the root cause of a problem.

Design rules

@squarism
squarism / iterm2.md
Last active April 21, 2025 09:10
An iTerm2 Cheatsheet

Tabs and Windows

Function Shortcut
New Tab + T
Close Tab or Window + W (same as many mac apps)
Go to Tab + Number Key (ie: ⌘2 is 2nd tab)
Go to Split Pane by Direction + Option + Arrow Key
Cycle iTerm Windows + backtick (true of all mac apps and works with desktops/mission control)
@chantastic
chantastic / on-jsx.markdown
Last active November 10, 2024 13:39
JSX, a year in

Hi Nicholas,

I saw you tweet about JSX yesterday. It seemed like the discussion devolved pretty quickly but I wanted to share our experience over the last year. I understand your concerns. I've made similar remarks about JSX. When we started using it Planning Center, I led the charge to write React without it. I don't imagine I'd have much to say that you haven't considered but, if it's helpful, here's a pattern that changed my opinion:

The idea that "React is the V in MVC" is disingenuous. It's a good pitch but, for many of us, it feels like in invitation to repeat our history of coupled views. In practice, React is the V and the C. Dan Abramov describes the division as Smart and Dumb Components. At our office, we call them stateless and container components (view-controllers if we're Flux). The idea is pretty simple: components can't

@vitorbritto
vitorbritto / rm_mysql.md
Last active April 6, 2025 09:16
Remove MySQL completely from Mac OSX

Remove MySQL completely

  1. Open the Terminal

  2. Use mysqldump to backup your databases

  3. Check for MySQL processes with: ps -ax | grep mysql

  4. Stop and kill any MySQL processes

  5. Analyze MySQL on HomeBrew:

    brew remove mysql