Skip to content

Instantly share code, notes, and snippets.

View wzpan's full-sized avatar

潘伟洲 wzpan

View GitHub Profile
wzpan /
Created June 12, 2017 03:48
Sign an android app.
# sh path_to_apk.apk path_to_key_store.keystore STOREPASSWORD STOREALIAS
rm -rf build
mkdir build
cd build
unzip $1
rm -rf META-INF
APK_NAME=`basename $1`
wzpan /
Created May 5, 2017 13:55 — forked from chuangbo/
Python dynamic DNSPod DNS Script

替换上你的Email,密码,域名ID,记录ID等参数,就可以运行了。 会在后台一直运行,每隔30秒检查一遍IP,如果修改了就更新IP。

获得domain_id可以用curl curl -k -d "login_email=xxx&login_password=xxx"

获得record_id类似 curl -k -d "login_email=xxx&login_password=xxx&domain_id=xxx"

wzpan / post-merge
Created April 18, 2016 06:47 — forked from sindresorhus/post-merge
git hook to run a command after `git pull` if a specified file was changed. In this example it's used to run `npm install` if package.json changed and `bower install` if `bower.json` changed. Run `chmod +x post-merge` to make it executable then put it into `.git/hooks/`.
#/usr/bin/env bash
# MIT © Sindre Sorhus -
# git hook to run a command after `git pull` if a specified file was changed
# Run `chmod +x post-merge` to make it executable then put it into `.git/hooks/`.
changed_files="$(git diff-tree -r --name-only --no-commit-id ORIG_HEAD HEAD)"
check_run() {
echo "$changed_files" | grep --quiet "$1" && eval "$2"
wzpan / tag.css
Created March 24, 2016 09:43
StyleSheet for hexo-tag-bootstrap.
* Bootstrap v3.3.5 (
* Copyright 2011-2016 Twitter, Inc.
* Licensed under MIT (
button {
overflow: visible;
button {
wzpan / redmine gitlab sync
Created February 16, 2016 04:01 — forked from jakimowicz/redmine gitlab sync
simple (and dirty) sync between redmine issues and gitlab issues
#!/usr/bin/env ruby
require 'faraday'
require 'json'
require 'gitlab'
module Redmine
Host = nil
APIKey = nil
wzpan /
Created June 1, 2015 16:17
A python script to speed up the rendering process of Hexo 3.
$ python -f FILE
$ python -d DIR
wzpan /
Last active August 29, 2015 14:22
Java keyboard IO.
class HelloWorld
public static void main(String args[])
InputStreamReader sin = new InputStreamReader(;
BufferedReader br = new BufferedReader(sin);
System.out.println("Type your name: ");
#!/usr/bin/env ruby
if ARGV[0].nil? || ARGV[0].match(/-h/)
puts "Usage : #{$0} github_username dash_sqlite_db char_appended_to_keyword [no_comments]"
require 'net/http'
require 'open-uri'
#require 'awesome_print'
#! /bin/bash
# 计算有效变更代码量的脚本
# 包括注释,但不包括新增的空行
version() {
OS=`uname -o`
echo "svn_counter ($OS) 0.0.1"
usage() {
wzpan /
Last active August 29, 2015 14:05
Python2 example to handle options and arguments.
import sys, os, getopt
TARGET_TYPE = ".log"
def process_file(path):
''' Process a file. '''
print path
def process_dir(path):