This is part 1 of my March 9th 2011 Confoo presentation. Refer to the Table of Contents for the other parts.
This is a meta-presentation. It's a presentation of the tools and things I've used to build and perform the actual presentation I gave. It is not directly related to Pyramid or Python.
Presentation of my setup and the tools used.
Some people come to me and express wonder on the flow of my live presentation, because it all seems to just work all the time, even without Internet access. Here is what I've done to make things look like they actually work:
Scripts to handle different tasks with keyboard shortcuts
Here is a script I've written that lists a bunch of events with associated chunks of code to be executed when I launch them. The script allows me to hit
Ctrl+Spacebar and type in a couple of letters, and then launches the associated piece of code.
They require the Ubuntu
beep packages to be installed. The scripts are available here:
apps.py, gtkdrive.glade, gtkdrive.py, mod_confoo2011.py, presmod.py
This required setting some global hotkeys like this:
$ # Support for compiz (use `ccsm` to activate the "Commands" plugin)
$ gconftool-2 --type string --set /apps/compiz/plugins/commands/command0 "echo 1 > /tmp/btntrigger"
$ gconftool-2 --type string --set /apps/compiz/plugins/commands/run_command0_key "<Super>space"
$ # Support for metacity:
$ gconftool-2 --type string --set /apps/metacity/keybinding_commands/command_1 "echo 1 > /tmp/btntrigger"
$ gconftool-2 --type string --set /apps/metacity/global_keybindings/run_command_1 "<Super>space"
<Super>space will pop up a little window like this:
In there, typing one of the commands that were listed when running the presentation will run the associated method in
I've added this snippet of code to my
~/.emacs file to adjust the font size, making sure people can see something from a distance and fits a 1024x768 resolution at 80 characters wide (grabbed here):
;; When doing a presentation:
(set-face-attribute 'default nil :height 150)
Also to speed up things when dealing with boilerplate, I'm using yasnippet for Emacs
(add-to-list 'load-path "~/.emacs.d/plugins/yasnippet-0.6.1c")
and these yasnippets in my
~/.emacs.d/snippets directory. You'll find in there only the ones I actually used in the presentation, and not the standard ones.
I've added a couple of aliases to speed things up in the presentation. Here is a list of what I've used:
# To use throughout the code to refer to my custom-built FFmpeg. See the post on FFmpeg
# To make sure I load ipython using the local virtualenv
alias ipython="python `which ipython`"
# PIP download cache, don't download things twice.
Using PIP_DOWNLOAD_CACHE allowed me to install things more quickly. If I had downloaded the package already, it would take it from my download cache. This doesn't prevent *all* Internet access, as
pip will still go look on the PyPI if it's the latest version for example.
You could also have set up a local mirror with the packages you needed, and install everything following this method.
Squid caching proxy
At first, I wanted to use Squid caching to fake I had an Internet connection, but in the end, the presentation room did have Internet and I had a cell phone with tethering enabled so I didn't need the proxy. But still, here is how I did it the year before:
$ sudo apt-get install squid3
Tweak the squid3 proxy config:
refresh_pattern . 1440 90% 4320 reload-into-ims ignore-no-cache ignore-reload override-expire
# Comment out:
#refresh_pattern -i (/cgi-bin/|\?) 0 0% 0
Restart the server, and you should be all set. In any console you wish to use the proxy, run:
$ export http_proxy=http://localhost:3128
I've downloaded the HTML5 boilerplate code from http://html5boilerplate.com/.
I also had a copy of
socket.io.js from here.
Video and sound recordings
To do video recording of the screen, I've used this
~/build/ffmpeg-0.6.1/bin/ffmpeg -y -f x11grab -r 12 -s 1024x768 -i :0.0 -vcodec libx264 -vpre veryfast Presentation.mkv
Sound recording was made with an old SIM-less HTC Dream (USA's G1), running a free Android application named Virtual Recorder, recording in PCM WAVE using the microphone-earbuds thing that came with the phone.
Someone to tape the presentation, using an external camcorder.
I was using a SANYO Xacti camera, which spat some already-encoded H.264/AVC, that was sitting on a tripod.
The final rendering was done with Cinelerra, using ReframeRT to adjust the frame-rate of the Presentation.mkv file, produced by FFmpeg's x11grab. I also needed to adjust the frame-rate for some reasons
I used the audio from the Android device, the video from tx11grab
I've used YouTube to publish the video parts, and this Blogofile blog for the tutorials themselves. Here is the YouTube result: