Skip to content

Instantly share code, notes, and snippets.

View LeonDevLifeLog's full-sized avatar
:octocat:
Focusing

Leon LeonDevLifeLog

:octocat:
Focusing
  • nanjing,jiangsu China
View GitHub Profile
@LeonDevLifeLog
LeonDevLifeLog / make_cert.md
Created May 26, 2022 11:17 — forked from liuguangw/make_cert.md
使用openssl制作自定义CA、自签名ssl证书

自签名ssl证书生成

生成CA私钥

# 创建文件夹 ca 保存Ca相关
mkdir ca
cd ca
#创建私钥 (建议设置密码)
openssl genrsa -des3 -out myCA.key 2048
@LeonDevLifeLog
LeonDevLifeLog / setup_android_build.sh
Created January 3, 2022 09:07
To set up build environment for Android kernel development
###
# Download Android NDK to be able to compile runtime cmd-line tools on ARM
# - https://developer.android.com/ndk/downloads/index.html
wget https://dl.google.com/android/repository/android-ndk-r15b-linux-x86_64.zip
###
# Download up-to-date adb/fastboot platform tools to interface with Android (adb/fastboot)
# - https://developer.android.com/studio/releases/platform-tools.html
wget https://dl.google.com/android/repository/platform-tools-latest-linux.zip
package com.github.leondevlifelog.mpp
import kotlinx.cinterop.*
import platform.android.*
data class JniClass(val jclass: jclass)
data class JniObject(val jobject: jobject)
data class JniMethod(val jmethod: jmethodID)
fun asJniClass(jclass: jclass?) = if (jclass != null) JniClass(jclass) else null
@LeonDevLifeLog
LeonDevLifeLog / init.sh
Created August 24, 2019 15:34
youtube rtmp proxy
#!/bin/bash
apt-get update
apt-get install apt-transport-https ca-certificates curl gnupg-agent software-properties-common
curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo apt-key add -
sudo add-apt-repository "deb [arch=amd64] https://download.docker.com/linux/ubuntu $(lsb_release -cs) stable"
apt-get update
sudo apt-get install docker-ce docker-ce-cli containerd.io
docker pull tiangolo/nginx-rtmp
docker run -d -p 1935:1935 --name nginx-rtmp tiangolo/nginx-rtmp
docker cp nginx.conf nginx-rtmp:/etc/nginx/nginx.conf
N757JE0KCT-eyJsaWNlbnNlSWQiOiJONzU3SkUwS0NUIiwibGljZW5zZWVOYW1lIjoid3UgYW5qdW4iLCJhc3NpZ25lZU5hbWUiOiIiLCJhc3NpZ25lZUVtYWlsIjoiIiwibGljZW5zZVJlc3RyaWN0aW9uIjoiRm9yIGVkdWNhdGlvbmFsIHVzZSBvbmx5IiwiY2hlY2tDb25jdXJyZW50VXNlIjpmYWxzZSwicHJvZHVjdHMiOlt7ImNvZGUiOiJJSSIsInBhaWRVcFRvIjoiMjAyMC0wMS0wNyJ9LHsiY29kZSI6IkFDIiwicGFpZFVwVG8iOiIyMDIwLTAxLTA3In0seyJjb2RlIjoiRFBOIiwicGFpZFVwVG8iOiIyMDIwLTAxLTA3In0seyJjb2RlIjoiUFMiLCJwYWlkVXBUbyI6IjIwMjAtMDEtMDcifSx7ImNvZGUiOiJHTyIsInBhaWRVcFRvIjoiMjAyMC0wMS0wNyJ9LHsiY29kZSI6IkRNIiwicGFpZFVwVG8iOiIyMDIwLTAxLTA3In0seyJjb2RlIjoiQ0wiLCJwYWlkVXBUbyI6IjIwMjAtMDEtMDcifSx7ImNvZGUiOiJSUzAiLCJwYWlkVXBUbyI6IjIwMjAtMDEtMDcifSx7ImNvZGUiOiJSQyIsInBhaWRVcFRvIjoiMjAyMC0wMS0wNyJ9LHsiY29kZSI6IlJEIiwicGFpZFVwVG8iOiIyMDIwLTAxLTA3In0seyJjb2RlIjoiUEMiLCJwYWlkVXBUbyI6IjIwMjAtMDEtMDcifSx7ImNvZGUiOiJSTSIsInBhaWRVcFRvIjoiMjAyMC0wMS0wNyJ9LHsiY29kZSI6IldTIiwicGFpZFVwVG8iOiIyMDIwLTAxLTA3In0seyJjb2RlIjoiREIiLCJwYWlkVXBUbyI6IjIwMjAtMDEtMDcifSx7ImNvZGUiOiJEQyIsInBhaWRVcFRvIjoiMjAyMC0wMS0wNyJ9LHsiY29kZSI6IlJTV
@LeonDevLifeLog
LeonDevLifeLog / gradle-wrapper.properties
Created February 27, 2019 15:13
gradle官方国内镜像
http://downloads.gradle-dn.com/distributions/<version>.zip
@LeonDevLifeLog
LeonDevLifeLog / url.gradle
Last active October 31, 2018 01:37
华为 maven 镜像
maven {
url 'https://mirrors.huaweicloud.com/repository/maven/'
}
JDK加速地址:https://mirrors.huaweicloud.com/java/jdk/
Maven加速地址:https://mirrors.huaweicloud.com/apache/maven/maven-3/
<mirror>
<id>huaweicloud</id>
<mirrorOf>*</mirrorOf>
maven {
url 'https://mirrors.huaweicloud.com/repository/maven/'
}

just copy and paste

sudo sh -c "$(curl -fsSL https://gist.githubusercontent.com/LeonDevLifeLog/3b62f2286edaffa39efe8983c97fbd9d/raw/25f002762f50cb21a7caa7e36c8a12d24aa72470/init_ubuntu.sh)"
@LeonDevLifeLog
LeonDevLifeLog / set_proxy.cmd
Last active February 12, 2019 01:32
windows cmd设置代理
set HTTP_PROXY=http://192.168.16.232:8080
set HTTPS_PROXY=http://192.168.16.232:8080
set http_proxy=socks5://127.0.0.1:1080
set https_proxy=socks5://127.0.0.1:1080
export HTTP_PROXY=http://192.168.16.232:8080
export HTTPS_PROXY=http://192.168.16.232:8080