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
water = ice + fire | |
water = egg + hourglass | |
fire : final | |
earth : final | |
air : final | |
steam = water + fire | |
steam = water + energy | |
lava = earth + fire | |
pressure = earth + earth | |
pressure = air + air |
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
termcap vt102 '' | |
hardstatus on | |
hardstatus alwayslastline | |
hardstatus string '%{=b}%{b}%-w%{.BW}%10>[%n %t]%{-}%+w%< %=%{G}%H %{-b}%{w}%Y/%m/%d %c:%s' | |
vbell off | |
defscrollback 1000 | |
windows | |
# 退出vim/nano之后自动刷新屏幕 | |
altscreen on |
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 | |
#以下信息请自行修改 | |
MYSQL_DIR=/usr/local/mysql #mysql目录 | |
MYSQL_USER=root #mysql用户名 | |
MYSQL_PASS=123456 #mysql密码 | |
BACKUP_DIR=/backup #存放备份文件的目录 | |
#以上信息自行修改 | |
#定义数据库的名字和旧数据库的名字 | |
DataBakName=Data_$(date +”%Y%m%d”).tar.gz |
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
// lineSpliter project main.go | |
package main | |
import ( | |
"bufio" | |
"fmt" | |
"os" | |
"path/filepath" | |
"strconv" | |
"strings" |
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
// ScreenCloser project main.go | |
package main | |
import ( | |
"syscall" | |
"time" | |
) | |
const ( | |
SC_MONITORPOWER = 0xF170 |
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 | |
/** | |
* 简单自动部署 | |
* bitbucket POST hook http://horsley:anypassword@your_host/autodeploy.php | |
*/ | |
define('APP_PATH', dirname(__FILE__)); | |
if (php_sapi_name() != 'cli') { | |
if (!isset($_SERVER['PHP_AUTH_USER'])) { | |
header('WWW-Authenticate: Basic realm="My Realm"'); | |
header('HTTP/1.0 401 Unauthorized'); |
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 | |
/** | |
* 简单文件缓存 | |
* @author: horsley | |
* @version: 2013-11-04 | |
*/ | |
class Cache { | |
//内存缓存,跟磁盘缓存保持一致格式 | |
//消耗内存,但可减少一次请求内的磁盘io次数,并加速读取(命中时) |
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 | |
/** | |
* 获取本系统存放的目录 对应的url | |
* 当本系统部署在非站点根目录的时候 需要使用本函数获取系统根目录对应url | |
* 其后没有斜杠 | |
* @access public | |
* @return string | |
*/ | |
function get_baseurl() { |
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
// gitpull project main.go | |
package main | |
import ( | |
"fmt" | |
"io" | |
"net/http" | |
"os" | |
"os/exec" | |
"path/filepath" |
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/sbin/php | |
<?php | |
/* | |
* Rsync备份脚本 | |
*/ | |
set_time_limit(0); | |
date_default_timezone_set('Asia/Shanghai'); | |
define('CONF_SRC', 'backup_src'); | |
define('CONF_DST', 'backup_dest'); |