Archive for ‘Apple’ Category
Browse: |
Apple » |
Subcategories: |
|
 Posted on 15:55, February 28th, 2013 by Many Ayromlou
This took a while to figure out, mainly because I’m a unix guy trying to “figure out” Windows Server and it’s archaic ACL system and the fact that ACL’s/attributes under OSX are just insane. The main issue I had with all the other recipes on the net describing this process was that it did NOT work for OSX/Finder. When users transferred the files, Finder was not able to strip off it’s “in-use” attribute from the file once copied to the destination. This would leave files in limbo (greyed out) and no one could touch/access them from another Mac until I stripped the “in-use” attribute off manually. Normally SMB capable NAS’s ignore Finder/OSX attributes and this does not happen, but FS7500 is “mac friendly” and preserves the attributes so we had to figure out a way to give Finder enough rights to be able to strip the attribute off once the file was copied.
The core idea here is that you have a windows share (\\elm\DROPBOX in my case) which has a bunch of subfolders under it, one per class (they are in the form of BDCxxx.yyy in my case). What we’re trying to do is give AD users who are in AD groups (also called BDCxxx.yyy in my case) which represent classes enough permission to get inside \\elm\dropbox and see the name of the subfolders and be able to drag files onto the appropriate class subfolder (BDCxxx.yyy), essentially submitting their assignment. What we don’t want to let the users do is to peak inside those subfolders. It’s the equivalent of a “write only” group permission on a folder (no execute or read bit) in unix land. We also want to have our instructors be able to access everything in the DROPBOX share, so we use a group called DropBoxMasters for that purpose.
For the sake of this example I will use the student/class group BDC974.011 which the students belong to and DropBoxMasters group for our instructors. So here we go:
1) We obviously need a share. If you’re using a FS7500 NAS you just create the share and that’s it, no sharing permissions, everything is controlled by Windows ACL’s. If your share is on windows then I guess you can give full control sharing permissions to Domain Users. Once this is done we access \\elm to set the Windows permissions on DROPBOX share.
2) For DROPBOX we need the following permissions to be set to Allow and Apply it to “This folder only”: Traverse folder/execute file, List folder/read data, Read attributes, Read extended attributes, Read permissions. This will allow our BDC974.011 students to see the content of this folder (i.e. the subfolders, one per course). Remember that you need to create this permission set for each individual course/group/class. And remember to apply to “This folder only”.

3) Still on DROPBOX share permissions we want to setup the DropBoxMasters group. This one is easy since it’s “Full control” permission that applies to “This folder, subfolder and files”. Easy :-)

4) Before we go on, a note about the above process. In the permissions/Advanced security settings you should only have the “class/course” groups, the DropBoxMasters group, SYSTEM group (with full control) and Domain Admins (with full control). Next we want to create the subfolders inside DROPBOX, one subfolder per course/class (BDC974.011 in my case). Permission wise we want to setup the following permissions for the group that matches our course/folder (i.e. the example screen shots here are for group BDC974.011 on subfolder \\elm\DROPBOX\BDC974.011). We need the following permissions to be set to Allow and Apply it to “This folder only”: List folder/read data, Read attributes, Read extended attributes, Create files/write data, Create folders/append data, Write attributes, Write extended attributes, Read permissions.

5) Still in the security settings for the course subfolder we need to add “CREATOR OWNER” to the list of permissions (This is a built-in windows entity) and give it the following permissions for “Files only”: basically all the allow check boxes EXCEPT the following (leave unchecked)……Full control, Change permissions, Take ownership. Remember these permissions are to be applied to “Files only”.

That’s it…..Now just keep repeating this for all your courses/groups.
 Posted on 09:55, February 20th, 2013 by Many Ayromlou
Does sh*t like this make you wanna smack your mac :-)

Here is a quick way to rebuild the Launch Services database and get rid of duplicates in the Open With submenu:
/System/Library/Frameworks/CoreServices.framework/Frameworks/LaunchServices.framework/Support/lsregister -kill -r -domain local -domain system -domain user
This process should take about a minute or two. You should check to see if this has fixed the problem. On my machine, running 10.8.2, I had to also restart Finder to complete the process using the following command:
killall Finder
That’s all…..Now Open With submenu is squicky clean

 Posted on 12:46, January 3rd, 2013 by Many Ayromlou
Renew a DHCP lease:
Renewing a DHCP lease via the Network System Preference Pane has the advantage of not dropping the connection, unlike switching the interface to BOOTP and back to DHCP. This command mimics that behavior.
(Via MacOSXHints.com)
 Posted on 12:24, October 4th, 2012 by Many Ayromlou
