Run with Python:
pip-2.7 install cffi
PYTHON=python2.7 sh go.sh
Run with PyPy:
pip-pypy install cffi
PYTHON=pypy sh go.sh
#!/usr/bin/env python | |
#-*- coding:utf-8 -*- | |
from sys import argv, stderr | |
from lxml import etree | |
xhtml_namespace = "http://www.w3.org/1999/xhtml" | |
content_type_attrs = { | |
"http-equiv": "Content-Type", |
#-*- coding:utf-8 -*- | |
import gevent.monkey | |
import gevent.pool | |
gevent.monkey.patch_all() | |
import requests | |
from zipfile import ZipFile |
#!/usr/bin/env bash | |
deliver_target=(example1@kindle.cn example2@kindle.cn) | |
smtp_account="your-deliver@your-gmail.com" | |
smpt_password="******" | |
issue_archive_dir="/srv/ebook-deliver/archives" | |
issue_name="solidot-$(date +%Y%m%d)" |
#-*- coding:utf-8 -*- | |
import time | |
import subprocess | |
""" | |
select last_name || "" || middle_name || "" || first_name as name, mobile_phone, other_phone from contacts where categories like "%通讯录%" and (mobile_phone <> '' or other_phone <> '') | |
""" | |
people = [ |
#!/usr/bin/env python | |
from flask_script import Manager | |
from myapp.app import create_app | |
from myapp.ext import db, oauth | |
app = create_app() | |
manager = Manager(app) |
import re | |
def convert_string_template(string): | |
index = -1 | |
def repl(matched): | |
nonlocal index | |
keyword = matched.group(1) | |
if keyword: | |
return "{%s}" % keyword.strip('()') |
Run with Python:
pip-2.7 install cffi
PYTHON=python2.7 sh go.sh
Run with PyPy:
pip-pypy install cffi
PYTHON=pypy sh go.sh
# Path to your oh-my-zsh configuration. | |
ZSH=$HOME/.oh-my-zsh | |
# Set name of the theme to load. | |
# Look in ~/.oh-my-zsh/themes/ | |
# Optionally, if you set this to "random", it'll load a random theme each | |
# time that oh-my-zsh is loaded. | |
ZSH_THEME="seeker" | |
# Set to this to use case-sensitive completion |
#!/usr/bin/env sh | |
PYTHON_VERSION=2.7 | |
WXPYTHON_ROOT="$(brew --prefix wxwidgets)/lib/python${PYTHON_VERSION}/site-packages" | |
WXPYTHON_SITE_ROOT="${WXPYTHON_ROOT}/$(cat ${WXPYTHON_ROOT}/wx.pth)" | |
SYSTEM_PYTHON=/usr/bin/python | |
# find the root of the virtualenv, it should be the parent of the dir this script is in | |
ENV=`${SYSTEM_PYTHON} -c "import os; print os.path.abspath(os.path.join(os.path.dirname(\"$0\"), '..'))"` |
PATCHED_FILENAME = "Monaco for Powerline.ttf" | |
$(PATCHED_FILENAME): Monaco.ttf fontpatcher.py fontpatcher-symbols.sfd | |
fontforge -script fontpatcher.py Monaco.ttf | |
@echo "(´・_・`) You can install the $(PATCHED_FILENAME) now." | |
Monaco.ttf: Monaco.dfont | |
fondu Monaco.dfont | |
rm *.bdf |