Skip to content

Instantly share code, notes, and snippets.

benli.shi beilly

Block or report user

Report or block beilly

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
View ProxyUtils.kt
/**
* 是否使用代理(WiFi状态下的,避免被抓包)
*/
fun isWifiProxy(context: Context?): Boolean {
val isIcsOrLater = Build.VERSION.SDK_INT >= Build.VERSION_CODES.ICE_CREAM_SANDWICH
val proxyAddress: String
val proxyPort: Int
if (isIcsOrLater) {
proxyAddress = System.getProperty("http.proxyHost")
val portstr = System.getProperty("http.proxyPort")
@beilly
beilly / shell.sh
Last active Sep 25, 2019
常用shell 脚本、命令
View shell.sh
echo time=`date +"%Y%m%d-%H%m%S"` > properties.txt
keytool -list -v -keystore "jsk路径" -storepass 密码
@beilly
beilly / slide_from_left.xml
Created Sep 23, 2019
Android 两个界面间快速切换时,会发现有短暂黑屏
View slide_from_left.xml
<?xml version="1.0" encoding="utf-8"?>
<set xmlns:android="http://schemas.android.com/apk/res/android">
<translate
android:duration="@integer/slide_animation_duration"
android:fromXDelta="-100%p"
android:interpolator="@android:anim/accelerate_decelerate_interpolator"
android:toXDelta="0"/>
</set>
@beilly
beilly / frpc.sh
Last active Sep 20, 2019
mac jenkins 安装和启动
View frpc.sh
nohup ./frpc -c ./frpc.ini &
@beilly
beilly / FakeX509TrustManager.java
Last active Sep 11, 2019
Volley Stack with default HttpsURLConnection, and it will trusting all certificates
View FakeX509TrustManager.java
package com.beilly.utils.net;
import android.content.Context;
import java.io.IOException;
import java.io.InputStream;
import java.security.KeyManagementException;
import java.security.KeyStore;
import java.security.KeyStoreException;
import java.security.NoSuchAlgorithmException;
@beilly
beilly / AndroidPath.MD
Last active Aug 21, 2019
记录Android系统文件访问权限
View AndroidPath.MD
Log.i(TAG,context.getCacheDir().getPath());
///data/user/0/{packageName}/cache
Log.i(TAG,context.getFilesDir().getPath());
///data/user/0/{packageName}/files
Log.i(TAG,Environment.getExternalStorageDirectory().getPath());
///storage/emulated/0   需要权限
Log.i(TAG,context.getObbDir().getPath());
///storage/emulated/0/Android/obb/{packageName}  不需要权限,获取其他应用路径的需要权限
Log.i(TAG,context.getExternalCacheDir().getPath());
@beilly
beilly / AndroidManifest.xml
Last active Aug 20, 2019
Android Security Config
View AndroidManifest.xml
android:networkSecurityConfig="@xml/security_config"
@beilly
beilly / filelist.txt
Created Jul 7, 2019
一个基于ffmpeg的视频截取合并的过程记录
View filelist.txt
file 'cut111.mp4'
file 'cut333.mp4'
file 'cut222.mp4'
@beilly
beilly / email-sonar.html
Created May 14, 2019
Jenkins邮件模板
View email-sonar.html
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<title>${ENV, var="JOB_NAME"}-第${BUILD_NUMBER}次构建日志</title>
</head>
<style>
.build_info_table,
@beilly
beilly / AndroidBug5497Workaround.java
Created Aug 31, 2016
WebView adjustResize windowSoftInputMode breaks when activity is fullscreen.Depent on https://github.com/madebycm/AndroidBug5497Workaround
View AndroidBug5497Workaround.java
package com.vcredit.utils;
import android.app.Activity;
import android.graphics.Rect;
import android.view.View;
import android.view.ViewTreeObserver;
import android.widget.FrameLayout;
/**
* Created by shibenli on 2016/8/31.
You can’t perform that action at this time.