This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import os | |
import re | |
import sys | |
from io import StringIO | |
from lxml import etree | |
SPECIAL_CHARACTERS = { | |
7: 'a', # BELL | |
8: 'b', # BS |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
for i in *.mp4; do | |
ffmpeg -i "$i" -c:v libx265 -crf 30 -c:a copy -color_primaries bt2020 -colorspace bt2020nc -color_trc arib-std-b67 -map_metadata 0 -max_muxing_queue_size 1024 -n Compressed/${i::-4}.mp4; | |
done |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/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. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
git clone https://gitlab.com/openconnect/ocserv.git | |
cd ocserv/ | |
apt install autoconf pkg-config libev-dev libwrap0-dev libpam0g-dev liblz4-dev libseccomp-dev libreadline-dev libnl-route-3-dev libkrb5-dev liboath-dev libradcli-dev libsystemd-dev protobuf-c-compiler gperf libprotobuf-c-dev libtalloc-dev libhttp-parser-dev libpcl1-dev libopts25-dev liblockfile-bin nuttcp lcov libuid-wrapper libpam-wrapper libnss-wrapper libsocket-wrapper gss-ntlmssp libpam-oath autogen | |
sh autogen.sh | |
./configure | |
make | |
make install |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# With Apache | |
# apt install php composer | |
# Without Apache | |
apt install php-fpm composer | |
# Install dependencies | |
apt install php-curl php-xml php-mbstring php-imagick php-mysql | |
# With PostgreSQL |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
git clone 'git@github.com:trojan-gfw/trojan.git' | |
sudo apt install cmake default-libmysqlclient-dev libboost-program-options-dev libboost-system-dev libssl-dev | |
# Oops, the boost version shipped with Ubuntu 18.04 is too old for trojan. | |
wget 'https://dl.bintray.com/boostorg/release/1.72.0/source/boost_1_72_0.tar.bz2' | |
tar xvf boost_1_72_0.tar.bz2 -C /usr/local/ | |
cd trojan/ | |
git checkout v1.14.1 | |
cmake -D CMAKE_INSTALL_PREFIX:PATH=/usr/local -D BOOST_ROOT:PATH=/usr/local/boost_1_72_0/ . |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Refer to https://www.v2ray.com/developer/intro/compile.html |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Convert HLS stream from m3u8 to MP4 | |
gst-launch-1.0 -v mp4mux name=mux ! filesink location=output.mp4 filesrc location=GOPR7003.m3u8 ! hlsdemux ! decodebin name=decoder decoder. ! queue ! videoconvert ! x264enc ! mux. decoder. ! queue ! audioconvert ! voaacenc ! mux. | |
# Combine normal TS files into MP4 | |
cvlc -v segment-*.ts \ | |
--sout='#gather:file{dst=output.mp4}' \ | |
--sout-keep \ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
sudo apt install git | |
git clone git@github.com: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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# In fact, getdns repo has stubby as a submodule and there is no need | |
# to clone a separate repo. | |
git clone git@github.com:getdnsapi/stubby.git | |
cd stubby/ | |
# please refer to | |
# [get-getdns.sh](https://gist.github.com/LeeiFrankJaw/0068ea73267c165ee4bef091fc3822f2) | |
# for how to install the getdns dependency. | |
sudo apt install libyaml-dev | |
autoreconf -vfi | |
./configure |
NewerOlder