Skip to content

Instantly share code, notes, and snippets.

View xiongdi9456's full-sized avatar

Sheldon xiongdi9456

  • Tokyo
View GitHub Profile
@xiongdi9456
xiongdi9456 / zabbix-alert-smtp.sh
Created August 26, 2019 02:51 — forked from superdaigo/zabbix-alert-smtp.sh
Zabbix SMTP Alert script for gmail
#!/usr/bin/python
# -*- coding: utf-8 -*-
"""
Zabbix SMTP Alert script for gmail.
"""
import sys
import smtplib
from email.MIMEText import MIMEText
from email.Header import Header
@xiongdi9456
xiongdi9456 / 唯一邀请码生成方法
Last active August 25, 2019 03:24 — forked from zjnxyz/唯一邀请码生成方法
唯一邀请码生成方法,通过算法实现,唯一第三方组件来判断邀请码是否唯一!!!
/**
* 随机字符串
*/
private static final char[] CHARS = new char[] {'F', 'L', 'G', 'W', '5', 'X', 'C', '3',
'9', 'Z', 'M', '6', '7', 'Y', 'R', 'T', '2', 'H', 'S', '8', 'D', 'V', 'E', 'J', '4', 'K',
'Q', 'P', 'U', 'A', 'N', 'B'};
private final static int CHARS_LENGTH = 32;
/**
* 邀请码长度,总个数33,554,432
@xiongdi9456
xiongdi9456 / gitbbs-favorite.json
Created July 10, 2019 15:51
gitbbs-config 请勿自行删除或者修改
[]