`

命令记录

阅读更多
直接打开一个PPT
“....\Microsoft office\OFFICE11\PPTVIEW.EXE" /k /a ***.ppt


命令拷备
scp -r -P3333 ~/.vim user@192.168.0.1:/home/user


生成 git key
ssh-keygen -d


重启rails服务
#!/bin/bash
ps -Af | grep "script/server webrick -p 3003 -d" | kill -9 `awk {'print $2'}`
ruby ./script/server webrick -p 3003 -d


mysql
IFNULL(expr1,expr2) 
如果expr1不是NULL,IFNULL()返回expr1,否则它返回expr2

sql = <<-SQL
  UPDATE ruku_bill_lis
  LEFT JOIN products ON products.id = ruku_bill_lis.product_id
  SET ruku_bill_lis.remuneration_price = products.remuneration_price
  WHERE ruku_bill_lis.remuneration_price IS NULL
SQL
records_count = ActiveRecord::Base.connection.update(sql)
amount = ActiveRecord::Base.connection.select_one(sql)["amount"].to_f


查看网络路由信息
nslookup


分享到:
评论

相关推荐

Global site tag (gtag.js) - Google Analytics