Skip to content

Instantly share code, notes, and snippets.

View leeyisoft's full-sized avatar
🏠
Working from home

leeyi leeyisoft

🏠
Working from home
View GitHub Profile
@leeyisoft
leeyisoft / RpcClient
Last active August 31, 2017 08:18
php rpc client (rabbitmq)
<?php
/**
* @desc Advanced Message Queuing Protocol RPC Client
*
* @name RpcClient
* @copyright leeyi.net @ 2014-2020
* @author leeyi <leeyisoft@icloud.com>
*/
namespace app\lib\AMQP;
@leeyisoft
leeyisoft / Pusher.php
Last active August 23, 2017 01:30
PHP rabbitmq producer for yii2
<?php
/**
* Advanced Message Queuing Protocol 发送消息类
*
* @copyright leeyi.net @ 2014-2020
* @author leeyi <leeyisoft@icloud.com>
*/
namespace app\lib\AMQP;
@leeyisoft
leeyisoft / SMS.py
Last active April 26, 2023 07:01
一个Python3发送短信的类
#!/usr/bin/env python3
# coding=utf-8
import json
import hashlib
import re
import requests
def md5(Str):
m = hashlib.md5(Str.encode(encoding='utf8'))
@leeyisoft
leeyisoft / rpc_server.py
Last active August 31, 2017 08:14
添加rpc_server.py 支持 qqbot 服务; 在linux系统启动的时候控制台没有输出Stopped 是正常的,具体解释参考https://stackoverflow.com/questions/10029697/file-descriptors-redirecting-is-stuck
#!/usr/bin/env python3
# encoding: utf-8
import sys
import os
import logging
import pika
import json
import requests
import socket