Skip to content

Instantly share code, notes, and snippets.

View chengxuncc's full-sized avatar
👼
To be a god.

chengxuncc

👼
To be a god.
View GitHub Profile
@chengxuncc
chengxuncc / alioss.sh
Last active October 19, 2020 07:29
Upload or download Aliyun OSS file via curl
#!/bin/bash
bucket=???
host=oss-cn-???.aliyuncs.com
Id=???
Key=???
host="${bucket}.${host}"
method=$(echo $1 | tr '[:lower:]' '[:upper:]')
src=$2
package main
import (
"errors"
"net"
"strconv"
"syscall"
"unsafe"
"os"
)
@chengxuncc
chengxuncc / replace-fakeroot.sh
Created April 22, 2019 02:53
Fakeroot-tcp on arch
sudo pacman -R fakeroot --noconfirm
wget http://ftp.debian.org/debian/pool/main/f/fakeroot/fakeroot_1.23.orig.tar.xz
tar xvf fakeroot_1.23.orig.tar.xz
cd fakeroot-1.23
wget https://aur.archlinux.org/cgit/aur.git/plain/silence-dlerror.patch?h=fakeroot-tcp -O silence-dlerror.patch
patch -p1 -i silence-dlerror.patch
./bootstrap
./configure --prefix=/usr \
--libdir=/usr/lib/libfakeroot \
--disable-static \
@chengxuncc
chengxuncc / install-docker-ce.sh
Created October 13, 2018 19:35
Kali install docker-ce 中科大源
apt-get install -y apt-transport-https ca-certificates curl gnupg2 software-properties-common
curl -fsSL http://mirrors.ustc.edu.cn/docker-ce/linux/debian/gpg | apt-key add -
echo "deb http://mirrors.ustc.edu.cn/docker-ce/linux/debian stretch stable" >> /etc/apt/sources.list
apt-get update
apt-get install -y docker-ce
docker run hello-world
systemctl enable docker