Skip to content

Instantly share code, notes, and snippets.

#连接
#关闭弱网时自动切至流量
settings put global wifi_num_of_switch_to_mobile_data_toggle 0
#关闭弱网检测
settings put global wifi_watchdog_poor_network_test_enabled 0
#关闭弱网检测
settings put global network_avoid_bad_wifi 0
#关闭切换至更好的 WLAN 网络
settings put global sem_wifi_switch_to_better_wifi_enabled 0
#关闭附近设备扫描
@fei-ke
fei-ke / titaniumbackup-btsync-cleaner.sh
Created July 15, 2018 06:06 — forked from auipga/titaniumbackup-btsync-cleaner.sh
This script helps you to (re)move old TitaniumBackup files when you backup its folder using btsync/Bittorrent Sync/rslsync/Resilio Sync. It keeps the latest 1 backup, older backups will be moved somewhere else.
#!/bin/bash
# remove old backups keeping only the latest one
# run this script only in your TitaniumBackup folder !!!
# create this folder first!
target=old
# pipe|separated|list
exclude="this.is.an.example.org.mozilla.firefox"
# | get app IDs
@fei-ke
fei-ke / OmcTextDecoder.java
Created March 29, 2018 15:03
Encode Decode Samsung Note 8 omc text
import java.io.*;
import java.util.zip.Deflater;
import java.util.zip.GZIPInputStream;
import java.util.zip.GZIPOutputStream;
public class OmcTextDecoder {
private final int SALT_LENGTH = 256;
private final String XML_HEADER = "<?xml";
private final byte[] salts = new byte[]{(byte) 65, (byte) -59, (byte) 33, (byte) -34, (byte) 107, (byte) 28, (byte) -107, (byte) 55, (byte) 78, (byte) 17, (byte) -81, (byte) 6, (byte) -80, (byte) -121, (byte) -35, (byte) -23, (byte) 72, (byte) 122, (byte) -63, (byte) -43, (byte) 68, (byte) 119, (byte) -78, (byte) -111, (byte) -60, (byte) 31, (byte) 60, (byte) 57, (byte) 92, (byte) -88, (byte) -100, (byte) -69, (byte) -106, (byte) 91, (byte) 69, (byte) 93, (byte) 110, (byte) 23, (byte) 93, (byte) 53, (byte) -44, (byte) -51, (byte) 64, (byte) -80, (byte) 46, (byte) 2, (byte) -4, (byte) 12, (byte) -45, (byte) 80, (byte) -44, (byte) -35, (byte) -111, (byte) -28, (byte) -66, (byte) -116, (byte) 39, (byte) 2, (byte) -27, (byte) -45, (byte) -52, (byte) 125, (byte) 39, (by
@fei-ke
fei-ke / RedPackAmountGenerator.java
Last active January 20, 2019 16:53
红包生成算法
import java.util.ArrayList;
import java.util.List;
import java.util.Random;
/**
* Created by fei-ke on 2015/6/18.
*/
public class RedPackAmountGenerator {
private int mFloor; //下限
private int mCeiling; //上限
@fei-ke
fei-ke / zimuzu_sign.php
Last active June 17, 2016 01:43
字幕组签到
<?php
$_cookieFileLocation = './cookie.txt';
$login_url="http://www.zimuzu.tv/User/Login/ajaxLogin";
$sign_url="http://www.zimuzu.tv/user/sign";
$hotkeyword_url="http://www.zimuzu.tv/public/hotkeyword";
$get_cur_user_top_info_url="http://www.zimuzu.tv/user/login/getCurUserTopInfo";
$ch = curl_init();
@fei-ke
fei-ke / adball.bat
Created March 30, 2015 16:25
windows bat file, support multiple devices 'adb' command
@echo off
for /f %%i in ('adb devices^|findstr /e "device"') do (
if "%1" == "shell" (
start cmd /k adb -s %%i %*
) else (
adb -s %%i %*
)
)
@fei-ke
fei-ke / google_paly_region
Created March 21, 2015 16:39
change google paly region,copy from http://pastebin.com/rmWfDeGH
Hello XXX,
Thank you for contacting Google! I understand you contacted us today because you are wanting to change the region of your Google Play Store. I can definitely feel where you're coming from here, but rest assured, I'd be more than happy to help you out.
We use the billing address of your default payment instrument in Google Wallet to help determine your home country for accessing the Play Store. Our collection of content can vary by country, so your view of the Play Store may differ from what others are seeing when you travel outside of the country listed on your default payment method's billing address.
Please note that you must have a valid payment method with a billing address located inside a country in order to access that country's Play Store.
If you're having issues viewing your intended country's Play Store and would like to change your default payment method or update an existing billing address in Google Wallet, please use the following steps:
@fei-ke
fei-ke / wo.txt
Last active January 18, 2019 03:33
联通沃宽提速接口
提速:
http://bj.wokuan.cn/web/improvespeed.php?ContractNo=宽带帐号&up=09&old=07&round=29
恢复: http://bj.wokuan.cn/web/lowerspeed.php?ContractNo=宽带帐号&round=85
上面up old表示提升和本来的两种宽带类型
09是100M
07是10M
round是随机数
@fei-ke
fei-ke / renameapk
Last active August 29, 2015 14:11 — forked from fredgrott/renameapk
// in your android.applicationVariants.all { variant ->
// or in your android.libraryVariants.all { variant ->
// code block put this:
if (variant.productFlavors[0] == null){
variant.outputs[0].outputFile = new File(variant.outputs[0].outputFile.parent,
project.ext.ourProjectName + "_"
+ variant.buildType.name + "_"
+ android.defaultConfig.versionCode + "_"
+ android.defaultConfig.versionName + ".apk")
}else{
@fei-ke
fei-ke / AbsItemAdapter.java
Last active August 29, 2015 14:05
适用于ItemView的列表适配器
/**
* 适用于ItemView的列表适配器
* Created by fei-ke on 2014/8/19.
*/
public class AbsItemAdapter<T extends IItemView, K extends IItemBean> extends BaseAdapter {
private List<K> mData;
private Class<T> itemViewClass;
public AbsItemAdapter(Class<T> itemViewClass) {