Skip to content

Instantly share code, notes, and snippets.

@salman-pathan
salman-pathan / multi-thread-go.md
Created February 7, 2023 03:22
Explanation of multi-thread processing in Go

Multi-thread processing in Go

Threads

A thread is the smallest unit of processing that an OS can perform. The default size of a thread in a Linux/x86-32 machine is 2MB

Threads can be :

  1. Concurrent - Two or more threads can start, run and complete in overlapping periods.
  2. Parallel - The same task can be executed multiple times at once.
@john-science
john-science / chess_training.md
Last active July 5, 2025 13:22
Training for Chess

Chess Training

My current goals:

  1. Go through my checklist before EVERY move.
  2. Stop playing hope chess: if you can find a single weakness in an idea, abandon it and find a new idea.

The Checklist

@tykurtz
tykurtz / grokking_to_leetcode.md
Last active October 12, 2025 17:59
Grokking the coding interview equivalent leetcode problems

GROKKING NOTES

I liked the way Grokking the coding interview organized problems into learnable patterns. However, the course is expensive and the majority of the time the problems are copy-pasted from leetcode. As the explanations on leetcode are usually just as good, the course really boils down to being a glorified curated list of leetcode problems.

So below I made a list of leetcode problems that are as close to grokking problems as possible.

Pattern: Sliding Window

@kanmaytacker
kanmaytacker / oop_python.ipynb
Last active August 18, 2024 03:03
Objected-oriented programming with Python
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@res0nat0r
res0nat0r / 00-k8s-notes.md
Last active March 1, 2023 10:10
Kubernetes Notes

List all containers in pod:

kubectl get pod <name> -o jsonpath="{.spec['containers','initContainers'][*].name}"

Get events related to pod:

@shankarshastri
shankarshastri / LearnXInYMinProtocolBuffer.proto
Last active April 18, 2025 15:09
Self-Explanatory Protocol Buffer Lang Guide (CheatSheet)
/*
* Self-Explanatory Protocol Buffer Lang Guide
*/
/*
* Why Protocol Buffers?
* Protocol buffers are Google's language-neutral, platform-neutral, extensible mechanism for serializing structured data – think XML, but smaller, faster, and simpler.
* You define how you want your data to be structured once, then you can use special generated source code to easily write and read your structured data to and from a variety of data streams and using a variety of languages.
* Protocol Buffers are Schema Of Messages. They are language agnostic.
@vasanthk
vasanthk / System Design.md
Last active October 10, 2025 09:03
System Design Cheatsheet

System Design Cheatsheet

Picking the right architecture = Picking the right battles + Managing trade-offs

Basic Steps

  1. Clarify and agree on the scope of the system
  • User cases (description of sequences of events that, taken together, lead to a system doing something useful)
    • Who is going to use it?
    • How are they going to use it?
@Kartones
Kartones / statsd-local-server.md
Created August 19, 2015 09:55
StatsD local server for testing
@arganzheng
arganzheng / PoolingHttpClient
Created June 18, 2015 02:35
An HttpClient with PoolingHttpClientConnectionManager
package org.opentsdb.client;
import static com.google.common.base.Preconditions.checkArgument;
import java.io.IOException;
import java.util.concurrent.TimeUnit;
import org.apache.commons.lang.StringUtils;
import org.apache.http.HeaderElement;
import org.apache.http.HeaderElementIterator;