Skip to content

Instantly share code, notes, and snippets.

View yzf's full-sized avatar
🎯
Focusing

Jeff Yuan yzf

🎯
Focusing
  • Netease Games
  • GuangZhou, China
View GitHub Profile
@yzf
yzf / debian_utf8.sh
Created April 16, 2020 02:52
debian shell utf-8
# add to any of .profile/.bashrc/.zshrc ...
LANG=en_US.UTF-8
LANGUAGE=
LC_CTYPE="en_US.UTF-8"
LC_NUMERIC="en_US.UTF-8"
LC_TIME="en_US.UTF-8"
LC_COLLATE="en_US.UTF-8"
LC_MONETARY="en_US.UTF-8"
LC_MESSAGES="en_US.UTF-8"
LC_PAPER="en_US.UTF-8"
@yzf
yzf / webrtc-native.sh
Created August 8, 2019 08:23
自编译webrtc-native
# how to build webrtc-native
1. gettting code
```bash
fetch --nohooks webrtc_android
gclient sync
```
PS: more details refer to https://webrtc.org/native-code/android/
@yzf
yzf / .gclient
Created July 17, 2019 07:18
.gclient
solutions = [
{
"url": "https://github.com/open-webrtc-toolkit/owt-deps-webrtc.git",
"managed": False,
"name": "src",
"deps_file": "DEPS",
"custom_deps": {},
},
]
target_os = ["android", "unix"]
@yzf
yzf / gen.sh
Created July 17, 2019 07:10
owt-gen
gn gen out/Android --args='target_os="android" target_cpu="arm" rtc_use_h264=true ffmpeg_branding="Chrome" proprietary_codecs=true'
diff --git a/.gitignore b/.gitignore
index 5c979d9575..02e58ab052 100644
--- a/.gitignore
+++ b/.gitignore
@@ -67,3 +67,5 @@
/x86-generic_out/
/xcodebuild
!webrtc/*
+tags
+out
@yzf
yzf / docker-redis-cluster-mac.sh
Last active February 15, 2019 06:22
run docker redis cluster in mac
docker run -e "IP=0.0.0.0" -e CLUSTER_ONLY=true -i -t -p 7000:7000 -p 7001:7001 -p 7002:7002 -p 7003:7003 -p 7004:7004 -p 7005:7005 -p 7006:7006 -p 7007:7007 grokzen/redis-cluster
redis-cli -h localhost -p 7000
@yzf
yzf / ssh-agent.sh
Created August 29, 2018 03:21
auto start ssh agent in remote server
SSH_ENV="$HOME/.ssh/environment"
function start_agent {
echo "Initialising new SSH agent..."
/usr/bin/ssh-agent | sed 's/^echo/#echo/' > "${SSH_ENV}"
echo succeeded
chmod 600 "${SSH_ENV}"
. "${SSH_ENV}" > /dev/null
/usr/bin/ssh-add;
}
@yzf
yzf / nginx.conf
Created August 28, 2018 02:37
nginx跨域
server {
listen 80 default_server;
index index.html index.htm index.nginx-debian.html;
location /api {
proxy_pass http://127.0.0.1:8080;
add_header Access-Control-Allow-Origin *;
add_header Access-Control-Allow-Methods 'GET, POST, OPTIONS';
add_header Access-Control-Allow-Headers 'DNT,X-Mx-ReqToken,Keep-Alive,User-Agent,X-Requested-With,If-Modified-Since,Cache-Control,Content-Type,Authorization';
@yzf
yzf / partition.sh
Last active August 24, 2018 16:40
增加分区
mkfs.ext4 /dev/sda3
mkdir /data
reboot now
# mount /dev/sda3 /data
edit: /etc/fstab
/dev/sda3 /data ext4 defaults 1 2
@yzf
yzf / jdk8.sh
Created June 6, 2018 06:32
install jdk8 in debian
echo "deb http://ppa.launchpad.net/webupd8team/java/ubuntu trusty main" | tee /etc/apt/sources.list.d/webupd8team-java.list
echo "deb-src http://ppa.launchpad.net/webupd8team/java/ubuntu trusty main" | tee -a /etc/apt/sources.list.d/webupd8team-java.list
apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv-keys EEA14886
apt-get update
apt-get install oracle-java8-installer