Skip to content

Instantly share code, notes, and snippets.

Avatar

Roy Binux binux

View GitHub Profile
@liberize
liberize / captcha.py
Last active Apr 7, 2019
简单验证码识别
View captcha.py
#!/usr/bin/env python
# coding: utf-8
import os
import sys
from PIL import Image, ImageChops
templates = []
@binux
binux / basedb.py
Created Aug 30, 2012
basedb for sqlite
View basedb.py
#!/usr/bin/env python
# -*- encoding: utf-8 -*-
# vim: set et sw=4 ts=4 sts=4 ff=unix fenc=utf8:
# Author: Binux<17175297.hk@gmail.com>
# http://binux.me
# Created on 2012-08-30 17:43:49
import logging
logger = logging.getLogger()
@binux
binux / daemon.sh
Created Jan 10, 2012
防止多重启动的守护进程
View daemon.sh
#!/usr/bin/env bash
if [ ! $STY ]; then
screen -S $(basename $0 .sh) -U -d -m $0 $*
exit 0
fi
if [ ! $LOCK ]; then
LOCK=$(echo $0 $* | md5sum | cut -f 1 -d " ").lock
fi