⌘T | go to file |
⌘⌃P | go to project |
⌘R | go to methods |
⌃G | go to line |
⌘KB | toggle side bar |
⌘⇧P | command prompt |
This file contains 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
# copy to ~/.bash_profile | |
# | |
# xTerm-256color | |
export LS_OPTIONS='--color=auto' | |
export CLICOLOR='Yes' | |
export LSCOLORS='Exfxcxdxbxegedabagacad' | |
# Modify Terminal Prompt and Color | |
case $(id -u) in | |
0) |
This file contains 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
<!-- copy this to YOUR_THEME.tmTheme--> | |
<dict> | |
<key>name</key> | |
<string>diff: deleted</string> | |
<key>scope</key> | |
<string>markup.deleted</string> | |
<key>settings</key> | |
<dict> | |
<key>background</key> | |
<string>#EAE3CA</string> |
This file contains 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
tell application "Finder" to set theFile to POSIX path of (selection as alias) | |
tell application "Finder" to set fileExtension to name extension of (selection as alias) |
解决方案来自:[Apple Support Communities] (https://discussions.apple.com/thread/3275811?start=0&tstart=0)
- 连接 VPN Cisco IPSec (让系统生成配置文件)
- 拷贝配置文件到
/etc/racoon
打开终端执行:
$ sudo cp /var/run/racoon/xxx.xxx.xxx.xxx.conf /etc/racoon
- 修改 racoon 配置文件:
$ sudo vim /etc/racoon/racoon.conf
- 将最后一行注释掉(目的是不使用系统生成配置):
# include "/var/run/racoon/*.conf" ;
- 将下面一行添加到文件末尾,包含分号(使用定制的配置文件):
This file contains 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
on vpnToggle(vpnName) | |
tell application "System Events" | |
tell current location of network preferences | |
set VPNservice to service vpnName | |
set isConnected to connected of current configuration of VPNservice | |
if isConnected then | |
disconnect VPNservice | |
do shell script "./ip-down" with administrator privileges | |
else | |
do shell script "./ip-up" with administrator privileges |
This file contains 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
<!-- This depth of field effect uses SVG filters in CSS3 it currently only works in Chrome --> | |
<div id="photoframe"> | |
<img id="full" src="https://dl.dropbox.com/u/32918455/camera%20pics/full.png" /> | |
<img class="blurable" data-blurindex="10" id="fullblur" src="https://dl.dropbox.com/u/32918455/camera%20pics/full.png" /> | |
<img class="blurable" data-blurindex="8" id="lenses" src="https://dl.dropbox.com/u/32918455/camera%20pics/lens.png" /> | |
<img class="blurable" data-blurindex="6" id="cameras" src="https://dl.dropbox.com/u/32918455/camera%20pics/camera.png" /> | |
<img class="blurable" data-blurindex="4" id="film" src="https://dl.dropbox.com/u/32918455/camera%20pics/film.png" /> | |
<img class="blurable" data-blurindex="2" id="filters" src="https://dl.dropbox.com/u/32918455/camera%20pics/filters.png" /> | |
<img class="blurable" data-blurindex="0" id="loupes" src="https://dl.dropbox.com/u/32918455/camera%20pics/loupe.png" usemap="loupemap" /> | |
<map id="loupemap" name="loupemap"> |
This file contains 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
Show hidden characters
[ | |
{ "keys": ["ctrl+n"], "command": "move", "args": {"by": "lines", "forward": true} } | |
] |
This file contains 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
# toggle iTerm Dock icon | |
# add this to your .bash_profile or .zshrc | |
function toggleiTerm() { | |
pb='/usr/libexec/PlistBuddy' | |
iTerm='/Applications/iTerm.app/Contents/Info.plist' | |
echo "Do you wish to hide iTerm in Dock?" | |
select ync in "Hide" "Show" "Cancel"; do | |
case $ync in | |
'Hide' ) |
OlderNewer