Skip to content

Instantly share code, notes, and snippets.

@ghostlyman
ghostlyman / proxyfile
Created October 21, 2017 15:40 — forked from Latias94/proxyfile
shadowsock 配置
# 这是本地监听的HTTP代理的端口地址。
# SpechtLite还会自动启用一个位于port+1的SOCKS5代理服务器。
# 选择大于1024的未被占用的端口即可。
port: 9090
# 下面定义adapter,即远程代理服务器的信息。每个adapter代表一个远程代理服务器。
adapter:
# 在定义规则的时候,我们使用id来引用当前定义的adapter。
# 程序自动定义了一个id为direct的adapter,使用这个adapter将会不走代理直接连接目标服务器。因此自定义id不能为direct。
# - id: adapter1
# # 类型为HTTP代理服务器.
@ghostlyman
ghostlyman / daemon.py
Created July 22, 2017 11:00 — forked from marazmiki/daemon.py
Python daemon example
#!/usr/bin/env python
# coding: utf-8
import argparse
import os
import sys
import time
import atexit
import logging
import signal
@ghostlyman
ghostlyman / WechatSmartWish.py
Created July 5, 2017 05:39 — forked from littlecodersh/WechatSmartWish.py
Demo of sending smart wishes through wechat.
#coding=utf8
import itchat, time
SINCERE_WISH = u'祝%s新年快乐!'
REAL_SINCERE_WISH = u'祝%s新年快乐!!'
def send_wishes():
friendList = itchat.get_friends(update=True)[1:]
for friend in friendList:
# 如果不是演示目的,把下面的方法改为itchat.send即可
@ghostlyman
ghostlyman / main.py
Created July 5, 2017 05:38 — forked from littlecodersh/main.py
Main script behind itchat robot
#coding=utf8
import itchat
# tuling plugin can be get here:
# https://github.com/littlecodersh/EasierLife/tree/master/Plugins/Tuling
from tuling import get_response
@itchat.msg_register('Text')
def text_reply(msg):
if u'作者' in msg['Text'] or u'主人' in msg['Text']:
return u'你可以在这里了解他:https://github.com/littlecodersh'