Skip to content

Instantly share code, notes, and snippets.

View ameenkhan07's full-sized avatar
:shipit:

Ameen Khan ameenkhan07

:shipit:
View GitHub Profile
@ameenkhan07
ameenkhan07 / Cheetsheet.cpp
Created March 4, 2019 03:20
STL cheetsheet
// C++ Structure
/*The constructor initializes id to 42 when it's called. It's called an initliazation list.
In your example, it is equivalent to
*/
struct TestStruct {
int id;

Stevey's Google Platforms Rant

I was at Amazon for about six and a half years, and now I've been at Google for that long. One thing that struck me immediately about the two companies -- an impression that has been reinforced almost daily -- is that Amazon does everything wrong, and Google does everything right. Sure, it's a sweeping generalization, but a surprisingly accurate one. It's pretty crazy. There are probably a hundred or even two hundred different ways you can compare the two companies, and Google is superior in all but three of them, if I recall correctly. I actually did a spreadsheet at one point but Legal wouldn't let me show it to anyone, even though recruiting loved it.

I mean, just to give you a very brief taste: Amazon's recruiting process is fundamentally flawed by having teams hire for themselves, so their hiring bar is incredibly inconsistent across teams, despite various efforts they've made to level it out. And their operations are a mess; they don't real

@ameenkhan07
ameenkhan07 / #DistributedSystemReadingList.md
Last active December 14, 2019 08:51
Distributed System Reading

The papers included in CSE-586 reading.

Consensus and Paxos

  • Paxos Made Moderately Complex. Robbert Van Renesse and Deniz Altinbuken, ACM Computing Surveys, 2015.
  • Paxos made live - An engineering perspective. Tushar D. Chandra, Robert Griesemer, Joshua Redstone. ACM PODC, Pages: 398 - 407, 2007
  • ZooKeeper: Wait-free coordination for internet-scale systems P. Hunt, M. Konar, F. P. Junqueira, and B. Reed USENIX ATC 2010.
  • The Chubby Lock Service for Loosely-Coupled Distributed Systems. Mike Burrows, OSDI 2006.
  • In Search of an Understandable Consensus Algorithm. Diego Ongaro, John Ousterhout, USENIX ATC, 2014.
  • WPaxos: Wide Area Network Flexible Consensus. Ailidani Ailijiang, Aleksey Charapko, Murat Demirbas, Tevfik Kosar, IEEE TPDS, 2019.
  • Dissecting the Performance of Strongly-Consistent Replication Protocols. Ailidani Ailijiang, Aleksey Charapko, Murat Demirbas, Sigmod 2019.
@ameenkhan07
ameenkhan07 / latency.txt
Created January 23, 2020 21:55 — forked from jboner/latency.txt
Latency Numbers Every Programmer Should Know
Latency Comparison Numbers (~2012)
----------------------------------
L1 cache reference 0.5 ns
Branch mispredict 5 ns
L2 cache reference 7 ns 14x L1 cache
Mutex lock/unlock 25 ns
Main memory reference 100 ns 20x L2 cache, 200x L1 cache
Compress 1K bytes with Zippy 3,000 ns 3 us
Send 1K bytes over 1 Gbps network 10,000 ns 10 us
Read 4K randomly from SSD* 150,000 ns 150 us ~1GB/sec SSD
@ameenkhan07
ameenkhan07 / web-servers.md
Created January 24, 2020 19:45 — forked from willurd/web-servers.md
Big list of http static server one-liners

Each of these commands will run an ad hoc http static server in your current (or specified) directory, available at http://localhost:8000. Use this power wisely.

Discussion on reddit.

Python 2.x

$ python -m SimpleHTTPServer 8000
@ameenkhan07
ameenkhan07 / DZ60.hex
Created July 21, 2020 05:00
DZ60 keyboard
:100000000C9439030C9480030C9480030C948003AB
:100010000C9480030C9480030C9480030C94800354
:100020000C9480030C9480030C942B290C94FD29D0
:100030000C94FE1F0C9480030C9480030C9480039A
:100040000C9480030C9480030C9480030C94800324
:100050000C9480030C944B200C9480030C9480032C
:100060000C9480030C9480030C9480030C94800304
:100070000C9480030C9480030C9480030C948003F4
:100080000C9480030C9480030C9480030C948003E4
:100090000C9480030C9480030C9480030C948003D4