@yangjiandong
2014-07-14T06:01:21.000000Z
字数 11343
阅读 4484
ios 安装
获取 Homebrew
ruby -e "$(curl -fsSL https://raw.github.com/Homebrew/homebrew/go/install)"
brew tap phinze/homebrew-cask && brew install brew-cask
查找软件包
brew search wget
安装软件包
brew install wget
列出已安装的软件包
brew list
删除软件包
brew remove wget
查看软件包信息
brew info wget
列出软件包的依赖关系
brew deps wget
更新brew
brew update
列出过时的软件包(已安装但不是最新版本)
brew outdated
更新过时的软件包(全部或指定)
brew upgrade 或 brew upgrade wget
remove old version
brew cleanup $FORMULA
or clean up everything at once:
brew cleanup
to see what would be cleaned up:
brew cleanup -n
proxy, edit ~/.curlrc
socks5='http://127.0.0.1:8103'
markdown 编辑器
brew cask install mou
Hydra
是一个轻量级窗口管理器,具有强大的API和非常小的footprint,可轻松修改OS X桌面环境。wiki
brew cask install itemr2
brew cask install mplayerx
firefox
安全性和隐私 :打开安全的任何来源
java
http://www.oracle.com/technetwork/java/javase/downloads/jdk8-downloads-2133151.html
http://download.oracle.com/otn-pub/java/jdk/8u5-b13/jdk-8u5-macosx-x64.dmg
thunder :
brew cask install thunder
中文输入法
qq拼音
brew cask install alfred
brew install p7zip
// zip
cd xx
7za a xx.zip
// unzip
7z x file.7z
How to install
Relocate the HexColorPicker.colorPicker file to either of these places:
For installation only in your account:
Copy or move the file to...
[your home folder] → Library → ColorPickers
How to use
Bring forward the usual Color panel. (This may appear as "Show Colors" in various menus, or may be brought up when you click a color for editing.)
Click the Hex Color Picker icon (a # mark on a blue-tinted circle) at the top of the window.
Use the text field to type in or copy the hex code for the current color, or use the standard Color panel facilities (including other pickers) to tune the color to what you want.
以下方式有效
Launch AppleScript and type the following in the editor pane: choose color
, Save (⌘S) the ‘script’ in your Applications folder, making sure to choose ‘Application’ from the file format dropdown
iStat Menus 4.0.2 可用序列号:
raoi-gpgm-tfmg-197631-761867505-4
jfun-zhci-dxkh-426161-1659470934-4
lsbl-ljdv-avpr-18411-72023832-4
mwjh-hxub-kgwo-112407-444120057-4
svuw-sqwc-apfz-334267-1355118418-4
timw-htva-dizc-229500-903082500-4
For Vim configuration and use, create the following symlinks:
ln -s ~/.dotfiles/vim ~/.vim
ln -s ~/.dotfiles/vim/vimrc ~/.vimrc
ln -s ~/.dotfiles/vim/gvimrc ~/.gvimrc
install packageControl,The console is accessed via the ctrl+` shortcut or the View > Show Console menu.
import urllib.request,os,hashlib; h = '7183a2d3e96f11eeadd761d777e62404' + 'e330c659d4bb41d3bdf022e94cab3cd0'; pf = 'Package Control.sublime-package'; ipp = sublime.installed_packages_path(); urllib.request.install_opener( urllib.request.build_opener( urllib.request.ProxyHandler()) ); by = urllib.request.urlopen( 'http://sublime.wbond.net/' + pf.replace(' ', '%20')).read(); dh = hashlib.sha256(by).hexdigest(); print('Error validating download (got %s instead of %s), please try manual install' % (dh, h)) if dh != h else open(os.path.join( ipp, pf), 'wb' ).write(by)
package
MarkdownEditing
Bracket Highlighter - 类似于代码匹配,可以匹配括号,引号等符号内的范围
theme
slush
sloarized
0-4
defaults -currentHost write -globalDomain AppleFontSmoothing -int 3
cd
tar xvf dotfiles.tar.gz
For zsh configuration create the following symlinks:
ln -s ~/.dotfiles/zsh ~/.zsh
ln -s ~/.dotfiles/zsh/zshrc ~/.zshrc
ln -s ~/.dotfiles/zsh/zshenv ~/.zshenv
ln -s ~/.dotfiles/zsh/zprofile ~/.zprofile
For ssh configuration, create the following symlink:
cd
mkdir .ssh
ln -s ~/.dotfiles/ssh/config ~/.ssh/config
For those machines where zsh isn't installed or won't easily work, create the
following symlinks:
$ ln -s ~/.dotfiles/bash/bash_profile ~/.bash_profile
$ ln -s ~/.dotfiles/bash/bashrc ~/.bashrc
$ ln -s ~/.dotfiles/bash/bash_aliases ~/.bash_aliases
$ ln -s ~/.dotfiles/bash/bash_history ~/.bash_history
edit:
echo "set completion-ignore-case on">>~/.inputrc
brew install bash-completion
Add the following lines to your ~/.bash_profile:
if [ -f $(brew --prefix)/etc/bash_completion ]; then
. $(brew --prefix)/etc/bash_completion
fi
Homebrew's own bash completion script has been installed to
/usr/local/etc/bash_completion.d
Bash completion has been installed to:
/usr/local/etc/bash_completion.d
brew install dos2unix
显示:
defaults write com.apple.finder AppleShowAllFiles -bool true
隐藏:
defaults write com.apple.finder AppleShowAllFiles -bool false
点击苹果电脑屏幕左上角的 Apple 标志,选择“系统偏好设置”,点击“用户与组群”后选择你的“帐户”,然后选择“登陆项”标签。OK,所有随苹果电脑 Mac OS X 系统开机自动加载运行的软件都列出来了,你可以选中一个软件,点击“-”按钮来取消开机自动加载。或是点击“+”按钮从软件列表里添加登陆自动启动的软件项。
For Git configuration and global ignore files, create these symlinks:
$ ln -s ~/.dotfiles/git/gitconfig ~/.gitconfig
$ ln -s ~/.dotfiles/git/gitignore_global ~/.gitignore_global
git config --global core.excludesfile ~/.gitignore_global
出现如下出错信息
Permission denied (publickey).fatal: Could not read from remote repository.
参考
https://help.github.com/articles/generating-ssh-keys
sudo vi /etc/hosts
add:
193.169.1.88 svnserver
这是一个帮您科学上网的 hosts 文件。我们倡导自由的互联网
默认
Google DNS IPv4地址:
8.8.8.8 (google-public-dns-a.google.com)
8.8.4.4 (google-public-dns-b.google.com)
Google DNS IPv6地址:
2001:4860:4860::8888
2001:4860:4860::8844
OpenDNS IPv4地址:
208.67.222.222 (Resolver1.OpenDNS.com)
208.67.220.220 (Resolver2.OpenDNS.com)
208.67.222.220 (Resolver3.OpenDNS.com)
208.67.220.222 (Resolver4.OpenDNS.com)
OpenDNS IPv6地址:
2620:0:ccc::2
2620:0:ccd::2
eclipse + subclipse,采用 javaHL
brew install --universal --java subversion
sudo ln -s /usr/local/lib/libsvnjavahl-1.dylib /Library/Java/Extensions/libsvnjavahl-1.dylib
提示:先用浏览器进行登陆,保存用户名密码
upgrade to 1.7
$ brew tap homebrew/versions
$ brew install subversion17
(不要做,没成功)
brew versions svn
cd /usr/local/Library/Formula/
git checkout 0060dc3 /usr/local/Library/Formula/subversion.rb
brew install svn
-- 没成功
brew update
...
静音
sudo nvram SystemAudioVolume=%80
开启
sudo nvram -d SystemAudioVolume
https://github.com/ohdarling/GoAgentX
edit
/Applications/AppCode.app/Contents/Info.plist
<key>JVMMVersion</key>
<string>1.8*</string>
Username: qoophp.com
===== LICENSE BEGIN =====
54283-12042010
00003JtXHtt8M05x1DIN6Fj!9GtZ1R
!Tf9fvxH9S5dGhx94Y2TPZezhdyio"
X8ZHQ"OROJbvtbESDy160r3MrSNGGG
===== LICENSE END =====
use idea intellij key map,update:
Rated File
ctrl + cmd + 上键
http://devnet.jetbrains.com/thread/434167
建议采用smart completion 方式
~/Library/Preferences/appCode10
Project View -> gear -> Autoscroll to Source
install
gem sources --remove https://rubygems.org/
gem sources -a http://ruby.taobao.org/
sudo gem install cocoapods
用 git 做版本控制的时候,不要把 Podfile.lock 放到 .gitignore 中。(原因 Podfile.lock 会锁定当前所需第三方 library 的版本,之后如果多次执行 "pod install" 不会更改版本,只有执行 "pod update" 才会更改 Podfile.lock。)
cocoaPods 将所有的依赖库都放到另一个名为Pods项目中,然后让主项目依赖Pods项目,这样,源码管理工作都从主项目移到了Pods项目中。发现的一些技术细节有:
java 环境可直接安装
/usr/libexec/java_home -v 1.7
export JAVA_HOME=`/usr/libexec/java_home -v 1.7`
export PATH=${JAVA_HOME}/bin:$PATH
$ echo $JAVA_HOME
/Library/Java/JavaVirtualMachines/jdk1.7.0_45.jdk/Contents/Home
// edit
//~/adt-bundle-mac-x86_64-20140321/eclipse/Eclipse.app/Contents/
sudo edit /Library/Java/JavaVirtualMachines/jdk1.8xx.jdk/Contents/Info.plist
将这部分
<key>JVMCapabilities</key>
<array>
<string>CommandLine</string>
</array>
修改为一下即可:
<key>JVMCapabilities</key>
<array>
<string>JNI</string>
<string>BundledApp</string>
<string>WebStart</string>
<string>Applets</string>
<string>CommandLine</string>
</array>
需重新启动才生效,此时可启动eclipse
终端执行如下命令:
echo 0x2717 >> ~/.android/adb_usb.ini
重启 adb 去DDMS 看看 有啦!!
setup
-MacBook-Pro:~ user
export PATH=$PATH:/Android-SDK/android-sdk-macosx/tools
adb kill-server,adb start-server,adb devices
To force running under JDK 1.7 edit /Applications/.app/Contents/Info.plist file, change JVMVersion from 1.6* to 1.7* :
<key>JVMVersion</key>
<string>1.7*</string>
register:
idea,1590388054-PB2HR-52RNS-63BOR-ZUWCF-86UX0
解决字体发虚问题 xxx.vmoptions
-Dawt.useSystemAAFontSettings=lcd
-Dswing.aatext=true
-Dsun.java2d.xrender=true
edit .bashrc
export _JAVA_OPTIONS='-Dawt.useSystemAAFontSettings=setting'
off,on,lcd ..
好像也不解决问题
remove idea setting:
~/Library/Application Support/IntelliJIdeaXX contains the catalog with plugins.
~/Library/Preferences/IntelliJIdeaXX contains the rest of the configuration settings.
~/Library/Caches/IntelliJIdeaXX contains data caches, logs, local history, etc. These files can be quite significant in size.
9.0+~/Library/Logs/IntelliJIdeaXX contains logs
真正的解决方式,安装apple 指定的 jdk6
<key>JVMVersion</key>
<string>1.6*</string>
brew install python
brew install python --with-brewed-openssl
--upgrade
brew update
brew upgrade python
python3
brew install python3 --with-brewed-openssl
-- /usr/local/etc/privoxy/wall.action 增加
python.org
whereis python看看路径
python3 is run python 3
python2 python3 共存
easy_install, pip
https://pip.pypa.io/en/latest/installing.html
linux下,修改~/.pip/pip.conf,如果没这文件则创建。
windows下,修改%HOMEPATH%\pip\pip.ini。
内容为:
[global]
index-url = http://pypi.douban.com/simple
pip install virtualenvwraper
//use,相关配置在.bash_profile
mkvirtualenv sphinx
brew install nodejs
使用 cnpm 加速 npm
$ sudo npm --registry=http://r.cnpmjs.org install koa -g
or
npm config set registry="http://r.cnpmjs.org"
GitBook is a command line tool (and Node.js library) for building beautiful books and exercises using GitHub/Git and Markdown. You can see an example: Learn Javascript. An editor is available for Windows, Mac and Linux. You can follow @GitBookIO on Twitter. Complete documentation is available at help.gitbook.io.
install
npm install gitbook -g
在使用其他软件时,经常需要打开系统文件夹,方法如下:在打开的文件路径选择框中默认是没有/usr目录的,此时按Command+Shift+G
在弹出框中输入/usr/local/并找到Cellar点open即可添加。
Search Scope add /opt/homebrew-cask
sudo rm -rf ~/.Trash/*
http://www.faxianyige.com/mac/osxtips/1186.html
参考在Mac下安装使用Docker,采用brew 安装
brew install boot2docker
安装docker client
要想在mac下直接执行docker命令,需要安装一个适合mac的docker client,安装方法如下
# Get the docker client file
DIR=$(mktemp -d ${TMPDIR:-/tmp}/dockerdl.XXXXXXX) && \
curl -f -o $DIR/ld.tgz https://get.docker.io/builds/Darwin/x86_64/docker-latest.tgz && \
gunzip $DIR/ld.tgz && \
tar xvf $DIR/ld.tar -C $DIR/ && \
cp $DIR/usr/local/bin/docker ./docker
# Set the environment variable for the docker daemon
export DOCKER_HOST=tcp://127.0.0.1:4243
# Copy the executable file
sudo cp docker /usr/local/bin/
ffmpeg
brew install ffmpeg --with-fdk-aac --with-ffplay --with-freetype --with-frei0r --with-libass --with-libvo-aacenc --with-libvorbis --with-libvpx --with-opencore-amr --with-openjpeg --with-opus --with-rtmpdump --with-schroedinger --with-speex --with-theora --with-tools