To resize a disk I had to use Carbon Copy Cloner, cloning the existing disk to another drive, then booting up in to it.

1. VMWare Edit Settings on VM you want to change
2. Add 2nd hard drive with new primary partition size you want
3. Restart the VM to pick up the new drive
4. Open Disk Utility select new hard drive and partition as GUID
5. Run CCC and copy old hard drive to new one. You will be prompted and asked if you would like to create a recovery drive. Select YES if you want to use this feature.
6. Run Systems Preferences and change startup disk to new one and restart VM (confirm that it works)
7. Un-mount old hard drive
8. WMWare Edit Settings remove the old hard drive.
9. Power cycle the VM. And then finally delete the old drive from disk.

This did the trick for me.

I need to connect to a VNC server but do not have a firewall rule to allow that traffic by default.

I do however have an OpenSSH server running which I can connect to through the firewall. To achieve this I issue the following command on my local mac osx in a terminal window

ssh -L 5900:[internal server IP]:5900 username@my-remote-server-ipaddress

After it prompts for a password I then issue the following in Finder -> Go

vnc://127.0.0.1:5900

Connecting to my self on port 5900 forwards to the remote server, and then on to the internal IP. I can then login to the VNC Server as usual.

For a short time I’m having to use a Technicolor TF582n FTTC router whilst I rule out a hardware issue affecting my fibre connection.

THe DNS servers picked up by default don’t tend to be that great, so I prefer to use Google DNS servers. Here’s how I changed the addresses quickly via a telnet session.

Taken from:
http://www.petecooper.org/tutorials/changing-dns-servers-on-a-technicolor-tg582n-fttc

dns server route list
dns server route flush
dns server route add dns=8.8.8.8 metric=10 intf=Internet
dns server route add dns=8.8.8.8 metric=10 intf=Internet
dns server route list

if happy

saveall

No need to reboot the router.

I often need to export from Excel to a CSV and Excel cannot naively export with quote delimiters.

This handy macro does the trick:

http://support.microsoft.com/kb/291296/en-us

Sub QuoteCommaExport()
' Dimension all variables.
Dim DestFile As String
Dim FileNum As Integer
Dim ColumnCount As Integer
Dim RowCount As Integer

' Prompt user for destination file name.
DestFile = InputBox("Enter the destination filename" _
& Chr(10) & "(with complete path):", "Quote-Comma Exporter")

' Obtain next free file handle number.
FileNum = FreeFile()

' Turn error checking off.
On Error Resume Next

' Attempt to open destination file for output.
Open DestFile For Output As #FileNum

' If an error occurs report it and end.
If Err <> 0 Then
MsgBox "Cannot open filename " & DestFile
End
End If

' Turn error checking on.
On Error GoTo 0

' Loop for each row in selection.
For RowCount = 1 To Selection.Rows.Count

' Loop for each column in selection.
For ColumnCount = 1 To Selection.Columns.Count

' Write current cell's text to file with quotation marks.
Print #FileNum, """" & Selection.Cells(RowCount, _
ColumnCount).Text & """";

' Check if cell is in last column.
If ColumnCount = Selection.Columns.Count Then
' If so, then write a blank line.
Print #FileNum,
Else
' Otherwise, write a comma.
Print #FileNum, ",";
End If
' Start next iteration of ColumnCount loop.
Next ColumnCount
' Start next iteration of RowCount loop.
Next RowCount

' Close destination file.
Close #FileNum
End Sub

I run various NFS network shares and ‘mount’ them as readonly or read/write on clients running Ubuntu.

On a vanilla Ubuntu image the first step is to install the NFS client and tools to be able to mount a share.

sudo apt-get install rpcbind nfs-common

From there, mounting a share:

mount NFS-Server-IP:/path/to/share /folder/on/client

e.g.

mount 192.168.1.2:/volumes/shared_files /home/mounted_directory/

Note: You must create a blank folder on your client to mount the NFS share to. E.g. if using /home/backups then mkdir /home/backups before mounting the share.

I recently wanted to setup all my VMs to report to a remote syslog server, so that I can monitor the output and different levels of information.

The following help guide was just what I needed: Papertrail support article

Step 1:
Find out what type of logging daemon is running:

ls -d /etc/*syslog*

Step 2:
Add the following to the end of the respective .conf file:

*.* @your.server.ip

Step 3:
Kill the service – Ubuntu: sudo killall -HUP rsyslog rsyslogd and restart: sudo service rsyslog restart
Kill the service – Mac OSX: sudo killall -HUP syslog syslogd

Then to test messages are getting through to the remote syslog server:

logger "this is a test"

Worked a dream.

If you are specifying a specific port for your syslog server then put

*.* @your.server.ip:port_number