Upgrade to Pro — share decks privately, control downloads, hide ads and more …

Mac OSX Productivity Tips for Developers

Mac OSX Productivity Tips for Developers

These are the slides that accompany the Matthew McCullough and Tim Berglund video series produced in association with O'Reilly Media at http://shop.oreilly.com/product/110000007.do

The reference repository for this video series is at https://github.com/matthewmccullough/MacOSXProductivityTips/

Matthew McCullough

December 01, 2013
Tweet

More Decks by Matthew McCullough

Other Decks in Programming

Transcript

  1. Developer Productivity Tips for Mac
    with Matthew McCullough and Tim Berglund

    View Slide

  2. View Slide

  3. a more productive
    developer

    View Slide

  4. language-agnostic

    View Slide

  5. trial and error and trial and
    success

    View Slide

  6. UNIX roots

    View Slide

  7. The Platform
    ✓POSIX compliant
    ✓Ruby, Bash, and Zsh scripts work out of the box
    ✓Application-imposed common shortcuts

    View Slide

  8. Keyboard hacks

    View Slide

  9. expand
    snippets system-wide

    View Slide

  10. View Slide

  11. View Slide

  12. View Slide

  13. customize
    shortcuts system-
    wide

    View Slide

  14. View Slide

  15. emacs
    hotkeys system-wide

    View Slide

  16. ⌃+a
    Go to beginning of line
    ⌃+e
    Go to end of line

    View Slide

  17. ⌃+u
    Delete from cursor to beginning of line
    ⌃+k
    Delete from cursor to end of line

    View Slide

  18. ⌃+w
    Erase word to left
    ⌃+t
    Transpose characters around cursor

    View Slide

  19. ⌥⌃+f
    Move forward a word
    ⌥⌃+b
    Move backwards a word

    View Slide

  20. modifier
    Keys

    View Slide

  21. View Slide

  22. Safari keyboard
    Link
    Selection

    View Slide

  23. View Slide

  24. Terminal tips

    View Slide

  25. iTerm 2

    View Slide

  26. multi-monitor compatible full screen

    View Slide

  27. multi-tab profiles

    View Slide

  28. preservable window layouts

    View Slide

  29. enhanced terminal
    prompts

    View Slide

  30. $ echo "This is devoid of any useful info"
    $

    View Slide

  31. [scripts (master)⚡]> echo "This is more informative"

    View Slide

  32. View Slide

  33. ╭─mccm06 at Detronia in ~/Downloads
    ╰─○ echo "This is much more
    informative"
    ╭─mccm06 at Detronia in ~/GitHubProjects
    ╰─○

    View Slide

  34. Source Control assistants

    View Slide

  35. tig Git ASCII GUI

    View Slide

  36. View Slide

  37. the hub gem

    View Slide

  38. View Slide

  39. command line for GitHub

    View Slide

  40. uses the GitHub API

    View Slide

  41. $ hub clone dotfiles
    Cloning into 'dotfiles'...
    remote: Counting objects: 560, done.
    remote: Compressing objects: 100% (292/292), done.
    remote: Total 560 (delta 288), reused 517 (delta 256)
    Receiving objects: 100% (560/560), 214.32 KiB | 316 KiB/s, done.
    Resolving deltas: 100% (288/288), done.

    View Slide

  42. file Formats

    View Slide

  43. the Markdown format

    View Slide

  44. Gruber, daring fireball

    View Slide

  45. Multimarkdown

    View Slide

  46. GitHub Flavored Markdown

    View Slide

  47. the Asciidoc format

    View Slide

  48. show gradle nao

    View Slide

  49. the DocBook format

    View Slide

  50. leveraging the Pandoc toolchain

    View Slide

  51. Package management

    View Slide

  52. MacPorts

    View Slide

  53. rsync-based package manager

    View Slide

  54. View Slide

  55. Homebrew

    View Slide

  56. Git-based package manager

    View Slide

  57. View Slide

  58. View Slide

  59. searching with
    Spotlight

    View Slide

  60. search criteria
    constraints

    View Slide

  61. name:
    objects with this phrase in their file name

    View Slide

  62. kind:
    objects of this type

    View Slide

  63. date:
    objects modified on this date

    View Slide

  64. date:today
    objects modified today

    View Slide

  65. date:>1/1/08
    objects modified after 1/1/08

    View Slide

  66. modified:3/7/08-3/10/08
    objects modified between these two dates

    View Slide

  67. created:=6/1/08
    objects created on this date

    View Slide

  68. AND
    join two rules together

    View Slide

  69. OR
    optionally join two rules together

    View Slide

  70. NOT
    exclude a second condition

    View Slide

  71. search result
    behaviors

    View Slide

  72. ⌘⌥
    show path to file

    View Slide


  73. open containing folder in Finder

    View Slide

  74. moving with
    Finder

    View Slide

  75. moving files without cut

    View Slide

  76. ⌘C
    copies file to pasteboard

    View Slide

  77. ⌘⌥ V
    moves file from pasteboard

    View Slide

  78. viewing with
    QuickLook

    View Slide

  79. QuickLook Extensions

    View Slide

  80. for Java files

    View Slide

  81. for ZIP files

    View Slide

  82. for Markdown files

    View Slide

  83. for XML files

    View Slide

  84. QuickLook from the CLI

    View Slide

  85. $ ql

    View Slide

  86. $ qlmanage -p "[email protected]" >& /dev/null &

    View Slide

  87. saving to the
    Cloud

    View Slide

  88. saving to CloudApp

    View Slide

  89. View Slide

  90. View Slide

  91. $ cloudapp
    Uploaded to http://cl.ly/text/
    1B0T0t2e0V3c.

    View Slide

  92. saving to Gists

    View Slide

  93. View Slide

  94. Tweeting with T

    View Slide

  95. View Slide

  96. $ t update "Chirp from the CLI"

    View Slide

  97. $ t update "At the @OReillyMedia studio in Sebastopol
    with the @tlberglund, ready to record some more
    videos with Kirk and crew."
    Tweet posted by @matthewmccull.
    Run `t delete status 369592150104633344` to delete.

    View Slide

  98. $ t update X

    View Slide

  99. Web Service helpers

    View Slide

  100. curl for URLs

    View Slide

  101. curl -I www.serverwatch.com

    View Slide

  102. curl api.github.com

    View Slide

  103. wget for files

    View Slide

  104. Pasteboard command line

    View Slide

  105. pbcopy

    View Slide

  106. curl serverwatch.com | pbcopy

    View Slide

  107. pbpaste

    View Slide

  108. pbpaste | gist

    View Slide

  109. Shell tune-ups

    View Slide

  110. Zsh

    View Slide

  111. View Slide

  112. oh-my-zsh

    View Slide

  113. View Slide

  114. dotfiles on GitHub

    View Slide

  115. search for "dotfiles" repositories

    View Slide

  116. @pengwynn

    View Slide

  117. @holman

    View Slide

  118. @matthewmccullough

    View Slide

  119. @

    View Slide

  120. Display control

    View Slide

  121. Caffeine

    View Slide

  122. GUI component

    View Slide

  123. View Slide

  124. View Slide

  125. View Slide

  126. Caffeinate

    View Slide

  127. command line

    View Slide

  128. $ caffeinate

    View Slide

  129. $ caffeinate -t 144000 &

    View Slide

  130. $ caffeinate

    View Slide

  131. layout windows with
    Slate

    View Slide

  132. arrange windows

    View Slide

  133. size windows

    View Slide

  134. switch windows

    View Slide

  135. text based configuration file

    View Slide

  136. View Slide

  137. bind e:cmd;alt;ctrl;shift ${showHintsLeftHand}
    bind right:cmd;alt;ctrl;shift push right bar-resize:screenSizeX/2
    bind left:cmd;alt;ctrl;shift push left bar-resize:screenSizeX/2
    bind up:cmd;alt;ctrl;shift push up bar-resize:screenSizeY/2
    bind down:cmd;alt;ctrl;shift push down bar-resize:screenSizeY/2

    View Slide

  138. bind g:cmd;alt;ctrl;shift move ${centered}
    bind o:cmd;alt;ctrl;shift move ${fullscreen}
    bind h:cmd;alt;ctrl;shift move ${leftHalf}
    bind j:cmd;alt;ctrl;shift move ${bottomHalf}
    bind k:cmd;alt;ctrl;shift move ${topHalf}
    bind l:cmd;alt;ctrl;shift move ${rightHalf}
    bind u:cmd;alt;ctrl;shift move ${topLeftQuarter}
    bind i:cmd;alt;ctrl;shift move ${topRightQuarter}
    bind n:cmd;alt;ctrl;shift move ${bottomLeftQuarter}
    bind m:cmd;alt;ctrl;shift move ${bottomRightQuarter}

    View Slide

  139. AppleScript automation

    View Slide

  140. script Finder
    sleep

    View Slide

  141. osascript -e 'tell application "Finder" to sleep'

    View Slide

  142. Automator apps

    View Slide

  143. reformat to
    JPEG

    View Slide

  144. Command Line GUI launches

    View Slide

  145. open

    View Slide

  146. open -a "TextMate"

    View Slide

  147. Frecency directory navigation

    View Slide

  148. z

    View Slide

  149. Quick directory toggles

    View Slide

  150. cd -

    View Slide

  151. Proxy icon for files and folders

    View Slide

  152. Drag to copy a file

    View Slide

  153. Drag to copy a file path

    View Slide

  154. show Hidden files and folders

    View Slide

  155. defaults write com.apple.Finder AppleShowAllFiles YES

    View Slide

  156. type to change folders

    View Slide

  157. ⌘+⇧+G

    View Slide

  158. os Screen Change

    View Slide

  159. fn⌘ F1 = Mirror screen
    ⌃⌥⌘ 8 = Invert colors

    View Slide

  160. keyboard based Screen Navigation

    View Slide

  161. ⌃Shift+ F2 = Select menu bar

    View Slide

  162. View Slide

  163. Boxen

    View Slide

  164. View Slide

  165. The Big Ideas of Boxen

    View Slide

  166. the Pre-Reqs

    View Slide

  167. the Setup

    View Slide

  168. the Boxen web app

    View Slide

  169. the Boxen repo

    View Slide

  170. Running Boxen

    View Slide

  171. Adding packages

    View Slide

  172. Adding applications

    View Slide

  173. Adding puppet modules

    View Slide

  174. Curating settings

    View Slide

  175. View Slide

  176. in Sum...

    View Slide

  177. hotkeys

    View Slide

  178. automation

    View Slide

  179. modifers

    View Slide

  180. spotlight filters

    View Slide

  181. replacements

    View Slide

  182. add-ons

    View Slide

  183. metadata

    View Slide

  184. Developer Productivity Tips for Mac
    with Matthew McCullough and Tim Berglund

    View Slide

  185. Credits
    ✓ "Keyboard" designed by Luboš Volkov, http://thenounproject.com/noun/keyboard/#icon-No20868
    ✓ "Computer" designed by Edward Boatman, http://thenounproject.com/noun/computer/#icon-No115
    ✓ "Code" designed by Dmitry Baranovskiy, http://thenounproject.com/noun/html-code/#icon-No4991
    ✓ "Written Document" designed by Thomas Le Bas, http://thenounproject.com/noun/written-document/#icon-No6119
    ✓ "Package" designed by Arthur Schmitt, http://thenounproject.com/noun/package/#icon-No18159
    ✓ "Magnifying Glass" designed by Edward Boatman, http://thenounproject.com/noun/magnifying-glass/#icon-No95
    ✓ "Checklist" designed by Michael Young, http://thenounproject.com/noun/checklist/#icon-No3559
    ✓ "Eye" designed by Volodin Anton, http://thenounproject.com/noun/eye/#icon-No17181
    ✓ "Cloud" designed by Dmitry Baranovskiy, http://thenounproject.com/noun/cloud/#icon-No9758
    ✓ "HTML Code" designed by WebPlatform.org, http://thenounproject.com/noun/html-code/#icon-No13024
    ✓ "Clipboard" by Seth Taylor, http://thenounproject.com/noun/clipboard/#icon-No1712
    ✓ "Console" designed by Austin Andrews, http://thenounproject.com/noun/console/#icon-No8571
    ✓ "Exit Full Screen" designed by Olyn LeRoy, http://thenounproject.com/noun/exit-full-screen/#icon-No4780
    ✓ "Apple Core" designed by Richard Zeid, http://thenounproject.com/noun/apple-core/#icon-No9817
    ✓ "Robot" designed by Kenneth Appiah, http://thenounproject.com/noun/robot/#icon-No1616
    ✓ "Rocket" designed by Jean-Philippe Cabaroc, http://thenounproject.com/noun/rocket/#icon-No7427
    ✓ "Compass" designed by Márcio Duarte, http://thenounproject.com/noun/compass/#icon-No7175
    ✓ "Light Switch" designed by Alexandria Eddings, http://thenounproject.com/noun/light-switch/#icon-No18388
    ✓ "Linked Files" designed by Iconoci, http://thenounproject.com/noun/linked-files/#icon-No10081
    ✓ "Hidden" designed by Rémy Médard, http://thenounproject.com/noun/hidden/#icon-No21609
    ✓ "Folder" designed by Cris Dobbins, http://thenounproject.com/noun/folder/#icon-No8928
    ✓ "Map Marker" designed by Edward Boatman, http://thenounproject.com/noun/map-marker/#icon-No462
    ✓ "Box Trolley" designed by Michael Zenaty, http://thenounproject.com/noun/box-trolley/#icon-No21806
    ✓ "Coordination" designed by OCHA AVMU, http://thenounproject.com/noun/coordination/#icon-No4222

    View Slide