lovedan
3/17/2016 - 5:06 AM

Mac 配置文件收藏

Mac 配置文件收藏|-|&tag=Mac

'.source.coffee':
  'Require underscore':
    'prefix': 'r_'
    'body': "_ = require('underscore')$1"
  'Require Backbone':
    'prefix': 'rb'
    'body': "Backbone = require('backbone')$1"
  'Require jQuery':
    'prefix': 'rj'
    'body': "$ = require('jquery')$1"
  'Require sharify':
    'prefix': 'rs'
    'body': "sd = require('sharify').data$1"
  'Console log':
    'prefix': 'c'
    'body': 'console.log ${1:true}$2'
  'Debugger':
    'prefix': 'd'
    'body': 'debugger$1'
'.source.js':
  'Require underscore':
    'prefix': 'r_'
    'body': "_ = require('underscore');$1"
  'Require Backbone':
    'prefix': 'rb'
    'body': "Backbone = require('backbone');$1"
  'Require jQuery':
    'prefix': 'rj'
    'body': "$ = require('jquery');$1"
  'Require sharify':
    'prefix': 'rs'
    'body': "sd = require('sharify').data;$1"
  'Console log':
    'prefix': 'c'
    'body': 'console.log(${1:true});$2'
  'Debugger':
    'prefix': 'd'
    'body': 'debugger;$1'
'.source.jade':
  'Console log':
    'prefix': 'c'
    'body': '- console.log(${1:true});$2'
  'Debugger':
    'prefix': 'd'
    'body': '- debugger$1'


<?xml version="1.0" ecoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" 
 "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
   <dict>
      <key>Label</key>
           <string>jopper.proxy.polipo</string>
      <key>RunAtLoad</key>
           <true/>
      <key>KeepAlive</key>
           <true/>
      <key>ProgramArguments</key>
           <array>
              <string>/usr/local/bin/polipo</string>
              <string>socksParentProxy=localhost:1080</string>
           </array>
    </dict>
</plist>
  
<!-- 
  copy plist 到 ~/Library/LaunchAgents/ 目录下 
  launchctl load xxxx.plist 立即加载并执行 plist 文件
-->
- 删除dock缓存 rm ~/Library/Preferences/com.apple.dock.{db,plist}

- 重启dock killall -KILL Dock

- 创建连接 ln -s "/Users/JiangNan/Documents/图片制作/" /Users/JiangNan/Dropbox/Temp/图片制作
- Flush DNS cache dscacheutil -flushcache sudo killall -HUP mDNSResponder
- /System/Library/Frameworks/CoreServices.framework/Versions/A/Frameworks/LaunchServices.framework/Versions/A/Support/lsregister -kill -r -domain local -domain system -domain user   清理无效重复右键菜单
- /System/Library/Frameworks/CoreServices.framework/Versions/A/Frameworks/LaunchServices.framework/Versions/A/Support/lsregister -f /Applications/VMware\ Fusion.app/ 清理无效重复右键菜单
- lsof -i tcp:80   lsof -i 4TCP | grep 80 查看占用端口情况
- sudo defaults write /Library/Preferences/com.apple.loginwindow SHOWOTHERUSERS_MANAGED -bool FALSE 删除安装Server出现的其它用户

- 建立端口转发
    - lsof -c socat | grep LISTEN
    - socat -d -d -lf /var/log/socat.log TCP4-LISTEN:13389,reuseaddr,fork,su=nobody TCP4:192.168.1.209:3389 &
    - lsof -c socat | egrep 'LISTEN|UDP'
    - socat UDP4-RECVFROM:500,fork UDP4-SENDTO:192.168.1.209:500
    - socat UDP4-RECVFROM:4500,fork UDP4-SENDTO:192.168.1.209:4500
    - lsof -i udp | egrep 'isakmp|ipsec-msft' #500,4500端口占用

- Mac环境变量 export PATH=/Applications/MAMP/bin/php/php5.5.26/bin:/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin:
- SVN 关闭服务 killall -9 svnserve 启动服务 svnserve -d -r /Users/SVN/