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
    
  4. Exercise command completion

    $ apt-get install <TAB><TAB>
    
  5. Activate/deactivate the virtualenv on your instance

    $ source /var/lib/geonode/bin/activate
    $ deactivate
    
  6. Set the DJANGO_SETTINGS_MODULE environment variable

    $ export DJANGO_SETTINGS_MODULE=geonode.settings
    
  7. 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__
    > ?
    
  2. 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