1.lang translate
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
<!doctype html> | |
<html lang="en"> | |
<head> | |
<title>JavaScript Patterns</title> | |
<meta charset="utf-8"> | |
</head> | |
<body> | |
<script src="https://ajax.googleapis.com/ajax/libs/jquery/1.7.1/jquery.min.js"></script> | |
<script> | |
/*! |
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
<!doctype html> | |
<html lang="en"> | |
<head> | |
<title>JavaScript Patterns</title> | |
<meta charset="utf-8"> | |
</head> | |
<body> | |
<script> | |
/*! | |
* jQuery extend-based plugin boilerplate |
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
#vim中删除技巧 | |
:%s/[Ctrl-v][Enter]//g 删除DOS方式的回车^M | |
:%s= *$== 删除行尾空白 | |
:%!sort -u 删除重复行 | |
:%s/^.{-}pdf/new.pdf/ 只是删除第一个pdf | |
:%s/// 删除多行注释 | |
:g/^$/d 删除所有空行 | |
:g!/^dd/d 删除不含字符串'dd'的行 | |
:v/^dd/d 删除不含字符串'dd'的行 |
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
http://plumgo.cc/blog/2012/01/05/ssd-optimization-on-ubuntu-note/ | |
1. /etc/fstab | |
1). / 目录参数: discard,noatime,nodiratime,errors=remount-ro 0 1 | |
2). 其他 | |
tmpfs /tmp tmpfs defaults,noatime,mode=1777 0 0 | |
tmpfs /var/tmp tmpfs defaults,noatime,mode=1777 0 0 | |
tmpfs /var/log tmpfs defaults,noatime,mode=1777 0 0 |
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
#在httpd.conf的最底部添加此代码 | |
#在106行去掉#号,变成:LoadModule rewrite_module modules/mod_rewrite.so | |
#### | |
## http://lamp.linux.gov.cn/Apache/ApacheMenu/vhosts/mass.html#simple.rewrite | |
#### | |
# 从"Host:"头获取主机名 | |
UseCanonicalName Off | |
# 可分拣的日志 | |
LogFormat "%{Host}i %h %l %u %t \"%r\" %s %b" vcommon |
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
;[Menu.Left]项的最后面添加以下代码 | |
Type: item; Caption: "www directory"; Action: shellexecute; FileName: "F:/"; Glyph: 2 | |
Type: item; Caption: "httpd.conf"; Glyph: 6; Action: run; FileName: "scite"; parameters:"F:/wamp/apache2/conf/httpd.conf" | |
Type: item; Caption: "php.ini"; Glyph: 6; Action: run; FileName: "scite"; parameters: "F:/wamp/apache2/bin/php.ini" | |
Type: item; Caption: "my.ini"; Glyph: 6; Action: run; FileName: "scite"; parameters: "F:/wamp/mysql/my.ini" | |
Type: item; Caption: "host"; Glyph: 6; Action: run; FileName: "scite"; parameters: "C:\WINDOWS\system32\drivers\etc\hosts" | |
Type: item; Caption: "Exit"; Action: multi; Actions: myexit; |
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 | |
file_put_contents('wp.tar.gz',file_get_contents('http://wordpress.org/latest.tar.gz')); | |
exec('tar -xf wp.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
http://wiki.ubuntu.org.cn/UbuntuSkills | |
* 通过ssh传输文件 | |
scp -rp /path/filename username@remoteIP:/path #将本地文件拷贝到服务器上 | |
scp -rp username@remoteIP:/path/filename /path #将远程文件从服务器下载到本地 | |
tar cvzf - /path/ | ssh username@remoteip "cd /some/path/; cat -> path.tar.gz" #压缩传输 | |
tar cvzf - /path/ | ssh username@remoteip "cd /some/path/; tar xvzf -" #压缩传输一个目录并解压 | |
rsync -avh /path/to/file/or/dir user@host:/path/to/dir/or/file | |
rsync -avh user@host:/path/to/file/or/dir /path/to/file/or/dir |
To add a SFTP-only user, you'll need to make sure your SSH config settings are correct, add a new user/group and set permissions for your new user. For step-by-step directions, see below. Omit sudo
if you're logged in as root.
-
Edit
/etc/ssh/sshd_config
and make sure to add the following at the end of the file:Match group filetransfer
ChrootDirectory %h