Skip to content

Instantly share code, notes, and snippets.

@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 / 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 / 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 / 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
#连接
#关闭弱网时自动切至流量
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
#关闭附近设备扫描