import urllib2,os; pf='Package Control.sublime-package'; ipp=sublime.installed_packages_path(); os.makedirs(ipp) if not os.path.exists(ipp) else None; urllib2.install_opener(urllib2.build_opener(urllib2.ProxyHandler())); open(os.path.join(ipp,pf),'wb').write(urllib2.urlopen('http://sublime.wbond.net/'+pf.replace(' ','%20')).read()); print 'Please restart Sublime Text to finish installation'
This file contains hidden or 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
设置时区 | |
ec2实例和国外vps默认的时区都是当地的,不适合国内使用,通过手动修改自己的时区 | |
ln -sf /usr/share/zoneinfo/Asia/Shanghai /etc/localtime | |
date一下看看已经更改过来了 |
This file contains hidden or 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
在导出数据之前,先设置两个值 max_allowed_packet 128M~256M或者更大,参考内存的使用量;net_buffer_length 一般设置成16384。在使用mysqldump导出数据的时候增加两个三个参数 -e --max_allowed_packet=128M --=net_buffer_length=16384 | |
This file contains hidden or 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
$ wget http://tengine.taobao.org/download/tengine-1.3.0.tar.gz | |
$ wget http://download.savannah.gnu.org/releases/libunwind/libunwind-1.0.1.tar.gz | |
$ wget http://gperftools.googlecode.com/files/gperftools-2.0.tar.gz | |
$ tar zxvf libunwind-1.0.1.tar.gz && cd libunwind-1.0.1 | |
$ CFLAGS=-fPIC ./configure | |
$ make CFLAGS=-fPIC | |
$ sudo make CFLAGS=-fPIC install | |
$ cd .. |
This file contains hidden or 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
package { | |
"nginx": | |
ensure => installed, | |
} | |
package { | |
"ssh": | |
ensure => "present" | |
} |
This file contains hidden or 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
### Hadoop 伪分布式开发环境 | |
##### 创建账号 Hadoop账号 | |
<pre> | |
groupadd hadoop | |
mkdir /home/hadoop | |
useradd -g hadoop -d /home/hadoop -s /bin/bash hadoop | |
passwd hadoop |
This file contains hidden or 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
git config --global user.name github101 | |
git config --global user.email "[email protected]" | |
git config --global core.editor "subl -w" | |
git config --global github.user github101 | |
git config --global core.autocrlf true |