From: Charles McGarvey Date: Wed, 20 Jun 2018 10:16:17 +0000 (-0600) Subject: initial commit X-Git-Url: https://git.dogcows.com/gitweb?p=chaz%2Ftalk-bring-your-own-user-agent;a=commitdiff_plain;h=642b94450b8d4fbcbc212461510aa38525514105 initial commit --- 642b94450b8d4fbcbc212461510aa38525514105 diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..c8fe356 --- /dev/null +++ b/.gitignore @@ -0,0 +1,5 @@ +*.pdf +/img/http-anyua-diagram.svg +/img/http-anyua-middleware-diagram.svg +/remark.min.js +/slides-offline.html diff --git a/Makefile b/Makefile new file mode 100644 index 0000000..1f082a7 --- /dev/null +++ b/Makefile @@ -0,0 +1,38 @@ + +SLIDES = bring-your-own-user-agent +BROWSER = google-chrome +DOT = dot + +dotfiles = $(shell find . -iname '*.dot') +svgfiles = $(patsubst %.dot,%.svg,$(dotfiles)) + +all: offline + +clean: + rm -f slides-offline.html remark.min.js $(SLIDES).pdf $(svgfiles) + +offline: slides-offline.html remark.min.js $(svgfiles) + +pdf: $(SLIDES).pdf + +run: $(svgfiles) + $(BROWSER) slides.html + +run-offline: offline + $(BROWSER) slides-offline.html + +%.svg: %.dot + $(DOT) -Tsvg -o$@ $< + +$(SLIDES).pdf: slides.html $(wildcard css/*) $(wildcard img/*) $(svgfiles) + docker run --network host --rm -t -v `pwd`:/slides astefanutti/decktape http://localhost:5000 /slides/$(SLIDES).pdf + +slides-offline.html: slides.html + sed -e '1 a ' \ + -e 's!https://.*remark-latest\.min\.js!remark.min.js!' <$< >$@ + +remark.min.js: + curl -Lo $@ https://gnab.github.io/remark/downloads/remark-latest.min.js + +.PHONY: all clean offline pdf run run-offline + diff --git a/README.md b/README.md new file mode 100644 index 0000000..30edec8 --- /dev/null +++ b/README.md @@ -0,0 +1,18 @@ + +# Slides for "Bring Your Own User-Agent" + +This directory contains the slides for my talk entitled "Bring Your Own User-Agent". + +The slides were written in [Markdown](https://daringfireball.net/projects/markdown/) format and can be rendered with +[remark](http://remarkjs.com/). + +## Options + +To view the slides: + + make run + +To build a PDF version of the slides: + + make pdf + diff --git a/css/common.css b/css/common.css new file mode 100644 index 0000000..8689442 --- /dev/null +++ b/css/common.css @@ -0,0 +1,107 @@ +@import url(https://fonts.googleapis.com/css?family=Open+Sans); +@import url(https://fonts.googleapis.com/css?family=Muli); +@import url(https://fonts.googleapis.com/css?family=Inconsolata); + +.remark-slide-content { + font-family: 'Open Sans'; + font-size: 22px; +} + +.remark-slide-content h1, +.remark-slide-content h2, +.remark-slide-content h3 { + font-family: Muli; + font-weight: bold; +} +.remark-slide-content h2 { + font-size: 40px; +} +.remark-slide-content h3 { + font-size: 30px; +} + +.remark-slide-content li { + line-height: 2em; +} +.remark-slide-content .condensed li { + line-height: 1em; +} + +.remark-code, .remark-inline-code { + font-family: Inconsolata, monospace; +} +.remark-code { + border-radius: 5px; + border: 1px solid #ccc; +} + +.remark-slide-content blockquote { + border-radius: 5px; + border: 1px solid #ccc; + background: #f0f0f0; + margin: 1.5em 0; + padding: 1em; + quotes: "\201C""\201D""\2018""\2019"; + position: relative; +} +.remark-slide-content blockquote:before { + color: #ccc; + position: absolute; + content: open-quote; + font-size: 6em; + line-height: 0.1em; + margin-right: 0.25em; + vertical-align: -0.4em; +} + +.remark-slide-content .col { + box-sizing: border-box; + display: block; + float: left; + border: 0; + margin: 0; + padding: 0; + width: 50%; +} +.remark-slide-content .col:nth-of-type(odd) { + padding: 0 1em 0 0; +} +.remark-slide-content .col:nth-of-type(even) { + padding: 0 0 0 1em; +} +.remark-slide-content .col.sep:nth-of-type(odd) { + border-right: 1px solid #ccc; +} +.remark-slide-content .col.sep:nth-of-type(even) { + border-left: 1px solid #ccc; +} + +/* fix non-collapsing margin */ +.remark-slide-content .marginfix h3, +.remark-slide-content .marginfix ul { + margin-top: 0; +} + +.remark-slide-content .top-right { + float: right; + margin: 50px 0 0 2em; +} + +.remark-slide-content .highlight { + color: #7d9726; +} + +.big { + font-size: 150%; +} +.small { + font-size: 50%; +} + +.remark-code-line-highlighted { + background-color: rgba(200,200,255,.25); +} +.hljs-hybrid .hljs { + background: rgba(29,31,33,.96); +} + diff --git a/css/slides.css b/css/slides.css new file mode 100644 index 0000000..b4e4513 --- /dev/null +++ b/css/slides.css @@ -0,0 +1,9 @@ + +.img-map img { + width: 75%; +} + +.ex-code .perl { + font-size: 38px; +} + diff --git a/img/deps1.png b/img/deps1.png new file mode 100644 index 0000000..d285c57 Binary files /dev/null and b/img/deps1.png differ diff --git a/img/deps2.png b/img/deps2.png new file mode 100644 index 0000000..0c1c1a6 Binary files /dev/null and b/img/deps2.png differ diff --git a/img/deps3.png b/img/deps3.png new file mode 100644 index 0000000..6642d57 Binary files /dev/null and b/img/deps3.png differ diff --git a/img/deps4.png b/img/deps4.png new file mode 100644 index 0000000..8e76c48 Binary files /dev/null and b/img/deps4.png differ diff --git a/img/deps5.png b/img/deps5.png new file mode 100644 index 0000000..e81a85d Binary files /dev/null and b/img/deps5.png differ diff --git a/img/http-anyua-diagram.dot b/img/http-anyua-diagram.dot new file mode 100644 index 0000000..8917205 --- /dev/null +++ b/img/http-anyua-diagram.dot @@ -0,0 +1,28 @@ + +digraph G { + node + [ + fontname = "Inconsolata" + fontsize = 20 + shape = record + style = rounded + margin = "0.2,0.2" + ] + + edge + [ + fontname = "Inconsolata" + fontsize = 18 + arrowhead = vee + arrowtail = vee + arrowsize = 2 + ] + + "WebService module" -> "HTTP::AnyUA->request" + "HTTP::AnyUA->request" -> "Real user agent,\ne.g. HTTP::Tiny" [label=" Transform request and response "] + "Real user agent,\ne.g. HTTP::Tiny" -> "internet" + "internet" -> "Real user agent,\ne.g. HTTP::Tiny" + "Real user agent,\ne.g. HTTP::Tiny" -> "HTTP::AnyUA->request" + "HTTP::AnyUA->request" -> "WebService module" +} + diff --git a/img/http-anyua-middleware-diagram.dot b/img/http-anyua-middleware-diagram.dot new file mode 100644 index 0000000..633d85e --- /dev/null +++ b/img/http-anyua-middleware-diagram.dot @@ -0,0 +1,32 @@ + +digraph G { + node + [ + fontname = "Inconsolata" + fontsize = 20 + shape = record + style = rounded + margin = "0.2,0.2" + ] + + edge + [ + fontname = "Inconsolata" + fontsize = 18 + arrowhead = vee + arrowtail = vee + arrowsize = 2 + ] + + "WebService module" -> "HTTP::AnyUA->request" + "HTTP::AnyUA->request" -> "Middleware" + "Middleware" -> "Real user agent,\ne.g. HTTP::Tiny" [label=" Transform request and response "] + "Real user agent,\ne.g. HTTP::Tiny" -> "internet" + "internet" -> "Real user agent,\ne.g. HTTP::Tiny" + "Real user agent,\ne.g. HTTP::Tiny" -> "Middleware" + "Middleware" -> "HTTP::AnyUA->request" + "HTTP::AnyUA->request" -> "WebService module" + + "Middleware" [style="rounded,filled",fillcolor="#88FF88"] +} + diff --git a/img/opg.png b/img/opg.png new file mode 100644 index 0000000..d85d2ca Binary files /dev/null and b/img/opg.png differ diff --git a/img/twilio.png b/img/twilio.png new file mode 100644 index 0000000..19dc341 Binary files /dev/null and b/img/twilio.png differ diff --git a/img/webservice-on-cpan-circled.png b/img/webservice-on-cpan-circled.png new file mode 100644 index 0000000..faedb72 Binary files /dev/null and b/img/webservice-on-cpan-circled.png differ diff --git a/img/webservice-on-cpan.png b/img/webservice-on-cpan.png new file mode 100644 index 0000000..50e9b67 Binary files /dev/null and b/img/webservice-on-cpan.png differ diff --git a/js/common.js b/js/common.js new file mode 100644 index 0000000..3832adb --- /dev/null +++ b/js/common.js @@ -0,0 +1,55 @@ + +/* + * Create a shortcut on a number key to jump to a named slide. + * + * Using the hotkey on the target slide will go "back" to the slide that was active before jumping + * to the target slide. + * + * Example: Jump to the slide named "myslide" when the "1" key is pressed. + * createHotkey(1, 'myslide'); + */ +function createHotkey(key, slideName) { + var targetSlide = slideshow.getSlideByName(slideName); + var lastSlide = -1; + document.addEventListener('keydown', function(e) { + if (e.which === key + 48) { + var currentNum = slideshow.getCurrentSlideIndex() + 1; + var targetNum = targetSlide.getSlideIndex() + 1; + if (currentNum !== targetNum) { + lastSlide = currentNum; + slideshow.gotoSlide(targetNum); + } + else { + slideshow.gotoSlide(lastSlide); + } + } + }); +}; + +/* + * Set a hotkey "u" to navigate backwards in time. + * + * If you get on the wrong slide, this might be the easiest way to get back on track. This is what + * you might expect the browser's "Back" button to do if it worked. + */ +(function() { + var history = []; + var skip = false; + slideshow.on('hideSlide', function(slide) { + if (skip) { + skip = false; + return; + } + history.push(slide.getSlideIndex() + 1); + }); + document.addEventListener('keydown', function(e) { + if (e.which === 85 /* [u]ndo */) { + var lastNum = history.pop(); + if (lastNum) { + skip = true; + slideshow.gotoSlide(lastNum); + } + } + }); +})(); + diff --git a/slides.html b/slides.html new file mode 100644 index 0000000..37678e6 --- /dev/null +++ b/slides.html @@ -0,0 +1,501 @@ + +Bring Your Own User-Agent +