initial import

This commit is contained in:
Vasil Kolev 2016-11-05 22:18:25 +02:00
commit 21da818cdb
20 changed files with 359 additions and 0 deletions

4
.gitignore vendored Normal file
View File

@ -0,0 +1,4 @@
*.pdf
.*.swp
*-blog.txt
.depend

33
Makefile Normal file
View File

@ -0,0 +1,33 @@
SLIDELEVEL=2
TARGETS=$(patsubst %.pandoc,%.pdf,$(wildcard *.pandoc)) $(patsubst %.pandoc,%-blog.txt,$(wildcard *.pandoc)) $(patsubst %.pandoc,%.epub,$(wildcard *.pandoc))
all: depend $(TARGETS)
depend: .depend
.depend: $(wildcard *.pandoc) makedep.sh
rm -f .depend
./makedep.sh > .depend
-include .depend
%.pdf: %.pandoc beamer.my beamercolorthemekrok.sty
pandoc --slide-level $(SLIDELEVEL) -t beamer $< -H beamer.my --latex-engine=pdflatex -o $@
%.epub: %.pandoc beamer.my beamercolorthemekrok.sty
pandoc --slide-level $(SLIDELEVEL) -t epub $< --template beamer.my -V theme:Warsaw -V fonttheme:structurebold -V colortheme:krok -o $@
%.png: img/%.png
./mkimg.sh $@
%.jpg: img/%.jpg
./mkimg.sh $@
%-blog.txt: %.pandoc
php etxt.php $< > $@
clean:
rm -f $(TARGETS) *.png .depend
push:
git push origin master

47
README.md Normal file
View File

@ -0,0 +1,47 @@
Presentation build system
=========================
Description
-----------
This is what I use to build my slides. I have the following goals:
* Easy to write
* Easy to change/copy-paste
* Automated formatting of images
* Automated rebuild when something changes
* Ability to write the text of the talk in the presentation
* Ability to extract the text of the presentation as a blog post
* Ability to easily track changes with a version control system
For example on how to use, see ``example.pandoc``.
Usage
-----
* Write your presentation as *something*.pandoc
* Put your .png images in ``img/``
* Run ``make``
* Lather, rinse, repeat
Requirements
------------
* Make
* php (for building the text)
* imagemagick (image manipulation)
* pandoc (duh)
* texlive-lang-cyrillic if you want to write in Cyrillic
* git (if you want to put this in a version control system, which I highly recommend)
This all was tested/developed on Debian.
Missing features
----------------
* Multiple images on one page
* This is not supported by pandoc in anyway, you'll need LaTeX for that
* Support for other images than png
* Too lazy to add it

1
beamer.my Normal file
View File

@ -0,0 +1 @@
\usepackage[russian]{babel}

47
beamercolorthemekrok.sty Normal file
View File

@ -0,0 +1,47 @@
% Copyright 2007 by Till Tantau
%
% This file may be distributed and/or modified
%
% 1. under the LaTeX Project Public License and/or
% 2. under the GNU Public License.
%
% See the file doc/licenses/LICENSE for more details.
\ProvidesPackageRCS $Header: /home/vedranm/bitbucket/beamer/base/themes/color/beamercolorthemekrok.sty,v d02a7cf4d8ae 2010/06/17 09:11:41 rivanvx $
\mode<presentation>
\definecolor{craneorange}{HTML}{008803}
\definecolor{craneblue}{HTML}{000000}
\setbeamercolor{structure}{fg=craneblue}
\setbeamercolor{palette primary}{fg=craneblue,bg=craneorange!70}
\setbeamercolor{palette secondary}{fg=craneblue,bg=craneorange!80}
\setbeamercolor{palette tertiary}{fg=craneblue,bg=craneorange!90}
\setbeamercolor{palette quaternary}{fg=craneblue,bg=craneorange}
\setbeamercolor{titlelike}{parent=palette quaternary}
\setbeamercolor{block title}{fg=craneblue,bg=craneorange}
\setbeamercolor{block title alerted}{use=alerted text,fg=craneblue,bg=alerted text.fg!75!bg}
\setbeamercolor{block title example}{use=example text,fg=craneblue,bg=example text.fg!75!bg}
\setbeamercolor{block body}{parent=normal text,use=block title,bg=block title.bg!25!bg}
\setbeamercolor{block body alerted}{parent=normal text,use=block title alerted,bg=block title alerted.bg!25!bg}
\setbeamercolor{block body example}{parent=normal text,use=block title example,bg=block title example.bg!25!bg}
\setbeamercolor{sidebar}{bg=craneorange!70}
\setbeamercolor{palette sidebar primary}{fg=craneblue}
\setbeamercolor{palette sidebar secondary}{fg=craneblue!75}
\setbeamercolor{palette sidebar tertiary}{fg=craneblue!75}
\setbeamercolor{palette sidebar quaternary}{fg=craneblue}
\setbeamercolor*{separation line}{}
\setbeamercolor*{fine separation line}{}
\mode
<all>

46
etxt.php Normal file
View File

@ -0,0 +1,46 @@
<?php
if ($argc!=2) {
echo "Usage: {$argv[0]} filename\n";
exit(2);
}
define("ST_OUT", 1);
define("ST_IN", 2);
$fp = fopen($argv[1],"r");
$state=ST_OUT;
$slide=1;
$slidetitle="title";
while (!feof($fp)) {
$row = fgets($fp);
if ($row === false) break;
// echo "DBG: st:$state sl:$slide $row";
if ($state==ST_OUT) {
if (preg_match('/^###[^#]/', $row)) {
$slidetitle = preg_replace('/^[# ]*/','', $row);
$slidetitle = str_replace(array("\n", "\r"), '', $slidetitle);
$slide++;
continue;
}
if (strncmp($row, "<!--", 4)==0) {
echo "[slide $slide $slidetitle]\n\n";
$state=ST_IN;
continue;
}
} else if ($state==ST_IN) {
if (strncmp($row, "-->", 3)==0) {
$state=ST_OUT;
echo "\n";
continue;
}
echo $row;
}
}

