Skip to content

Instantly share code, notes, and snippets.

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

Xiangjun Zhang xdays

🏠
Working from home
View GitHub Profile
#!/usr/bin/env python
# -*- coding: utf-8 -*-
import boto3
import json
from datetime import datetime
import time
my_stream_name = 'test'
func AddJsonFormGormTag(in string) (string) {
var result string
scanner := bufio.NewScanner(strings.NewReader(in))
var oldLineTmp = ""
var lineTmp = ""
var propertyTmp = ""
var seperateArr []string
for scanner.Scan() {
oldLineTmp = scanner.Text()
||fireworktv.com
||v2ex.com
||wikipedia.org
||golang.org
||googlesource.com
||wireguard.com
||github.com
||gitlab.com
||gitlab-static.net
||tunsafe.com
{"sig":"12921da835011b96beef12fba4fac39254b96cbf76f3ce0fdb6d66d9a81d0091dbfb85d57fa79f8aa192f334a943584afb2090055cd5f51fb535b6d8d93fdf170","msghash":"986fb795b265c324c8d9357c55ef6ada2d4ce05f2f69e4bbd49371d159512bce"}
@xdays
xdays / zabbix_snmp_linux_templates.xml
Last active December 29, 2015 15:19
Zabbix DiskIO template based on SNMP
<?xml version="1.0" encoding="UTF-8"?>
<zabbix_export>
<version>2.0</version>
<date>2013-11-28T09:40:30Z</date>
<groups>
<group>
<name>Templates</name>
</group>
</groups>
<templates>
@xdays
xdays / zabbix_agent_linux_templates.xml
Last active December 29, 2015 15:19
Zabbix DiskIO template based on Template OS Linux
<?xml version="1.0" encoding="UTF-8"?>
<zabbix_export>
<version>2.0</version>
<date>2013-11-28T09:41:16Z</date>
<groups>
<group>
<name>Templates</name>
</group>
</groups>
<templates>
@xdays
xdays / zabbix_web.conf
Created November 20, 2013 15:24
apache cofigure file for zabbix
#
# Zabbix monitoring system php web frontend
#
Alias /zabbix /usr/local/zabbix-web
<Directory "/usr/local/zabbix-web">
Options FollowSymLinks
AllowOverride None
Order allow,deny
@xdays
xdays / mail.md
Last active December 28, 2015 18:19
two method to specify the sender with mail

two method to specify the sender:

  1. echo "This is the main body of the mail" | mail -s "Subject of the Email" recipent_address@example.com -- -f from_user@example.com

  2. mail -s "Some random subject" -a "From: some@mail.tld" to@mail.tld

@xdays
xdays / pypod.md
Last active December 27, 2015 03:59 — forked from chuangbo/README.md

替换上你的Email,密码,域名ID,记录ID等参数,就可以运行了。 会在后台一直运行,每隔30秒检查一遍IP,如果修改了就更新IP。

获得domain_id可以用curl curl -k https://dnsapi.cn/Domain.List -d "login_email=xxx&login_password=xxx"

获得record_id类似 curl -k https://dnsapi.cn/Record.List -d "login_email=xxx&login_password=xxx&domain_id=xxx"

20130626

@xdays
xdays / github_card.html
Last active December 25, 2015 12:19
github card
<div class="github-card" data-user="xdays" data-width="300" data-height="150"></div>
<script src="http://lab.lepture.com/github-cards/widget.js"></script>