Steve Jobs’ Speech From 1983 About Things That Didn’t Exist Until Now | iPhone in Canada Blog – Canada’s #1 iPhone Resource:
Back in 1983, Steve Jobs spoke at International Design Conference (IDCA) in Aspen. Now, the full 1-hour audio recording of Steve’s amazing speech discussing things like wireless networking, App Store and the iPad has surfaced, thanks to folks at LifeLibertyTech.com who got their hands on one of the cassette recordings from the conference which were handed out to all attendees.
(Via www.iphoneincanada.ca)
 Posted on 16:36, September 20th, 2012 by Many Ayromlou
Yeah, brand new app in IOS6 and it does not work without fiddling…..Here is how you get it working:
- Open Settings.
- Open General.
- Open Date & Time.
- Switch the Set Automatically setting to Off.
- Open Set Date & Time.
- Set the date to a year ahead.
- Go back to the Home screen and open Passbook.
- Tap the App Store button. The App Store should load.
- Go back to Date & Time and turn on Set Automatically.
That’s it…….life goes on :-)
 Posted on 16:33, August 28th, 2012 by Many Ayromlou
How to Run Mac OS X Inside Windows Using VirtualBox:
Maybe you’d like to test drive OS X before switching to a Mac or building a Hackintosh, or maybe you just want to run that one killer OS X app on your Windows machine. Whatever your reason, you can actually install and run OS X on any Intel-based Windows PC with a program called VirtualBox. Here’s how.
(Via lifehacker.com)
 Posted on 13:28, August 24th, 2012 by Many Ayromlou

Preview Fonts with One Click in the OS X Font Window [Mac Tips]:
Most OS X apps have a small “Fonts” window that pops up if you want to change your font’s options, but by default, it doesn’t show you what each font actually looks like. Here’s how to show a preview of every font with one click.
(Via Lifehacker)
 Posted on 11:55, August 22nd, 2012 by Many Ayromlou
Ghosts in the ROM » NYC Resistor:
While digging through dumps generated from the Apple Mac SE ROM images we noticed that there was a large amount of non-code, non-audio data. Adam Mayer tested different stride widths and found that at 67 bytes (536 pixels across) there appeared to be some sort of image data that clearly was a picture of people.

(Via www.nycresistor.com)
 Posted on 11:48, August 22nd, 2012 by Many Ayromlou
View more export options in Preview:
Preview in 10.8 has removed a number of export options. If you choose File > Export, there are only six options in the Format popup menu, compared to 13 in the Lion version of the application.
Alas, this is yet another feature that has more options hidden behind an Option keypress. Hold down the Option key when clicking on the Format menu to see all 13 available options.
(Via MacOSXHints.com)
 Posted on 21:11, August 8th, 2012 by Many Ayromlou
Flush DNS cache in Lion and Mountain Lion:
To flush the DNS cache in Mac OS X 10.5 and 10.6, run this command in Terminal:
sudo dscacheutil -flushcache
To do the same in 10.7 and 10.8, run this command:
sudo killall -HUP mDNSResponder
(Via MacOSXHints.com)
 Posted on 14:29, July 31st, 2012 by Many Ayromlou
Two small commands with huge possibilities:
- mdls
usage: mdls [-name attr] [-raw [-nullMarker markerString]] [-plist file] path list the values of one or all the attributes of the specified file -raw: don't print attribute names before values -nullMarker: substitute this string for null attributes in raw mode -plist: output attributes in XML format to file. Use - to write to stdout option -plist is incompatible with options -raw, -nullMarker, and -name example: mdls ~/Pictures/Birthday.jpg example: mdls -name Keyword ~/Pictures/Birthday.jpg
- mdfind
Usage: mdfind [-live] [-count] [-onlyin directory] [-name fileName | -s smartFolderName | query]
list the files matching the query
query can be an expression or a sequence of words
-live Query should stay active
-count Query only reports matching items count
-onlyin <dir> Search only within given directory
-name <name> Search on file name only
-s <name> Show contents of smart folder <name>
-0 Use NUL (``\0'') as a path separator, for use with xargs -0.
example: mdfind image
example: mdfind -onlyin ~ image
example: mdfind -name stdlib.h
example: mdfind "kMDItemAuthor == '*MyFavoriteAuthor*'"
example: mdfind -live MyFavoriteAuthor
 Posted on 14:22, July 31st, 2012 by Many Ayromlou
Great in-depth article by Nathan Grigg. Everything you ever wanted to know about launchd and how job scheduling can be easily done under OSX.
 Posted on 11:03, July 30th, 2012 by Many Ayromlou