BIN
img/balkon1.png Executable file

Binary file not shown.

After

Width:  |  Height:  |  Size: 332 KiB

BIN
img/isom.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 193 KiB

BIN
img/network.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 198 KiB

BIN
img/parter.png Executable file

Binary file not shown.

After

Width:  |  Height:  |  Size: 421 KiB

BIN
img/srva.jpg Executable file

Binary file not shown.

After

Width:  |  Height:  |  Size: 11 MiB

BIN
img/srvb1.jpg Executable file

Binary file not shown.

After

Width:  |  Height:  |  Size: 11 MiB

BIN
img/srvb2.jpg Executable file

Binary file not shown.

After

Width:  |  Height:  |  Size: 10 MiB

159
infra.pandoc Normal file
View File

@ -0,0 +1,159 @@
% Инфраструктурата на OpenFest 2016
% жица, брат ми
% OpenFest team \<team@openfest.org\>
# За какво ще ви говорим
## За какво ще ви говорим
* Мрежа
* Wireless
* Monitoring
* Телефони
* Ток
* Видео
##
![Къде сме](isom.png)
# Мрежа
##
### Мрежа
##
![Логическа топология](network.png)
## Цел
* Гигабитова мрежа
* IPv4 и IPv6
* Издръжлива на прекъсвания
* Да може да носи всичкия потребителски и служебен трафик
* много видео трафик
##
### Хардуерна част
## Техника
* core switch-ове
* 7 x TP-Link SG3210 (буквално железни)
* 2 x Cisco 3750G
* workshop switch-ове (от кол и въже)
* HP 1800-24G
* 2 x Cisco 2970
* 2 x Mikrotik cloud router switch
* router
* DL380 G5
* много много кабели
* PoE инжектори
## Снабдяване
* Добри хора
* netissat (за поредна година)
* devhex
* securax
* initLab
* ebay
* изпадат понякога много евтино switch-ове
## До-снабдяване
* ПРИЕМАМЕ ДАРЕНИЯ
* наистина, малко гигабитова техника няма да откажем
* или 10-гигабитова
* ... или 100-гигабитова
## Топология
* Мрежа с много кръгове
* MSTP
* Жици навсякъде
* Един leaf, за NOC
* ако NOC-а не работи, ще пречи само на мрежарите
* те така и така не са хора
##
![Партер/1ви ет.](parter.png)
##
![1ви балkon/2ри ет.](balkon1.png)
## Uplink
* 300 mbps през NetX
* едно оптично трасе, което опънаха заради нас миналата година
* в момента влиза през фасадата през една тръба до нас
* моля не го режете, преди да свърши събитието
##
![Сървърно преди 1](srvb1.jpg)
##
![Сървърно преди 2](srvb2.jpg)
##
![Сървърно след](srva.jpg)
## NOC мазе
##
### Софтуерна част
## routing и т.н.
* прост linux
* deban iptables и NAT (бля)
## подмрежи
* management (ipv4 only)
* wired (ipv4 & ipv6)
* wireless (ipv4 & ipv6)
* video (ipv4 only)
* overflow (ipv4 only)
* Разделени по роли
## Потребителски мрежи
* странни ARP филтрирания
* ... които ще бъдат разказани в wifi частта
* филтриран порт 25
* не си заслужава усилието
* Split DNS
* имахме за stream.openfest.org, да не ходят хората навън за stream-а
* тая година не се занимавахме (някой смени bind-а на unbound :) )
## Прост зонален firewall
* Никой освен сървъра не може да си говори с не-потребителските vlan-и
# wireless
##
### Wireless
# Monitoring
# Телефони
# Ток
# Видео
# КРАЙ
##
### Благодарим за вниманието!

6
makedep.sh Executable file
View File

@ -0,0 +1,6 @@
#!/bin/bash
for i in *.pandoc; do
pdfn=`echo $i|sed s/\.pandoc$/.pdf/`
echo $pdfn: `grep '^!' "$i"|cut -d \( -f 2|cut -d \) -f 1|cut -d ' ' -f 1|sort|uniq `
done

1
missfont.log Normal file
View File

@ -0,0 +1 @@
mktextfm lass1095

15
mkimg.sh Executable file
View File

@ -0,0 +1,15 @@
#!/bin/bash
img=$1
geom=`identify -quiet -format '%G' img/$img`
width=`echo $geom |cut -d x -f 1`
height=`echo $geom |cut -d x -f 2`
wantedwidth=`echo -e "scale=0\n$height"'*'"1.4"|bc|cut -d . -f 1`
if [ $width -gt $wantedwidth ]; then
cp "img/$img" "$img"
else
convert "img/$img" -gravity center -extent ${wantedwidth}x${height} "$img"
fi

BIN
srva.jpg Executable file

Binary file not shown.

After

Width:  |  Height:  |  Size: 11 MiB

BIN
srvb1.jpg Executable file

Binary file not shown.

After

Width:  |  Height:  |  Size: 11 MiB

BIN
srvb2.jpg Executable file

Binary file not shown.

After

Width:  |  Height:  |  Size: 10 MiB