Skip to content

Instantly share code, notes, and snippets.

View erizhang's full-sized avatar
🎯
Focusing

Eric Zhang erizhang

🎯
Focusing
View GitHub Profile
@erizhang
erizhang / build.csv
Last active August 29, 2015 14:02
d3js StackedBar
build waiting duration
001 3 5
002 6 6
003 13 12
005 7 2
006 5 10
@erizhang
erizhang / table_driven.c
Last active December 27, 2015 13:28
This code snippet illustrate how validate members value a specific structure. It's implemented in table driven way. One hand, it separate the content definition and mechanism, on the other hand, it can reduce the complexity of structure comparing once there are too much members were defined in the structure.
#include <stdio.h>
#include <stdlib.h>
#include <stddef.h>
typedef struct __sample_t {
int a;
int b;
}sample_t;
typedef struct __structure_threshold_t
@erizhang
erizhang / commands-of-install-emacs24
Created October 22, 2013 07:57
Install emacs24 ppa version under ubuntu
sudo apt-get purge emacs-snapshot-common emacs-snapshot-bin-common emacs-snapshot emacs-snapshot-el emacs-snapshot-gtk emacs23 emacs23-bin-common emacs23-common emacs23-el emacs23-nox emacs23-lucid auctex emacs24 emacs24-bin-common emacs24-common
sudo add-apt-repository ppa:cassou/emacs
sudo apt-get update
sudo apt-get install emacs-snapshot-el emacs-snapshot-gtk emacs-snapshot
sudo apt-get install emacs24 emacs24-el
emacs --version