Public
snipts » mac
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
-
∞ 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
-
∞ 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
-
∞ Enable mouseover highlights in stacks
$ defaults write com.apple.dock mouse-over-hilite-stack -boolean yes $ killall Dock
-
∞ 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
-
∞ Mac OS X's Single-Application Mode
# http://db.tidbits.com/article/10624 $ defaults write com.apple.dock single-app -bool true $ killall Dock
-
∞ 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
-
∞ 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
-
∞ 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
-
∞ 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
-
∞ 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
-
∞ 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!
-
∞ Bless CD To be opened automatically on mac when inserted
sudo bless -folder "/Volumes/VolumeName/" -openfolder "/Volumes/VolumeName/"
-
∞ 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
-
∞ Show hidden files on a mac
defaults write com.apple.finder AppleShowAllFiles -bool true
-
∞ Force Safari to Open Links in Tabs
defaults write com.apple.Safari TargetedClicksCreateTabs -bool true -
∞ Delete all the .svn folders
find . -name .svn -exec rm -rf {} \;
-
∞ Profile
PATH="/usr/local/bin:${PATH}" export PATH
-
∞ 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.
-
∞ 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



Mac for Linux Geeks