As pointed out to me in the comments the original Author — Mathias Bynens — is constantly updating this document. You can find the latest up to date version at http://mths.be/osx
# ~/.osx — http://mths.be/osx
###############################################################################
# General UI/UX #
###############################################################################
# Set computer name (as done via System Preferences → Sharing)
scutil --set ComputerName "MathBook Pro"
scutil --set HostName "MathBook Pro"
scutil --set LocalHostName "MathBook-Pro"
# Menu bar: disable transparency
defaults write NSGlobalDomain AppleEnableMenuBarTransparency -bool false
# Menu bar: show remaining battery time (on pre-10.8); hide percentage
defaults write com.apple.menuextra.battery ShowPercent -string "NO"
defaults write com.apple.menuextra.battery ShowTime -string "YES"
# Menu bar: hide the useless Time Machine and Volume icons
defaults write com.apple.systemuiserver menuExtras -array "/System/Library/CoreServices/Menu Extras/Bluetooth.menu" "/System/Library/CoreServices/Menu Extras/AirPort.menu" "/System/Library/CoreServices/Menu Extras/Battery.menu" "/System/Library/CoreServices/Menu Extras/Clock.menu"
# Always show scrollbars
defaults write NSGlobalDomain AppleShowScrollBars -string "Always"
# Disable smooth scrolling
# (Uncomment if you’re on an older Mac that messes up the animation)
#defaults write NSGlobalDomain NSScrollAnimationEnabled -bool false
# Disable opening and closing window animations
defaults write NSGlobalDomain NSAutomaticWindowAnimationsEnabled -bool false
# Increase window resize speed for Cocoa applications
defaults write NSGlobalDomain NSWindowResizeTime -float 0.001
# Expand save panel by default
defaults write NSGlobalDomain NSNavPanelExpandedStateForSaveMode -bool true
# Expand print panel by default
defaults write NSGlobalDomain PMPrintingExpandedStateForPrint -bool true
# Disable the “Are you sure you want to open this application?” dialog
defaults write com.apple.LaunchServices LSQuarantine -bool false
# Display ASCII control characters using caret notation in standard text views
# Try e.g. `cd /tmp; unidecode "\x{0000}" > cc.txt; open -e cc.txt`
defaults write NSGlobalDomain NSTextShowsControlCharacters -bool true
# Disable Resume system-wide
defaults write NSGlobalDomain NSQuitAlwaysKeepsWindows -bool false
# Disable automatic termination of inactive apps
defaults write NSGlobalDomain NSDisableAutomaticTermination -bool true
# Fix for the ancient UTF-8 bug in QuickLook (http://mths.be/bbo)
# Commented out, as this is known to cause problems when saving files in Adobe Illustrator CS5 :(
#echo "0x08000100:0" > ~/.CFUserTextEncoding
###############################################################################
# Trackpad, mouse, keyboard, Bluetooth accessories, and input #
###############################################################################
# Trackpad: enable tap to click for this user and for the login screen
defaults write com.apple.driver.AppleBluetoothMultitouch.trackpad Clicking -bool true
defaults -currentHost write NSGlobalDomain com.apple.mouse.tapBehavior -int 1
defaults write NSGlobalDomain com.apple.mouse.tapBehavior -int 1
# Trackpad: map bottom right corner to right-click
defaults write com.apple.driver.AppleBluetoothMultitouch.trackpad TrackpadCornerSecondaryClick -int 2
defaults write com.apple.driver.AppleBluetoothMultitouch.trackpad TrackpadRightClick -bool true
defaults -currentHost write NSGlobalDomain com.apple.trackpad.trackpadCornerClickBehavior -int 1
defaults -currentHost write NSGlobalDomain com.apple.trackpad.enableSecondaryClick -bool true
# Trackpad: swipe between pages with three fingers
defaults write NSGlobalDomain AppleEnableSwipeNavigateWithScrolls -bool true
defaults -currentHost write NSGlobalDomain com.apple.trackpad.threeFingerHorizSwipeGesture -int 1
defaults write com.apple.driver.AppleBluetoothMultitouch.trackpad TrackpadThreeFingerHorizSwipeGesture -int 1
# Disable “natural” (Lion-style) scrolling
defaults write NSGlobalDomain com.apple.swipescrolldirection -bool false
# Increase sound quality for Bluetooth headphones/headsets
defaults write com.apple.BluetoothAudioAgent "Apple Bitpool Min (editable)" -int 40
# Enable full keyboard access for all controls
# (e.g. enable Tab in modal dialogs)
defaults write NSGlobalDomain AppleKeyboardUIMode -int 3
# Disable press-and-hold for keys in favor of key repeat
defaults write NSGlobalDomain ApplePressAndHoldEnabled -bool false
# Set a blazingly fast keyboard repeat rate
defaults write NSGlobalDomain KeyRepeat -int 0
# Set language and text formats
# Note: if you’re in the US, replace `EUR` with `USD`, `Centimeters` with
# `Inches`, and `true` with `false`.
defaults write NSGlobalDomain AppleLanguages -array "en" "nl"
defaults write NSGlobalDomain AppleLocale -string "en_GB@currency=EUR"
defaults write NSGlobalDomain AppleMeasurementUnits -string "Centimeters"
defaults write NSGlobalDomain AppleMetricUnits -bool true
# Disable auto-correct
defaults write NSGlobalDomain NSAutomaticSpellingCorrectionEnabled -bool false
###############################################################################
# Screen #
###############################################################################
# Require password immediately after sleep or screen saver begins
defaults write com.apple.screensaver askForPassword -int 1
defaults write com.apple.screensaver askForPasswordDelay -int 0
# Save screenshots to the desktop
defaults write com.apple.screencapture location -string "$HOME/Desktop"
# Save screenshots in PNG format (other options: BMP, GIF, JPG, PDF, TIFF)
defaults write com.apple.screencapture type -string "png"
# Disable shadow in screenshots
defaults write com.apple.screencapture disable-shadow -bool true
# Enable subpixel font rendering on non-Apple LCDs
defaults write NSGlobalDomain AppleFontSmoothing -int 2
# Enable HiDPI display modes (requires restart)
sudo defaults write /Library/Preferences/com.apple.windowserver DisplayResolutionEnabled -bool true
###############################################################################
# Finder #
###############################################################################
# Finder: allow quitting via ⌘ + Q; doing so will also hide desktop icons
defaults write com.apple.finder QuitMenuItem -bool true
# Finder: disable window animations and Get Info animations
defaults write com.apple.finder DisableAllAnimations -bool true
# Show icons for hard drives, servers, and removable media on the desktop
defaults write com.apple.finder ShowExternalHardDrivesOnDesktop -bool true
defaults write com.apple.finder ShowHardDrivesOnDesktop -bool true
defaults write com.apple.finder ShowMountedServersOnDesktop -bool true
defaults write com.apple.finder ShowRemovableMediaOnDesktop -bool true
# Finder: show hidden files by default
defaults write com.apple.Finder AppleShowAllFiles -bool true
# Finder: show all filename extensions
defaults write NSGlobalDomain AppleShowAllExtensions -bool true
# Finder: show status bar
defaults write com.apple.finder ShowStatusBar -bool true
# Finder: allow text selection in Quick Look
defaults write com.apple.finder QLEnableTextSelection -bool true
# Display full POSIX path as Finder window title
defaults write com.apple.finder _FXShowPosixPathInTitle -bool true
# Disable the warning when changing a file extension
defaults write com.apple.finder FXEnableExtensionChangeWarning -bool false
# Avoid creating .DS_Store files on network volumes
defaults write com.apple.desktopservices DSDontWriteNetworkStores -bool true
# Disable disk image verification
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
# Automatically open a new Finder window when a volume is mounted
defaults write com.apple.frameworks.diskimages auto-open-ro-root -bool true
defaults write com.apple.frameworks.diskimages auto-open-rw-root -bool true
defaults write com.apple.finder OpenWindowForNewRemovableDisk -bool true
# Show item info below icons on the desktop and in other icon views
/usr/libexec/PlistBuddy -c "Set :DesktopViewSettings:IconViewSettings:showItemInfo true" ~/Library/Preferences/com.apple.finder.plist
/usr/libexec/PlistBuddy -c "Set :FK_StandardViewSettings:IconViewSettings:showItemInfo true" ~/Library/Preferences/com.apple.finder.plist
/usr/libexec/PlistBuddy -c "Set :StandardViewSettings:IconViewSettings:showItemInfo true" ~/Library/Preferences/com.apple.finder.plist
# Enable snap-to-grid for icons on the desktop and in other icon views
/usr/libexec/PlistBuddy -c "Set :DesktopViewSettings:IconViewSettings:arrangeBy grid" ~/Library/Preferences/com.apple.finder.plist
/usr/libexec/PlistBuddy -c "Set :FK_StandardViewSettings:IconViewSettings:arrangeBy grid" ~/Library/Preferences/com.apple.finder.plist
/usr/libexec/PlistBuddy -c "Set :StandardViewSettings:IconViewSettings:arrangeBy grid" ~/Library/Preferences/com.apple.finder.plist
# Increase grid spacing for icons on the desktop and in other icon views
/usr/libexec/PlistBuddy -c "Set :DesktopViewSettings:IconViewSettings:gridSpacing 100" ~/Library/Preferences/com.apple.finder.plist
/usr/libexec/PlistBuddy -c "Set :FK_StandardViewSettings:IconViewSettings:gridSpacing 100" ~/Library/Preferences/com.apple.finder.plist
/usr/libexec/PlistBuddy -c "Set :StandardViewSettings:IconViewSettings:gridSpacing 100" ~/Library/Preferences/com.apple.finder.plist
# Increase the size of icons on the desktop and in other icon views
/usr/libexec/PlistBuddy -c "Set :DesktopViewSettings:IconViewSettings:iconSize 80" ~/Library/Preferences/com.apple.finder.plist
/usr/libexec/PlistBuddy -c "Set :FK_StandardViewSettings:IconViewSettings:iconSize 80" ~/Library/Preferences/com.apple.finder.plist
/usr/libexec/PlistBuddy -c "Set :StandardViewSettings:IconViewSettings:iconSize 80" ~/Library/Preferences/com.apple.finder.plist
# Disable the warning before emptying the Trash
defaults write com.apple.finder WarnOnEmptyTrash -bool false
# Empty Trash securely by default
defaults write com.apple.finder EmptyTrashSecurely -bool true
# Enable AirDrop over Ethernet and on unsupported Macs running Lion
defaults write com.apple.NetworkBrowser BrowseAllInterfaces -bool true
# Show the ~/Library folder
chflags nohidden ~/Library
# Remove Dropbox’s green checkmark icons in Finder
file=/Applications/Dropbox.app/Contents/Resources/check.icns
[ -e "$file" ] && mv -f "$file" "$file.bak"
unset file
###############################################################################
# Dock & hot corners #
###############################################################################
# Enable highlight hover effect for the grid view of a stack (Dock)
defaults write com.apple.dock mouse-over-hilte-stack -bool true
# Set the icon size of Dock items to 36 pixels
defaults write com.apple.dock tilesize -int 36
# Enable spring loading for all Dock items
defaults write com.apple.dock enable-spring-load-actions-on-all-items -bool true
# Show indicator lights for open applications in the Dock
defaults write com.apple.dock show-process-indicators -bool true
# Don’t animate opening applications from the Dock
defaults write com.apple.dock launchanim -bool false
# Speed up Mission Control animations
defaults write com.apple.dock expose-animation-duration -float 0.1
# Don’t group windows by application in Mission Control
# (i.e. use the old Exposé behavior instead)
defaults write com.apple.dock "expose-group-by-app" -bool false
# Don’t show Dashboard as a Space
defaults write com.apple.dock "dashboard-in-overlay" -bool true
# Remove the auto-hiding Dock delay
defaults write com.apple.Dock autohide-delay -float 0
# Remove the animation when hiding/showing the Dock
defaults write com.apple.dock autohide-time-modifier -float 0
# Enable the 2D Dock
#defaults write com.apple.dock no-glass -bool true
# Automatically hide and show the Dock
defaults write com.apple.dock autohide -bool true
# Make Dock icons of hidden applications translucent
defaults write com.apple.dock showhidden -bool true
# Enable iTunes track notifications in the Dock
defaults write com.apple.dock itunes-notifications -bool true
# Reset Launchpad
find ~/Library/Application\ Support/Dock -name "*.db" -maxdepth 1 -delete
# Add a spacer to the left side of the Dock (where the applications are)
#defaults write com.apple.dock persistent-apps -array-add '{tile-data={}; tile-type="spacer-tile";}'
# Add a spacer to the right side of the Dock (where the Trash is)
#defaults write com.apple.dock persistent-others -array-add '{tile-data={}; tile-type="spacer-tile";}'
# Hot corners
# Top left screen corner → Mission Control
defaults write com.apple.dock wvous-tl-corner -int 2
defaults write com.apple.dock wvous-tl-modifier -int 0
# Top right screen corner → Desktop
defaults write com.apple.dock wvous-tr-corner -int 4
defaults write com.apple.dock wvous-tr-modifier -int 0
# Bottom left screen corner → Start screen saver
defaults write com.apple.dock wvous-bl-corner -int 5
defaults write com.apple.dock wvous-bl-modifier -int 0
###############################################################################
# Safari & WebKit #
###############################################################################
# Allow hitting the Backspace key to go to the previous page in history
defaults write com.apple.Safari com.apple.Safari.ContentPageGroupIdentifier.WebKit2BackspaceKeyNavigationEnabled -bool true
# Hide Safari’s bookmarks bar by default
defaults write com.apple.Safari ShowFavoritesBar -bool false
# Disable Safari’s thumbnail cache for History and Top Sites
defaults write com.apple.Safari DebugSnapshotsUpdatePolicy -int 2
# Enable Safari’s debug menu
defaults write com.apple.Safari IncludeInternalDebugMenu -bool true
# Make Safari’s search banners default to Contains instead of Starts With
defaults write com.apple.Safari FindOnPageMatchesWordStartsOnly -bool false
# Remove useless icons from Safari’s bookmarks bar
defaults write com.apple.Safari ProxiesInBookmarksBar "()"
# Enable the Develop menu and the Web Inspector in Safari
defaults write com.apple.Safari IncludeDevelopMenu -bool true
defaults write com.apple.Safari WebKitDeveloperExtrasEnabledPreferenceKey -bool true
defaults write com.apple.Safari "com.apple.Safari.ContentPageGroupIdentifier.WebKit2DeveloperExtrasEnabled" -bool true
# Add a context menu item for showing the Web Inspector in web views
defaults write NSGlobalDomain WebKitDeveloperExtras -bool true
###############################################################################
# Address Book, Dashboard, iCal, iTunes, Mail, and Disk Utility #
###############################################################################
# Enable the debug menu in Address Book
defaults write com.apple.addressbook ABShowDebugMenu -bool true
# Enable Dashboard dev mode (allows keeping widgets on the desktop)
defaults write com.apple.dashboard devmode -bool true
# Enable the debug menu in iCal
defaults write com.apple.iCal IncludeDebugMenu -bool true
# Make the iTunes arrow links go to your library instead of the iTunes Store
defaults write com.apple.iTunes invertStoreLinks -bool true
# Disable the iTunes arrow links completely
defaults write com.apple.iTunes show-store-arrow-links -bool false
# Disable the Ping sidebar in iTunes
defaults write com.apple.iTunes disablePingSidebar -bool true
# Disable all the other Ping stuff in iTunes
defaults write com.apple.iTunes disablePing -bool true
# Make ⌘ + F focus the search input in iTunes
defaults write com.apple.iTunes NSUserKeyEquivalents -dict-add "Target Search Field" "@F"
# Disable send and reply animations in Mail.app
defaults write com.apple.Mail DisableReplyAnimations -bool true
defaults write com.apple.Mail DisableSendAnimations -bool true
# Copy email addresses as `foo@example.com` instead of `Foo Bar ` in Mail.app
defaults write com.apple.mail AddressesIncludeNameOnPasteboard -bool false
# Enable the debug menu in Disk Utility
defaults write com.apple.DiskUtility DUDebugMenuEnabled -bool true
###############################################################################
# Terminal #
###############################################################################
# Only use UTF-8 in Terminal.app
defaults write com.apple.terminal StringEncodings -array 4
# Use a modified version of the Pro theme by default in Terminal.app
open "$HOME/init/Mathias.terminal"
sleep 1 # Wait a bit to make sure the theme is loaded
defaults write com.apple.Terminal "Default Window Settings" -string "Mathias"
defaults write com.apple.Terminal "Startup Window Settings" -string "Mathias"
# Enable “focus follows mouse” for Terminal.app and all X11 apps
# This means you can hover over a window and start typing in it without clicking first
#defaults write com.apple.terminal FocusFollowsMouse -bool true
#defaults write org.x.X11 wm_ffm -bool true
###############################################################################
# Time Machine #
###############################################################################
# Prevent Time Machine from prompting to use new hard drives as backup volume
defaults write com.apple.TimeMachine DoNotOfferNewDisksForBackup -bool true
# Disable local Time Machine backups
hash tmutil &> /dev/null && sudo tmutil disablelocal
###############################################################################
# Twitter.app #
###############################################################################
# Disable smart quotes as it’s annoying for code tweets
defaults write com.twitter.twitter-mac AutomaticQuoteSubstitutionEnabled -bool false
# Show the app window when clicking the menu icon
defaults write com.twitter.twitter-mac MenuItemBehavior -int 1
# Enable the hidden ‘Develop’ menu
defaults write com.twitter.twitter-mac ShowDevelopMenu -bool true
# Open links in the background
defaults write com.twitter.twitter-mac openLinksInBackground -bool true
# Allow closing the ‘new tweet’ window by pressing `Esc`
defaults write com.twitter.twitter-mac ESCClosesComposeWindow -bool true
# Show full names rather than Twitter handles
defaults write com.twitter.twitter-mac ShowFullNames -bool true
# Hide the app in the background if it’s not the front-most window
defaults write com.twitter.twitter-mac HideInBackground -bool true
###############################################################################
# Kill affected applications #
###############################################################################
for app in Finder Dock Mail Safari iTunes iCal Address\ Book SystemUIServer Twitter; do
killall "$app" > /dev/null 2>&1
done
echo "Done. Note that some of these changes require a logout/restart to take effect."
 Posted on 16:07, July 27th, 2012 by Many Ayromlou
