Exercises

Shell and Utilities

  1. ssh into your virtual machine or other instance
  2. sudo to modify the sshd_config settings to verify disabling of dns resolution (UseDNS=no)
  3. install a command line helper
$ sudo apt-get install bash-completion
  1. exercise command completion
$ apt-get install <TAB><TAB>
  1. activate/deactivate the virtualenv on your instance
$ source /var/lib/geonode/bin/activate
$ deactivate
  1. set the DJANGO_SETTINGS_MODULE env variable
$ export DJANGO_SETTINGS_MODULE=geonode.settings
  1. install the httpie utility via pip
$ pip install httpie
$ http http://localhost/geoserver/rest
$ http -a admin http://localhost/geoserver/rest
<type in password - geoserver>

Python

  1. launch ipython and experiment
> x = "some text"
> x.<TAB><TAB>
> x.split.__doc__
> ?
  1. execute a script with ipython and open the REPL
$ echo "twos = [ x*2 for x in range(5)]" > test.py
$ ipython -i test.py
> twos