# 创建项目, 会在当前目录下创建 blog 文件夹
composer create-project laravel/laravel blog
# 进入项目文件夹
cd blog
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
中文输入法: | |
我用的是QQ五笔,但在编辑模式中输入中文时,常常会触发MacVim的命令,原因是输是输入法没有完全截获按键; | |
解决方法:在命令行输入以下命令, | |
defaults write org.vim.MacVim MMUseInlineIm 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
git clone https://github.com/fivesheep/chnroutes.git | |
python chnroutes.py -p mac | |
sudo cp ip-up /etc/ppp | |
sudo cp ip-down /etc/ppp | |
sudo chmod a+x ip-up ip-down |
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
for remote in `git branch -r `; do git branch --track $remote; done | |
git remote update | |
git pull --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
git clone git://github.com/andrew13/Laravel-4-Bootstrap-Starter-Site.git $1 cd $1 | |
composer install --dev | |
php artisan migrate | |
php artisan db:seed | |
php artisan serve | |
open http://localhost:8000 |
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
curl ipinfo.io |
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
# 切换到 rvm 的目录 | |
cd $rvm_path/gems | |
# 查找 gemfile | |
find . -type f -name "Gemfile" | |
# 类似于 | |
vi $rvm_path/gems/ruby-2.0.0-p247/gems/railties-4.0.0/lib/rails/generators/rails/app/templates/Gemfile |
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
$gem server | |
会启动一个gem服务器。在我电脑上是找个提示: | |
$ gem server | |
Server started at http://0.0.0.0:8808 | |
Server started at http://[::ffff:0.0.0.0]:8808 | |
假设其IP为192.168.10.1然后在其他机器上,(注意绑定的IP是0.0.0.0,也就是这台机器上的所有IP都绑定上了,包括192.168.10.1 和回环地址 127.0.0.1 ),用如下命令安装 |
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
$ telnet gateway.sandbox.push.apple.com 2195 | |
Trying 17.149.34.135... | |
Connected to gateway.sandbox.push-apple.com.akadns.net. | |
Escape character is '^]'. |
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
$data = 'http://www.putclub.com'; | |
$size = '200x200'; | |
$logo = './1.jpg'; // 中间那logo图 | |
// 通过google api生成未加logo前的QR图,也可以自己使用RQcode类生成 | |
$png = 'http://chart.googleapis.com/chart?chs=' . $size . '&cht=qr&chl=' . urlencode($data) . '&chld=L|1&choe=UTF-8'; | |
$QR = imagecreatefrompng($png); | |
if($logo !== FALSE) | |
{ |