Once you’ve purchased Mountain Lion from the App Store, follow these steps to create a backup install DVD or flash drive
- Download Lion from the Mac App Store—but don’t install it yet, because of the disappearing installer issue noted above.
- Find the installer in your Applications folder and right-click on it then select “Show Package Contents.” Head to Contents and SharedSupport and look for the file called “InstallESD.dmg”
- Open up Disk Utility from your Applications and Utilities folder and drag the DMG file into the sidebar on the left.
- If you’re burning to DVD: insert your disk, select the DMG file in the sidebar, and hit “Burn.” Skip to step 6.
- If you’re burning to USB, you’ll need to first format the drive properly:
- Insert the disk and select it in the sidebar in Disk Utility. Select the Partition tab, select “1 Partition” from the dropdown menu and choose “Mac OS Extended (Journaled)” for the format type.
- Click the Options button and choose “GUID Partition Table”—this will make the drive bootable and formatted correctly for the Mac. Hit Apply to format—which will completely erase—the drive.
- Now click the Restore tab and choose the DMG file as your source and the USB drive as the destination. Hit the Apply button to make it happen.
- Finally, to boot from your install disk/drive and install Mountain Lion, restart your Mac and hold the Option key down when you hear the startup chime.
That’s all….good luck :-)
 Posted on 14:14, July 27th, 2012 by Many Ayromlou
