Skip to content

Instantly share code, notes, and snippets.

View Zhiw's full-sized avatar
🎯
Focusing

Zhiwei Yu Zhiw

🎯
Focusing
View GitHub Profile
package com.kmhope.awst.view;
import android.content.Context;
import android.support.v7.widget.GridLayoutManager;
import android.support.v7.widget.RecyclerView;
import android.view.View;
import android.view.ViewGroup;
/**
* ClassName: MyLayoutManager
@Zhiw
Zhiw / getFilePathUtil
Created November 13, 2015 15:27
convert content Uri to file path
public class getRealPathUtil {
@ @TargetApi(Build.VERSION_CODES.KITKAT)
public static String getRealPathFromURI_API19(Context context, Uri uri){
String filePath = "";
String wholeID = DocumentsContract.getDocumentId(uri);
String id = wholeID.split(":")[1];
String[] column = { MediaStore.Images.Media.DATA };
@Zhiw
Zhiw / surge.conf
Last active June 14, 2018 05:35
surge.conf for surge Reference https://gist.github.com/scomper/b0c6129840272c136a82(update frequenly)
[General]
# warning, notify, info, verbose
loglevel = notify
skip-proxy = 192.168.0.0/16, 10.0.0.0/8, 172.16.0.0/12, 100.64.0.0/10, localhost, *.local
bypass-tun = 0.0.0.0/8, 192.168.0.0/16, 10.0.0.0/8, 172.16.0.0/12, 100.64.0.0/10
dns-server = 114.114.114.114,119.29.29.29,8.8.8.8
[Proxy]
# http, https, socks5
# Shadowsocks 代理设置(TFO 需要服务器端程序及内核支持)