Skip to content

Instantly share code, notes, and snippets.

View leegao's full-sized avatar

Lee Gao leegao

  • Google
  • Jersey City, NJ
View GitHub Profile
@kyo-takano
kyo-takano / introduction-to-ternary-neural-networks.ipynb
Created March 6, 2024 12:29
Introduction to Ternary Neural Networks
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@yossorion
yossorion / what-i-wish-id-known-about-equity-before-joining-a-unicorn.md
Last active November 3, 2024 17:14
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

anonymous
anonymous / GAME_MASTER_v0_1.protobuf
Created July 16, 2016 16:31
Pokemon Go decoded GAME_MASTER protobuf file v0.1
Result: 1
Items {
TemplateId: "BADGE_BATTLE_ATTACK_WON"
Badge {
BadgeType: BADGE_BATTLE_ATTACK_WON
BadgeRanks: 4
Targets: "\nd\350\007"
}
}
Items {
@vasanthk
vasanthk / System Design.md
Last active December 9, 2024 01:30
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?
@srcreigh
srcreigh / who-needs-latex.txt
Created January 14, 2016 20:49
notes from my compiler construction course
January 14, 2016
Thursday
COMPILER CONSTRUCTION
1. TOKENS AND KINDS
===================
@elvinio
elvinio / Useful Linux Commands
Last active August 29, 2015 14:09
Useful Linux Commands
# doing a strace on a process
strace -c -f ./D4Adaptor
# listening on multicast group in iperf
/usr/local/bin/iperf -s -i 1 -u -B 224.0.28.46 -p 6313
# spamming multicast
/usr/local/bin/iperf -c 224.0.28.46 -u -T 32 -t 60 -i 5 -p 6313
@hsanchez
hsanchez / Example.mini
Created April 2, 2012 16:19 — forked from kmizu/Example.mini
Toy language with parser combinators of scala, which is derived from Kishida-san's code. Original language has dynamic scope. But It has static scope and so-called lexical closure.
val factorial = (n) => {
if(n < 2) 1 else (n * factorial(n - 1));
};
println("factorial(3) = " + factorial(3));
def mkcounter(n) = () => {
n = n + 1;
n
};
val counter = mkcounter(6);
@jkp
jkp / gist:2284716
Created April 2, 2012 16:15 — forked from ahankinson/gist:1426301
Boost Python error "No to_python (by-value) converter found..."
I'm posting this here because I had a maddening search for information about why this error occurs when trying to do certain tasks in a Boost Python binding to a C++ object:
TypeError: No to_python (by-value) converter found for C++ type: Element*
This was when trying to iterate over a vector, defined as:
typedef std::vector<Element*> ElementList;
It turns out that in your `class_<>` definitions you have to be pretty specific. I already had:
#!/bin/bash
NYAN=('bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbmbbbbbbbbbbbbbbbbbbbbbbbbbbb'
'bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbmbmbbbbbbbbbbbbbbbbbbbbbbbbbb'
'bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbmbbbbbbbbbbbbbbbbbbbbbbbbbbb'
'bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb'
'bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb'
'bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb'
'bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb'
'bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbmb'
'bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbmb'
@msantos
msantos / bpf.c
Last active September 5, 2024 02:33
Example of using bpf to capture packets
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <fcntl.h>
#include <err.h>
#include <unistd.h>
#include <sys/types.h>
#include <sys/socket.h>