This is kinda cool. It only works if you have access to “Back to My Mac” service and you have it turned on in the remote mac’s preferences (under iCloud preferences). If you ever need to find out the FQDN (Fully Qualified Domain Name) of your remote mac and connect to it via ssh or something like it you can use the following command in the terminal:
echo show Setup:/Network/BackToMyMac | scutil | sed -n 's/.* : *\(.*\).$/\1/p'
This should spit out the “domain name” for your “personal” iCloud DNS. The output looks something like this:
12345678.members.btmm.icloud.com
To use this in a ssh command you would need the name of the remote machine plus the information above:
ssh -2 -6 remote-hostname.12345678.members.btmm.icloud.com
That’s it…..you should see a prompt for ssh login to your remote machine.
 Posted on 10:37, April 3rd, 2012 by Many Ayromlou
The “Bounce” command is really useful for those times when you’re receiving spam mail that gives you no recourse to opt-out. Usually Ads and announcements have a link to unsubscribe, but if they don’t I usually just “bounce” the mail back to the sender and that usually causes the sender to take me off their mailing list. As of the release of Lion, apple (for some reason) has decided to take that functionality and the associated button away from the Mail app. To be more precise, they’ve removed the icon and the menu option, but the function is still there, buried in the guts of mail. You can get it back by creating the following Automator Service script. Follow the instructions below:
- Open Automator application
- Create a new Service when prompted to “Choose a type for your document”
- In the right pane configure the service so that it has “No Input” for the “Service Receives” pull down and select “Mail” in the pull down next to it (see the screen shot below)

