Skip to content

Instantly share code, notes, and snippets.

View CFM880's full-sized avatar
🎉
Focusing

Cheng Fangming CFM880

🎉
Focusing
View GitHub Profile
@chadgeary
chadgeary / install
Created May 28, 2019 18:04
openjdk 1.7 on ubuntu 19.04
# install dep
sudo apt install libsctp1 ca-certificates-java
# get old openjdk
mkdir ~/openjdk-7 && cd ~/openjdk-7
wget http://ftp.us.debian.org/debian/pool/main/libj/libjpeg-turbo/libjpeg62-turbo_1.5.2-2+b1_amd64.deb
wget http://ftp.us.debian.org/debian/pool/main/o/openjdk-7/openjdk-7-jdk_7u161-2.6.12-1_amd64.deb
wget http://ftp.us.debian.org/debian/pool/main/o/openjdk-7/openjdk-7-jre_7u161-2.6.12-1_amd64.deb
wget http://ftp.us.debian.org/debian/pool/main/o/openjdk-7/openjdk-7-jre-headless_7u161-2.6.12-1_amd64.deb
wget http://ftp.us.debian.org/debian/pool/main/i/icedtea-web/icedtea-netx-common_1.5.3-1_all.deb
@xujiaao
xujiaao / android-set-ntp-server.md
Last active September 18, 2024 07:27
Set the NTP server of your android device
tags
Android
Android Things

Set the NTP server of your android device

@ArnaudValensi
ArnaudValensi / create-ssl-cert.sh
Created January 9, 2018 09:39
Generate a self signed certificate without passphrase for private key
openssl req -x509 -newkey rsa:4096 -keyout key.pem -out cert.pem -days 10000 -nodes
@hghwng
hghwng / .gitignore
Last active August 26, 2024 11:21
SciTools Understand for Arch Linux
pkg/
src/
understand-bin-*.pkg.*
Understand-*.tgz
.SRCINFO
@wavezhang
wavezhang / java_download.sh
Last active September 21, 2024 00:51
download java from oracle without login
wget -c --no-cookies --no-check-certificate --header "Cookie: oraclelicense=accept-securebackup-cookie" https://download.oracle.com/otn-pub/java/jdk/12.0.2+10/e482c34c86bd4bf8b56c0b35558996b9/jdk-12.0.2_linux-x64_bin.tar.gz
@eduardb
eduardb / CountingFileRequestBody.java
Last active May 26, 2023 00:07
Uploading a file with a progress displayed using OkHttp
public class CountingFileRequestBody extends RequestBody {
private static final int SEGMENT_SIZE = 2048; // okio.Segment.SIZE
private final File file;
private final ProgressListener listener;
private final String contentType;
public CountingFileRequestBody(File file, String contentType, ProgressListener listener) {
this.file = file;