http://www.makkintosshu.com/journal/testing-the-os-version-on-darwinmac-os-x-in-bash
Category Archives: Uncategorized
Data recovery with GNU ddrescue
ddrescue will create a image of a disk while skipping broken blocks on the disk, when finished, mount the image with hdiutil, then run DiskWarrior to repair damage to the filesystem in the process.
sudo screen ./ddrescue /dev/rdisk4 /Volumes/Internal\ IT/zeller\ temp/ddrescue.dmg ~/mapfile hdiutil attach -imagekey diskimage-class=CRawDiskImage /Volumes/Internal\ IT/zeller\ temp/ddrescue.dmg
Renew the Code Signing Certificate on Os X Server 10.8.x
sudo /Applications/Server.app/Contents/ServerRoot/usr/sbin/certadmin --recreate-CA-signed-certificate "`hostname` Code Signing Certificate" "IntermediateCA_`hostname | tr 'a-z' 'A-Z'`_1" `security find-certificate -c "\`hostname\` Code Signing Certificate" | grep snbr | cut -d "x" -f 2 | cut -d " " -f 1 | tr 'A-Z' 'a-z' | sed 's/^0*//'`
Kerio operator database recovery
/opt/kerio/operator/bin/php -d open_basedir="/" /opt/kerio/operator/bin/systemBackup.php backup systemDatabase,voiceMail,systemLog,callLog,license,recordedCalls,tftp /opt/kerio/operator/bin/php -d open_basedir="/" /opt/kerio/operator/bin/systemBackup.php restore systemDatabase,voiceMail,systemLog,callLog,license,recordedCalls,tftp /opt/kerio/operator/bin/updateChecker --upgrade /opt/kerio/operator/updates/upgrade.img 6af29904584f38c2342e256c64f41e5b5ed449d3f7ec700670aa68872f7378b7b0cd55d81890d243bd8cdd4a09378b914653a4f29b393124d433e3f16de4264 /opt/kerio/operator/bin/updateChecker --upgrade /tmp/kerio-operator-upgrade-2.4.5-5285.img 6af29904584f38c2342e256c64f41e5b5ed449d3f7ec700670aa68872f7378b7b0cd55d81890d243bd8cdd4a09378b914653a4f29b393124d433e3f16de4264 /bin/sh -e /usr/sbin/upgrade /opt/kerio/operator/updates/upgrade.img /usr/bin/gbak -user sysdba -password masterkey -BACKUP_DATABASE /var/lib/firebird/2.0/data/kts.fdb /var/backup/tmp/foo.fdb /usr/bin/gbak -user sysdba -password masterkey -CREATE_DATABASE /var/backup/tmp/foo.fdb /var/backup/tmp/bar.fdb
Applescript to find all occurencies of a eMail address in Outlooks 2011 Contacts and replace.
set oldaddress to "asdf@asdf.com" set newaddress to "qwer@asdf.com" tell application "/Applications/Microsoft Office 2011/Microsoft Outlook.app" set currentIdentityFolder to quoted form of POSIX path of (current identity folder as string) set theContactIDs to words of (do shell script "mdfind -onlyin " & currentIdentityFolder & " 'kMDItemContentType == com.microsoft.outlook14.contact && kMDItemEmailAddresses == " & oldaddress & "' | xargs -I % mdls -name com_microsoft_outlook_recordID '%' | cut -d'=' -f2 | sort -u | paste -s -") set theContacts to {} repeat with thisContactID in theContactIDs set theaddresses to email addresses of contact id thisContactID repeat with theaddress in theaddresses set address of theaddress to newaddress end repeat set email addresses of (item 1 of contact id thisContactID) to theaddresses end repeat end tell
OS X Server: When saving files on SMB shares, the permissions may be changed so only the owner can read or write
Turn on ACLs on the server and configure ACL inheritance on the share to save the group access.
To turn on ACLs for the SMB shared folders, execute this command on the server:
sudo defaults write /Library/Preferences/SystemConfiguration/com.apple.smb.server AclsEnabled -bool YES
Apple Mail alias name
Apple Mail supports adding additional email addresses by separating them with a comma. But unfortunately there is no GUI functionality for having a second “From” name.
Editing Accounts.plist will allow it tough:
Insert into ~/Library/Mail/V2/MailData/Accounts.plist into same level as <key>EmailAddresses</key>:
<key>EmailAliases</key>
<array>
<dict>
<
key>alias</key>
<
string>YOUR.ICLOUD.ALIAS@me.com</string>
<
key>name</key>
<
string>YOUR NAME</string>
<
dict>
<
dict>
<
key>alias</key>
<
string>YOUR.ICLOUD.ALIAS@icloud.com</string>
<
key>name</key>
<
string>YOUR NAME</string>
<
dict>
<
array>
Show currently paired bluetooth devices on MacOS 10.9
system_profiler SPBluetoothDataType | grep -A 10 -B 2 "Major Type" | grep -B 7 Connected:
eDSSServerTimeout (-14470)
Error of Type eDSSServerTimeout (-14470) on line 1268 of /SourceCache/WorkgroupManager/Workgroupmanager -361.3.1/PMMUGMainView.mm
according to DirectoryService(8) manpage this is an error status coming back from DirectoryService. Restart of DirectoryService might help.
Compressor 4.1 Settings for youtube
Use these settings to export via Compressor to upload to Youtube without bitching and complaining.