- In the Library select Mail and drag the action “Get Selected Mail Messages” into the workflow window (on the right)
- In the Library select Utilities and drag the action “Run AppleScript” (NOT the “Execute AppleScript”) into the workflow window below the “Get Selected Mail Messages” Action
- Copy the following code into the “Run AppleScript” Action window
on run {input, parameters}
tell application "Mail"
repeat with eachMessage in input
bounce eachMessage
delete eachMessage
end repeat
end tell
end run
- Your final screen should look like below

- Save the workflow with a name like “Bounce Message”. This will save the workflow in the Library folder under your home directory in a subfolder called Services (not that you need to worry about this).
Now assuming you have two email accounts setup in Mail, send a test email from one account to the other. Then in the receiving account check for the new mail, select it, go to the “Mail” menu, under “Services” and select “Bounce Message”. This should bounce your test message back to it’s original sender (your other account) and delete it from your inbox. If you want to get really fancy you can even assign a keyboard shortcut to the “Bounce Message” Service. If for some reason you need to get rid of it, just delete the file under your personal Library directory (in finder hold down option while going to the “Go” menu and select “Library”), under Services folder.
 Posted on 13:41, November 2nd, 2011 by Many Ayromlou
If you didn’t know, iCloud has a really neat feature that allows it to act just like dropbox. If you activate the “Document & Data” synching option in the iCloud pref panel, it allows you to sync any file using iCloud. This is contrary to what Apple is selling the service as being just for “Custom” Apps that have the iCloud feature (i.e.: keynote, numbers, etc.).
So here is how you take advantage of this. Once you’ve turned on the feature in the preferences panel, you open up Finder. Hold down the “option/alt” key and from the finder menus choose “Go/Library“. This should land you in your not so secret Library directory. You need to hold down the option key to see this, since OSX Lion hides the users Library directory by default. Now in the Finder window find the “Mobile Documents” folder (and if you like) drag it to the favourites list in Finder (in the left pane). Done. Now whatever file you save into “Mobile Documents” folder from any application will “sync” with all the other mac’s you’ve setup with this feature. You can treat it like your “free” 5GB dropbox account.
 Posted on 11:24, August 4th, 2011 by Many Ayromlou
