Skip to content

Instantly share code, notes, and snippets.

View liwh's full-sized avatar
🎯
Focusing

robie lee liwh

🎯
Focusing
View GitHub Profile
ct "字母"
shift + %
form 嵌套form冲突
//得到你的from
var form = document.forms[ 'yourForm '];
//在这里手工指定提交给哪个ACTION
form.action = 'updateAction.do ';
//执行SUBMIT
form.submit();
⌘T – Go to File
⇧⌘T – Go to Symbol – This works in the same way as Go to File but for within a specific file.
⌘L – Go to Line
⇧⌘L – Select Line
⌃⌘ + ARROW – Move Code
⇧⌃⌥V – Send selected to Pastie – Send the selected code over to Pastie with a private URL for sharing the code.
⌃S – Simple Search – Most folks know about ⌘F as it’s the same in most applications. This shortcut allows you to do a quick search in the current file iteratively.
⌘] and ⌘[ – Block indentation.
⌥⌘[ - Format Selection.
⇧⌃T – To-do list – This feature scans the project for code marked as ‘FIXME’, ‘TODO’ and ‘CHANGED’.
➜ ~ cd workplace/shopqi
➜ shopqi git:(master) vagrant up
[default] Provisioning enabled with chef_solo...
[default] Importing base box 'lucid32-shopqi'...
[default] Matching MAC address for NAT networking...
[default] The guest additions on this VM do not match the install version of
VirtualBox! This may cause things such as forwarded ports, shared
folders, and more to not work properly. If any of those things fail on
this machine, please update the guest additions and repackage the
box.
[default] /usr/local/rvm/gems/ruby-1.9.2-p180/gems/chef-0.9.12/lib/chef/mixin/command.rb:184:in `handle_command_failures': stderr
[default] : : stderr
[default] /etc/init.d/unicorn-vagrant stop returned 1, expected 0: stderr
[default] (: stderr
[default] Chef::Exceptions::Exec: stderr
[default] )
: stderr
[default] ---- Begin output of /etc/init.d/unicorn-vagrant stop ----
STDOUT: timeout: run: unicorn-vagrant: (pid 18739) 37s, want down, got TERMSTDERR:
---- End output of /etc/init.d/unicorn-vagrant stop ----
Unix中的screen是个多元化多功能的全屏窗口管理器,习惯了你会觉得它比windows的任务栏好用多了。
下面是.screenrc文件,仅供参考。
#
# ~/.screenrc
#
# 启动时不显示欢迎屏幕
startup_message off
# 定义screen的功能键为Ctrl-Z。向终端输入Ctrl-Z时应按 Ctrl-Z z。
escape ^Zz
# 屏幕缓冲区 1024 行。
@liwh
liwh / gist:891944
Created March 29, 2011 07:32
the config of screenrc
#
# Example of a user's .screenrc file
#
# http://www.orkut.com/CommMsgs.aspx?cmm=1988&tid=4
# This is how one can set a reattach password:
# password ODSJQf.4IJN7E # "1234"
multiuser on
@liwh
liwh / gist:894109
Created March 30, 2011 09:13
reload functon for zsh completion
#when we create new function or install new bin , the default zsh cant get the new completion for us,so we
#can add a new function for this problem,you can add the blow content in your .zshrc file
function reload() {
if [[ "$#*" -eq 0 ]]; then
test -r /etc/zsh/zsh-oli && . /etc/zsh/zsh-oli
test -r ~/.zshrc && . ~/.zshrc
return 0
else
local fn
for fn in $*; do
[default] [Wed, 30 Mar 2011 23:07:25 -0700] DEBUG: ---- Begin output of /etc/init.d/nginx status ----
[Wed, 30 Mar 2011 23:07:25 -0700] DEBUG: STDOUT: run: nginx: (pid 2914) 1662s; run: log: (pid 648) 1812s
[Wed, 30 Mar 2011 23:07:25 -0700] DEBUG: STDERR:
[Wed, 30 Mar 2011 23:07:25 -0700] DEBUG: ---- End output of /etc/init.d/nginx status ----
[Wed, 30 Mar 2011 23:07:25 -0700] DEBUG: Ran /etc/init.d/nginx status returned 0
[default] /usr/local/rvm/gems/ruby-1.9.2-p180/gems/chef-0.9.12/lib/chef/provider/service.rb:91:in `action_reload': stderr
[default] : : stderr
[default] #<Chef::Provider::Service::Debian:0xa9bfb40> does not support :reload: stderr
[default] (: stderr
[default] Chef::Exceptions::UnsupportedAction: stderr
Started POST "/products/upload" for 10.0.2.2 at 2011-04-02 09:32:59 -0700
Processing by ProductsController#upload as HTML
Parameters: {"authenticity_token"=>"BzEqlVKPZdsgez1zKBBlFa6sF/TVrQGq+wWIlv5XASI=", "id"=>"4d974f7f5585d322a1000004", "photo"=>{"file"=>#<ActionDispatch::Http::UploadedFile:0xb157434 @original_filename="252320434a6.jpg", @content_type="image/jpeg", @headers="Content-Disposition: form-data; name=\"photo[file]\"; filename=\"252320434a6.jpg\"\r\nContent-Type: image/jpeg\r\n", @tempfile=#<File:/tmp/RackMultipart20110402-8865-71g0vl>>}}
MONGODB shopqi_development['users'].find({:_id=>BSON::ObjectId('4d974c8e5585d34c3c000001')})
MONGODB shopqi_development['stores'].find({:_id=>BSON::ObjectId('4d974c8e5585d34c3c000002')})
MONGODB shopqi_development['products'].find({"store_id"=>BSON::ObjectId('4d974c8e5585d34c3c000002'), :_id=>BSON::ObjectId('4d974f7f5585d322a1000004')})
qi_development['products'].update({"_id"=>BSON::ObjectId('4d974f7f5585d322a1000004')}, {"$pushAll"=>{"photos"=>[{"_id"=>BSON