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 | |
machine_type=f1-micro | |
image=ubuntu-14-04 | |
gcloud compute instances create shadowsocks-1 \ | |
--can-ip-forward --image $image --restart-on-failure \ | |
--zone asia-east1-b --machine-type $machine_type \ | |
--metadata-from-file startup-script=bin/shadowsocks-startup.sh |
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
/*genarate javascript namspace function*/ | |
var _ns= {}; | |
_ns.genNameSpace= function(path, loseMe){ | |
var reg = /^[_$a-z]+[_$a-z0-9]*/i; | |
var nsAr = path.split('.'); | |
var stringCommond = ""; | |
var stringNS = ""; | |
var n = loseMe ? nsAr.length - 1 : nsAr.length; | |
for (var i = 0; i < n; i++){ | |
if(!reg.test(nsAr[i])) { |
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
2016/11/25 09:47:39 [19567] params.c:Parameter() - Ignoring badly formed line in config file: ignore errors | |
2016/11/25 09:47:39 [19567] name lookup failed for 119.162.158.222: Name or service not known | |
2016/11/25 09:47:39 [19567] connect from UNKNOWN (119.162.158.222) | |
2016/11/25 01:47:39 [19567] rsync on ftpuserhome/13/test/ from rsyncer@UNKNOWN (119.162.158.222) | |
2016/11/25 01:47:39 [19567] building file list | |
2016/11/25 01:47:39 [19567] 2016/11/25 01:47:39 119.162.158.222 ftpuserhome 13/test/1234.jpg 83186 | |
2016/11/25 01:47:39 [19567] sent 83,292 bytes received 55 bytes total size 83,135 | |
2016/11/25 09:53:21 [19640] params.c:Parameter() - Ignoring badly formed line in config file: ignore errors | |
2016/11/25 09:53:21 [19640] name lookup failed for 119.162.158.222: Name or service not known | |
2016/11/25 09:53:21 [19640] connect from UNKNOWN (119.162.158.222) |
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); |
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
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
#! /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
#!/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
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/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 |