If you ever are in need of signing a PDF file, you don’t need to print/sign/scan it anymore, Lion’s new preview app lets you insert/sign those pdf docs in a flash. Here is how you get your signature “scanned”.
- Use a Sharpie marker and sign your name on a plain piece of paper. Make sure it’s a plain sheet of paper with nothing written on either side.
- Open the Preview App and go to Preferences>Signatures and Press the small + button to add a new signature.
- A new window will pop up with your webcam video inside.
- Hold up the paper with your signature in front of the camera and make sure there is enough light in the room for the camera to get a clean image
- Align the signature — by moving it back and forth — with the blue line and wait for the machine to give you the clean scan of it in the window beside it.
- Press Enter to accept the signature when you’re ready.
I had to do this twice, but it’s very easy and quick to do. You can even have multiple pics taken of your signatures (or other peoples sig in your household).
 Posted on 15:21, July 26th, 2011 by Many Ayromlou
Now that I’m getting settled in the latest OSX, I thought I share with you a couple of finder gems that might not be obvious right from the get go:
1) You now have the ability to select multiple files in a folder and right click on them to choose “New Folder with X Selections”. This will create a new folder and move the selected files into that folder. Kinda neat and makes the process of moving large number of files a bit simpler.
2) You can now “move” files and folders from one place to another. First “copy” the file/folder in question by selecting it and using the command-c shortcut. Then find the place you want to move them to and instead of using the usual command-v (which copies the files/folders) use command-option-v instead. Yeaaaaa, we can finally be just like our windows cousins :-).
3) To remove something from the finder sidebar, hold the command key as you drag it out.
4) In the Finder’s “Go” menu hold the option key to reveal a “Go to Library” menu item.
Although not strictly a new finder gem, Window resizing now supports standard modifier keys, so holding Shift while resizing a window constrains it to its existing aspect ratio, while holding Option resizes the window from its center point.
 Posted on 22:21, March 19th, 2011 by Many Ayromlou
