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
#!/bin/bash | |
name="gateway" | |
declare -a temp_arr | |
def="DEF:rrd_rtt=$name.rrd:rtt:AVERAGE \ | |
DEF:rrd_pl=$name.rrd:pl:AVERAGE \ | |
VDEF:rtt_max=rrd_rtt,MAXIMUM \ | |
VDEF:pl_max=rrd_pl,MAXIMUM \ | |
-e now -s end-2h \ | |
" | |
NUM="`rrdtool graph xxx \ |
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
#!/bin/bash | |
RRD_DIR="/tmp" | |
RRD_NAME="gateway" | |
while getopts f:p:n:h:d OPTS | |
do | |
case $OPTS in | |
p) RRD_DIR="$OPTARG" ;; | |
n) RRD_NAME="$OPTARG" ;; | |
h) HOST_NAME="$OPTARG" ;; |
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
<?php | |
$str0 = "2012-01-24 12:00:00"; | |
function clockit ( $date ){ | |
$t = new DateTime ($date); | |
$h = $t->format('g'); | |
$a = array ( | |
"🕛","🕐","🕑","🕒","🕓","🕔","🕕","🕖","🕗","🕘","🕙","🕚","🕛" | |
); | |
return $a[$h]; | |
} |
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
<html> | |
<textarea name="n" type="text" id="n" onkeyup="CtoH(this);" style="width:100%;height:100%;"></textarea> | |
<SCRIPT> | |
function CtoH(obj){ | |
var str=obj.value; | |
var result=""; | |
for (var i = 0; i < str.length; i++){ | |
if (str.charCodeAt(i)==12288){ | |
result+= String.fromCharCode(str.charCodeAt(i)-12256); | |
continue; |
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
#/usr/bin/env python | |
# -*- coding: utf-8 -*- | |
import sys,urllib2,codecs | |
try: import simplejson as json | |
except ImportError: import json | |
CLIENT_ID="IYLVVWKAC110IENAZ53BJJUJEIDOSK5SVKKLDPAVLCHRLO45" | |
CLIENT_SECRET="KPW0QHUC2125TSWNZFLMHYXHHAN3BGXZRVZQYO5JS1RUZ3WS" | |
url="https://api.foursquare.com/v2/venues/categories?client_id="+CLIENT_ID+"&client_secret="+CLIENT_SECRET+"&v=20120615" | |
#url="file:///tmp/categories" |
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
<!DOCTYPE HTML> | |
<html><head><meta charset=utf-8 /><title>4sq categories</title></head><body> | |
<ul> | |
<li><img src="https://foursquare.com/img/categories/arts_entertainment/default_32.png" />Arts & Entertainment</li> | |
<ul> | |
<li> <img src="https://foursquare.com/img/categories/arts_entertainment/arcade_32.png" />Arcade</li> | |
<li> <img src="https://foursquare.com/img/categories/arts_entertainment/artgallery_32.png" />Art Gallery</li> | |
<li> <img src="https://foursquare.com/img/categories/arts_entertainment/bowling_32.png" />Bowling Alley</li> |
Arts & Entertainment *
Aquarium *
Arcade *
Art Gallery *
Bowling Alley *
Casino *
Comedy Club *
Concert Hall
- ![General Entertainment](https://foursquare.com/img/categories_v2/arts_entertainment/default_
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
#!/bin/bash -x | |
SRC=/home/xf/git/Hotot/data/ | |
DEST=/opt/www/hotot/ | |
echo "\033[1;31;40m[i]Sync ...\033[0m" | |
# ignore .*.swp, .hgignore, etc | |
rsync -av --exclude '.*.*' --exclude '*.coffee' --exclude 'test*' $SRC $DEST | |
# replace conf.vars.platform, key and secret | |
echo "\033[1;31;40m[i] Replace platform, key and secret ...\033[0m" |
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
plugin.enltarget.draw_guardian([ | |
{ | |
"lat": 29.65357, | |
"lng": 115.943885, | |
"time": 1368429231432, | |
"days": 380, | |
"player": "honesty", | |
"title": "九江市生命活水医院", | |
"guid": "ade47c22469242b2b97957cbcda2682c.11" | |
}, |
OlderNewer