set-up-mac

一个 iOS 开发者的 OS X 工作环境

Stars
78

iOS OS X

  1. OS X

  2. chrome web

1. OS X

  • Dock Magnification Dock
  • QQ
  • ``
  • Magic Mouse Trackpad

2.

2.1 Alfred

Alfred alt + j

alfred-workflow:

  • Baidu-Map, # *bmap *,

  • Caffeinate Control, # caff 1h, 1

  • Chrome Bookmarks, # cb ios, ios

  • Chrome History, # ch ios, chrome iOS

  • CocoaPods, # pod yykit, cocoapods yykit

  • colors, # #60aa82, hsl,

  • CountDown, # timer 25m,

  • Dash, # iOS UIView, Dash iOS channel UIView

  • Douban, # book iOS iOS *movie *

  • encode-decode, # base64 encode/decode

  • Evernote

    • Search:

      • ens keyword, evernote
      • ens @ , to search in a selected notebook.
      • ens # , to search notes with a selected tag.
      • ent, Search in Notes Titles
      • enr, Search Reminders Notes
      • entodo, Search todo notes
      • enrec, Search Last Updated Notes
      • enu, Search Notes with URL
    • Create:

      • enn, Create New note.
      • typenote, Type a New note, Notebook: (default) | Tags: (none) | Reminder: (none) | Note: (type it).
  • Finder-Settings, # Finder Settings & desktop settings

  • flushdns,

  • Github repos, # Search your github repositories

  • HTTP-codes, # http 400, http

  • ip-address, # ip, ip

  • kill-process, #

  • Last+changed+files, # .last, list last changed files.

  • New OmniFocus Task, # Omnifocus Action! @Context ::Project #Start #Due $Duration //Note

  • Simulator-Folders,

  • sublime-text,

  • Timestamp, #

  • Wi-Fi-Toggle, # Wifi

  • Workflow-Search, # Alfred workflow

2.2 Moom

Moom keyboard

  • Trigger keyboard control with hot key: + 9, show cheat sheet, repeat to show grid. moom-keyboard

      • 1, move & zoom, .
      • 2, revert to original dimensions.
      • 3, move & zoom,
      • 4, move & zoom,
      • 0, move to other display, Resize proportionally, Loop through displays.
        moom-custom

2.3 Jitouch

Jitouch/Magic Mouse

2.4 OmniFocus

OmniFocus iPhone

2.5 Path Finder

Path Finder Finder

2.6 PopClip

PopClipOmniFocus

2.7 1Password

1Password iOS

2.8 CheatSheet

CheatSheet``

2.9 Eudic

EuDic

2.10

Finder

brew cask Mac

  • QLColorCode () brew cask install qlcolorcode
  • QLStephen ( README) brew cask install qlstephen
  • QLMarkdown ( markdown ) brew cask install qlmarkdown
  • QuickLookJSON ( JSON ) brew cask cask install quicklook-json
  • BetterZipQL ( zip ) brew cask install betterzipql
  • QLImageSize () brew cask install qlimagesize
  • WebP ( WebP ) brew cask install webpquicklook
  • Suspicious Package ( pkg ) brew cask install suspicious-package
  • ProvisionQL ( iPa ) brew cask install provisionql

3.

3.1 Homebrew

Homebrew Homebrew Xcode Command Line Tools Xcode Command Line Tools Homebrew

terminal $ Hombrew

/usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"

brew

$ brew doctor

Homwbrew /usr/local git brew sudo

Homebrew cask

brew-cask brew-cask

$ brew tap caskroom/cask  //  Github  caskroom/cask 
$ brew install brew-cask  //  brew-cask

3.2 iTerm2

iTerm2 Terminal

iTerm +`.` profile key `Left option () key acts asRight option () key acts as``+ESC`

### Editor
- Ctrl + r          history reverse search
- Ctrl + s          history forward search
- Ctrl + g          Escape from history searching mode
- cmd + ;           autocomplete
- cmd + shift + h   paste history

- Ctrl + a / e      beginning/end of line
- Ctrl + f / b      forward/back 1 char
- Ctrl + p / n      previous/next history
- Ctrl + d / h      delete current/previous char
- Ctrl + w          delete the word behind point
- Ctrl + k          delete text from the point to the end of the line
- ctrl + u          delete current line

- Alt + f / b       forward/back 1 word
- Alt + d           delete the word after the cursor
- Alt + w           delete text from the point to the beginning of the line

- cmd + k           clear buffer
- Ctrl + l          clear screen

- !!                Execute last command in history
- !abc              Execute last command in history beginning with abc
- !abc:p            Print last command in history beginning with abc

