Skip to content

Instantly share code, notes, and snippets.

View jifang's full-sized avatar

Ji Fang jifang

  • Visbit
  • Sunnyvale, CA
View GitHub Profile
This file has been truncated, but you can view the full file.
2018/03/05 14:38:48 [notice] 92168#0: using the "kqueue" event method
2018/03/05 14:38:48 [notice] 92168#0: start worker processes
2018/03/05 14:38:48 [debug] 92168#0: channel 10:11
2018/03/05 14:38:48 [notice] 92168#0: start worker process 92282
2018/03/05 14:38:48 [debug] 92168#0: pass channel s:2 pid:92282 fd:10 to s:0 pid:92169 fd:3
2018/03/05 14:38:48 [debug] 92168#0: pass channel s:2 pid:92282 fd:10 to s:1 pid:92274 fd:4
2018/03/05 14:38:48 [debug] 92282#0: add cleanup: 00007FD4B002E310
2018/03/05 14:38:48 [debug] 92282#0: malloc: 00007FD4AF51B670:8
2018/03/05 14:38:48 [debug] 92282#0: malloc: 00007FD4B1801600:16384
2018/03/05 14:38:48 [debug] 92282#0: malloc: 00007FD4B180D400:16384
03-05 14:39:22.779 5979-5995/? V/VB_Test: [1] downloading:1
03-05 14:39:22.779 5979-5995/? V/VB_Test: Download:https://10.0.0.186/files/1
03-05 14:39:22.976 5979-5995/? V/VB_Network: Sending request https://10.0.0.186/files/1 on Connection{10.0.0.186:443, proxy=DIRECT hostAddress=/10.0.0.186:443 cipherSuite=TLS_RSA_WITH_AES_128_CBC_SHA protocol=h2}
User-Agent:
Host: 10.0.0.186
Connection: Keep-Alive
Accept-Encoding: gzip
03-05 14:39:23.024 5979-5995/? V/VB_Network: Received response for https://10.0.0.186/files/1 (h2) in 48.9ms
server: nginx/1.13.10
date: Mon, 05 Mar 2018 22:39:23 GMT
@jifang
jifang / gist:9df9991e5f8e7f1d979c73a453f7ad67
Created March 6, 2018 22:09
OKHttp issue #3915 Client Log#2
03-06 14:07:52.072 13736-13794/co.visbit.myapplication D/Http2: >> CONNECTION 505249202a20485454502f322e300d0a0d0a534d0d0a0d0a
03-06 14:07:52.073 13736-13794/co.visbit.myapplication D/Http2: >> 0x00000000 6 SETTINGS
03-06 14:07:52.073 13736-13794/co.visbit.myapplication D/Http2: >> 0x00000000 4 WINDOW_UPDATE
03-06 14:07:52.075 13736-13818/co.visbit.myapplication D/Http2: << 0x00000000 18 SETTINGS
03-06 14:07:52.077 13736-13818/co.visbit.myapplication D/Http2: << 0x00000000 4 WINDOW_UPDATE
03-06 14:07:52.081 13736-13794/co.visbit.myapplication D/Http2: >> 0x00000003 26 HEADERS END_STREAM|END_HEADERS
03-06 14:07:52.083 13736-13820/co.visbit.myapplication D/Http2: >> 0x00000000 0 SETTINGS ACK
03-06 14:07:52.092 13736-13818/co.visbit.myapplication D/Http2: << 0x00000000 0 SETTINGS ACK
03-06 14:07:52.135 13736-13818/co.visbit.myapplication D/Http2: << 0x00000003 123 HEADERS END_HEADERS
03-06 14:07:52.136 13736-13818/co.visbit.myapplication D/Http2: <<
@jifang
jifang / ExampleInstrumentedTest.java
Last active April 17, 2018 21:01
Android test for creating files in multiple threads
package com.example.jifang.testio;
import android.content.Context;
import android.support.test.InstrumentationRegistry;
import android.support.test.runner.AndroidJUnit4;
import android.util.Log;
import org.junit.Test;
import org.junit.runner.RunWith;
@jifang
jifang / gist:e9f8849973bc962bf622e1ad90dde8b4
Created December 9, 2019 20:02
libev-4.19-ndk20b.patch
--- libev-4.19.orig/ev_select.c 2019-12-09 15:00:08.000000000 -0500
+++ libev-4.19/ev_select.c 2019-12-09 14:49:46.000000000 -0500
@@ -47,7 +47,7 @@
#endif
#if defined(__ANDROID__) || defined(ANDROID)
-typedef int fd_mask;
+//typedef int fd_mask; // Android NDK r20b typedef fd_mask to unsigned long
#endif
@jifang
jifang / libev-4.19-ndk20b.patch
Created December 9, 2019 20:09
Patch for compiling libev-4.19 with NDK r20b
--- libev-4.19.orig/ev_select.c 2019-12-09 15:00:08.000000000 -0500
+++ libev-4.19/ev_select.c 2019-12-09 14:49:46.000000000 -0500
@@ -47,7 +47,7 @@
#endif
#if defined(__ANDROID__) || defined(ANDROID)
-typedef int fd_mask;
+//typedef int fd_mask; // Android NDK r20b typedef fd_mask to unsigned long
#endif
@jifang
jifang / libcurlpp-0.8.1-multiplex.patch
Created January 2, 2020 23:05
Support HTTP/2 multiplexing
diff --git a/src/curlpp/Multi.cpp b/src/curlpp/Multi.cpp
index 58b05aa..e3ecca2 100644
--- a/src/curlpp/Multi.cpp
+++ b/src/curlpp/Multi.cpp
@@ -31,6 +31,7 @@ curlpp::Multi::Multi()
{
mMultiHandle = curl_multi_init();
runtimeAssert("Error when trying to curl_multi_init() a handle", mMultiHandle != NULL);
+ curl_multi_setopt(mMultiHandle, CURLMOPT_PIPELINING, CURLPIPE_MULTIPLEX);
}
@jifang
jifang / ffmpeg-hevc-bsf.patch
Last active January 30, 2020 22:31
Trim down the ffmpeg library
diff --git a/libavcodec/avpacket.c b/libavcodec/avpacket.c
index 2b20067211..f6ef244063 100644
--- a/libavcodec/avpacket.c
+++ b/libavcodec/avpacket.c
@@ -83,6 +83,7 @@ static int packet_alloc(AVBufferRef **buf, int size)
return 0;
}
+#if 0
int av_new_packet(AVPacket *pkt, int size)
@jifang
jifang / gist:b1a16cca7f7e2d2625f7d3c2270d23f8
Last active November 5, 2023 09:06
Setup docker on CentOS
#!/bin/bash
cat /etc/os-release
# Install docker engine
yum-config-manager --add-repo https://download.docker.com/linux/centos/docker-ce.repo
yum install docker-ce docker-ce-cli containerd.io docker-buildx-plugin docker-compose-plugin