Skip to content

Instantly share code, notes, and snippets.

@HaskellZhangSong
HaskellZhangSong / ubuntu-alibabab-deb-src-config.sh
Last active January 5, 2020 15:50
Ubuntu配置阿里镜像源
cp /etc/apt/source.list /etc/apt/source.list.bak
rm /etc/apt/source.list
cat >>/etc/apt/sources.list<<EOF
deb http://mirrors.aliyun.com/ubuntu/ bionic main restricted universe multiverse
deb-src http://mirrors.aliyun.com/ubuntu/ bionic main restricted universe multiverse
deb http://mirrors.aliyun.com/ubuntu/ bionic-security main restricted universe multiverse
deb-src http://mirrors.aliyun.com/ubuntu/ bionic-security main restricted universe multiverse
@HaskellZhangSong
HaskellZhangSong / dynamic-nginx-module-ubuntu-18.04.sh
Created December 27, 2019 16:13 — forked from excid3/dynamic-nginx-module-ubuntu-18.04.sh
How to compile a dynamic nginx module for Ubuntu 18.04
# Install dependencies that nginx was originally compiled with
sudo apt install libperl-dev libgeoip-dev libgd-dev
# Get the nginx source
wget https://nginx.org/download/nginx-1.14.0.tar.gz
tar zxf nginx-1.14.0.tar.gz
# Get the module source
wget https://github.com/fdintino/nginx-upload-module/archive/master.zip
unzip master.zip
@HaskellZhangSong
HaskellZhangSong / ss_config_to_ss_url.sh
Created October 16, 2019 02:58
ss server config to ss url and qrcode
#! /bin/bash
method=`cat $1 | jq '.method'`
method1=`sed -e 's/^"//' -e 's/"$//' <<<"$method"`
password=`cat $1 | jq '.password'`
password1=`sed -e 's/^"//' -e 's/"$//' <<<"$password"`
server_port=`cat $1 | jq '.server_port'`
server_ip=`curl -s ip.sb`
url=$(echo -n "${method1}:${password1}@${server_ip}:${server_port}" | base64)