Skip to content

Instantly share code, notes, and snippets.

View venshine's full-sized avatar
:octocat:
I may be slow to respond.

venshine

:octocat:
I may be slow to respond.
View GitHub Profile
@venshine
venshine / private_fork.md
Created October 16, 2023 12:31 — forked from 0xjac/private_fork.md
Create a private fork of a public repository

The repository for the assignment is public and Github does not allow the creation of private forks for public repositories.

The correct way of creating a private frok by duplicating the repo is documented here.

For this assignment the commands are:

  1. Create a bare clone of the repository. (This is temporary and will be removed so just do it wherever.)

git clone --bare git@github.com:usi-systems/easytrace.git

@venshine
venshine / isValidContext.java
Last active March 19, 2020 06:52
判断用于Glide的Context是否有效
/**
* 判断用于Glide的Context是否有效
*
* @param context 用于Glide的Context
* @return 用于Glide的Context是否有效
*/
public static boolean isValidContext(final Context context) {
if (context == null) {
return false;
}
@venshine
venshine / BSDiff.java
Created July 31, 2019 08:42
BSPatch and BSDdiff Java version, extracted from Wechat Tinker
import java.io.BufferedInputStream;
import java.io.ByteArrayOutputStream;
import java.io.DataOutputStream;
import java.io.File;
import java.io.FileInputStream;
import java.io.FileOutputStream;
import java.io.IOException;
import java.io.InputStream;
import java.io.OutputStream;
import java.util.zip.GZIPOutputStream;
@venshine
venshine / screencap-saved.sh
Last active September 4, 2017 14:13
Android手机截屏并自动上传电脑的脚本
#! /bin/bash
adb shell screencap -p /sdcard/test.png
dir=~/Desktop/
curr=`date "+%Y-%m-%d %H:%M:%S"`
name=${dir}"screenshot"${curr}".png"
echo "${name}"
adb pull /sdcard/test.png "$name"
@venshine
venshine / Android Studio .gitignore
Last active July 19, 2016 07:43
A .gitignore file for Android Studio
# Built application files
*.apk
*.ap_
# Files for the ART/Dalvik VM
*.dex
# Java class files
*.class
@venshine
venshine / bintray.gradle
Created April 27, 2016 09:54
bintray.gradle
https://raw.githubusercontent.com/venshine/gradle-bintray-upload/master/bintray.gradle