Archive for the ‘Linux’ Category

3 01 2013


bigCat Posted in Linux - 1 Comment

via [ubuntu] How do I open or close network ports - Ubuntu Forums.\r\n\r\n \r\n\r\nsudo netstat -ntlup\r\n\r\n绑定在127.0.0.1的端口,在外部机器是无法访问的\r\n\r\n干哦... weinre

2 01 2013

如何在 Ubuntu 上設定 node.js 的開發環境

bigCat Posted in Linux, JavaScript - 0 Comment

via 如何在 Ubuntu 11.04 上設定 node.js 的開發環境 | DreamersLab.\r\n\r\n \r\n\r\n安裝 node.js\r\n\r\n# install git\r\n\r\n$ sudo apt-get install git\r\n\r\n# clone repo\r\n\r\n$ git clone git:// ~/.nvm\r\n\r\n# enable on terminal open\r\n\r\n$ echo ". ~/.nvm/" >> ~/.bashrc\r\n\r\n# reopen your terminal and do the following\r\n\r\n$ nvm install v0.8.16\r\n\r\n# set default node\r\n\r\n$ nvm alias default v0.8.16\r\n\r\n \r\n\r\n安裝 mongodb\r\n\r\n# switch to super user\r\n\r\n$ sudo su\r\n\r\n# add 10gen GPG key\r\n\r\n$ apt-key adv --keyserver --recv 7F0CEB10\r\n\r\n# add to source.list for using upstart to manage mongodb\r\n\r\n$ echo "deb dist 10gen" >> /etc/apt/sources.list\r\n\r\n# install\r\n\r\n$ apt-get update\r\n\r\n$ apt-get install mongodb-10gen\r\n\r\n$ exit

28 08 2012

.htaccess 判断域名做跳转

bigCat Posted in Linux, WordPress - 0 Comment
RewriteCond %{HTTP_HOST}$ [NC]\r\nRewriteRule ^(.*)$$1 [L,R=301]


16 07 2012


bigCat Posted in Linux - 0 Comment

grep -r $'\xEF\xBB\xBF' .\r\n找到那个文件有BOM 改掉就好了\r\n\r\nvia chenyundong

15 07 2012

php whoami

bigCat Posted in Linux, PHP - 0 Comment
<?php\r\necho "Output of the 'whoami' command:<br /><br />";\r\necho exec('/usr/bin/whoami');\r\n?>
Host: (miao) | Word: Press | Code: HTML5