This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Copyright (C) 2012 Justin Poliey <justin.d.poliey@gmail.com> | |
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: | |
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. | |
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WIT |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/python | |
#coding: utf8 | |
import socket | |
import time | |
gateway = ('10.192.4.29',5018) #change if necessary | |
conf = { | |
'mac': 'YOUR-MAC-ADDRESS-IN-UPPER-CASE', | |
'user': 'your_username', | |
'psw': 'your_password' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#/usr/bin/python | |
from pyftpdlib.authorizers import DummyAuthorizer | |
from pyftpdlib.handlers import FTPHandler | |
from pyftpdlib.servers import FTPServer | |
authorizer = DummyAuthorizer() | |
authorizer.add_anonymous(".", perm="elradfmw") | |
handler = FTPHandler | |
handler.authorizer = authorizer | |
server = FTPServer(("0.0.0.0", 21), handler) | |
server.serve_forever() |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
" run this command first: | |
" git clone https://github.com/gmarik/Vundle.vim.git ~/.vim/bundle/Vundle.vim | |
set nocompatible " be iMproved, required | |
filetype off " required | |
" set the runtime path to include Vundle and initialize | |
set rtp+=~/.vim/bundle/Vundle.vim | |
call vundle#begin() | |
" alternatively, pass a path where Vundle should install plugins |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
data:text/html, <style type="text/css">#e{position:absolute;top:0;right:0;bottom:0;left:0;}</style><div id="e"></div><script src="http://d1n0x3qji82z53.cloudfront.net/src-min-noconflict/ace.js" type="text/javascript" charset="utf-8"></script><script>var e=ace.edit("e");e.setTheme("ace/theme/monokai");e.getSession().setMode("ace/mode/ruby");</script> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"version": 1, | |
"list": [ | |
["com.miui.permcenter.install.AdbInstallActivity", "继续安装", "miui_chinese"], | |
["com.miui.permcenter.install.AdbInstallActivity", "Install", "miui_english"], | |
["OppoPackageInstallerActivity", "安装", "oppo_chinese"], | |
["PackageInstallerActivity", "安装", "huawei_chinese"] | |
] | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import collections, weakref | |
# combining | |
# https://stackoverflow.com/questions/7828444/indexable-weak-ordered-set-in-python | |
# and | |
# https://stackoverflow.com/questions/1092531/event-system-in-python/1094423#1094423 | |
# make the event handler weakref-ed, so that we dont need to clean up manually. | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import win32api, win32con, win32gui, win32process, win32com.client | |
import time | |
import sys | |
import traceback | |
CLOSE_WINDOW_INTERVAL = 0.1 | |
wmi = win32com.client.GetObject('winmgmts:') | |
def query_process_name_by_id(pid): |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/system/bin/sh | |
# What is this? | |
# PSD (Pin to the SD card), is an auxiliary script that keeps your Apps "staying" on your SD card. | |
# "staying" is quoted because what it actually do is moving your app back to the SD card again after an update. | |
# Why? | |
# a. Since Android Lollipop, the apps you moved to the SD card will back to internal storage after an update. | |
# b. My phone has a small internal storage and running Android Lollipop. | |
# c. I am not going to buy another phone or downgrade to Kitkat. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import zlib | |
import cPickle | |
from pprint import pprint | |
def encryptString(data): | |
datalen = len(data) | |
headlen = min(datalen, 128 - datalen % 41) | |
tail = str(datalen) | |
tail = '0' * (8 - len(tail)) + tail | |
tail = map(lambda x: chr(ord(x) ^ 137), tail) |
OlderNewer