Yep, it works. I was kinda disappointed when firmware 4.3 was introduced and the 3GS owners were left in the cold as far as wifi hotspot sharing. Apple only activated that function on the iphone 4. Anyhow, after messing around with the menus a bit tonite, I figured out how to do something similar to wifi tethering (hotspot) of ipad to the iphone 3GS using bluetooth. Here is how you do it:
- Turn wifi off on your 3GS and ipad device. I’m testing from home so I wanted to make sure I was NOT using wifi.
- Turn on Bluetooth on both your 3GS and ipad device. This is under Settings/General
- On the iphone 3GS turn on “Personal Hotspot”.
- On the ipad go back to the Bluetooth menu and let it scan for a second. You’ll find a Entry for your iPhone soon. Click on the entry and connect.
- You’ll be prompted on the iphone and the ipad to make sure you see the same code. Just say Okay/Yes.
- Viola, you’re tethering your ipad to your iphone 3GS using bluetooth. You should see a Blue throbbing menu bar on top of your iphone 3GS saying “Personal Hotspot: 1 Connection”.
To stop turn Personal Hotspot off on the iphone. If you need to connect again, turn Personal Hotspot on (assuming BT is on already) and click on the iPhone entry in the Bluetooth menu on your ipad.
N.B. The iphone can also “share” it’s wifi connection with the ipad using bluetooth. Neato :-). Oh and that GPS location transfer thing that people are talking about using wifi tethering doesn’t seem to work when using BT…..Oh well, small price to pay.
UPDATE: After a bit of testing here are some numbers. These were done around midnight on Rogers/Fido Network through bluetooth (iphone 3GS on 3G):
- Ping: ~320ms
- Download: 1.53 Mbps
- Upload: 0.23 Mbps
Not bad for bluetooth I guess.
1234567Next
|
|