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 | |
ps -ef|grep [h]ujia |awk '{printf "kill -9 %d",$2}'|sh | |
cd /xxx/hujia/ | |
CLASSPATH="." | |
for jar in `ls ./lib` | |
do | |
CLASSPATH="$CLASSPATH:./lib/$jar" | |
done |
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/sh | |
######################## config ######################## | |
# 升级日志 | |
publish_log_file="/update/log/path/publish.log" | |
# 需要邮件通知的人 | |
master=( | |
[email protected] |
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
// 先判定宽高比,再判定宽高 | |
$sizeArr = explode("x", $p['screen']); | |
$screenWidth = $sizeArr['0']; | |
$screenHeight = $sizeArr['1']; | |
if ($screenHeight) | |
$wh = $screenWidth / $screenHeight; | |
$tmpArr = array(); | |
// 根据 宽高比最小差值,宽最小差值,高最小差值 进行排序,顶部为最合适的尺寸 | |
foreach ($splashArr as $info) { |
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 | |
/* | |
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS | |
* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT | |
* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR | |
* A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT | |
* OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, | |
* SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT | |
* LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, |
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 | |
function send_request_by_fsockopen($url,$post_data=array()){ | |
$url_array = parse_url($url); | |
$hostname = $url_array['host']; | |
$port = isset($url_array['port'])? $url_array['port'] : 80; | |
$requestPath = $url_array['path'] ."?". $url_array['query']; | |
$fp = fsockopen($hostname, $port, $errno, $errstr, 10); | |
if (!$fp) { | |
echo "$errstr ($errno)"; | |
return false; |
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 | |
class Cache | |
{ | |
private static $instance = array(); | |
/** | |
* 缓存实例化的工厂方法并且确保单例 | |
*/ | |
public static function getInstance( $type,$options=array()){ | |
$type = strtolower(trim($type)); |
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
/**************************************************** | |
* * | |
* Sociax HTML 标签关联模型 * | |
* * | |
****************************************************/ | |
/** | |
* HTML 标签关联模型 | |
* @model-node 模型节点的标签属性标记 | |
* @event-node 模型下事件节点的标签属性标记 |
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
/*! | |
* HeadJS The only script in your <HEAD> | |
* Author Tero Piirainen (tipiirai) | |
* Maintainer Robert Hoffmann (itechnology) | |
* License MIT / http://bit.ly/mit-license | |
* | |
* Version 0.99 | |
* http://headjs.com | |
*/ | |
/* modify : head ==> Wind */ |
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 | |
/** | |
* description : null | |
* @author : zhoumengkang | |
* createTime : 15/2/14 10:12 | |
*/ | |
define("TOKEN", "weixin"); | |
$wechatObj = new weChat(); | |
class weChat{ |
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
function fsockopen_test(){ | |
$hostname = 'm.cn'; | |
$url = '/bbb/2.php'; | |
$fp = fsockopen($hostname, 80, $errno, $errstr, 5); | |
if (!$fp) { | |
echo "$errstr ($errno)"; | |
return false; | |
} | |
$header = "GET $url HTTP/1.1\r\n"; | |
$header.="Host: $hostname\r\n"; |
NewerOlder