Skip to content

Instantly share code, notes, and snippets.

🎯
Focusing

潘伟洲 wzpan

🎯
Focusing
Block or report user

Report or block wzpan

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
@wzpan
wzpan / sign.sh
Created Jun 12, 2017
Sign an android app.
View sign.sh
# sh sign.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`
STORE_PATH=$3
STORE_PASS=$3
STORE_ALIAS=$4
@wzpan
wzpan / README.md
Created May 5, 2017 — forked from chuangbo/README.md
Python dynamic DNSPod DNS Script
View README.md

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

获得domain_id可以用curl curl -k https://dnsapi.cn/Domain.List -d "login_email=xxx&login_password=xxx"

获得record_id类似 curl -k https://dnsapi.cn/Record.List -d "login_email=xxx&login_password=xxx&domain_id=xxx"

@wzpan
wzpan / post-merge
Created Apr 18, 2016 — 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/`.
View post-merge
#/usr/bin/env bash
# MIT © Sindre Sorhus - sindresorhus.com
# 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
wzpan / tag.css
Created Mar 24, 2016
StyleSheet for hexo-tag-bootstrap.
View tag.css
/*!
* Bootstrap v3.3.5 (http://getbootstrap.com)
* Copyright 2011-2016 Twitter, Inc.
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)
*/
button {
overflow: visible;
}
button {
@wzpan
wzpan / redmine gitlab sync
Created Feb 16, 2016 — forked from jakimowicz/redmine gitlab sync
simple (and dirty) sync between redmine issues and gitlab issues
View redmine gitlab sync
#!/usr/bin/env ruby
require 'faraday'
require 'json'
require 'gitlab'
module Redmine
Host = nil
APIKey = nil
@wzpan
wzpan / speedup.py
Created Jun 1, 2015
A python script to speed up the rendering process of Hexo 3.
View speedup.py
#!/usr/bin/python2
'''
SYNOPSIS:
$ python speedup.py -f FILE
or
$ python speedup.py -d DIR
'''
@wzpan
wzpan / HelloWorld.java
Last active Aug 29, 2015
Java keyboard IO.
View HelloWorld.java
import java.io.*;
class HelloWorld
{
public static void main(String args[])
{
InputStreamReader sin = new InputStreamReader(System.in);
BufferedReader br = new BufferedReader(sin);
System.out.println("Type your name: ");
try{
View gists_to_dash_db.rb
#!/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]"
exit
end
require 'net/http'
require 'open-uri'
#require 'awesome_print'
View gist:0090b07f293aa8985d88
#! /bin/bash
# 计算有效变更代码量的脚本
# 包括注释,但不包括新增的空行
version() {
OS=`uname -o`
echo "svn_counter ($OS) 0.0.1"
}
usage() {
@wzpan
wzpan / getopt.py
Last active Aug 29, 2015
Python2 example to handle options and arguments.
View getopt.py
import sys, os, getopt
TARGET_TYPE = ".log"
def process_file(path):
''' Process a file. '''
print path
def process_dir(path):
You can’t perform that action at this time.