This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
int32(time.Now().Unix()) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
func addToLog(text string, logfile string) { | |
f, err := os.OpenFile(logfile, os.O_APPEND|os.O_WRONLY, 0600) | |
if err != nil { | |
panic(err) | |
} | |
defer f.Close() | |
if _, err = f.WriteString(text); err != nil { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$binPhash = base_convert($phash, 16, 2); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
####################################################################### | |
# File name: my.ini | |
# Created By: The Uniform Server Development Team | |
# Edited Last By: Mike Gleaves (ric) | |
# V 1.0 24-7-2016 | |
######################################################################## | |
[mysql] | |
default-character-set=utf8 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Generated by Percona Configuration Wizard (http://tools.percona.com/) version REL5-20120208 | |
# Configuration name server generated for a1565408@mvrht.net at 2018-06-10 10:08:14 | |
[mysql] | |
# CLIENT # | |
port = 3306 | |
socket = /var/lib/mysql/mysql.sock | |
[mysqld] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var gracefulStop = make(chan os.Signal) | |
signal.Notify(gracefulStop, syscall.SIGTERM) | |
signal.Notify(gracefulStop, syscall.SIGINT) | |
go func() { | |
sig := <-gracefulStop | |
fmt.Printf("caught sig: %+v", sig) | |
fmt.Println("Wait for 5 second to finish processing") | |
time.Sleep(5 * time.Second) | |
os.Exit(0) | |
}() |
OlderNewer