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
@xdays
xdays / tomcat-initscript.sh
Created August 20, 2015 15:00
tomcat init script for ansible
#!/bin/bash
#
# chkconfig: 345 99 28
# description: Starts/Stops Apache Tomcat
#
# Tomcat 7 start/stop/status script
# Forked from: https://gist.github.com/valotas/1000094
# @author: Miglen Evlogiev <bash@miglen.com>
#
# Release updates:
{"sig":"12921da835011b96beef12fba4fac39254b96cbf76f3ce0fdb6d66d9a81d0091dbfb85d57fa79f8aa192f334a943584afb2090055cd5f51fb535b6d8d93fdf170","msghash":"986fb795b265c324c8d9357c55ef6ada2d4ce05f2f69e4bbd49371d159512bce"}
||fireworktv.com
||v2ex.com
||wikipedia.org
||golang.org
||googlesource.com
||wireguard.com
||github.com
||gitlab.com
||gitlab-static.net
||tunsafe.com
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()
#!/usr/bin/env python
# -*- coding: utf-8 -*-
import boto3
import json
from datetime import datetime
import time
my_stream_name = 'test'