幻刈紫真 至简大道
HUYIZIZHEN · 共 42 篇文章
multi user RVM install
For a Multi-User install you would execute the following: $ curl -L https://get.rvm.io | sudo bash -s stable install path: /usr/local/rvm source ~/.bashrc 重新加载修改过的bash配置文件 type rvm | head -1:如显示rvm is a shell function则说明RVM安装成功 rvm -v 显示当前rvm 版本 rvm list known 显示当前可用的ruby版本 rvmsudo rvm install 2.0.…
2013-03-06 06:38 · ROR · 评论(0)
how to set default editor for BUNDLER_EDITOR (zsh)
for Ubuntu 12.10 I'm using zsh and rvm, EDITOR variable is set in ~/.zprofile with EDITOR=subl
2013-01-26 15:54 · ROR · 评论(0)
解决方法:To open a bundled gem, set $EDITOR or $BUNDLE EDITOR
To open a bundled gem, set $EDITOR or $BUNDLE EDITOR 解决方法: export EDITOR=gedit
2012-12-03 09:51 · ROR · 评论(0)
MongoDB 注册到windows系统服务
注册MongoDB为系统服务(此步骤必须以系统管理员身份运行cmd,否则会报错) 以系统管理员身份运行cmd输入并切换至MongoDB的bin目录运行以下语句 mongod.exe --dbpath=d:\mongodb\db --logpath=d:\mongodb\logs\mongodb.log --install --serviceName "MongoDB" 回车 如果控制台出现类似Tue Oct 09 12:05:15 Service can be started from the command line with 'net start MongoDB'这样的语句,说明服务已经…
2012-11-25 13:02 · 数据库 · 评论(0)
Ruby on rails 创建基于Rspec项目
1. 首先 $ rails new sample_app --skip-test-unit 2. 在Gemfile中添加 gem 'rspec-rails', '2.11.0' gem 'factory_girl_rails','1.4.0' gem 'capybara' 3. $ bundle install 4. $ rails generate rspec:install 5. 创建一个Controller $ rails generate controller StaticPages home help --no-test-framework controller生成要代参数 --n…
2012-11-21 11:11 · ROR · 评论(0)
mongoDB replicaSet 复制集模式 多台机器连接配置
rails 中 mongoid.yml hosts: - - 172.18.6.80 - 27017 - - 172.18.6.80 - 27018 - - 172.18.6.80 - 27019 - - 172.18.6.81 - 27017 - - 172.18.6.81 - 27018 - - 172.18.6.81 - 27019
2012-11-19 17:10 · 数据库 · 评论(0)
Ubuntu 下添加eclipse 至dash home
Name=Eclipse Comment=Eclipse IDE Exec=/opt/eclipse/eclipse Icon=/opt/eclipse/icon.xpm Terminal=false Type=Application Categories=Application;Development;
2012-11-12 10:56 · ubuntu linux · 评论(0)
git 常用命令
Git常用操作命令收集: 1) 远程仓库相关命令 检出仓库:$ git clone git://github.com/jquery/jquery.git 查看远程仓库:$ git remote -v 添加远程仓库:$ git remote add [name] [url] 删除远程仓库:$ git remote rm [name] 修改远程仓库:$ git remote set-url --push[name][newurl] 拉取远程仓库:$ git pull [remotename] [localbranchname] 推送远程仓库:$ git push [remotename] [lo…
2012-10-31 16:16 · git · 评论(0)
javascript常用的107个语句
1.document.write(“”); 输出语句 2.JS中的注释为// 3.传统的HTML文档顺序是: document->html->(head,body) 4.一个浏览器窗口中的DOM顺序是: window->(navigator,screen,history,location,document) 5.得到表单中元素的名称和值: document.getElementById(“表单中元素的ID号”).name(或value) 6.一个小写转大写的JS: document.getElementById(“output”).value=document.getElementById(…
2012-10-31 12:43 · javascript · 评论(0)
rails date format
1.Time#strftime 2. time.strftime( string ) => string 3. 4. Formats _time_ according to the directives in the given format 5. string. Any text not listed as a directive will be passed through 6. to the output string. 7. 8. Format meaning: 9. 10. %a - The abbreviated weekday name ("Sun") 11. %A - The…
2012-10-22 14:53 · ROR · 评论(0)
mongoDB 入门
转载自 http://www.cnblogs.com/hoojo/archive/2011/06/01/2066426.html 一、准备工作 1、 下载mongoDB 下载地址:http://www.mongodb.org/downloads 选择合适你的版本 相关文档:http://www.mongodb.org/display/DOCS/Tutorial 2、 安装mongoDB A、 不解压模式: 将下载下来的mongoDB-xxx.zip打开,找到bin目录,运行mongod.exe就可以启动服务,默认端口27017,db保存的路径是系统C硬盘目录的根目录的/data/db目录。也…
2012-09-29 10:50 · 数据库 · 评论(0)
Android 开发无法获取SDK更新
试试在hosts文件中添加 74.125.237.1 dl-ssl.google.com 74.125.237.1 dl.google.com
2012-09-06 15:06 · android · 评论(0)
CSS3文字燃烧特效示例
<!DOCTYPE html> <html> <head> <meta http-equiv="Content-Type" content="text/html; charset=utf-8"/> <title>CSS3文字燃烧特效示例</title> <style type="text/css"> body { background-color:#333; } h1 { margin-top: 24px; font-size: 2em; color:#fff; } h2 { margin-top: 36px; font-size: 3em; } p { margin-top: 24px; …
2012-08-30 17:41 · web美化 · 评论(0)
mongodb数据库操作语法
01 mongo –path 02 db.AddUser(username,password) 添加用户 03 db.auth(usrename,password) 设置数据库连接验证 04 db.cloneDataBase(fromhost) 从目标服务器克隆一个数据库 05 db.commandHelp(name) returns thehelpforthe command 06 db.copyDatabase(fromdb,todb,fromhost) 复制数据库fromdb—源数据库名称,todb—目标数据库名称,fromhost—源数据库服务器地址 07 db.createColl…
2012-08-14 15:26 · 数据库 · 评论(0)
MongoDB 应用简介
MongoDB 从入门到精通专题教程 最近有好多同事都在用mongodb,一个新的面向文档型介于面向对象与关系型之间免费的数据库,据说有拥有比传统数据库更高的性能。趁今天早上有空,就研究了一下。 首先上mongodb官网(www.mongodb.org)看了一下开始文档,下了个windows版的,装了一下,并且写了几个简单的例子,测试了一下,经过测试,mongodb确实好用,也很简单,当然其中也遇到了很多问题,因此为了能让以后的同学们更好的入门,所以做一个简单的介绍。如果你想尽快入门,则可以按照如下的步骤进行。 1,安装并启动数据库 从官网(www.mongodb.org/downloads…
2012-08-09 16:49 · ubuntu linux · 评论(0)