Sign up to create your own snipts, or login.

Public snipts » osx The latest public osx snipts.

showing 1-20 of 46 snipts for osx
  • show sockets on OS X
    lsof -iTCP -n -P
    

    copy | embed

    0 comments - tagged in  posted by febeling on Mar 15, 2010 at 9:17 a.m. EDT
  • show/hide hidden files in OSX
    Show:
    
    defaults write com.apple.finder AppleShowAllFiles TRUE
    killall Finder
    
    Hide:
    
    defaults write com.apple.finder AppleShowAllFiles FALSE
    killall Finder
    

    copy | embed

    0 comments - tagged in  posted by bromanji on Jan 12, 2010 at 5:12 p.m. EST
  • show & hide hidden files in finder
    Show:
    
    defaults write com.apple.finder AppleShowAllFiles TRUE
    killall Finder
    
    Hide:
    
    defaults write com.apple.finder AppleShowAllFiles FALSE
    killall Finder
    

    copy | embed

    0 comments - tagged in  posted by vedran on Jan 06, 2010 at 11:15 a.m. EST
  • See which modules are loaded in Apache (on OSX)
    /usr/sbin/apachectl -l
    

    copy | embed

    0 comments - tagged in  posted by pkarl on Dec 15, 2009 at 10:26 a.m. EST
  • Crate a *NIX-friendly disk image on Mac OS X
    # image.iso: Output image file
    # Source/: Directory from which the image is built
    hdiutil makehybrid -o image.iso Source/
    

    copy | embed

    0 comments - tagged in  posted by jmakeig on Dec 07, 2009 at 6:12 p.m. EST
  • osx force eject
    $ drutil tray eject
    

    copy | embed

    0 comments - tagged in  posted by tayhimself on Dec 04, 2009 at 7:03 p.m. EST
  • Uninstall AIR
    cd /Volumes/Adobe AIR/Adobe AIR Installer.app/Contents/MacOS
    sudo ./Adobe\ AIR\ Installer -uninstall
    

    copy | embed

    0 comments - tagged in  posted by lectroidmarc on Nov 18, 2009 at 12:36 p.m. EST
  • Enable mouseover highlights in stacks
    $ defaults write com.apple.dock mouse-over-hilite-stack -boolean yes
    $ killall Dock 
    

    copy | embed

    0 comments - tagged in  posted by softdev on Oct 12, 2009 at 10:30 a.m. EDT
  • Perform a packet dump for your Mac airport express card
    $ sudo tcpdump -i en1 -vvv -n -s 0 -w ~/Desktop/DumpFile.dmp
    

    copy | embed

    0 comments - tagged in  posted by pkarl on Sep 30, 2009 at 3:53 p.m. EDT
  • os x dvd iso using hdutil
    #hdutil method
    
    #!/bin/sh
    DIR=$1
    NAME=$(basename "${DIR}")
    hdiutil makehybrid -udf -udf-volume-name "${NAME}" -o "${NAME}" "${DIR}"
    

    copy | embed

    0 comments - tagged in  posted by tayhimself on Sep 18, 2009 at 1:16 p.m. EDT
  • os x dvd iso
    $mkisofs -f -dvd-video -udf -V DVD_VIDEO -o ~/Desktop/DVD_VIDEO.iso ~/Desktop/DVD_VIDEO/
    
    # Made into a script
    
    #!/bin/sh
    DIR=$1
    NAME=$(basename "${DIR}")
    mkisofs -f -dvd-video -udf -V "${NAME}" -o "${NAME}".iso "${DIR}"
    

    copy | embed

    0 comments - tagged in  posted by tayhimself on Sep 18, 2009 at 1:15 p.m. EDT
  • time machine interval
    $sudo defaults write /System/Library/LaunchDaemons/com.apple.backupd-auto StartInterval -int 14400
    

    copy | embed

    0 comments - tagged in  posted by tayhimself on Sep 17, 2009 at 11:41 a.m. EDT
  • Change SSH port on OS X
    # Add a service on an unused port in:
    sudo vim /etc/services
    
    # Change the string "ssh" below "SockServiceName" to whatever name used in the above file
    sudo vim /System/Library/LaunchDaemons/ssh.plist
    

    copy | embed

    0 comments - tagged in  posted by Fotinakis on Aug 18, 2009 at 6:14 p.m. EDT
  • Uninstall MySQL from OS X 10.5+
    #Uninstalling MySQL - (Mac - OS) 
    #From a terminal do the following: 
    
    $ sudo rm /usr/local/mysql 
    $ sudo rm -rf /usr/local/mysql* 
    $ sudo rm -rf /Library/StartupItems/MySQLCOM 
    $ sudo rm -rf /Library/PreformancPanes/My* 
    $ (Edit /etc/hostconfig) sudo vi /etc/hostconfig (Remove line MYSQLCOM=-YES) 
    $ sudo rm -rf /Library/Reciepts/mysql* 
    $ sudo rm -rf /Library/Reciepts/MySQL* 
    

    copy | embed

    0 comments - tagged in  posted by isagoksu on Jul 12, 2009 at 7:18 p.m. EDT
  • show hidden files in Mac OSX Finder
    #show hidden files in MacOSX Finder
    #type the following in the shell
    defaults write com.apple.finder AppleShowAllFiles TRUE
    
    killall Finder 
    
    #revert to original settings
    defaults write com.apple.finder AppleShowAllFiles FALSE
    
    killall Finder 
    

    copy | embed

    0 comments - tagged in  posted by danfreak on Jun 19, 2009 at 5:12 a.m. EDT
  • Profile
    PATH="/usr/local/bin:${PATH}"
    export PATH
    

    copy | embed

    0 comments - tagged in  posted by kkubasik on May 27, 2009 at 10:27 a.m. EDT
  • osx show all files
    defaults write com.apple.finder AppleShowAllFiles -bool true
    

    copy | embed

    0 comments - tagged in  posted by corbanb on May 19, 2009 at 10:44 a.m. EDT
  • Recursively remove all .svn directories
    find . -name .svn -exec rm -rf {} \;
    

    copy | embed

    0 comments - tagged in  posted by erincarter on May 09, 2009 at 3:00 p.m. EDT
  • Reset OS X Password without a OS X DVD
    # 1. Reboot your Mac
    # 2. Hold "Apple Key + S" down after you hear the chime sound.
    # 3. When you get text prompt to enter, just enter following:
    
    $ mount -uw /
    $ rm /var/db/.AppleSetupDone
    $ shutdown -h now
    
    # After a reboot you'll have a new admin account :)
    

    copy | embed

    0 comments - tagged in  posted by isagoksu on May 07, 2009 at 5:47 p.m. EDT
  • Tracing TCP data in OS X
    #In Leopard you can use -K for additional check sum.
    
    $ sudo tcpdump -i en0 -vvv -K -n -s 0 -w ~/Desktop/DumpFile.dmp
    
    #or just: 
    
    $ sudo tcpdump -i en0 -vvv -n -s 0 -w ~/Desktop/DumpFile.dmp
    
    #to stop it from capturing hit: Control-C
    #then type:
    
    $ tcpdump -s 0 -n -e -x -vvv -r Desktop/DumpFile.dmp
    
    # to view the file itself.
    

    copy | embed

    0 comments - tagged in  posted by isagoksu on May 06, 2009 at 6:45 p.m. EDT
Sign up to create your own snipts, or login.