Skip to content

Instantly share code, notes, and snippets.

View binux's full-sized avatar

Roy Binux binux

View GitHub Profile
@binux
binux / daemon.sh
Created January 10, 2012 07:38
防止多重启动的守护进程
#!/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
@binux
binux / basedb.py
Created August 30, 2012 12:28
basedb for sqlite
#!/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()
@liberize
liberize / captcha.py
Last active April 7, 2019 15:09
简单验证码识别
#!/usr/bin/env python
# coding: utf-8
import os
import sys
from PIL import Image, ImageChops
templates = []