批量拉取git最新代码

//~/auto_update.php ini_set('date.timezone','PRC'); function checkNetwork(){ $hostname = 'git.example.com'; $ip = gethostbyname($hostname); if(!$ip || $ip === $hostname) { return false; } else { return true; } } function

AngularJS拦截$http请求

$httpProvider.interceptors.push(['$q',function ($q) { return { request: function (config) { if(config.url==='/admin.php') { return $q.reject('no auth!'); } return config; }, responseError: function(rejection) { if(rejection=

flex-box布局上下分栏

.testbox{ position: relative; height:300px; border: 4px solid green; width: 400px; } .flex-rows { display: flex; flex-direction: column; position: absolute; top:0; left:0; right:0; bottom:0; } .flex-rows nav{ background-color: #ccc; } .flex-rows article { background-color:

shell批量从多台机器拷日志

ips=(192.168.1.101 192.168.1.102) proj=$1; if [ !$proj ];then proj='test' echo -n 'Enter project name (default=test):' read proj fi if [ $proj ];then

HTML语义

* header 头 * footer 尾 * nav 导航 * article 文章 * section 段落 * aside 与内容无关的,比如侧栏