Skip to content

Instantly share code, notes, and snippets.

View xudongzhang's full-sized avatar

Stone Zhang xudongzhang

View GitHub Profile
# Thanks to this post:
# http://blog.ikato.com/post/15675823000/how-to-install-consolas-font-on-mac-os-x
$ brew install cabextract
$ cd ~/Downloads
$ mkdir consolas
$ cd consolas
$ curl -O http://download.microsoft.com/download/f/5/a/f5a3df76-d856-4a61-a6bd-722f52a5be26/PowerPointViewer.exe
$ cabextract PowerPointViewer.exe
$ cabextract ppviewer.cab
@xudongzhang
xudongzhang / System Design.md
Created January 25, 2018 22:48 — forked from vasanthk/System Design.md
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?
@xudongzhang
xudongzhang / NestList.java
Created October 23, 2017 01:16 — forked from seanzhu/NestList.java
Flatten a nested list. Java version.
package practice;
import java.util.LinkedList;
import java.util.List;
import static java.util.Arrays.asList;
public class NestList {
public static List<Integer> flatten(List<?> list) {
List<Integer> ret = new LinkedList<Integer>();
@xudongzhang
xudongzhang / vim_cheatsheet.md
Created November 30, 2016 21:35 — forked from awidegreen/vim_cheatsheet.md
Vim shortcuts

Introduction

  • C-a == Ctrl-a
  • M-a == Alt-a

General

:q        close
:w        write/saves
:wa[!]    write/save all windows [force]
:wq       write/save and close