Skip to content

Instantly share code, notes, and snippets.

View ZoomQuiet's full-sized avatar
🖖
Sayeahooo

Zoom.Quiet ZoomQuiet

🖖
Sayeahooo
View GitHub Profile
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@ZoomQuiet
ZoomQuiet / fabfile.py
Last active January 4, 2016 16:09
Fabric for QPython auto upload/running script/collect log etc... from local through SSH
from fabric.api import local, env, run
#import os
env.shell = "/system/bin/sh -c"
# Local path configuration (can be absolute or relative to fabfile)
#
# Remote server configuration
PY = '/data/data/com.hipipal.qpyplus/files/bin/python'
PYQ = 'root@192.168.0.100'
env.hosts= [PYQ]
env.user = "root"
@ZoomQuiet
ZoomQuiet / gen_qpy_env.py
Last active January 4, 2016 15:39
generating env for QPython can running as native Python in Android mobile !
#qpy:console
'''for QPy can usage normal system python , gen. all need Adnorid /etc/profile
usage:
- upload this script into mobile
- normal in /storage/sdcard0/com.hipipal.qpyplus/projects/YouProject
- call in QPython "My QPython->projects->YouProject->gen_qpy_env.py"
config as default env:
# mount -o remount,rw /dev/block/mtdblock3 /system
@ZoomQuiet
ZoomQuiet / fabfile.py
Created January 27, 2014 02:07
Fabric for QPython auto play
from fabric.api import local, env, run
env.shell = "/system/bin/sh -c"
# Local path configuration (can be absolute or relative to fabfile)
## Remote server configuration
PY = '/data/data/com.hipipal.qpyplus/files/bin/python'
PYQ = 'root@192.168.0.100'
env.hosts= [PYQ]
env.user = "root"
PYQ_ROOT = '/storage/sdcard0/com.hipipal.qpyplus/projects'
PROJ_NAME = 'chaos'
@ZoomQuiet
ZoomQuiet / moc-on-osx.md
Last active January 2, 2016 02:09 — forked from RobertAudi/moc-on-osx.md
Chinese verion and appended how to install ncurses for display mutli-byte words

MOCp on OS X 10.9 Mavericks with CJK

thanx: AzizLight/moc-on-osx.md

最近升级到 了 MAC OS X 10.9 Mavericks, 一直以来使用 brew 安装的 MOCP 这就不成了,决定折腾清楚,并分享大家

依赖 Requirements

@ZoomQuiet
ZoomQuiet / brew --config
Created September 1, 2013 08:31
ERROR if "brew upgrade -v --env=std glib" https://github.com/mxcl/homebrew/issues/22241
$ brew --config
HOMEBREW_VERSION: 0.9.4
ORIGIN: https://github.com/mxcl/homebrew.git
HEAD: de5532166370563255accea15c0901cc25d0cfa1
HOMEBREW_PREFIX: /usr/local
HOMEBREW_CELLAR: /usr/local/Cellar
CPU: 8-core 64-bit sandybridge
OS X: 10.7.5-x86_64
Xcode: 4.6.3
CLT: 1.0.0.9000000000.1.1249367152
$ brew --config
HOMEBREW_VERSION: 0.9.4
ORIGIN: https://github.com/mxcl/homebrew.git
HEAD: de5532166370563255accea15c0901cc25d0cfa1
HOMEBREW_PREFIX: /usr/local
HOMEBREW_CELLAR: /usr/local/Cellar
CPU: 8-core 64-bit sandybridge
OS X: 10.7.5-x86_64
Xcode: 4.6.3
CLT: 1.0.0.9000000000.1.1249367152
// email 所在的列,从0开始算。email 作为唯一标示,用于去重。
var emailColumn = 1;
// 电子表格的 doc key
key = "0AhIp-TG_44qxdHFnTDFUeDNOUEp2LVVpbmVMa25QQVE";
/**
* 统计报名人数,根据 email 唯一标示去除重复的报名。
*/
function countUniqueRows() {
//已发送邮件的标记内容
var EMAIL_SENT = "EMAIL_SENT";
//记录已发送记录的列,一般为原有数据的后面一列,从0开始
var EMAIL_SENT_COLUMN = 9;
// 发送的邮件主题
var SUBJECT = "北京GDG之编程语言沙龙参会确认函";
// email 所在的列,从0开始算
#!/usr/bin/env python
import os, web, sys
sys.path.append(os.path.dirname(__file__))
urls = (
r'/', 'Home',
)