Quickies

[categories] [index] [all (527)] [latest]

Mac OS X
  1. $ defaults write -g ApplePressAndHoldEnabled -bool false
    
  2. $ defaults write com.apple.Mail DisableSendAnimations -bool YES
    $ defaults write com.apple.Mail DisableReplyAnimations -bool YES
    
  3. ie disable Resume per application:

    $ defaults write com.apple.Preview NSQuitAlwaysKeepsWindows -int NO
    
  4. $ defaults write NSGlobalDomain NSAutomaticWindowAnimationsEnabled -bool NO
    
  5. In column mode, double-clic on the ||.

  6. $ defaults write -g NSNavPanelExpandedStateForSaveMode -bool YES
    
  7. $ atos -o MyiPhoneBinary -arch armv7 0x00009f16
    -[AppDelegate application:didFinishLaunchingWithOptions:] (in MyiPhoneBinary) (AppDelegate.m:253)
    
  8. enable:

    $ sudo nvram boot-args="-v"
    

    disable:

    $ sudo nvram boot-args=
    
  9. $ defaults write /Library/Preferences/com.apple.loginwindow DesktopPicture /picture.jpg
    
  10. $ defaults write com.apple.screencapture location ~/Pictures
    $ killall SystemUIServer
    
  11. $ defaults write com.apple.screencapture type jpg
    $ killall SystemUIServer
    

    type may be jpg, pdf, tif or png

  12. $ defaults write com.apple.frameworks.diskimages skip-verify -bool true
    $ defaults write com.apple.frameworks.diskimages skip-verify-locked -bool true
    $ defaults write com.apple.frameworks.diskimages skip-verify-remote -bool true
    
  13. $ defaults write com.apple.dashboard mcx-disabled -boolean YES
    $ killall Dock    
    
  14. $ defaults write com.apple.mail DisableDataDetectors YES
    
  15. $ defaults write com.apple.iTunes disableGeniusSidebar YES
    
  16. $ defaults write NSGlobalDomain AppleEnableMenuBarTransparency -bool false
    
  17. $ launchctl unload -w /System/Library/LaunchAgents/com.apple.notificationcenterui.plist
    
    $ killall NotificationCenter
    
  18. $ defaults write -g NSScrollAnimationEnabled -bool false
    
  19. $ defaults write com.apple.dock workspaces-swoosh-animation-off -bool YES
    $ killall Dock
    
  20. $ defaults write com.apple.screencapture disable-shadow -bool true
    $ killall SystemUIServer
    
  21. $ defaults write com.apple.mail PreferPlainText -bool YES
    
  22. $ defaults write /Library/Preferences/com.apple.loginwindow AdminHostInfo SystemVersion 
    

    SystemVersion can be replaced by:

    SystemBuild
    SerialNumber 
    IPAddress 
    DSStatus 
    Time
    HostName
    
  23. $ /System/Library/PrivateFrameworks/Apple80211.framework/Versions/A/Resources/airport -S
    

    See the help page:

    $ airport --help
    
  24. $ defaults write com.apple.dock no-glass -boolean YES
    
  25. $ defaults write com.apple.DiskUtility DUDebugMenuEnabled -bool true
    
  26. $ defaults write com.apple.appstore ShowDebugMenu -bool true
    

    Source: http://www.red-sweater.com/blog/1586/the-mac-app-store-debug-menu

  27. cmd + F1

  28. $ defaults write com.apple.finder QLEnableTextSelection -bool TRUE; killall Finder
    
  29. The simplest way:

    Start with cmd-S, then

    # mount /
    # rm /var/db/.AppleSetupDone
    # reboot
    

    and create a new admin account through the assistant.

  30. $ defaults write com.apple.dock mouse-over-hilte-stack -boolean YES
    
  31. ~/Library/Application Support/iLifeAssetManagement/assets/sub/
    
  32. $ defaults write com.apple.dock largesize -float 200
    $ killall Dock
    

    128 is the default

  33. $ hdiutil attach disk_image.dmg
    $ cd /Volumes/volume_name/
    $ sudo installer -pkg package_name.pkg -target "/"
    $ hditutil detach /Volumes/volume_name/
    
  34. LaunchServices holds the mapping between applications and documents.

    $ /System/Library/Frameworks/CoreServices.framework/Versions/A/Frameworks/LaunchServices.framework/Versions/A/Support/lsregister
    

    explicitely register an application

    $ lsregister -f MyApp.app
    

    dump the database

    $ lsregister -dump
    

    rebuild the database

    $ lsregister -kill -r -domain local -domain system -domain user
    
  35. $ sw_vers -productVersion
    
  36. $ defaults write com.apple.mail AddressesIncludeNameOnPasteboard -bool NO
    
  37. $ /Developer/Tools/SetFile -a V my_file.txt
    
  38. $ defaults write com.apple.Dock showhidden -bool YES
    
  39. $ open -a Terminal `pwd`
    

    great with an alias in your ~/.profile

    alias new="open -a Terminal `pwd`"
    
  40. $ defaults write com.apple.dock launchanim -bool false
    
  41. $ sudo pmset lidwake 0
    
  42. $ defaults write com.apple.dashboard devmode YES
    $ killall Dock
    

    Press F12, start moving the widget and hit F12 again. Put the widget on the Desktop.

  43. cmd-R

  44. remove accounts:

    $ sudo defaults write /Library/Preferences/com.apple.loginwindow HiddenUsersList -array-add user1 user2 user3
    

    reset:

    $ sudo defaults write /Library/Preferences/com.apple.loginwindow HiddenUsersList -array-add
    
  45. Check the following directories:

    "~/Library/Developer/Xcode/iOS DeviceSupport/"
    "~/Library/Developer/Shared/Documentation/DocSets/"
    
  46. $ defaults write NSGlobalDomain NSSavePanelStandardDesktopShortcutOnly -bool YES
    
  47. $ defaults write NSGlobalDomain NSDocumentSaveNewDocumentsToCloud -bool false
    
  48. $ defaults write com.apple.finder _FXShowPosixPathInTitle -bool YES
    
  49. $ defaults write com.apple.addressbook ABShowDebugMenu -bool YES
    
  50. (and probably other fancy behaviors)

    # mkdir /AppleInternal
    
  51. $ defaults write com.apple.dock static-only -bool TRUE
    $ killall Dock
    
  52. # dmesg
    
  53. $ defaults write com.apple.desktopservices DSDontWriteNetworkStores true
    

    see http://support.apple.com/kb/HT1629

  54. $ /System/Library/Frameworks/ScreenSaver.framework/Resources/ScreenSaverEngine.app/Contents/MacOS/ScreenSaverEngine -background
    
  55. $ codesign -dvvv TwitHunter.app
    

    result

    Executable=/Users/nst/TwitHunter.app/Contents/MacOS/TwitHunter
    Identifier=ch.seriot.TwitHunter
    Format=bundle with Mach-O thin (x86_64)
    CodeDirectory v=20100 size=589 flags=0x0(none) hashes=21+5 location=embedded
    Hash type=sha1 size=20
    CDHash=d92cea80efead38315b778b0a320db6fceb666fe
    Signature size=8514
    Authority=Developer ID Application: Nicolas Seriot
    Authority=Developer ID Certification Authority
    Authority=Apple Root CA
    Timestamp=Aug 24, 2012 8:07:40 AM
    Info.plist entries=19
    Sealed Resources rules=4 files=6
    Internal requirements count=2 size=292
    

    See also "Mac OS X Code Signing In Depth" http://developer.apple.com/library/mac/#technotes/tn2206/_index.html

  56. ~/Library/Caches/Metadata/app.bundle.identifier