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 print_lua_table (lua_table, indent) | |
indent = indent or 0 | |
for k, v in pairs(lua_table) do | |
if type(k) == "string" then | |
k = string.format("%q", k) | |
end | |
local szSuffix = "" | |
if type(v) == "table" then | |
szSuffix = "{" | |
end |
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
--- Stubs for entity.* callbacks defined in C++. | |
-- | |
-- DO NOT INCLUDE this file in your scripts, it is for documentation purposes only. | |
-- | |
-- Entity callbacks query and mutate the specific entity that is running the | |
-- lua script. They can be called from a _different_ entity using | |
-- world.callScriptedEntity(targetEntityId, "entity.*"), replacing "*" with the | |
-- name of a function defined below. | |
-- | |
-- Specific types of entities (e.g. NPCs, Objects) define different sets of |
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
Coreseek (Sphinx) for MySQL 数据源 安装教程 | |
1. 下载源代码 | |
$ wget http://www.coreseek.cn/uploads/csft/3.2/coreseek-3.2.13.tar.gz | |
$ tar xzf coreseek-3.2.13.tar.gz | |
$ cd coreseek-3.2.13 | |
2. 中文测试环境检查: |
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 | |
# | |
# chkconfig: 2345 55 25 | |
# Description: Nginx init.d script, put in /etc/init.d, chmod +x /etc/init.d/nginx | |
# For Debian, run: update-rc.d -f nginx defaults | |
# For CentOS, run: chkconfig --add nginx | |
# | |
### BEGIN INIT INFO | |
# Provides: nginx | |
# Required-Start: $all |
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
Shadowsocks 启动脚本 | |
# insserv -v -d /etc/init.d/shadowsocks | |
===================== | |
#!/bin/sh | |
### BEGIN INIT INFO | |
# Provides: shadowsocks | |
# Required-Start: $local_fs $remote_fs $network $syslog | |
# Required-Stop: $local_fs $remote_fs $network $syslog |
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 | |
PATH=/bin:/sbin:/usr/bin:/usr/sbin:/usr/local/bin:/usr/local/sbin | |
export PATH | |
#定义变量 | |
#授权文件自动生成url | |
APX=http://soft.91yun.org/soft/serverspeeder/apx1.php | |
#安装包下载地址 | |
INSTALLPACK=http://soft.91yun.org/soft/serverspeeder/91yunserverspeeder.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
#! /bin/sh | |
### BEGIN INIT INFO | |
# Provides: supervisord | |
# Required-Start: $remote_fs | |
# Required-Stop: $remote_fs | |
# Default-Start: 2 3 4 5 | |
# Default-Stop: 0 1 6 | |
# Short-Description: Example initscript | |
# Description: This file should be used to construct scripts to be | |
# placed in /etc/init.d. |
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
1. 装个 sysv-conf-rc | |
2. sudo update-rc.d -f mysql remove 删除mysql随机器启动的服务 | |
sudo update-rc.d -f apache2 remove 删除apache2随机器启动的服务 | |
3. 查看/etc/rc2.d/里面的apache和mysql启动脚本,通常都是两个阿拉伯数字后再接一个英文字母,再加脚本名称。英文字母 是S的都是会自动启动的,K则相反。所以只要找到apache和mysql的启动脚本,把S改成K就可以了 |
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
# use UTF8 | |
set -g utf8 | |
set-window-option -g utf8 on | |
# make tmux display things in 256 colors | |
#set -g default-terminal "screen-256color" | |
# set scrollback history to 10000 (10k) | |
set -g history-limit 10000 |
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 | |
$key = '11345678901234561234567890123456'; | |
$iv = '1234567890123456'; | |
$method = "AES-256-CBC"; | |
$options = OPENSSL_RAW_DATA; | |
$text = "Really"; | |
$pkc_encoder = new PKCS7Encoder(); | |
$text = $pkc_encoder->encode($text); | |
$res = openssl_encrypt($text, $method, $key, $options, $iv); | |
echo "pkcs7: " . bin2hex($text); |
OlderNewer