Skip to content

Instantly share code, notes, and snippets.

.slide
# What is "prespal"?
* It's a simple markdown based syntax to slideshow/handout/outline presentation mangement tool
* Create one simple text file and it generates different output formats
* The slideshow is done by a forked version of S5
* Eventually we'll have output formats for pdf, and others
.note
* You can also have notes which only the presenter can see
* Keen.
#!/usr/bin/perl
use strict;
use warnings;
use Parse::RecDescent;
use Data::Dumper;
use Text::MultiMarkdown;
my $testslide = <<EOD;
.slide
# start slide 1
#!/usr/bin/perl
use strict;
use warnings;
use Parse::RecDescent;
use Data::Dumper;
use Text::MultiMarkdown;
my $testslide = <<EOD;
.slide
# start slide 1
sub run_command {
my $self = shift();
my $cmdname = shift();
my $dir = tempdir();
INFO("running commmand \`$cmdname\':\t");
my $cmd = system("$cmdname 1>$dir/out.txt 2>$dir/err.txt");
my $output = slurp("$dir/out.txt");
my $error = slurp("$dir/err.txt");
if ($cmd == 0) {
INFO("SUCESS");
<!DOCTYPE presentation [
<!ELEMENT presentation (slide+)>
<!ELEMENT slide ((h1|h2|h3|h4|h5|p|a|img|div)*,handout?,note?)>
<!ELEMENT div (#PCDATA)>
<!ELEMENT handout (#PCDATA)>
<!ELEMENT note (#PCDATA)>
]>
ScriptAlias /git/gitweb.cgi /srv/git/static-files/gitweb.cgi
ScriptAlias /git/gw /srv/git/static-files/gitweb.cgi
Alias /git/ /srv/git/
<Directory /srv/git/>
options followsymlinks indexes
order allow,deny
allow from all
# anything under /git/gw is treated as a gitweb paramater
$feature{'blame'}{'default'} = [1];
$feature{'blame'}{'override'} = 1;
$feature{'pickaxe'}{'default'} = [1];
$feature{'pickaxe'}{'override'} = 1;
$feature{'snapshot'}{'default'} = ['zip', 'tgz'];
$feature{'snapshot'}{'override'} = 1;
$projectsroot = '/srv/git/';
# trying to partion two drives as follows:
#
# /dev/sda: [|--- / partition (ext3) ---|---- swap 8.0 GB ----|]
# /dev/sdb: [|---------- /usr/local/cache (jfs) --------------|]
d-i partman-auto/disk string /dev/sda /dev/sdb
d-i partman-auto/expert_recipe string \
swap-root-cache :: \
70000 100000 1000000000 ext3 \
$primary{ } $bootable{ } \
# Generated by iptables-save v1.4.3.1 on Thu Sep 17 09:47:05 2009
*nat
:PREROUTING ACCEPT [15628:4179287]
:POSTROUTING ACCEPT [11068:690325]
:OUTPUT ACCEPT [11069:690365]
-A POSTROUTING -s 192.168.122.0/24 -d ! 192.168.122.0/24 -j MASQUERADE
COMMIT
# Completed on Thu Sep 17 09:47:05 2009
# Generated by iptables-save v1.4.3.1 on Thu Sep 17 09:47:05 2009
*filter
@goozbach
goozbach / foo.ini
Created October 26, 2009 00:55
python-configparser
# this is a comment
[default]
foo = yes
bar = no
cam = maybe
var = 23
prefix = /var/lib/
dir = %(prefix)s/bar/