Skip to content

Commit bda5e5a

Browse files
committed
First Draft YKNJS
1 parent 0a17df8 commit bda5e5a

File tree

1,120 files changed

+121296
-0
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

1,120 files changed

+121296
-0
lines changed

yknjs/LICENSE

Lines changed: 428 additions & 0 deletions
Large diffs are not rendered by default.

yknjs/README.md

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
# Presentation Title
2+
You know nothing, Jon Snow! OpenStack troubleshooting from a beginner's perspective.
3+
4+
How to tackle troubleshooting an OpenStack problem, from defining the problem, finding and testing a solution, to documenting the solution and sharing it with the world.
5+
6+
* * *
7+
8+
Presented by Elena Lindqvist at 2020 Open Infrastructure Summit, Oct 19-23, 2020
9+
10+
Rendered slides from this presentation are at <https://elenalind.github.io/yknjs>.
11+
12+
* * *
13+
14+
Made with [Cookiecutter](https://cookiecutter.readthedocs.io/) from gh:fghaas/cookiecutter-presentation.
15+
16+
License: CC-BY-SA

yknjs/bin/.gitignore

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
script
2+
script.timing

yknjs/bin/README.md

Lines changed: 70 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,70 @@
1+
# `bin`
2+
3+
This directory contains scripts that sometimes come in handy doing
4+
presentations.
5+
6+
## `screen.sh`
7+
8+
This is a wrapper around the Linux `script` command that invokes
9+
`screen -xR` (which spawns a new `screen`, or connects to an existing
10+
`screen` session if one is running).
11+
12+
This script requires the `script` and `mktemp` commands, which should
13+
be available for any contemporary distribution as installable packages
14+
&mdash; if they're not already installed by default.
15+
16+
## `shellinabox.sh`
17+
18+
This is another wrapper script that also starts `screen`, attaching to
19+
the same session as previously created by the `screen.sh` script, and
20+
exposes the terminal as a small embedded web server at
21+
<http://localhost:4200/>. You are then able to add this terminal to
22+
your screen, for the purpose of doing a live demo or anything else you
23+
might need a terminal for. To do so, simply include an inline frame in
24+
one of your slides, like so:
25+
26+
```html
27+
<iframe src="http://localhost:4200/"></iframe>
28+
```
29+
30+
Alternatively, you can also include the terminal as a slide
31+
background, which has the added advantage that you can easily
32+
configure it to fill the full available screen.
33+
34+
```html
35+
<!-- .slide: data-background-iframe="http://localhost:4200/" data-background-size="contain" -->
36+
```
37+
38+
## `demo.sh`
39+
40+
If you're using the `data-background-iframe` option in your slides,
41+
you will not be able to type into your screen session from within the
42+
presentation. However, with the `demo.sh` script you can still include
43+
a terminal demo easily:
44+
45+
- Ahead of your presentation, start `screen.sh` and `shellinabox.sh`.
46+
47+
- In addition, start `demo.sh`. This will simply create yet another
48+
connection to the same `screen` session.
49+
50+
- Start your presentation. Hit `s` for the speaker console, then pull
51+
your main window to your projector screen &mdash; be sure to put
52+
your browser into full-screen mode &mdash;, and leave the speaker
53+
console (and your terminal application) on your laptop display.
54+
55+
- When you get to your demo slide, use `Alt-Tab` to switch to the
56+
terminal, and type from there. Your typing will be displayed nicely,
57+
and in full width, on the projector screen.
58+
59+
- When your demo is complete, use `Alt-Tab` again to switch back to
60+
the speaker console, and continue advancing through your slides.
61+
62+
63+
## `asciinema.sh`
64+
65+
If you are making your slides available after your presentation, you
66+
may want to include a screencast of your demo. To turn your recorded
67+
`script` into an asciicast, simply run `asciinema.sh`. It uses
68+
`scriptreplay` to play back your demo, and then uploads it to
69+
[asciinema.org](http://www.asciinema.org).
70+

yknjs/bin/asciinema.sh

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
#!/bin/sh
2+
3+
set -e
4+
5+
SCRIPT="script"
6+
TIMING="$SCRIPT.timing"
7+
LC_ALL=en_US.UTF-8
8+
9+
asciinema rec -c "scriptreplay -t $TIMING $SCRIPT"

yknjs/bin/demo.sh

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
#!/bin/sh
2+
3+
"screen -xR"

yknjs/bin/screen.sh

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
#!/bin/sh
2+
3+
SCRIPT="script"
4+
TIMING="$SCRIPT.timing"
5+
6+
if [ -e $SCRIPT -o -e $TIMING ]; then
7+
echo "Please remove or rename $SCRIPT and $TIMING before continuing." >&2
8+
exit 1
9+
fi
10+
11+
script -c "screen -xR" -t${TIMING} $SCRIPT

yknjs/bin/shellinabox.sh

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
#!/bin/sh
2+
3+
set -e
4+
5+
dir=`dirname $0`
6+
pidfile="$dir/shellinaboxd.screen.pid"
7+
8+
# This assumes that screen is installed, and that the invoking user
9+
# is a member of a group whose name is identical to the username.
10+
shellinaboxd \
11+
--background=$pidfile \
12+
--localhost-only \
13+
--no-beep \
14+
--disable-ssl \
15+
--css=$dir/../css/shellinabox.css \
16+
--service /:$USER:$USER:HOME:"screen -xR"
17+
18+
echo "shellinaboxd started in background. Shutdown with \"kill -TERM `cat $pidfile`\"." >&2

yknjs/compile-and-add-css.sh

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
#!/bin/bash
2+
3+
# Compile Sass and add generated CSS
4+
SASS=`which pysassc || which sassc || which sass`
5+
for scss in css/*.scss; do
6+
css=${scss/.scss/.css}
7+
$SASS -t expanded $scss $css
8+
git add $css
9+
done
10+
git commit -m "Add compiled CSS"

yknjs/css/qrcode.css

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
.qrcode img {
2+
/* Override "block" display which qrcode.js sets by default, to allow
3+
proper centering */
4+
display: inline !important;
5+
height: 70% !important;
6+
width: auto !important;
7+
margin-left: auto;
8+
margin-right: auto;
9+
background-color: white !important;
10+
padding: 1em;
11+
}

0 commit comments

Comments
 (0)