This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <div class="wrap"> | |
| <div class="hack"> | |
| <div class="cnt"> | |
| content | |
| </div> | |
| </div> | |
| </div> | |
| /* CSS 部分的代码实现:整体代码参见上述 demo*/ | |
| .wrap{ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| ## IMPORTANT | |
| **Support for Rails 2.3-style plugins (vendor/plugins!) will be | |
| removed in Rails 4.0. Move them out and bundle them in your Gemfile, | |
| or fold them in to your app as lib/myplugin/* and | |
| config/initializers/myplugin.rb** | |
| ## CHANGES since RC1 | |
| *ActionMailer* |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| ENV["WATCHR"] = "1" | |
| system 'clear' | |
| def growl(message) | |
| growlnotify = `which growlnotify`.chomp | |
| title = "Watchr Test Results" | |
| image = message.include?('0 failures, 0 errors') ? "~/.watchr_images/passed.png" : "~/.watchr_images/failed.png" | |
| options = "-w -n Watchr --image '#{File.expand_path(image)}' -m '#{message}' '#{title}'" | |
| system %(#{growlnotify} #{options} &) | |
| end |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| $ cd /usr/src | |
| $ wget http://nginx.org/download/nginx-0.8.52.tar.gz | |
| $ tar xzvf ./nginx-0.8.52.tar.gz | |
| $ rm ./nginx-0.8.52.tar.gz | |
| $ gem install s3sync capistrano capistrano-ext passenger --no-ri --no-rdoc | |
| $ passenger-install-nginx-module | |
| # Automatically download and install Nginx? 2. No: I want to customize my Nginx installation | |
| # Where is your Nginx source code located?: /usr/src/nginx-0.8.52 | |
| # Where do you want to install Nginx to?: /opt/nginx |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| http://127.0.0.1:8080/solr/update?stream.body=%3Cdelete%3E%3Cquery%3E*:*%3C/query%3E%3C/delete%3E&commit=true |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| sudo mount -t cifs //Win7/shared -o username=User,password=Password /mnt/shared |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| let mapleader = "," | |
| "-------------------------------------------------------- | |
| "" highline current line & column | |
| " DOES NOT WORK with colorscheme solarized and blackboard | |
| " "-------------------------------------------------------- | |
| set cursorline | |
| set cursorcolumn | |
| highlight cursorline term=underline cterm=underline ctermbg=0 gui=NONE guibg=Grey40 | |
| if has("autocmd") | |
| " current line |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # 0. Make sure you have Ruby 1.9.3 installed, and optionally RVM and PostgreSQL | |
| # 0.2 If you are on the Mac, make sure you have a c compiler by installing XCode Command Line Tools or gcc4.2 with homebrew | |
| # https://github.com/mxcl/homebrew/wiki/Custom-GCC-and-cross-compilers | |
| # 0.5 Make sure you have bundler version ~> 1.2 as Rails depends on it | |
| gem install bundler | |
| # 1. Get edge Rails source (master branch) | |
| git clone https://github.com/rails/rails.git |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| When you start vim like that, you don't get a vim client, the text editor is using the terminal or cmd prompt - the two files are in two different buffers. Use :ls to list the buffers: | |
| :ls | |
| 1 %a "foo" line 6 | |
| 2 "bar" line 0 | |
| The %a is the active buffer. You can use :b2 to switch to buffer 2 or use :bn to cycle to the next or :bp for previous. I prefer (CTRL-W v) to split windows vertically, rather than (CTRL-W s), which splits horizontally. | |
| If you have 2 files loaded & no tabs (yet), you can, :tabnew and in the new tab type :b2 | |
| If you want to always have buffers loaded into their own tabs, check out this article. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| color molokai | |
| nmap <F8> :TagbarToggle<CR> | |
| " ctrl + s save current file | |
| imap <C-s> <Esc>:w<CR>:echo expand("%f") . " saved."<CR> | |
| vmap <C-s> <Esc>:w<CR>:echo expand("%f") . " saved."<CR> | |
| nmap <C-s> <Esc>:w<CR>:echo expand("%f") . " saved."<CR> | |
| " alt + q quit current buffer | |
| imap <A-q> <Esc>:q<CR> |