Skip to content

Instantly share code, notes, and snippets.

@swalkinshaw
swalkinshaw / tutorial.md
Last active November 13, 2023 08:40
Designing a GraphQL API
from heapq import *
class A:
def __init__(self, val):
self.val = val
def __lt__(self, cmp):
"""Overwrite this to do the opposite of what's
expected"""
@yossorion
yossorion / what-i-wish-id-known-about-equity-before-joining-a-unicorn.md
Last active April 7, 2024 22:55
What I Wish I'd Known About Equity Before Joining A Unicorn

What I Wish I'd Known About Equity Before Joining A Unicorn

Disclaimer: This piece is written anonymously. The names of a few particular companies are mentioned, but as common examples only.

This is a short write-up on things that I wish I'd known and considered before joining a private company (aka startup, aka unicorn in some cases). I'm not trying to make the case that you should never join a private company, but the power imbalance between founder and employee is extreme, and that potential candidates would

@mugifly
mugifly / img-conv-for-slack-emoji
Last active July 26, 2022 18:45
Image Converter for Slack Emoji (128px) - Required: ImageMagick.
#!/bin/bash
set -e
echo -e "Image Converter for Slack Emoji\nNOTICE: The image will be overwritten."
if [ $# -lt 1 ]; then
echo "USAGE:"
echo -e " ${0} IMG_FILE [IMG_FILE...]\n"
echo "IMG_FILE:"
$ git pull
remote: Counting objects: 409, done.
remote: Compressing objects: 100% (66/66), done.
remote: Total 409 (delta 269), reused 248 (delta 247), pack-reused 96
Receiving objects: 100% (409/409), 82.91 KiB | 0 bytes/s, done.
Resolving deltas: 100% (273/273), completed with 61 local objects.
From github.com:alphagov/smart-answers
   c71d9c3..6f9dbfe  master     -> origin/master
   9f9ef5d..741945f  benefit-cap-calculator-pre-autumn-changes -> origin/benefit-cap-calculator-pre-autumn-changes

Basic

import code; code.interact(local=locals())

Advanced

IPython with embed()

@vasanthk
vasanthk / System Design.md
Last active May 13, 2024 13: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?
@unnikked
unnikked / QuickSelect.java
Created July 4, 2015 15:40
A basic implementation of quickselect algorithm in Java. Intentionally unused generics.
import java.util.Arrays;
/**
* quickselect is a selection algorithm to find the kth smallest element in an
* unordered list. Like quicksort, it is efficient in practice and has good
* average-case performance, but has poor worst-case performance. Quickselect
* and variants is the selection algorithm most often used in efficient
* real-world implementations.
*
* Quickselect uses the same overall approach as quicksort, choosing one
@staltz
staltz / introrx.md
Last active May 13, 2024 09:59
The introduction to Reactive Programming you've been missing
@tsiege
tsiege / The Technical Interview Cheat Sheet.md
Last active May 9, 2024 13:54
This is my technical interview cheat sheet. Feel free to fork it or do whatever you want with it. PLEASE let me know if there are any errors or if anything crucial is missing. I will add more links soon.

ANNOUNCEMENT

I have moved this over to the Tech Interview Cheat Sheet Repo and has been expanded and even has code challenges you can run and practice against!






\