Skip to content

Instantly share code, notes, and snippets.

View LeeiFrankJaw's full-sized avatar

Lei Zhao LeeiFrankJaw

View GitHub Profile
@LeeiFrankJaw
LeeiFrankJaw / get-emacs.sh
Last active May 22, 2018 01:07
Install Emacs 25.3 on Ubuntu 16.04.3 LTS
git clone -b master git://git.sv.gnu.org/emacs.git
cd emacs/
git checkout emacs-25.3
sudo apt install --no-install-recommends texinfo
sudo apt install libgtk-3-dev libxpm-dev libjpeg8-dev libgif-dev libtiff5-dev libtinfo-dev librsvg2-dev libmagickwand-dev libacl1-dev libgnutls-dev
# Note: if you have installed Anaconda python distribution, it will
# affect how linker find libjpeg8 dynamic library files. To resolve
# this, simply remove Anaconda directory from PATH variable.
# ./autogen.sh
# ./configure
@LeeiFrankJaw
LeeiFrankJaw / get-texlive.sh
Last active December 10, 2017 16:31
Install TeX Live on Ubuntu 16.04.3 LTS
wget http://mirror.ctan.org/systems/texlive/tlnet/install-tl-unx.tar.gz
tar xvf install-tl-unx.tar.gz
cd install-tl-20171210/
wget https://gist.github.com/LeeiFrankJaw/a7d51045707fb6d0eb8aa8fc5c8e949c/raw/8512775fd3380681b879c60aae371e6d3de57226/texlive.profile
sudo ./install-tl -profile texlive.profile
echo export PATH=\"\$PATH:/usr/local/texlive/2017/bin/x86_64-linux\" >> ~/.bashrc
echo export MANPATH=/usr/local/texlive/2017/texmf-dist/doc/man:\$MANPATH >> ~/.bashrc
echo export INFOPATH=/usr/local/texlive/2017/texmf-dist/doc/info:\$INFOPATH >> ~/.bashrc
@LeeiFrankJaw
LeeiFrankJaw / get-git.sh
Last active February 23, 2020 13:37
Install git from source under Ubuntu 18.04
sudo apt install git
git clone [email protected]:git/git.git
cd git/
git checkout v2.15.1
sudo apt install libcurl4-openssl-dev
make configure
./configure --prefix=/usr/local # --without-tcltk
make all man
# make NO_GETTEXT=yes all man
make install install-man
@LeeiFrankJaw
LeeiFrankJaw / get-shadowsocks.sh
Last active January 24, 2018 05:45
Install shadowsocks-libev v3.1.1 on Ubuntu 16.04.03 LTS from source code
git clone [email protected]:shadowsocks/shadowsocks-libev.git
cd shadowsocks-libev/
git checkout v3.1.1
git submodule update --init --recursive
sudo apt install --no-install-recommends libpcre3-dev asciidoc xmlto libev-dev libc-ares-dev libmbedtls-dev libsodium-dev
sudo apt install automake libtool
./autogen.sh
./configure
make
sudo make install
@LeeiFrankJaw
LeeiFrankJaw / get-mupdf.sh
Last active February 8, 2018 08:31
Install MuPDF from source code on Ubuntu 16.04.03 LTS
git clone git://git.ghostscript.com/mupdf.git
cd mupdf/
git checkout 1.11
git submodule update --init --recursive
sudo apt install mesa-common-dev libgl1-mesa-dev libglu1-mesa-dev xorg-dev
make
sudo make install
sudo cp docs/logo/mupdf.png docs/logo/mupdf.xpm /usr/local/share/icons/hicolor/48x48/apps/
sudo cp docs/logo/mupdf-logo.svg /usr/local/share/icons/hicolor/scalable/apps/mupdf.svg
sudo mkdir -p /usr/local/share/icons/hicolor/1280x1280/apps/
@LeeiFrankJaw
LeeiFrankJaw / bionic.sh
Last active August 25, 2021 21:38
Install Clang on Ubuuntu LTS
#!/bin/bash
# Install Clang 8 on Ubuuntu 18.04.2 LTS
# Turn on errexit.
set -e
# You do not need to add new repository to the source list since the
# llvm toolchain now can be found on the bionic bionic-updates
# universe repositories.
@LeeiFrankJaw
LeeiFrankJaw / get-orgmode.sh
Last active January 24, 2018 07:59
Install org-mode from repo
git clone https://code.orgmode.org/bzg/org-mode.git
cd org-mode/
git checkout release_9.1.6
make compile info
emacs -L lisp/ -L contrib/lisp/ --batch -f batch-byte-compile contrib/lisp/*.el
@LeeiFrankJaw
LeeiFrankJaw / get-mu.sh
Last active March 12, 2019 19:50
Install mu from source repo
#!/bin/bash
git clone [email protected]:djcb/mu.git
cd mu/
git checkout v1.0
sudo apt install automake autoconf-archive libglib2.0-dev libxapian-dev libgmime-2.6-dev libunwind-dev
./autogen.sh
# compile with Clang
# CC=clang CXX=clang++ LDFLAGS='-fuse-ld=lld' ./autogen.sh
make
@LeeiFrankJaw
LeeiFrankJaw / get-python.sh
Last active February 13, 2018 15:54
Build python from source
git clone [email protected]:python/cpython.git
cd cpython/
git checkout v3.6.4
sudo apt build-dep python3.5
# git checkout v2.7.14
# sudo apt build-dep python2.7
./configure
# For python2, the default config won't install pip.
# ./configure --with-ensurepip
make
@LeeiFrankJaw
LeeiFrankJaw / get-squid.sh
Last active August 14, 2018 10:14
Compile Squid from Source for Ubuntu 16.04.3 LTS
wget http://www.squid-cache.org/Versions/v3/3.5/squid-3.5.27.tar.xz
tar xvf squid-3.5.27.tar.xz
cd squid-3.5.27/
./configure --prefix=/usr/local \
--exec-prefix='${prefix}' \
--localstatedir=/var \
--libexecdir='${prefix}/libexec/squid' \
--datadir='${prefix}/share/squid' \
--sysconfdir=/etc/squid \
--with-default-user=proxy \