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使用笔记 | |
### 1 首先 安装vim | |
安装vim很简单的命令 | |
```shell | |
sudo apt-get install vim | |
``` | |
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 push remote(name) :branch_name(分支名称) | |
删除git远程分支 |
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
checking for Ruby version >= 1.8.5... yes | |
checking for gcc... yes | |
checking for Magick-config... no | |
Can't install RMagick 2.13.1. Can't find Magick-config | |
---------------------- | |
sudo apt-get install libmagickwand-dev | |
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
The hash of ruby1.9 is different from ruby1.8, it has new grammar, but also support the older grammar. |
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
=render :partial=>"info",:collection=>@articles,:as=>:article |
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
I have lost it for a long time, when i pick it again, i find it's hard to remember all the things that i have hold in hand. when i see my chinese english, i feel unhapppy! |
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
require 'zip/zipfilesystem' | |
require 'zip/zip' | |
require 'uuidtools' | |
# 导出host中的所有附件到一个zip文件中 | |
def export_attachments | |
zip_path = Dir::tmpdir + '/'+ UUID.random_create.to_s + ".zip" | |
zip = Zip::ZipFile.open(zip_path, Zip::ZipFile::CREATE) | |
self.attachments.each do |attachment| | |
zip.add("文件名","源文件路径") | |
end |
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
今天客服来了电话,问我收到了么 |
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
333333 |
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
def hello | |
p "hello:" | |
end |