该文被密码保护。 阅读全文
posted @ 2014-01-17 18:27 纵情向前.... 阅读(0) 评论(0) 推荐(0) 编辑
该文被密码保护。 阅读全文
posted @ 2014-01-16 22:50 纵情向前.... 阅读(1) 评论(0) 推荐(0) 编辑
摘要: 1,查api的相关部分,下周叫Z坐我旁边改,改好才放人走。2,年会的事宜占了大半天。3,闪存不能玩,刷来刷去时间就过去了。4,基本虚度的一天。5,发现脑残无救,再这么跟脑残一起,我也是个脑残了。 阅读全文
posted @ 2014-01-16 18:42 纵情向前.... 阅读(96) 评论(0) 推荐(0) 编辑
摘要: 1, Ubuntu安装gitsudo apt-get install git-core2, Redhat安装gitsudo yum install git-all3, ruby和SHELL沟通ifconfig = `/sbin/ifconfig` #``为反引号,1旁边的那个键,用来引用SHELL下的指令,非常方便,返回命令执行后的response给ifconfigip = /[\d{2}.]{4}/.match(ifconfig)4, 数组赋值array = %w{it is like you are back from the dead}=> ["it", &qu 阅读全文
posted @ 2014-01-15 18:37 纵情向前.... 阅读(171) 评论(0) 推荐(0) 编辑
摘要: 用户注册#!/usr/bin/env ruby require 'net/http'require 'json'username = "tester"password = "123123"client_id = "36a059f1dd8b5565b9b12"register_url = URI("http://drhel31.com/api/user/1.0/json/register") register_user = Net::HTTP.post_form(register_ur 阅读全文
posted @ 2014-01-14 15:19 纵情向前.... 阅读(288) 评论(0) 推荐(0) 编辑
摘要: 1, Ruby的正则表达式以"//"作为构造方法。表达式返回一个RegExp的对象。 /a/.class #返回类型regexp a= /test/.match("you are the tester") #返回MatchData的对象,即匹配到的字符,如果不匹配返回nil,所以a=test 匹aqv("you are the tester")=~/tester/ #返回匹配的字符串的位置, 如此例的为12 d=/(\w+),(\w+),(\w+)\./.match("123Jack,wang,mrs., to be a b 阅读全文
posted @ 2014-01-10 18:19 纵情向前.... 阅读(183) 评论(11) 推荐(0) 编辑
该文被密码保护。 阅读全文
posted @ 2014-01-09 23:49 纵情向前.... 阅读(13) 评论(0) 推荐(0) 编辑
摘要: 1,问题驱动,要什么又拿不到,解决之,过程即是学习和理解问题的机会。2,在redhat下 rpm -q ruby #查看是否安装了ruby. wget http://ftp.ruby-lang.org/pub/ruby/2.0/ruby-2.0.0-p247.tar.gz #下载源码 tar -zxvf ruby-2.0.0-p247.tar.gz #解压 cd ruby-2.0.0-p247 ./configure --prefix=/usr/local --enable-shared --enable-pthread --disable-install-doc --with-opt-d.. 阅读全文
posted @ 2014-01-07 17:57 纵情向前.... 阅读(844) 评论(0) 推荐(0) 编辑
摘要: 问题:ubuntu中vi在编辑状态下方向键不能用,无法进入编辑模式,还有回格键不能删除。解决办法:可以安装vim full版本,在full版本下键盘正常,安装好后同样使用vi命令。安装vim:ubuntu预装的是vim tiny版本,而需要的是vim full版本。执行下面的语句安装vim full版本: $sudo apt-get remove vim-common $sudo apt-get install vim #实际上,我只是安装了这个命令,VI就能正常用了,没有执行上面的命令。来源: http://hongzhguan.iteye.com/blog/1479563 阅读全文
posted @ 2014-01-06 19:40 纵情向前.... 阅读(194) 评论(6) 推荐(0) 编辑
摘要: 1, bash --version #查看bash的版本。 echo $BASH_VERSION #同样可以用来查看bash的版本。2, df -h (为什么是h,人类可读啊,human-readable.多生动,一下子就让人记住了) free 显示内存的使用情况。free -b, -m, -g,-k,分别对应bytes,GB,MB,KB. du -h 显示某目录下文件大小。 du -h 目录名/文件件/3, 安装man中文手册的方法 sudo apt-get install manpages-zh sudo vi /etc/manpath.config将所有的/usr/share/man替换 阅读全文
posted @ 2014-01-04 17:10 纵情向前.... 阅读(175) 评论(0) 推荐(0) 编辑