06 2014 档案

摘要:$ sudo apt-get install p7zip$ p7zip -d aaa.7z 阅读全文
posted @ 2014-06-25 15:59 冰凌花花~ 阅读(754) 评论(0) 推荐(0)
摘要:How to use thelikequery with Mongoid . Basically I wanted something like the familiar SQL query:SELECT * FROM Apps WHERE name LIKE ‘%aaa%’I couldn’t f... 阅读全文
posted @ 2014-06-25 11:00 冰凌花花~ 阅读(456) 评论(0) 推荐(0)
摘要:http://blog.csdn.net/kunshan_shenbin/article/details/7249713http://api.rubyonrails.org/classes/ActionView/Helpers/FormBuilder.html#method-i-fields_for... 阅读全文
posted @ 2014-06-20 20:45 冰凌花花~ 阅读(613) 评论(0) 推荐(0)
摘要:http://guides.rubyonrails.org/routing.html#crud-verbs-and-actionscreates seven different routes in your application, all mapping to thePhotoscontrolle... 阅读全文
posted @ 2014-06-20 20:22 冰凌花花~ 阅读(249) 评论(0) 推荐(0)
摘要:[31] pry(main)> 'packages'.classify=> "Package"[33] pry(main)> 'packages'.classify.constantize=> Package[40] pry(main)> hash = {key: 'value'}=> {:key=... 阅读全文
posted @ 2014-06-20 20:11 冰凌花花~ 阅读(283) 评论(0) 推荐(0)
摘要:http://git-scm.com/book/en/Customizing-Git-Git-Configuration$ git config --global core.editor vim 阅读全文
posted @ 2014-06-19 21:38 冰凌花花~ 阅读(203) 评论(0) 推荐(0)
摘要:http://www.skorks.com/2009/09/ruby-exceptions-and-exception-handling/Rescuing Exceptions Inside MethodsIf we are inside a method and we want to rescue... 阅读全文
posted @ 2014-06-19 21:05 冰凌花花~ 阅读(133) 评论(0) 推荐(0)
摘要:vim route.rb resources :fetched_apps do member do patch :import end end spring rake routes recommend_apps GET /recommend_apps(.:fo... 阅读全文
posted @ 2014-06-19 16:34 冰凌花花~ 阅读(196) 评论(0) 推荐(0)
摘要:https://github.com/peleteiro/progressbargem install progressbargem 'progressbar', '~> 0.21.0'% irb --simple-prompt -r progressbar>> pbar = ProgressBar... 阅读全文
posted @ 2014-06-18 20:02 冰凌花花~ 阅读(196) 评论(0) 推荐(0)
摘要:join(string, ...) Returns a new string formed by joining the strings using File::SEPARATOR.File.join("usr", "mail", "gumby") #=> "usr/mail/gumby"rea... 阅读全文
posted @ 2014-06-18 19:22 冰凌花花~ 阅读(132) 评论(0) 推荐(0)
摘要:http://mongoid.org/en/mongoid/docs/querying.html#querieshttp://docs.mongodb.org/manual/reference/operator/query-comparison/gt大于, gte大于等于,lt小于, lte小于等于... 阅读全文
posted @ 2014-06-18 14:46 冰凌花花~ 阅读(278) 评论(0) 推荐(0)
摘要:在controller里加入binding.pry, then turn to the server terminalrails runner script/aaa.rb 阅读全文
posted @ 2014-06-16 20:53 冰凌花花~ 阅读(113) 评论(0) 推荐(0)
摘要:$ vim /home/wangzheng/.ssh/configHost 10.103.xx.xx HostName 10.103.xx.xxUser root Port 22022 $ ssh 10.103.xx.xxThe authenticity of host '[10.103.xx... 阅读全文
posted @ 2014-06-16 11:55 冰凌花花~ 阅读(317) 评论(0) 推荐(0)
摘要:如果新提交的分支代码和master有冲突,先checkout到分支merge master,解决冲突,然后再checkout master,merge 分支.(1) git checkout edit_package_page git merge master --no-ff这时候会看到很多CO... 阅读全文
posted @ 2014-06-16 11:28 冰凌花花~ 阅读(1935) 评论(0) 推荐(0)
摘要:http://ruby-doc.org/core-2.1.2/Regexp.htmlRegexpARegexpholds a regular expression, used to match a pattern against strings. Regexps are created using ... 阅读全文
posted @ 2014-06-13 18:29 冰凌花花~ 阅读(737) 评论(0) 推荐(0)
摘要:Basic GitHub CheckoutThis will get you going with the latest version of rbenv and make it easy to fork and contribute any changes back upstream.Check ... 阅读全文
posted @ 2014-06-13 17:45 冰凌花花~ 阅读(275) 评论(0) 推荐(0)
摘要:top命令进程太多,实时的只查看所有的系统运行的ruby的进程:top -d 1 -p `pgrep -d, ruby` 阅读全文
posted @ 2014-06-13 16:16 冰凌花花~ 阅读(219) 评论(0) 推荐(0)
摘要:Form 的样式,可以参考http://getbootstrap.com/css/#forms "form-control" %> "form-control"%> "form-cont... 阅读全文
posted @ 2014-06-13 16:13 冰凌花花~ 阅读(742) 评论(0) 推荐(0)
摘要:http://docs.mongodb.org/manual/reference/command/renameCollection/db.source-namespace.renameCollection( "target" )比如把users 替换成 all_usersdb.users.renam... 阅读全文
posted @ 2014-06-13 16:00 冰凌花花~ 阅读(1597) 评论(0) 推荐(0)
摘要:http://guides.rubyonrails.org/asset_pipeline.htmlRails 官方的 Assets Pipeline 文档,解释了 Rails 中对静态资源(javascript, css 以及图片)的管理方式: 0, :title => "修改"), edit_pa... 阅读全文
posted @ 2014-06-11 21:32 冰凌花花~ 阅读(176) 评论(0) 推荐(0)
摘要:Execute shell commandsThere are a number of different ways to run shell commands from Ruby.TheexeccommandKernel#execreplaces the current process and r... 阅读全文
posted @ 2014-06-11 21:00 冰凌花花~ 阅读(287) 评论(0) 推荐(0)
摘要:今天遇到了个小问题,console里没有报错,但是表单不能提交,猜测是验证的问题,后来跟PP确认了下.+ validate_virtual_name_exists = (value, element) ->+ result = value != null && value != ''... 阅读全文
posted @ 2014-06-10 19:20 冰凌花花~ 阅读(160) 评论(0) 推荐(0)
摘要:/workspace/ott_app_store:fetch-xml$ git branch edit_package_page/workspace/ott_app_store:fetch-xml$ git checkout masterSwitched to branch 'master'/wor... 阅读全文
posted @ 2014-06-09 16:49 冰凌花花~ 阅读(1489) 评论(0) 推荐(0)
摘要:vim ~/.bashrc# git branch show configurationPS1="\\w:\$(git branch 2>/dev/null | grep '^*' | colrm 1 2)\$ "现在重新打开一个终端,就能看到所在的分支啦. 阅读全文
posted @ 2014-06-09 16:45 冰凌花花~ 阅读(383) 评论(0) 推荐(0)
摘要:django程序的html页面中form的method='post'的时候报错Forbidden (403) CSRF verification failed. Request aborted.Help Reason given for failure: CSRF token missing or ... 阅读全文
posted @ 2014-06-08 23:55 冰凌花花~ 阅读(944) 评论(0) 推荐(0)
摘要:$django-admin.py startproject web2$cd web2/$python manage.py startapp blog$vim web2/settings.py 注意settings.py以下两个部分,首先要配置数据库,其次要在INSTALLED_APP里添加刚才新建的... 阅读全文
posted @ 2014-06-07 23:01 冰凌花花~ 阅读(348) 评论(0) 推荐(0)
摘要:$mysqlERROR 2002 (HY000): Can't connect to local MySQL server through socket '/tmp/mysql.sock' (2)$service mysqld status-bash: service: command not fo... 阅读全文
posted @ 2014-06-07 21:52 冰凌花花~ 阅读(217) 评论(0) 推荐(0)
摘要:angela@angeladeMacBook-Air:/data/db$mongoMongoDB shell version: 2.6.1connecting to: test2014-06-07T11:13:21.349+0800 warning: Failed to connect to 127... 阅读全文
posted @ 2014-06-07 11:30 冰凌花花~ 阅读(1851) 评论(0) 推荐(0)
摘要:个人博客http://www.iwangzheng.com/$git log --graph$git reset --hard 67889898...$ssh-add$git pull --rebase$git fetch (相当于pull新分支)$git branch (查看当前所在分支)$git... 阅读全文
posted @ 2014-06-06 13:36 冰凌花花~ 阅读(236) 评论(0) 推荐(0)
摘要:个人博客地址: http://www.iwangzheng.com/推荐一本非常好的书 :http://iissnan.com/progit/构造干净的 Git 历史线索 http://codecampo.com/topics/379git pull=git fetch+git mergeagain... 阅读全文
posted @ 2014-06-06 13:30 冰凌花花~ 阅读(289) 评论(0) 推荐(0)
摘要:$mail选择对应的数字查看邮件File "/opt/app/python/tv-cms-for-ch/current/scripts/sync_cms_for_ch.py",line 4, in ?from ConnectionParams import *File"/opt/app/python... 阅读全文
posted @ 2014-06-04 15:35 冰凌花花~ 阅读(436) 评论(0) 推荐(0)