Exercises¶
Shell and Utilities¶
ssh into your virtual machine or other instance
sudo to modify the sshd_config settings to verify disabling of DNS resolution (UseDNS=no)
Install a command line helper
$ sudo apt-get install bash-completionExercise command completion
$ apt-get install <TAB><TAB>Activate/deactivate the virtualenv on your instance
$ source /var/lib/geonode/bin/activate $ deactivate
Set the DJANGO_SETTINGS_MODULE environment variable
$ export DJANGO_SETTINGS_MODULE=geonode.settings
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¶
Launch ipython and experiment
> x = "some text" > x.<TAB><TAB> > x.split.__doc__ > ?
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