Skip to content

Instantly share code, notes, and snippets.

View edwardtoday's full-sized avatar

Pei Qing 卿培 edwardtoday

View GitHub Profile
@edwardtoday
edwardtoday / init.sh
Last active December 15, 2015 00:39
Ubuntu Server 12.10 AWS init script
sudo apt-get update && sudo apt-get upgrade
sudo apt-get install build-essential libxml2-dev libfuse-dev libcurl4-openssl-dev emacs24-nox
# Install s3fs to mount S3 bucket locally
wget http://s3fs.googlecode.com/files/s3fs-1.63.tar.gz
tar zxf s3fs-1.63.tar.gz
cd s3fs-1.63/
./configure && make && sudo make install
touch ~/.passwd-s3fs
chmod 600 ~/.passwd-s3fs
@edwardtoday
edwardtoday / install.sh
Last active December 14, 2015 21:19
What I have done to make jekyll run on Mountain Lion.
brew install apple-gcc42 autoconf automake libxml2 libxslt openssl curl-ca-bundle
brew tap raggi/ale
brew install openssl-osx-ca
openssl-osx-ca
# Install rvm with rails
\curl -#L https://get.rvm.io | bash -s stable --rails
# Install ruby
rvm pkg install openssl
@edwardtoday
edwardtoday / gist:5144006
Last active December 14, 2015 20:29
self introduction template
Good morning, dear teachers.
Thank you so much for providing me this opportunity to introduce myself.
My name is XXX. I was born in Henan province 24 years ago. My parents are both Chinese teachers in middle school.
Talking about my qualifications, I have received my bachelor's degree in July 2012 from Tsinghua University.
My major was Computer Science and Technology.
I have a strong body. In 2008, I managed to finish a half marathon race in The Beijing International Marathon. Basketball is my favorite sport. I have been class team captain since freshman year. I have once led my team into the quarterfinals in department cup.
I am a hard-worker not only when I am playing basketball, but off court as well. Being self-motivated is my strength. Although I have experienced failures in course study, I have learned to face the difficulties, come back to restart and never give up.
%!TEX root = ../thesis.tex
% \newcommand{\printmode}{}
\ifdefined\printmode
\usepackage{minted}
\usemintedstyle{bw} % turn off code highlighting
\else
% Online copy
\usepackage{minted}
\usemintedstyle{tango} % turn on code highlighting
%%% Set Table of Contents format
\renewcommand\contentsname{Table of Contents}
\usepackage[subfigure]{tocloft}
\renewcommand{\cftbeforechapskip}{0pt}
\renewcommand{\cftbeforetoctitleskip}{6pt}
\renewcommand{\cftaftertoctitleskip}{12pt}
% Set ToC heading size the same as that of Abstract
\renewcommand\cfttoctitlefont{\subsectionsize\bfseries}
\renewcommand\cftchapfont{\tocchapsize\bfseries}
\renewcommand\cftchappresnum{Chapter } % prefix "Chapter " to chapters in ToC
\usepackage{appendix}
\makeatletter
\newcommand\appendix@chapter[1]{
\refstepcounter{chapter}
\orig@chapter*{
\vspace*{-72pt}
\subsectionsize\bfseries Appendix \@Alph\c@chapter: #1
\vspace*{-36pt}
}
\addcontentsline{toc}{chapter}{Appendix \@Alph\c@chapter: #1}
\renewcommand*{\bibname}{References}
\makeatletter
\renewenvironment{thebibliography}[1]{
\clearpage
\ifdefined\phantomsection
\phantomsection
\else
\fi
\addcontentsline{toc}{chapter}{\bibname}
\vspace*{-12pt}
% change fontsize for section/subsection/subsubsection headings
\titleformat{\section}{\normalfont\sectionsize}{\thesection}{1em}{}
\titleformat{\subsection}{\normalfont\subsectionsize}{\thesubsection}{1em}{}
\titleformat{\subsubsection}{\normalfont\subsubsectionsize}{\thesubsection}{1em}{}
% Change spacing for headings. Please ignore the actual numbers.
% They are tweaked by comparing PDF outputs to the Word template. --!
\titlespacing*{\section}{0pt}{-12pt}{6pt}
\titlespacing*{\subsection}{0pt}{-14pt}{6pt}
\titlespacing*{\subsubsection}{0pt}{-16pt}{6pt}