bundle 在安装gem时,在默认的情况下,是会下载安装gem附带的ri与rdoc,gem安装的越多,那么rdoc就会占用了我们大量的硬盘空间;配置如下:
vim ~/.gemrc
# 添加如下即可
gem: --no-ri --no-rdoc赞!
bundle 在安装gem时,在默认的情况下,是会下载安装gem附带的ri与rdoc,gem安装的越多,那么rdoc就会占用了我们大量的硬盘空间;配置如下:
vim ~/.gemrc
# 添加如下即可
gem: --no-ri --no-rdoc赞!
| 导出: | |
| mysqldump -uroot db_name > tmp/db_name | |
| 导入: | |
| 进入mysql数据库控制台, | |
| 如mysql -u root -p | |
| mysql>use 数据库; | |
| 然后使用source命令,后面参数为脚本文件(如这里用到的.sql) | |
| mysql>source SQL的文件目录; |
https://help.github.com/articles/generating-ssh-keys
ssh-keygen -t rsa -C "[email protected]"
eval `ssh-agent -s`| netstat -nltp |
貌似最新版本的依赖安包包,还是挺多的。
http://nokogiri.org/tutorials/installing_nokogiri.html
If this is a concern for you and you want to use the system library instead, abort this installation process and reinstall nokogiri as follows:
gem install nokogiri -- --use-system-libraries
lanrion dummy (master) $ 4rs
bin/rails:6: warning: already initialized constant APP_PATH
/Users/lanrion/Projects/mygems/retrench/test/dummy/bin/rails:6: warning: previous definition of APP_PATH was here
Error: Command '-p' not recognized
Usage: rails COMMAND [ARGS]
The most common rails commands are:
generate Generate new code (short-cut alias: "g")
console Start the Rails console (short-cut alias: "c")| https://github.com/harrisj/qrencoder | |
| 依赖包 | |
| for ubuntu | |
| sudo apt-get install qrencode libqrencode-dev | |
| gem install qrencoder | |
| for mac | |
| brew install qrencode | |
| gem install qrencoder -- -- with-qrencoder-include=/usr/local/Cellar/qrencode/3.4.3_1/include --with-qrencoder-lib=/usr/local/Cellar/qrencode/3.4.3_1/lib |
有一个简单的需求:
数据库有一个表User(id, name),需要导出:
{
id1 => name1,
id2 => name2
}| http://git-scm.com/book/en/Git-Basics-Tagging | |
| git tag -a v1.5 -m 'my version 1.5' | |
| git push origin v1.5 |
I run this command to find and replace all occurrences of 'apple' with 'orange' in all files in root of my site
find ./ -type f -exec sed -i -e 's/apple/orange/g' {} \;