Mac Tweak: Lose Name When Copying Email Address

I found this the other day! It’s just awesome.

Great post at maclife.com!

If you frequently copy email addresses out of Mail using the Control-click contextual menu. By default, Mail.app includes the user’s real name as well as their email address — that is, until you take a visit to Applications > Utilities > Terminal and type in the following with Mail.app closed: defaults write com.apple.mail AddressesIncludeNameOnPasteboard -bool NO — goodbye, real name, hello email address only!

Source: maclife.com | 6 Secrets of the Mac OS X Mail App

Nebulous Notes, awesome note-taking on iPhone and iPad


A few days ago I found a great text editor for the iPad and iPhone.

I have been using Droptext and Elements. But they don’t work nearly as great as Nebulous.

Nebulous supports access to your Dropbox and will store and sync offline copies of the files that you are working on.

Nebulous Notes (for Dropbox) on iTunes

Keep your drives clean with BlueHarvest 4

A while ago I came across a small app that does one thing great; It keeps my USB- and network-drives clean of the hidden files that Mac OS X adds in the background. Spotlight files etc. This is a killer feature when you work in a mixed Windows/Mac environment.

Simply put, it saves me a lot of moaning from colleagues after I borrow their thumb-drives!

The easiest way to keep your disks and file servers clean of Mac “dust”. BlueHarvest automatically removes DS_Store and ._ AppleDouble files (resource forks) from your USB keys, SD cards and file servers, etc. BlueHarvest removes these items as they’re created so you’ll always be “dust” free.

Link: http://www.zeroonetwenty.com/blueharvest4/

Linked: eagerZeroedThick powershell script

I found this great Powershell script that convert virtual disk files to eagered zeroed.

Awesome script! I had to make some changes to make it work in my environment.

 function Set-EagerZeroThick{
 param($vcName, $vmName, $hdName)

# Find ESX host for VM
 $vmImpl = Get-VM $vmName
 Write-Host $vmImpl
 if($vmImpl.PowerState -ne "PoweredOff"){
 Write-Host "Guest must be powered off to use this script !" -ForegroundColor red
 return $false
 }

 $vm = $vmImpl | Get-View
 Write-Host $vm
 $esxName = (Get-View $vm.Runtime.Host).Name
 Write-Host $esxName
# Find datastore path
 $dev = $vm.Config.Hardware.Device[10] | where {$_.DeviceInfo.Label -eq $hdName}
 Write-Host $dev
 if($dev.Backing.thinProvisioned){
 return $false
 }
 $hdPath = $dev.Backing.FileName
 Write-Host $hdPath

# For Virtual Disk Manager we need to connect to the ESX server
 $esxHost = Connect-VIServer -Server $esxName -User $esxAccount -Password $esxPasswd

# Convert HD
 $vDiskMgr = Get-View -Id (Get-View ServiceInstance -Server $esxHost).Content.VirtualDiskManager
 Write-Host $vDiskMgr
 $dc = Get-Datacenter -Server $esxHost | Get-View
 Write-Host $dc
 $taskMoRef = $vDiskMgr.EagerZeroVirtualDisk_Task($hdPath, $dc.MoRef)
 Write-Host $taskMoRef
 $task = Get-View $taskMoRef
 Write-Host $task
 while("running","queued" -contains $task.Info.State){
 $task.UpdateViewData("Info")
 }

 Disconnect-VIServer -Server $esxHost -Confirm:$false

# Connect to the vCenter
 Connect-VIServer -Server $vcName
 if($task.Info.State -eq "success"){
 return $true
 }
 else{
 return $false
 }
}

$vmName = "vm1"
$vCenter = "vcenter_server"
$esxAccount = "rootuser"
$esxPasswd = "password"

Set-EagerZeroThick $vCenter $vmName "Hard disk 1"

To validate before and after running the eageredZeroed script I run the following script:

$vm = Get-VM vm1 | Get-View
$vm.config.Hardware.Device[10].backing
$vm.config.Hardware.Device[10].DeviceInfo

Source: http://www.lucd.info/2009/11/15/scripts-for-yellow-bricks-advise-thin-provisioning-alarm-eagerzeroedthick/

Linked: Move-Template

A couple of days ago I found a really great PowerCLI script that move templates i vSphere. Awesome post and script by afokkema at ict-freak.nl!

Storage vMotion is a great feature to Move your VMs to other datastores. But what if you want to move your Templates?
In the current version of vSphere there is no option within the Client

function Move-Template{
    param( [string] $template, [string] $esx, [string] $datastore)

    if($template -eq ""){Write-Host "Enter a Template name"}
    if($esx -eq ""){Write-Host "Enter an ESX hostname"}
    if($esx -ne "" -and $datastore -eq ""){$vmotion = $true}
    if($datastore -ne ""){$svmotion = $true}

    Write-Host "Converting $template to VM"
    $vm = Set-Template -Template (Get-Template $template) -ToVM 

    if($svmotion){
        Write-Host "Migrate $template to $esx and $datastore"
        Move-VM -VM (Get-VM $vm) -Destination (Get-VMHost $esx) `
        -Datastore (Get-Datastore $datastore) -Confirm:$false
        (Get-VM $vm | Get-View).MarkAsTemplate() | Out-Null
    }        

    if($vmotion){
        Write-Host "Migrate $template to $esx"
        Move-VM -VM $vm -Destination (Get-VMHost $esx) -Confirm:$false
        ($vm | Get-View).MarkAsTemplate() | Out-Null
    }
}

The function above can be used to move a single template via:

Move-Template <template> <esxhost> <datastore>

Source: http://ict-freak.nl/2010/01/21/powercli-move-template/