Skip to content

Commit fb28098

Browse files
committed
docs: initial commit
Signed-off-by: Lorenzo Fontana <[email protected]>
0 parents  commit fb28098

20 files changed

+356
-0
lines changed

LICENSE

+18
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
For compatibility with the Linux Kernel licensing rules,
2+
all the C code (in files with extension *.c and *.h) in this repostiroy
3+
is licensed under GPL-2.0+ (GNU General Public License v2.0 or later).
4+
5+
GPL-2.0: https://www.gnu.org/licenses/old-licenses/gpl-2.0.html
6+
Kernel licensing rules: https://www.kernel.org/doc/html/latest/process/license-rules.html
7+
8+
The rest of the code in this repository is licensed under the Apache License
9+
Version 2.0. You may obtain a copy of this license at:
10+
11+
http://www.apache.org/licenses/LICENSE-2.0
12+
13+
The instructions and slides in this repository (e.g. the files
14+
with extension .md and .yml in the "slides" subdirectory) are
15+
under the Creative Commons Attribution 4.0 International Public
16+
License. You may obtain a copy of this license at:
17+
18+
https://creativecommons.org/licenses/by/4.0/legalcode

README.md

+22
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
# BPF Workshop
2+
3+
## Authors
4+
5+
- [David Calavera](https://github.com/calavera)
6+
- [Lorenzo Fontana](https://github.com/fntlnz)
7+
8+
## Build and run
9+
10+
You need [hugo](https://gohugo.io/) in your path, then
11+
12+
```
13+
hugo serve
14+
```
15+
16+
## Thanks to
17+
18+
- Many thanks to [Jérôme Petazzoni](https://github.com/jpetazzo), we adapted Jérôme's template
19+
from [container.training](https://container.training) to Hugo
20+
- Thanks to the [remark](https://github.com/gnab/remark) authors for their work on it, it's the tool
21+
we use to generate the slides.
22+
- Thanks to the [hugo](https://gohugo.io/) authors, for the awesome static site generator!

archetypes/default.md

+11
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
---
2+
title: "{{ replace .Name "-" " " | title }}"
3+
weight: 100
4+
---
5+
6+
# Hi I'm an example
7+
Let's do some eBPF
8+
9+
.exercise[
10+
bpf code
11+
]

archetypes/details.md

+12
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
---
2+
title: "{{ replace .Name "-" " " | title }}"
3+
weight: 100
4+
class: extra-details
5+
---
6+
7+
# Extra details
8+
9+
Your content here
10+
11+
12+
If you like emojis .emoji[🐕]

config.toml

+5
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
baseURL = "http://example.org/"
2+
languageCode = "en-us"
3+
title = "My New Hugo Site"
4+
theme = "workshop"
5+
publishDir = "docs"

content/exercise-example.md

+27
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
---
2+
title: "exercise example"
3+
weight: 30
4+
class: extra-details
5+
---
6+
7+
## Exercise example
8+
9+
.exercise[
10+
Write this code in a file called test.bt
11+
```
12+
tracepoint:syscalls:sys_enter_read
13+
{
14+
@start[tid] = nsecs;
15+
}
16+
17+
tracepoint:syscalls:sys_exit_read / @start[tid] /
18+
{
19+
@times = hist(nsecs - @start[tid]);
20+
delete(@start[tid]);
21+
}
22+
```
23+
Execute it with
24+
```bash
25+
bpftrace read.bt
26+
```
27+
]

content/introduction.md

+8
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
---
2+
title: "introduction"
3+
weight: 20
4+
---
5+
# Introduction
6+
7+
Needs to be written!
8+

content/presenters.md

+15
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
---
2+
title: "presenters"
3+
weight: 11
4+
class: extra-details
5+
---
6+
7+
- Hello! We are:
8+
9+
- .emoji[🐕] David Calavera ([@calavera](https://twitter.com/calavera), Netlify)
10+
11+
- .emoji[🐕] Lorenzo Fontana ([@fntlnz](https://twitter.com/fntlnz), Sysdig)
12+
13+
- The workshop will run from 9:00am to 12:30pm
14+
15+
- Feel free to interrupt for questions at any time

content/welcome.md

+16
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
---
2+
title: "welcome"
3+
weight: 10
4+
class: title
5+
---
6+
7+
Linux <i><b>e</b>xtended <b>B</b>erkeley <b>P</b>acket <b>F</b>ilters</i>
8+
9+
10+
.footnote[
11+
**Be kind to the WiFi!**<br/>
12+
*Be kind with others*<br/>
13+
*Thank you!*
14+
15+
**Slides: https://bpf.sh/workshop**
16+
]

themes/workshop/layouts/_default/list.html

Whitespace-only changes.

themes/workshop/layouts/_default/single.html

Whitespace-only changes.

themes/workshop/layouts/index.html

+10
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
<!DOCTYPE html>
2+
<html>
3+
{{ partial "header.html" . }}
4+
5+
<body>
6+
{{ partial "slides.html" . }}
7+
{{ partial "footer.html" . }}
8+
</body>
9+
10+
</html>
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
<script src="//gnab.github.io/remark/downloads/remark-latest.min.js"></script>
2+
<script>
3+
var slideshow = remark.create({
4+
ratio: '16:9',
5+
highlightSpans: true,
6+
});
7+
</script>
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
<head>
2+
<title>{{ .Title }}</title>
3+
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
4+
<link rel="stylesheet" href="/workshop.css">
5+
</head>
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
<textarea id="source">
2+
{{ range .Data.Pages.ByWeight }}
3+
class: {{ .Params.class }}
4+
{{ .Content}}
5+
---
6+
{{ end }}
7+
</textarea>
13.3 KB
Loading
23.7 KB
Loading
15.2 KB
Loading

themes/workshop/static/workshop.css

+191
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,191 @@
1+
/* Originally coming from: https://github.com/jpetazzo/container.training/blob/master/slides/workshop.css */
2+
3+
@import url(https://fonts.googleapis.com/css?family=Droid+Serif:400,700,400italic);
4+
@import url(https://fonts.googleapis.com/css?family=Ubuntu+Mono:400,700,400italic);
5+
6+
@import url('https://fonts.googleapis.com/css?family=Inconsolata:400,700');
7+
@import url('https://fonts.googleapis.com/css?family=Open+Sans');
8+
9+
/* Fonts! Sizes! And a bit of color. */
10+
.remark-slide-content {
11+
font-family: 'Droid Serif';
12+
font-size: 25px !important;
13+
}
14+
15+
.emoji {
16+
font-family: 'EmojiOne Color';
17+
}
18+
19+
h1, h2, h3, h4, h5, h6 {
20+
font-family: 'Droid Serif';
21+
font-weight: bold;
22+
font-size: 45px !important;
23+
margin-top: 0.5em;
24+
}
25+
26+
code {
27+
font-family: 'Inconsolata';
28+
font-size: 110%;
29+
background-color: #ccc;
30+
}
31+
code.remark-code {
32+
font-size: 100%;
33+
}
34+
.exercise ul li code.remark-code.hljs.bash {
35+
padding: 0;
36+
}
37+
38+
/* For print! Borrowed from https://github.com/gnab/remark/issues/50 */
39+
@page {
40+
size: 1210px 681px;
41+
margin: 0;
42+
}
43+
44+
@media print {
45+
.remark-slide-scaler {
46+
width: 100% !important;
47+
height: 100% !important;
48+
transform: scale(1) !important;
49+
top: 0 !important;
50+
left: 0 !important;
51+
}
52+
}
53+
54+
/* Don't change things below this unless you know what you're doing! */
55+
56+
/* put slide numbers in top-right corner instead of bottom-right */
57+
div.remark-slide-number {
58+
top: 6px;
59+
left: unset;
60+
bottom: unset;
61+
right: 6px;
62+
}
63+
64+
.debug {
65+
font-family: monospace;
66+
position: absolute;
67+
left: 0px;
68+
right: 0px;
69+
bottom: 0px;
70+
color: white;
71+
background-color: black;
72+
opacity: 0;
73+
}
74+
.debug a {
75+
color: white;
76+
}
77+
.debug:hover {
78+
opacity: 1;
79+
}
80+
81+
a {
82+
text-decoration: none;
83+
color: blue;
84+
}
85+
86+
.remark-slide-content { padding: 1em 2.5em 1em 2.5em; }
87+
88+
.footnote {
89+
position: absolute;
90+
bottom: 1em;
91+
}
92+
span.footnote {
93+
bottom: 2em;
94+
}
95+
96+
.red { color: #fa0000; }
97+
.gray { color: #ccc; }
98+
.small { font-size: 70%; }
99+
.big { font-size: 140%; }
100+
.underline { text-decoration: underline; }
101+
.strike { text-decoration: line-through; }
102+
103+
/* On pic slides, zoom images as big as possible */
104+
div.pic {
105+
padding: 0;
106+
vertical-align: middle;
107+
}
108+
div.pic p {
109+
margin: 0;
110+
}
111+
div.pic img {
112+
display: block;
113+
margin: auto;
114+
max-width: 1210px;
115+
max-height: 550px;
116+
}
117+
div.pic h1, div.pic h2, div.title h1, div.title h2 {
118+
text-align: center;
119+
}
120+
121+
/* Center images that are on title slides */
122+
div.title img {
123+
display: block;
124+
margin: auto;
125+
max-width: 1210px;
126+
max-height: 420px; /* Arbitrary value to have so space for the title */
127+
}
128+
div.title {
129+
vertical-align: middle;
130+
}
131+
div.title > p:first-child {
132+
text-align: center;
133+
font-size: 300%;
134+
}
135+
136+
div.pic span.interstitial img {
137+
width: 100%;
138+
max-height: unset;
139+
max-width: unset;
140+
}
141+
142+
/* "Normal" images (not on title or pic slides) shouldn't be too big */
143+
div img {
144+
max-width: 1210px;
145+
max-height: 250px;
146+
}
147+
148+
.nav {
149+
text-align: center;
150+
position: absolute;
151+
left: 0;
152+
right: 0;
153+
bottom: 25px;
154+
font-size: 150%;
155+
}
156+
157+
.warning {
158+
background-image: url("images/warning.png");
159+
background-size: 1.5em;
160+
padding-left: 2em;
161+
padding-top: 0.2em;
162+
padding-bottom: 0.2em;
163+
background-repeat: no-repeat;
164+
background-position: left;
165+
}
166+
.exercise {
167+
background-color: #eee;
168+
background-image: url("images/keyboard.png");
169+
background-size: 1.4em;
170+
background-repeat: no-repeat;
171+
background-position: 0.2em 0.2em;
172+
border: 2px dotted black;
173+
}
174+
.exercise:before {
175+
content: "Hands-on exercise";
176+
margin-left: 1.8em;
177+
}
178+
179+
li p { line-height: 1.25em; }
180+
181+
div.extra-details {
182+
background-image: url("images/extra-details.png");
183+
background-position: 0.5% 1%;
184+
background-size: 4%;
185+
}
186+
187+
/* This is used only for the history slide (the only table in this doc) */
188+
td {
189+
padding: 0.1em 0.5em;
190+
background: #eee;
191+
}

themes/workshop/theme.toml

+2
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
name = "workshop"
2+
description = "workshop theme"

0 commit comments

Comments
 (0)