$30 off During Our Annual Pro Sale. View Details »

It's All in the Tools

It's All in the Tools

These slides are from the 2014 edition my talk "It's All in the Tools" for CocoaConf.

Nathan Eror

April 25, 2014
Tweet

More Decks by Nathan Eror

Other Decks in Programming

Transcript

  1. IT’S ALL IN THE TOOLS Nathan Eror @neror / nathan@martiancraft.com

  2. WHY?

  3. WHAT?

  4. USE THE KEYBOARD Stacking Modifiers ⌘⌥⌃ Jump Bar ⌃[1-6] a.k.a.

    Optional Navigation
  5. ⌥ Is for Assistant Editor

  6. None
  7. None
  8. None
  9. BEHAVIORS RS BEHAVIO U

  10. None
  11. DEBUGGER

  12. None
  13. None
  14. None
  15. Advanced Breakpoints

  16. Debugger Quick Look UIViewController+NEQuickLookDebug.m #import "UIViewController+NEQuickLookDebug.h" ! @implementation UIViewController (NEQuickLookDebug)

    ! #if DEBUG ! - (id)debugQuickLookObject { UIView *view = [self view]; UIGraphicsBeginImageContextWithOptions(view.bounds.size, NO, 0.f); [view drawViewHierarchyInRect:view.bounds afterScreenUpdates:NO]; UIImage *snapshotImage = UIGraphicsGetImageFromCurrentImageContext(); UIGraphicsEndImageContext(); return snapshotImage; } ! #endif ! @end
  17. LLDB CUSTOMIZATION

  18. .lldbinit custom summaries python scripting .lldbinit-Xcode

  19. TERMINAL

  20. Makefile SQLITE_DB_FILE=AppData.sqlite SIMULATOR_HOME=$(HOME)/Library/Application\ Support/iPhone\ Simulator ! dbshell: find $(SIMULATOR_HOME) -name

    "$(SQLITE_DB_FILE)" -exec sqlite3 {} ';' ! killdb: find $(SIMULATOR_HOME) -name "$(SQLITE_DB_FILE)" -exec rm {} ';' ! dbschema: find $(SIMULATOR_HOME) -name "$(SQLITE_DB_FILE)" -exec sqlite3 {} .schema ';' ! dbdump: find $(SIMULATOR_HOME) -name "$(SQLITE_DB_FILE)" -exec sqlite3 {} .dump ';'
  21. Shell - Redirection & Piping $ cat Makefile | pbcopy

    ...or... $ pbcopy < Makefile
  22. Shell - Expansions $ ls screen.png $ cp screen{,_copy}.png $

    ls screen.png screen_copy.png ... $ ls screen.png $ touch file{1,2,3} $ ls file1 file2 file3 screen.png
  23. ALFRED BONUS!

  24. None
  25. None
  26. DIY Python Ruby bash

  27. Python #!/usr/bin/python ! from Quartz.CoreGraphics import * from Quartz.ImageIO import

    * ! inurl = CFURLCreateWithFileSystemPath(None, "File.jpg", kCFURLPOSIXPathStyle, False) outurl = CFURLCreateWithFileSystemPath(None, "File_thumb.jpg", kCFURLPOSIXPathStyle, False) thumb_options = { kCGImageSourceCreateThumbnailWithTransform : True, kCGImageSourceCreateThumbnailFromImageAlways : True, kCGImageSourceThumbnailMaxPixelSize : 300 }; imgsrc = CGImageSourceCreateWithURL(inurl, thumb_options) thumb_image = CGImageSourceCreateThumbnailAtIndex(imgsrc, 0, thumb_options) ! outsrc = CGImageSourceCreateWithURL(outurl, thumb_options) ! dest = CGImageDestinationCreateWithURL(outurl, CGImageSourceGetType(outsrc), 1, None) CGImageDestinationAddImage(dest, thumb_image, None) CGImageDestinationFinalize(dest)
  28. None
  29. YOUR BODY IS A TOOL, TOO Eat Well Exercise Don’t

    sit down all day!
  30. THANK YOU Nathan Eror @neror neror@neror.com nathan@martiancraft.com