05 2016 档案

摘要:https://godoc.org https://github.com/avelino/awesome-go 命令源码文件(main)与库源码文件处同一代码包中,不能go build /go install, 同一代码包中可以有多个命令源码文件,可以go run,但不能build/install, 阅读全文

posted @ 2016-05-27 18:14 anjuncc 阅读(189) 评论(0) 推荐(0)

摘要:https://nodejs.org/api/ require(‘./xx/xx’) 多次require只执行一次 ; .node结尾二进制模块 常用module fs/iconv-lite/child_process domain 模块,可以简化异步代码的异常处理 阅读全文

posted @ 2016-05-26 11:43 anjuncc 阅读(81) 评论(0) 推荐(0)

摘要:gem 'devise'rails g devise:install Userrails g devise Userrails g devise:views 阅读全文

posted @ 2016-05-24 13:29 anjuncc 阅读(131) 评论(0) 推荐(0)

摘要:variable @fontAwesomeEotPath_iefix is undefined rails generate bootstrap:install如果还有错,保证在加载主提之前import ,比如在loader.less中导入 阅读全文

posted @ 2016-05-23 18:25 anjuncc 阅读(98) 评论(0) 推荐(0)

摘要:bundle gem xxxrake build gem push pkg/xxx.gem rake releaserake install 阅读全文

posted @ 2016-05-22 15:39 anjuncc 阅读(85) 评论(0) 推荐(0)

摘要:git clean -df #清除add前的内容 git reset --hard 阅读全文

posted @ 2016-05-21 15:50 anjuncc 阅读(69) 评论(0) 推荐(0)

摘要:1> sudo apt-get -y install autoconf automake build-essential git libass-dev libgpac-dev libsdl1.2-dev libtheora-dev libtool libva-dev libvdpau-dev libvorbis-dev libx11-dev libxext-dev libxfixes-de... 阅读全文

posted @ 2016-05-20 11:22 anjuncc 阅读(141) 评论(0) 推荐(0)

摘要:bundle package #保存gem到 vendor/cache bundle install –local 从cache从安装 升级rails bundle config –delete bin rake rails:updatein git add bin rails console >> 阅读全文

posted @ 2016-05-18 17:41 anjuncc 阅读(102) 评论(0) 推荐(0)

摘要:export PYTHON_BUILD_MIRROR_URL="http://pyenv.qiniudn.com/pythons/" 阅读全文

posted @ 2016-05-17 13:32 anjuncc 阅读(94) 评论(0) 推荐(0)

摘要:remote connect #bind-address = 127.0.0.1 #skip-networking grant all privileges on *.* to 'root'@'%' identified by 'xxx' with grant option; flush privi 阅读全文

posted @ 2016-05-17 11:18 anjuncc 阅读(78) 评论(0) 推荐(0)

摘要:ri #rdoc reader attr_reader attr_writer @@xx 类变量都是私有的 def 类名.xx end 类方法 [1,3,5,7].inject(0){|sum,e| sum+e} String 8bit字节序列 #{expr} 全局变量,类变量,实例变量,{}可省略 %q %Q Debug ruby –r debug t.rb 14 ruby t.rb... 阅读全文

posted @ 2016-05-13 18:18 anjuncc 阅读(102) 评论(0) 推荐(0)

摘要:11.2 listing object’s method Oject.methods/singleton_methods/instance_methods 指定类名定义的方法在 singleton_methods MyClass.method_defined? :my_instance_method MyClass.respond_to? :my_singleton_method for... 阅读全文

posted @ 2016-05-12 17:03 anjuncc 阅读(116) 评论(0) 推荐(0)

摘要:一 对象模型 kernel Module Kernel.private_instance_methods.grep(/^pr/) private method 1 如果一个方法接收者不是你自己,一定要指定一个接收者 2 私有方法 只能指定一个隐含接收者(可调超类的私有方法) 类本身是Class类的对象。类的名字是个常量 Class<Module,模块和类的名字扮演目录角色,... 阅读全文

posted @ 2016-05-12 12:13 anjuncc 阅读(221) 评论(0) 推荐(0)

摘要:rake -T 列出全部taskconfig.active_record.schema_format = :sql #remove the old db/schema.rb file, create db/structure.sql 阅读全文

posted @ 2016-05-05 13:48 anjuncc 阅读(185) 评论(0) 推荐(0)

摘要:symbol 不能有- 'data-turbolinks-track' => true stop rails –s kill -INT $(cat tmp/pids/server.pid) class A puts "foobar" end 装入A类时,输出foobar object.call_method === object.__send__(:call_m... 阅读全文

posted @ 2016-05-02 23:41 anjuncc 阅读(80) 评论(0) 推荐(0)

导航