This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"schema_version": 1, | |
"name": "微信公众号订阅【第二版只有最新的一篇文章】", | |
"description": "2019.08.03 更新,最新可用", | |
"source_url": false, | |
"guid": "a0be876a712baf52fa4270d6b174443a", | |
"tag_fg_color": "#ffffff", | |
"tag_bg_color": "#00b050", | |
"icon": "eye", | |
"exported_at": "2019-08-03T10:05:30Z", |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"schema_version": 1, | |
"name": "微信公众号订阅", | |
"description": "2019.08.01 更新,最新可用", | |
"source_url": "http://104.224.190.22:3000/scenarios/8/export", | |
"guid": "c0be876a712baf52fa4270d6b1744432", | |
"tag_fg_color": "#ffffff", | |
"tag_bg_color": "#00b050", | |
"icon": "eye", | |
"exported_at": "2019-08-01T08:46:10Z", |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import base64 | |
import datetime | |
import hashlib | |
import hmac | |
import json | |
import urllib.parse | |
import uuid | |
access_key_id = '' | |
access_secret = '' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
server { | |
listen 80; | |
listen 443 ssl; | |
server_name your-domain.com; | |
charset utf-8; | |
client_max_body_size 32M; | |
root /project/static; | |
index index.html; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
def handle(self, *args, **options): | |
redis = get_redis_connection() | |
ps = redis.pubsub() | |
ps.subscribe([RELAY_CONTROL_RESULT_CHANNEL]) | |
for item in ps.listen(): | |
if item['type'] == 'message': | |
data = item['data'] | |
equipment_id, return_state = data.decode('ascii').split(':') | |
# equipment_id is group name |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[Unit] | |
Description=Live Syncing (Mirror) Daemon | |
After=network.target | |
[Service] | |
Restart=always | |
Type=simple | |
Nice=19 | |
#EnvironmentFile=-/etc/default/lsyncd | |
#ExecStart=/usr/bin/sh -c 'eval `/usr/bin/lsyncd -nodaemon $LSYNCD_OPTIONS /etc/lsyncd/lsyncd.conf.lua`' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import os | |
import logging | |
import logging.handlers | |
def init_log(log_path, level=logging.INFO, when="D", backup=7, | |
format="%(levelname)s: %(asctime)s: %(filename)s:%(lineno)d * %(thread)d %(message)s", | |
datefmt="%m-%d %H:%M:%S"): | |
""" | |
init_log - initialize log module |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#coding: utf-8 | |
import os | |
import time | |
import fcntl | |
import contextlib | |
import logging | |
@contextlib.contextmanager | |
def open_file(filename, pattern = 'r', timeout = 5): | |
""" 以加锁的方式读取文件,尝试timeout * 10 次,每次sleep 1秒钟. |