Sign up to create your own snipts, or login.

Public snipts » mac The latest public mac snipts.

showing 1-20 of 40 snipts for mac
  • Script to automate OCR with Adobe Acrobat using Hazel for Mac
    try
       tell application "Adobe Acrobat Professional"
          activate
          open theFile
          tell application "System Events"
             tell process "Acrobat"
                tell menu bar 1
                   tell menu "Document"
                      tell menu item "OCR Text Recognition"
                         tell menu 1
                            click menu item "Recognize Text Using OCR..."
                         end tell
                      end tell
                   end tell
                   
                end tell
                keystroke return
             end tell
          end tell
          save the front document
          close the front document
       end tell
    end try
    

    copy | embed

    0 comments - tagged in  posted by macdrifter on Mar 02, 2010 at 5:15 p.m. EST
  • Enable automatic revision control for SVN on any client/IDE
    # Enable automatic revision control for SVN on any client/IDE like Coda (Mac) or others.
    # This means that you can include copyrights in your files and
    # SVN will make sure it revises the files accordingly if you use the $id$ variable within them.
    # Add the following lines right at the bottom of the SVN config file located in:
    # ~/.subversion/config (Mac/Linux)
    
    [miscellany]
    enable-auto-props = yes
    
    [auto-props]
    # Scriptish formats
    *.bat        = svn:eol-style=native; svn:keywords=Id; svn-mine-type=text/plain
    *.bsh        = svn:eol-style=native; svn:keywords=Id; svn:mime-type=text/x-beanshell
    *.cgi        = svn:eol-style=native; svn:keywords=Id; svn-mine-type=text/plain
    *.cmd        = svn:eol-style=native; svn:keywords=Id; svn-mine-type=text/plain
    *.js         = svn:eol-style=native; svn:keywords=Id; svn:mime-type=text/javascript
    *.php        = svn:eol-style=native; svn:keywords=Id Rev Date; svn:mime-type=text/x-php
    *.pl         = svn:eol-style=native; svn:keywords=Id; svn:mime-type=text/x-perl; svn:executable
    *.pm         = svn:eol-style=native; svn:keywords=Id; svn:mime-type=text/x-perl
    *.py         = svn:eol-style=native; svn:keywords=Id; svn:mime-type=text/x-python; svn:executable
    *.sh         = svn:eol-style=native; svn:keywords=Id; svn:mime-type=text/x-sh; svn:executable
    
    # Image formats
    *.bmp        = svn:mime-type=image/bmp
    *.gif        = svn:mime-type=image/gif
    *.ico        = svn:mime-type=image/ico
    *.jpeg       = svn:mime-type=image/jpeg
    *.jpg        = svn:mime-type=image/jpeg
    *.png        = svn:mime-type=image/png
    *.tif        = svn:mime-type=image/tiff
    *.tiff       = svn:mime-type=image/tiff
    
    # Data formats
    *.pdf        = svn:mime-type=application/pdf
    *.avi        = svn:mime-type=video/avi
    *.doc        = svn:mime-type=application/msword
    *.eps        = svn:mime-type=application/postscript
    *.gz         = svn:mime-type=application/gzip
    *.mov        = svn:mime-type=video/quicktime
    *.mp3        = svn:mime-type=audio/mpeg
    *.ppt        = svn:mime-type=application/vnd.ms-powerpoint
    *.ps         = svn:mime-type=application/postscript
    *.psd        = svn:mime-type=application/photoshop
    *.rtf        = svn:mime-type=text/rtf
    *.swf        = svn:mime-type=application/x-shockwave-flash
    *.tgz        = svn:mime-type=application/gzip
    *.wav        = svn:mime-type=audio/wav
    *.xls        = svn:mime-type=application/vnd.ms-excel
    *.zip        = svn:mime-type=application/zip
    
    # Text formats
    .htaccess    = svn:mime-type=text/plain
    *.css        = svn:mime-type=text/css
    *.dtd        = svn:mime-type=text/xml
    *.html       = svn:mime-type=text/html
    *.ini        = svn:mime-type=text/plain
    *.sql        = svn:mime-type=text/x-sql
    *.txt        = svn:mime-type=text/plain
    *.xhtml      = svn:mime-type=text/xhtml+xml
    *.xml        = svn:mime-type=text/xml
    *.xsd        = svn:mime-type=text/xml
    *.xsl        = svn:mime-type=text/xml
    *.xslt       = svn:mime-type=text/xml
    *.xul        = svn:mime-type=text/xul
    *.yml        = svn:mime-type=text/plain
    CHANGES      = svn:mime-type=text/plain
    COPYING      = svn:mime-type=text/plain
    INSTALL      = svn:mime-type=text/plain
    Makefile*    = svn:mime-type=text/plain
    README       = svn:mime-type=text/plain
    TODO         = svn:mime-type=text/plain
    
    # Code formats
    *.c          = svn:eol-style=native; svn:keywords=Id; svn:mime-type=text/plain
    *.cpp        = svn:eol-style=native; svn:keywords=Id; svn:mime-type=text/plain
    *.h          = svn:eol-style=native; svn:keywords=Id; svn:mime-type=text/plain
    *.java       = svn:eol-style=native; svn:keywords=Id; svn:mime-type=text/plain
    *.as         = svn:eol-style=native; svn:keywords=Id; svn:mime-type=text/plain
    *.mxml       = svn:eol-style=native; svn:keywords=Id; svn:mime-type=text/plain
    

    copy | embed

    0 comments - tagged in  posted by fevangelou on Dec 11, 2009 at 2:07 p.m. EST
  • install mysql gem in mac
    # MySQL gem for Snow Leapord
    sudo env ARCHFLAGS="-arch x86_64" gem install mysql -- --with-mysql-config=/usr/local/mysql/bin/mysql_config
    

    copy | embed

    0 comments - tagged in  posted by chawei on Dec 04, 2009 at 2:19 a.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
  • Enable "path view" in Finder
    # http://www.tuaw.com/2008/12/05/terminal-tips-enable-path-view-in-finder/
    
    $ defaults write com.apple.finder _FXShowPosixPathInTitle -bool YES
    $ killall Finder
    

    copy | embed

    0 comments - tagged in  posted by siggiarni on Oct 06, 2009 at 6:44 p.m. EDT
  • Mac OS X's Single-Application Mode
    # http://db.tidbits.com/article/10624
    
    $ defaults write com.apple.dock single-app -bool true
    $ killall Dock
    

    copy | embed

    0 comments - tagged in  posted by siggiarni on Oct 06, 2009 at 6:38 p.m. EDT
  • ISO-DMG Conversion
    # Convert a DMG file to ISO
    hdiutil convert /path/imagefile.dmg -format UDTO -o /path/convertedimage.iso
    # Convert an ISO file to DMG format
    hdiutil convert /path/imagefile.iso -format UDRW -o /path/convertedimage.dmg
    

    copy | embed

    0 comments - tagged in  posted by goerz on Sep 09, 2009 at 3:43 p.m. EDT
  • remove spotlight
    # Remove Spotlight from the Menu Bar (works on Snow Leopard)
    # restart the SystemUIServer!
    # /System/Library/CoreServices> 
    sudo mv Search.bundle/ Search.bundle.disabled
    

    copy | embed

    0 comments - tagged in  posted by goerz on Sep 03, 2009 at 5:37 a.m. EDT
  • disable Spotlight
    // disable spotlight indexing
    
    sudo mdutil -i off  
    
    // enable spotlight indexing
    
    sudo mdutil -i on
    
    // delete existing spotlight indexes
    sudo mdutil -E 
    
    // some other options:  -s = display status, -v = verbose
    

    copy | embed

    0 comments - tagged in  posted by d13t on Aug 27, 2009 at 3:30 a.m. EDT
  • Manual Mounting on Mac
    #! /bin/bash
    # Mount a partition described in /etc/fstab
    # For example fstab could contain the line
    # LABEL=PARTITION_NAME none msdos rw,noauto
    # See http://www.macosxhints.com/article.php?story=20090811124320441
    
    dev_id=`diskutil list | awk '/PARTITION_NAME/{ print $6; }'`
    [[ $dev_id ]] && diskutil mount $dev_id
    

    copy | embed

    0 comments - tagged in  posted by goerz on Aug 25, 2009 at 2:52 p.m. EDT
  • symbolic link
    #syntax to create symbolic link
    ln -s /export/space/common/archive /archive
    
    #example, link would be created in directory 'placement'
    ln -s /path/to/original/file/or/directory /path/to/the/placement
    
    #dropbox example
    ln -s /Users/username/Dropbox/theFolder /path/to/symbolic/links/directory
    

    copy | embed

    0 comments - tagged in  posted by d13t on Aug 21, 2009 at 8:24 a.m. EDT
  • Clean Mail.app Database
    1. Quit mail
    2. Load terminal
    3. cd ~/Library/Mail
    4. sqlite3 Envelope\ Index
    5. at the 'sqlite>' prompt, enter 'vacuum subjects;' and then 'vacuum;'
    6. Reload mail - it may well be faster loading and your search may well work again!
    

    copy | embed

    1 comment - tagged in  posted by joeybaker on Aug 20, 2009 at 8:30 p.m. EDT
  • Bless CD To be opened automatically on mac when inserted
    sudo bless -folder "/Volumes/VolumeName/" -openfolder "/Volumes/VolumeName/"
    

    copy | embed

    0 comments - tagged in  posted by ludicco on Aug 19, 2009 at 9:55 a.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
  • Show hidden files on a mac
    defaults write com.apple.finder AppleShowAllFiles -bool true
    

    copy | embed

    0 comments - tagged in  posted by stangsupier on Jun 08, 2009 at 11:42 a.m. EDT
  • Force Safari to Open Links in Tabs
    defaults write com.apple.Safari TargetedClicksCreateTabs -bool true
    

    copy | embed

    0 comments - tagged in  posted by joeybaker on Jun 06, 2009 at 2:59 a.m. EDT
  • Delete all the .svn folders
    find . -name .svn -exec rm -rf {} \;
    

    copy | embed

    0 comments - tagged in  posted by ravenlp on Jun 04, 2009 at 5:59 p.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
  • edit hosts file on Mac
    f you want to edit your hosts file to force your computer to use your (gs) Grid-Service to load antiochnorman.com then you will need to follow the instructions below in Terminal.  
    
    cd /etc
    sudo vi /etc/hosts
    
    Now add a record for DOMAIN.com with the IP address set to XX.XX.XX.XX by pressing 'i' to insert and arrow down to the end of the file.  Then add your record, it should be in the following format:
    
    XX.XX.XX.XX    DOMAIN.com
    
    After the record is added press 'Esc' then save with ':wq!' so that it will actually overwrite the file.
    

    copy | embed

    0 comments - tagged in  posted by AvidDeville on May 08, 2009 at 4:09 p.m. EDT
  • Hack a Mac, get an admin account
    # Hold Command-S to boot into single-user mode
    
    # Leopard - OOB reset
    mount -uw /
    rm /var/db/.AppleSetupDone
    reboot
    
    # Leopard - delete user
    mount -uw /
    rm /var/db/dslocal/nodes/Default/users/<shortname>.plist
    rm -r /Users/<shortname>
    halt
    
    # Tiger - delete user and OOB reset
    mount -uw /
    rm -rf /Users/<shortname>
    rm -rf /var/db/netinfo/local.nidb
    rm -rf /var/db/.AppleSetupDone
    

    copy | embed

    0 comments - tagged in  posted by Fotinakis on Apr 23, 2009 at 12:22 p.m. EDT
Sign up to create your own snipts, or login.