SSL Cert from letsencrypt.org

free ssl cert from https://letsencrypt.org/script with it:new => https://acme.sh/old => https://github.com/Neilpang/le

2016/02/250 Feb · 1 min · map[name:SCys uri:]

[20150716][Android][4.2.2_r1]USB plugin type

AC/USB/Wireless charging type checker file: packages/apps/Settings/src/com/android/settings/Utils.java function: getBatteryStatus public static String getBatteryStatus(Resources res, Intent batteryChangedIntent) { final Intent intent = batteryChangedIntent; int plugType = intent.getIntExtra("plugged", 0); int status = intent.getIntExtra("status", BatteryManager.BATTERY_STATUS_UNKNOWN); String statusString; if (status == BatteryManager.BATTERY_STATUS_CHARGING) { statusString = res.getString(R.string.battery_info_status_charging); if (plugType > 0) { int resId; if (plugType == BatteryManager.BATTERY_PLUGGED_AC) { resId = R.string.battery_info_status_charging_ac; } else if (plugType == BatteryManager.BATTERY_PLUGGED_USB) { resId = R.string.battery_info_status_charging_usb; } else { resId = R....

2015/07/180 Jul · 1 min · map[name:SCys uri:]

[Android][4.2.2_r1][Phone]添加重启按钮

直接上链接:长按电源键,为Android手机添加自动重启ItemMTKAndroid4.2.2添加重启功能

2015/07/150 Jul · 1 min · map[name:SCys uri:]

[Android][4.2.2_r1][Phone]StatusBar custom config

file: /base/packages/SystemUI/src/com/android/systemui/statusbar/phone/PhoneStatusBar.javafunction: addStatusBarWindow()use:hide status bar with height as 0show status bar with height as getStatusBarHeight()fix black bar in top when hide statusbarxml: /base/core/res/res/values/dimens.xmlchange line status_bar_height 25dip => 0dip

2015/07/070 Jul · 1 min · map[name:SCys uri:]

JS SHA1 文件 函数

需要的库CryptoJS/rollups/sha1.jsCryptoJS/components/lib-typedarrays-min.jshash: (fobj, callback_end, callback_progress)->blob = new Blob()read = 0unit = 1024 * 1024sha1 = CryptoJS.algo.SHA1.create()reader = new FileReader()reader.onload = (e)->bytes = CryptoJS.lib.WordArray.create(new Uint8Array(e.target.result))sha1.update bytesread += unitif read < fobj.sizecallback_progress read / fobj.sizeblob = fobj.slice read, read + unitreader.readAsArrayBuffer blobelsehash = sha1.finalize()callback_progress 1callback_end hash.toString(CryptoJS.enc.Hex)@processing = falsereader.readAsArrayBuffer fobj.slice(read, read + unit)

2015/05/240 May · 1 min · map[name:SCys uri:]