This file contains hidden or 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
| #--------------------------------------------------------------------- | |
| # Global settings | |
| #--------------------------------------------------------------------- | |
| global | |
| # to have these messages end up in /var/log/haproxy.log you will | |
| # need to: | |
| # | |
| # 1) configure syslog to accept network log events. This is done | |
| # by adding the '-r' option to the SYSLOGD_OPTIONS in | |
| # /etc/sysconfig/syslog |
This file contains hidden or 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
| #!/usr/bin/python3 | |
| # -*- coding: utf-8 -*- | |
| ############################################################################# | |
| import csv, codecs, time, os | |
| import matplotlib.pyplot as plt; plt.rcdefaults() | |
| import numpy as np | |
| from PyQt5.QtCore import (QFile, QFileInfo, QPoint, QRect, QSettings, QSize, | |
| Qt, QTextStream, QProcess, QDir) | |
| from PyQt5.QtGui import QIcon, QFont | |
| from PyQt5.QtWidgets import (QAction, QApplication, QMainWindow, |
This file contains hidden or 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
| <!doctyp html> | |
| <html lang="en"> | |
| <head> | |
| <meta charset="utf-8" /> | |
| <title>Get Latitude and Longitude</title> | |
| <script src="http://maps.google.com/maps/api/js?libraries=places®ion=uk&language=en&sensor=true"></script> | |
| <script src="//ajax.googleapis.com/ajax/libs/jquery/1.10.1/jquery.min.js"></script> | |
| </head> | |
| <body> |
This file contains hidden or 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
| <!doctype html> | |
| <html lang="en"> | |
| <head> | |
| <meta charset="utf-8" /> | |
| <title>Maps</title> | |
| <style> | |
| #map_canvas { | |
| width: 500px; | |
| height: 400px; | |
| } |
This file contains hidden or 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
| <?php | |
| /** | |
| * 转换时间戳为n天/小时/分/秒前 | |
| * | |
| * @param unknown $timestamp 时间戳 | |
| * | |
| * @return string | |
| */ | |
| function convert2timeago($timestamp) | |
| { |
This file contains hidden or 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
| #!/bin/bash | |
| function snmpGetIP | |
| { | |
| local SNMP_HOST=$1 | |
| local SNMP_COMM=$2 | |
| local SNMP_IFID=$3 | |
| snmpwalk -Os -c ${SNMP_COMM} -v 2c ${SNMP_HOST} ipAdEntIf | grep "INTEGER: ${SNMP_IFID}" | grep -o '[0-9]\{1,3\}\.[0-9]\{1,3\}\.[0-9]\{1,3\}\.[0-9]\{1,3\}' | |
| } |