In terminal:

sudo apt-get install wmctrl
xrandr

In System Preferences Keyboard Shortcuts:
Press [Add], create command "dock left" (assuming you have 1600x900):

bash -norc -c "wmctrl -r :ACTIVE: -b remove,maximized_horz ; wmctrl -r :ACTIVE: -e 0,0,0,800,900"

Then assign shortcut.
Same for "dock right":

bash -norc -c "wmctrl -r :ACTIVE: -b remove,maximized_horz ; wmctrl -r :ACTIVE: -e 0,800,0,800,900"


An alternative way (that didn't work for me):

sudo apt-get install compizconfig-settings-manager
sudo apt-get install compiz-fusion-plugins-extra
ccsm

Type "grid", enable grid, open it and update shortcuts.

Read more: http://feeds.dzone.com/~r/dzone/snippets/~3/GEvQU7AyGkI/12687