Dockless hides apps from the dock

I’ve been using a small app called dockless. Dockless hides the icon from the dock…that’s all. But it does it great and it’s free.

Dockless is a little app that does what some people have always wanted – remove certain applications from their dock. Dock real estate can become precious, and some apps don’t make a whole lot of sense sitting there. That’s where Dockless comes in. With Dockless, any OS X application can be made to show in the Dock or not.

Download dockless here

Linked: How to Ensure Ethernet Connects Before AirPort on Your Mac

Some time ago I found this great blog-post about how to prioritize the Ethernet connection over Wi-Fi. In my case this is when I’m at home.

Sometimes, your Mac will connect to a janky Wi-Fi network. The connection is slow or you’re on the other side of a lead wall and you’re getting a really poor signal. When you finally find an Ethernet jack to plug into, you may notice you’re still connected to the Wi-Fi network that was giving you problems. This is because your Network Service Order list is out of its proper order to allow the Ethernet to take over when plugged in. Don’t fret, we’ll show you how to reset the Service Order list on your Mac to ensure that Ethernet takes priority over AirPort.

Read the full post at maclife.com

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/

Linked: Remove the “host currently has no management network redundancy” warning from your whitebox HA enabled ESX cluster

I found a great post on how to remove the Host <ESXi Hostname> currently has no management network redundancy warning that you get on a typical ESXi whitebox installation. Due to the fact that most whitebox machines don’t have multiple nics..

For more info and screenshots, checkout the original post.

When you completed building your ESX cluster from so called whitebox machines, you might see a warning sign at the cluster level. It will tell you the management network has no redundancy. This is probably correct because whitebox clusters usually don’t have 2 NIC’s for the management network.

To loose this irritating warning message do the following.

  1. Go to the properties of your cluster
  2. Select HA from the left pane
  3. Click the ‘Advanced Options’ button
  4. Fill in the first column of the first row by double clicking and typing the value ‘das.ignoreRedundantNetWarning’
  5. Fill in the second column of the same row by double clicking and typing the value ‘True’
  6. Close the Advanced Options window
  7. Now deselect the option ‘Enable HA’ and press OK
  8. HA will be disabled, this will take some time
  9. Go back to the options and select ‘Enable HA’ and press OK
  10. HA will be enabled and the warning will be gone

Linked: How To Rebuild LaunchServices to Remove Duplicates from “Open With” Menu

Have you ever used the right-click “Open With” feature in Finder when opening a specific type of file?  While this feature is usually pretty handy, if you install and remove applications on a regular basis there may still be traces of those applications that have been long-gone from your Mac. In this how-to, we’ll show how you can rebuild this list so it remains up-to-date and only shows what you currently have on your hard drive.

Basically you open a terminal and run the following command…And wait.

/System/Library/Frameworks/CoreServices.framework/Frameworks/LaunchServices.framework/Support/lsregister -kill -r -domain local -domain system -domain user

Source

Linked: Bash reference

Found this awesome bash reference here and thought I’d share it.

Ctrl + A Go to the beginning of the line you are currently typing on
Ctrl + E Go to the end of the line you are currently typing on
Ctrl + L Clears the Screen, similar to the clear command
Ctrl + U Clears the line before the cursor position. If you are at the end of the line, clears the entire line.
Ctrl + H Same as backspace
Ctrl + R Let’s you search through previously used commands
Ctrl + C Kill whatever you are running
Ctrl + D Exit the current shell
Ctrl + Z Puts whatever you are running into a suspended background process. fg restores it.
Ctrl + W Delete the word before the cursor
Ctrl + K Clear the line after the cursor
Ctrl + T Swap the last two characters before the cursor
Esc + T Swap the last two words before the cursor
Alt + F Move cursor forward one word on the current line
Alt + B Move cursor backward one word on the current line
Tab Auto-complete files and folder names

Linked: ZipCleaner, Create Zip Files Without Any Mac-Specific “Extras” Inside

Yesterday I stumbled across this neat app and great post on Switching To Mac.

One of the great features most modern operating systems offer, and Mac OS X is no exception, is the ability to create a zip archive out of most any document or folder from the Desktop.  Simply right-click the item you want to archive, and choose the Compress option from the contextual menu.

There is a problem, however, when Mac users create a zip archive in this manner, then share that archive with users of Windows or Linux.  The issue is that there are extra files Mac OS X uses, files that track custom icons and icon placement, that are hidden from Mac users.

Source