### Process Control
- Ctrl + C          Interrupt/Kill whatever you are running (SIGINT)
- Ctrl + l          Clear the screen
- Ctrl + s          Stop output to the screen (for long running verbose commands)
- Ctrl + q          Allow output to the screen (if previously stopped using command above)
- Ctrl + D          Send an EOF marker, unless disabled by an option, this will close the current shell (EXIT)
- Ctrl + Z          Send the signal SIGTSTP to the current task, which suspends it.
                    To return to it later enter fg 'process name' (foreground).

### Tab Navigation
- cmd + t               open new tab
- cmd + shift + ] / [     next/previous tab

### Pane navigation
- cmd + d           split pane left-right
- cmd + shift +d    split pane top-bottom
- cmd + ] / [       next/previous pane

### Search
- cmd + f           open search bar
- cmd + g           find next

### Zooming / Font Resize
- cmd + +           make font larger
- cmd + -           make font smaller

### Input to all panes
- cmd + alt + i     input to all panes in current tab

3.3 zsh

zsh shell shell

oh my zsh zsh

oh my zsh ~/.zshrc plugins

  • autojump
    brew
brew install autojump

Add the following line to your ~/.bash_profile or ~/.zshrc file (and remember to source the file to update your current session): [[ -s $(brew --prefix)/etc/profile.d/autojump.sh ]] && . $(brew --prefix)/etc/profile.d/autojump.sh

brew .zshrc .

zsh + oh-my-zsh +

  • git git ***
  • tab tab ctrl + n/p/f/b
  • autojumpzsh j + '' j -s
  • d
  • cd
  • ls -l **/.sh* find

3.4

  • curl, httpie

  • libimobiledevice, for iOS

  • chisel, for iOS

  • synx, for iOS

  • tldr man tldr

  • fastlane, for iOS

  • autojump

    • j foo, Jump To A Directory That Contains foo.
    • jo foo, Instead of jumping to a directory, you can open a file explorer window.
  • stree SourceTree

    set "alias stree='open -a SourceTree'" in .zshrc first, launch git repo in SourceTree with "stree /path-of-repo" eg: "stree .", SourceTree

  • st, SublimeText

    eg: "st ." open current path in SublimeText

  • grep, Matches patterns in input text.

    grep -i something file_path     # Search without case-sensitivity
    grep -r something .             # Search recursively in current directory for an exact string
    egrep ^regex$ file_path         # Use a regex
    grep -C 3 something file_path   # See 3 lines of context
    grep -c something file_path     # Print the count of matches instead of the matching text
    grep -n something file_path     # Print line number for each match
    cat file_path | grep something  # Use the standard input instead of a file
    ls -l | grep -i name            # list the files filename contain "name"
    
  • find

    find root_path -name '*.py'                              # Find files by extension
    find root_path -path '**/lib/**/*.py'                    # Find files matching path pattern
    find root_path -name '*.py' -exec wc -l {} \;            # Run a command for each file, use {} within the command to access the filename
    find root_path -name '*.py' -mtime -1d                   # Find files modified since a certain time
    find root_path -size +500k -size -10MB -iname '*.TaR.gZ' # Find files using case insensitive name matching, of a certain size
    find root_path -name '*.py' -mtime -180d -delete         # Delete files by name, older than a certain number of days
    find root_path -empty                                    # Find empty files or directories
    find root_path -name '*.py' -or -name '*.r'              # Find files matching more than one search criteria
    
  • file operate

    • cp, -r # "cp file.html{,.backup}", make a backup.
    • mv,
    • rm, -i -f -r
  • ps, Information about running processes.

    ps aux | grep string    # Search for a process that matches a string
    ps aux                  # 
    ps ax                   # terminal
    ps -lA                  # 
    ps axjf                 # 
    
  • command line + & # Put command line run in background.

  • jobs -l # List all task status in the background.

  • fg %jobnumber # put background task to foreground.

  • bg %jobnumber # put foreground task to background.

  • kill

    kill -signal %jobnumber     # get jobnumber from *jobs* command
    kill -signal PID            # get PID from *ps* command
    
    signal values:
    1SIGHUP
    2SIGINTctrl+c
    9SIGKILL
    15SIGTERM
    17SIGSTOPctrl+z
    

3.5 SublimeText 3

Sublime TextXcode

  • All Autocomplete
  • BracketHighlighter,
  • ConvertToUTF8 utf-8
  • Git
  • GitGutter, git diff
  • LiveReload
  • MarkdownEditing
  • Pretty JSON
  • SideBarEnhancement
  • SideBarGit git
  • SublimeLinter

3.6

4. Chrome web

5.