Skip to content

Instantly share code, notes, and snippets.

Avatar
🀄
Working for living

cloverstd cloverstd

🀄
Working for living
View GitHub Profile
View boxcar_api.py
# -*- coding: utf-8 -*-
# http://boxcar.io
# send message to mobile
__author__ = "Cloverstd"
import urllib
import urllib2
import json
View qiniu_download.sh
#!/bin/bash
key="infopush.debug.log.2014-07-"
suffix=".tar.gz"
for ((j=16; j<24; j++)); do
key_day=${key}${j}"-"
for ((i=0; i<24; i++)); do
if ((${i} < 10));then
key22="22/"${key_day}"0"${i}
@cloverstd
cloverstd / main.py
Last active Aug 29, 2015
IFTTT webhook by Python with Tornado
View main.py
#!/usr/bin/env python
# encoding: utf-8
from tornadorpc.xml import XMLRPCHandler
import tornado.ioloop
import tornado.httpserver
import tornado.web
View public_key
ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQDolyzLgc+keal0kSgpG24smd8pk0c7jgzcebRMrWiTqYpcu8ber6KjUf8nBLKVvx8t2K40c+xIUA7ptMryXiAz6tCckFC2rTmp7S7gqdjpEk0HgGU+m/WliZDyV1X0cYqiG2y/KlizDxgR40uAYXhRgT3dfrcQi5GO9qg+dUDip9lBsF2f/lnOOmYOVJMEHu77NklyWOMa3DJF1BiTxe+CtFd4sU0P7oidemik099HqWSf3lgxYqu/rgqCumLIHWF/CI8714xlfe64lcsTwMJsd7xL0qgTYvDmLmynFKwQEsDgvcZcRNEEI5pkC9kZ9/rQBDr8yaobArRo7QGXM3KD cloverstd@gmail.com
@cloverstd
cloverstd / jobs.py
Last active Aug 29, 2015
python-rq with tornado asynchronous
View jobs.py
#!/usr/bin/env python
# encoding: utf-8
import time
def test(interval):
for i in xrange(int(interval)):
print i
time.sleep(1)
@cloverstd
cloverstd / shanbay2rss.py
Last active Oct 3, 2015
扇贝打卡 RSS 源
View shanbay2rss.py
#!/usr/bin/env python
# encoding: utf-8
from __future__ import absolute_import, unicode_literals
import tornado.ioloop
import tornado.httpserver
from tornado.options import parse_command_line, define, options
import tornado.httpclient
import tornado.web
import tornado.gen
@cloverstd
cloverstd / surge.conf
Created Oct 4, 2015 — forked from janlay/README.md
Yet another config for Surge.app
View surge.conf
[General]
# warning, notify, info, verbose
loglevel = notify
[Proxy]
# http, https, socks5
Proxy = custom, 1.2.3.4, 443, rc4-md5, password, http://server/custom.module
[Rule]
# Block privacy trackers
@cloverstd
cloverstd / gist:2849259
Created Jun 1, 2012 — forked from zythum/gist:2848881
google收录的敏感词
View gist:2849259
@cloverstd
cloverstd / rc,lua
Created Jul 16, 2012 — forked from fanzeyi/rc,lua
awesome.config
View rc,lua
-- Standard awesome library
require("awful")
require("awful.autofocus")
require("awful.rules")
-- Theme handling library
require("beautiful")
-- Notification library
require("naughty")
naughty.config.default_preset.width = 400
@cloverstd
cloverstd / call.html
Created Oct 16, 2015
Flask macro gist
View call.html
{% import 'pagination.html' as pagination %}
{% call(page) pagination.paginate(page, last_page) %}
{{url_for('manage.order_list')}}?page={{page}}&status={{status}}
{% endcall %}
You can’t perform that action at this time.