`
文章列表

carriverwave

    博客分类:
  • gems
# "lib/carrierwave/uploader/store.rb" 42       def store_path(for_file=filename) 43         File.join([store_dir, full_filename(for_file)].compact) 44       end [194, 203] in /home/wenbo/.rvm/gems/ruby-1.9.3-rc1@files-server/gems/carrierwave-0.5.8/lib/carrierwave/uploader/versions.rb   ...

gdb tips

file ex1 用file命令加载调试时所需的符号表,然后再通过“attach”命令进行连接: (gdb) at 2412 show args run b 8 info break(i b) run(r) continue(c) step(s) break(b) gcc -gdwarf-2 -g3 sample.c -o sample -gdwarf-version 默认的level值是2, level 3包含更多的信息, ...
sudo ifconfig wlan0 down sudo iwconfig wlan0 mode ad-hoc sudo iwconfig wlan0 essid “yingouqlj” sudo ifconfig wlan0 192.168.0.1 netmask 255.255.255.0 sudo iptables -F sudo iptables -P INPUT ACCEPT sudo iptables -P FORWARD ACCEPT sudo iptables -t nat -A POSTROUTING -o etho -j MASQUERADE sudo iptables ...

sinatra tips

request.env = {"GATEWAY_INTERFACE"=>"CGI/1.1", "PATH_INFO"=>"/requests/4eccb0b4931a5621dd000001/fulfill", "QUERY_STRING"=>"request%5Bstatus%5D=done&request%5Bcomment_body%5D=done+body", "REMOTE_ADDR"=>"127.0.0. ...
man 3 puts axel -n 10 http://valgrind.org/downloads/valgrind-3.6.1.tar.bz2 md5sum valgrind-3.6.1.tar.bz2

sentence notes

the install will be incredibly easy.

chef

knife client list knife node list knide cookbook list knife cookbook site list knife node run_list add HOSTNAME 'recipe[quick_start]' knife node show HOSTNAME -r A node is a host that runs the Chef client. To configure your workstation as a chef client, you just need to copy this directory to ...

vim recipes notes

To save the changes in the current file then quit use : x. In Normal mode you use ZZ :help snipMate

taglist

    博客分类:
  • vim
TlistToggle help helptags > indent < unindent Shifts text right. Shifts text left. Using <Ctrl>+] to jump to a new tag takes you to a new buffer to show the results. If you'd rather see them in a new window use <Ctrl>+W+], or :stag tag. If you get dizzy after all this jumping arou ...

ubuntu tips

How to install Chromium on Ubuntu Open your /etc/apt/sources.list file ! gksudo gedit /etc/apt/sources.list Add these lines at the very bottom of it: deb http://ppa.launchpad.net/chromium-daily/ppa/ubuntu intrepid main deb-src http://ppa.launchpad.net/chromium-daily/ppa/ubuntu intrepid main then uplo ...

datamapper tips

    博客分类:
  • gems
model.storage_name(self.name) [236, 245] in /gems/dm-core-1.2.0.rc1/lib/dm-core/model.rb    236      #   the storage name (ie., table name, for database stores) associated with    237      #   this resource in the given repository    238      #    239      # @api public    240      def storage_name ...

DataMapper::Validations

    博客分类:
  • gems
25 module DataMapper 26   module Validations 27 28     Model.append_inclusions self 29 30     def self.included(model) 31       model.extend ClassMethods 32     end 33 34     # Ensures the object is valid for the context provided, and otherwise 35     # throws :halt and returns false. 3 ...

cucumber load sequence

    博客分类:
  • BDD
"/home/wenbo/workspace/github/fuck/features/support/env.rb:32:in `<top (required)>'", "/home/wenbo/.rvm/gems/ruby-1.9.2-p290@fuck/gems/cucumber-1.0.6/lib/cucumber/    rb_support/rb_language.rb:143:in `load'", "/home/wenbo/.rvm/gems/ruby-1.9.2-p290@fuck/gems/cucumber-1.0 ...

forwardable.rb

    博客分类:
  • ruby
# #   forwardable.rb - #   $Release Version: 1.1$ #   $Revision: 31833 $ #   by Keiju ISHITSUKA(keiju@ishitsuka.com) # original definition by delegator.rb #       Revised by Daniel J. Berger with suggestions from Florian Gross. # #       Documentation by James Edward Gray II and Gavin Sinclair # # ...

nokogiri

    博客分类:
  • ruby
       ### 240       # Create a builder with an existing root object.  This is for use when 241       # you have an existing document that you would like to augment with 242       # builder methods.  The builder context created will start with the 243       # given +root+ node. 244       # 245       ...
Global site tag (gtag.js) - Google Analytics