doc: add asciinema recording as lfs

This commit is contained in:
Glenn Y. Rolland 2023-10-25 14:02:25 +02:00
parent 7010a3d1e8
commit 969a302404
14 changed files with 641 additions and 122 deletions

4
.gitattributes vendored Normal file
View file

@ -0,0 +1,4 @@
*.webm filter=lfs diff=lfs merge=lfs -text
*.gif filter=lfs diff=lfs merge=lfs -text
*.svg filter=lfs diff=lfs merge=lfs -text
*.rec filter=lfs diff=lfs merge=lfs -text

6
.gitignore vendored
View file

@ -1,2 +1,8 @@
# SPDX-License-Identifier: GPL-3.0-or-later
#
# SPDX-FileCopyrightText: 2023 Glenn Y. Rolland <glenux@glenux.net>
# Copyright © 2023 Glenn Y. Rolland <glenux@glenux.net>
.vagrant
bin
lib

View file

@ -47,6 +47,9 @@ Commands:
edit Adjust the configuration
```
### Demo
<video src="https://code.apps.glenux.net/glenux/mfm/raw/branch/develop/doc/output.webm" width="810" height="595" style="max-width: 100%;" controls="controls"></video>
## Configuration

34
Vagrantfile vendored Normal file
View file

@ -0,0 +1,34 @@
# frozen_string_literal: true
# -*- mode: ruby -*-
# vi: set ft=ruby :
Vagrant.configure('2') do |config|
config.vm.box = 'debian/bookworm64'
config.vm.box_check_update = false
config.vm.provider 'virtualbox' do |vb|
vb.gui = false
vb.memory = '4096'
end
config.vm.provider "libvirt" do |lv|
# lv.cpus = "2"
lv.memory = "4096"
# enable nested virtualization
lv.nested = true
lv.cpu_mode = "host-model"
end
# config.vm.synced_folder ".", "/vagrant", type: "nfs", mount_options: ["vers=3,tcp"]
# config.vm.synced_folder "../../exercises", "/exercises", type: "nfs", mount_options: ["vers=3,tcp"]
config.vm.define 'demo' do |machine|
machine.vm.hostname = 'demo'
machine.vm.network 'forwarded_port', guest: 8080, host: 8080, host_ip: '127.0.0.1'
machine.vm.network 'forwarded_port', guest: 80, host: 1080, host_ip: '127.0.0.1'
end
config.vm.provision 'shell', path: 'scripts/vagrant.provision.sh'
end

114
doc/SCRIPT.md Normal file
View file

@ -0,0 +1,114 @@
# Minimalist FUSE Manager
---
## Configuration
Let's start by configuring `~/mnt/mfm.yml`!
---
---
## Configuration
We can add as many filesystems we want in the `filesystems:` list.
---
## Configuration
Each filesystem has a `type:` and specific configuration parameters
The current values supported by *mfm* are `gocryptfs`, `httpdirfs` and `sshfs`.
---
## Preparation
Before using *mfm*, lets have a look at the `~/mnt/` directory.
---
---
## Preparation
Yes, it is empty!
Don't worry, the mountpoint will be created automatically.
---
## Usage
Ok. Now, simply run *mfm* and choose your favorite filesystem!
In this demo, I will choose `Public - Debian Repository` which is a remote web
page hosting debian packages and registy catalog.
---
---
## Usage
Hmmm...
What happened?
---
## Usage
A directory was created in `~/mnt`.
It is filled with files and directories from a remote system, in which we can
navigate.
---
## Usage
Let's detach it now!
Simply run *mfm* again, and choose the same filesystem.
---
---
## Usage
It is now detached, and the directory is empty again!
---
## Conclusion
The *mfm* command works in the same way regardless of the filesystem selected.
It's simple, fast and efficient.
---
## Conclusion
The *mfm* project is still in its infancy.
We're looking for contributors to test it, to improve it, to make it even more
useful and enjoyable to use.
---
## Conclusion
But if you're just a user, we're already happy.
---
## Conclusion
Now it's your turn to use *mfm*!

23
doc/demo.mfm.yml Normal file
View file

@ -0,0 +1,23 @@
---
version: 1
global:
mountpoint: "~/mnt"
filesystems:
- type: gocryptfs
name: "Personal - Encrypted Credentials"
encrypted_path: "/path/to/credentials/vault"
- type: httpdirfs
name: "Public - Remote Debian Repository"
url: "http://ftp.debian.org/debian/"
- type: sshfs
name: "Personal - Remote Media Server"
remote_user: user
remote_host: mediaserver.local
remote_port: 22
remote_path: "/remote/path/to/media"
#

BIN
doc/output.gif (Stored with Git LFS) Normal file

Binary file not shown.

View file

@ -1,34 +0,0 @@
{"version": 2, "width": 80, "height": 24, "timestamp": 1698144413, "env": {"PS1": null}}
[1.018165, "o", "\u001b[?2004h▪ \u001b[1;0m~/src/minimalist-fuse-manager.draft\u001b[0m ▪ \u001b[1;34mgit develop\u001b[0m ▪ \u001b[0;31mglenux@dione (x86_64)\u001b[0m \r\r\n$ "]
[1.455154, "o", "m"]
[1.950563, "o", "f"]
[2.470096, "o", "m"]
[3.276897, "o", "\r\n\u001b[?2004l\r"]
[3.305204, "o", "\u001b[?25l\u001b[J\u001b[6n\u001b[?25h"]
[3.305518, "o", "\u001b[?25l\n\u001b[G\n\u001b[G\n\u001b[G\n\u001b[G\n\u001b[G\n\u001b[G\n\u001b[G\n\u001b[G\n\u001b[G\u001b[?1000h\u001b[?1002h\u001b[?1006h\u001b[9A\u001b[G\u001b[K\u001b[6n\u001b[?25h"]
[3.306429, "o", "\u001b[?25l\r\u001b[;30m╭──────────────────────────────────────────────────────────────────────────────╮\u001b[m\u001b[1B\r\u001b[;30m│\u001b[m\u001b[;30m \u001b[m\u001b[;30m│\u001b[m\u001b[1B\r\u001b[;30m│\u001b[m\u001b[;30m \u001b[m\u001b[;30m│\u001b[m\u001b[1B\r\u001b[;30m│\u001b[m\u001b[;30m \u001b[m\u001b[;30m│\u001b[m\u001b[1B\r\u001b[;30m│\u001b[m\u001b[;30m \u001b[m\u001b[;30m│\u001b[m\u001b[1B\r\u001b[;30m│\u001b[m\u001b[;30m \u001b[m\u001b[;30m│\u001b[m\u001b[1B\r\u001b[;30m│\u001b[m\u001b[;30m \u001b[m\u001b[;30m│\u001b[m\u001b[1B\r\u001b[;30m│\u001b[m\u001b[;30m \u001b[m\u001b[;30m│\u001b[m\u001b[1B\r\u001b[;30m│\u001b[m\u001b[;30m \u001b[m\u001b[;30m│\u001b[m\u001b[1B\r\u001b[;30m╰──────────────────────────────────────────────────────────────────────────────╯\u001b[m\u001b[8A\r\u001b[2C\u001b[;m \r\u001b[2C\u001b[1B\r\u001b[2C\u001b[;m \r\u001b[2C\u001b[1B\r\u001b[2C\u001b[;m \r\u001b[2C\u001b[1B\r\u001b[2C\u001b[;m \r\u001b[2C\u001b[1B\r\u001b[2C\u001b[;m \r\u001b[2C\u001b[1B\r\u001b[2C\u001b[;m \r\u001b[2C\u001b[1B\r\u001b[2C\u001b[;m \r\u001b[2C\u001b[1B\r\u001b[2C\u001b[;m \r\u001b[2C\u001b[7A\r\u001b[2C\u001b[;m \r\u001b[2C\u001b[;1;34m>\u001b[m\u001b[;m \u001b[m\u001b[;1m\u001b[m\u001b[;1m\u001b[m\u001b[1B\r\u001b[2C\u001b[;m \r\u001b[4C\u001b[;37m4/4\u001b[m\u001b[;30m \u001b[m\u001b[;30m──────────────────────────────────────────────────────────────────────\u001b[m\u001b[;m \u001b[1A\r\u001b[4C\u001b[1B\r\u001b[2C\u001b[;m \r\u001b[4C\u001b[;37m4/4\u001b[m\u001b[;30m \u001b[m\u001b[;30m──────────────────────────────────────────────────────────────────────\u001b[m\u001b[;m \u001b[1B\r\u001b[2C\u001b[;1;31;40m>\u001b[m\u001b[;40m \u001b[m\u001b[;1;33;40mPersonal - Media Server\u001b[m\u001b[1B\r\u001b[2C\u001b[;40m \u001b[m\u001b[;m \u001b[;mPersonal - Private Documents\u001b[m\u001b[1B\r\u001b[2C\u001b[;40m \u001b[m\u001b[;m \u001b[;mPersonal - SSH Keys\u001b[m\u001b[1B\r\u001b[2C\u001b[;40m \u001b[m\u001b[;m \u001b[;mWork - SSH Keys\u001b[m\u001b[5A\r\u001b[4C\u001b[?25h"]
[3.326805, "o", "\u001b[?25l\r\u001b[4C\u001b[?25h"]
[4.012419, "o", "\u001b[?25l\u001b[2B\r\u001b[2C\u001b[;40m \u001b[m\u001b[;m \u001b[;mPersonal - Media Server\u001b[m\u001b[1B\r\u001b[2C\u001b[;1;31;40m>\u001b[m\u001b[;40m \u001b[m\u001b[;1;33;40mPersonal - Private Documents\u001b[m\u001b[3A\r\u001b[4C\u001b[?25h"]
[4.421863, "o", "\u001b[?25l\u001b[3B\r\u001b[2C\u001b[;40m \u001b[m\u001b[;m \u001b[;mPersonal - Private Documents\u001b[m\u001b[1B\r\u001b[2C\u001b[;1;31;40m>\u001b[m\u001b[;40m \u001b[m\u001b[;1;33;40mPersonal - SSH Keys\u001b[m\u001b[4A\r\u001b[4C\u001b[?25h"]
[5.306557, "o", "\u001b[?25l\u001b[1A\r\u001b[J\u001b[?1000l\u001b[?1002l\u001b[?1006l\u001b[?25h"]
[5.307334, "o", "\u001b[33m>> Personal - SSH Keys\u001b[0m\r\n"]
[5.320419, "o", "Password: "]
[9.765985, "o", "\r\nDecrypting master key\r\n"]
[9.920941, "o", "\u001b[32mFilesystem mounted and ready.\u001b[0m\r\n"]
[9.923946, "o", "\u001b["]
[9.924126, "o", "32mVault Personal - SSH Keys is now available on /home/glenux/mnt/Personal - SSH Keys.Open\u001b[0m\r\n"]
[9.955489, "o", "\u001b[?2004h▪ \u001b[1;0m~/src/minimalist-fuse-manager.draft\u001b[0m ▪ \u001b[1;34mgit develop\u001b[0m ▪ \u001b[0;31mglenux@dione (x86_64)\u001b[0m \r\r\n$ "]
[10.923069, "o", "mfm"]
[12.707564, "o", "\r\n\u001b[?2004l\r"]
[12.736036, "o", "\u001b[?25l\u001b[J\u001b[6n\u001b[?25h"]
[12.736303, "o", "\u001b[?25l\n\u001b[G\n\u001b[G\n\u001b[G\n\u001b[G\n\u001b[G\n\u001b[G\n\u001b[G\n\u001b[G\n\u001b[G\u001b[?1000h\u001b[?1002h\u001b[?1006h\u001b[9A\u001b[G\u001b[K\u001b[6n\u001b[?25h"]
[12.737161, "o", "\u001b[?25l\r\u001b[;30m╭──────────────────────────────────────────────────────────────────────────────╮\u001b[m\u001b[1B\r\u001b[;30m│\u001b[m\u001b[;30m \u001b[m\u001b[;30m│\u001b[m\u001b[1B\r\u001b[;30m│\u001b[m\u001b[;30m \u001b[m\u001b[;30m│\u001b[m\u001b[1B\r\u001b[;30m│\u001b[m\u001b[;30m \u001b[m\u001b[;30m│\u001b[m\u001b[1B\r\u001b[;30m│\u001b[m\u001b[;30m \u001b[m\u001b[;30m│\u001b[m\u001b[1B\r\u001b[;30m│\u001b[m\u001b[;30m \u001b[m\u001b[;30m│\u001b[m\u001b[1B\r\u001b[;30m│\u001b[m\u001b[;30m \u001b[m\u001b[;30m│\u001b[m\u001b[1B\r\u001b[;30m│\u001b[m\u001b[;30m \u001b[m\u001b[;30m│\u001b[m\u001b[1B\r\u001b[;30m│\u001b[m\u001b[;30m \u001b[m\u001b[;30m│\u001b[m\u001b[1B\r\u001b[;30m╰──────────────────────────────────────────────────────────────────────────────╯\u001b[m\u001b[8A\r\u001b[2C\u001b[;m \r\u001b[2C\u001b[1B\r\u001b[2C\u001b[;m \r\u001b[2C\u001b[1B\r\u001b[2C\u001b[;m \r\u001b[2C\u001b[1B\r\u001b[2C\u001b[;m \r\u001b[2C\u001b[1B\r\u001b[2C\u001b[;m \r\u001b[2C\u001b[1B\r\u001b[2C\u001b[;m \r\u001b[2C\u001b[1B\r\u001b[2C\u001b[;m \r\u001b[2C\u001b[1B\r\u001b[2C\u001b[;m \r\u001b[2C\u001b[7A\r\u001b[2C\u001b[;m \r\u001b[2C\u001b[;1;34m>\u001b[m\u001b[;m \u001b[m\u001b[;1m\u001b[m\u001b[;1m\u001b[m\u001b[1B\r\u001b[2C\u001b[;m \r\u001b[4C\u001b[;37m4/4\u001b[m\u001b[;30m \u001b[m\u001b[;30m──────────────────────────────────────────────────────────────────────\u001b[m\u001b[;m \u001b[1A\r\u001b[4C\u001b[1B\r\u001b[2C\u001b[;m \r\u001b[4C\u001b[;37m4/4\u001b[m\u001b[;30m \u001b[m\u001b[;30m──────────────────────────────────────────────────────────────────────\u001b[m\u001b[;m \u001b[1B\r\u001b[2C\u001b[;1;31;40m>\u001b[m\u001b[;40m \u001b[m\u001b[;1;33;40mPersonal - Media Server\u001b[m\u001b[1B\r\u001b[2C\u001b[;40m \u001b[m\u001b[;m \u001b[;mPersonal - Private Documents\u001b[m\u001b[1B\r\u001b[2C\u001b[;40m \u001b[m\u001b[;m \u001b[;mPersonal - SSH Keys [\u001b[m\u001b[;32mopen\u001b[m\u001b[;m]\u001b[m\u001b[1B\r\u001b[2C\u001b[;40m \u001b[m\u001b[;m \u001b[;mWork - SSH Keys\u001b[m\u001b[5A\r\u001b[4C\u001b[?25h"]
[12.75762, "o", "\u001b[?25l\r\u001b[4C\u001b[?25h"]
[13.461593, "o", "\u001b[?25l\u001b[2B\r\u001b[2C\u001b[;40m \u001b[m\u001b[;m \u001b[;mPersonal - Media Server\u001b[m\u001b[1B\r\u001b[2C\u001b[;1;31;40m>\u001b[m\u001b[;40m \u001b[m\u001b[;1;33;40mPersonal - Private Documents\u001b[m\u001b[3A\r\u001b[4C\u001b[?25h"]
[13.971552, "o", "\u001b[?25l\u001b[3B\r\u001b[2C\u001b[;40m \u001b[m\u001b[;m \u001b[;mPersonal - Private Documents\u001b[m\u001b[1B\r\u001b[2C\u001b[;1;31;40m>\u001b[m\u001b[;40m \u001b[m\u001b[;1;33;40mPersonal - SSH Keys [\u001b[m\u001b[;1;32;40mopen\u001b[m\u001b[;1;33;40m]\u001b[m\u001b[4A\r\u001b[4C\u001b[?25h"]
[14.82604, "o", "\u001b[?25l\u001b[1A\r\u001b[J\u001b[?1000l\u001b[?1002l\u001b[?1006l\u001b[?25h"]
[14.826742, "o", "\u001b[33m>> Personal - SSH Keys\u001b[0m\r\n"]
[14.835263, "o", "\u001b[32mVault Personal - SSH Keys is now closed.\u001b[0m\r\n"]
[14.866577, "o", "\u001b[?2004h▪ \u001b[1;0m~/src/minimalist-fuse-manager.draft\u001b[0m ▪ \u001b[1;34mgit develop\u001b[0m ▪ \u001b[0;31mglenux@dione (x86_64)\u001b[0m \r\r\n$ "]
[17.130639, "o", "\u001b[?2004l\r\r\n"]
[17.130855, "o", "exit\r\n"]

BIN
doc/output.rec (Stored with Git LFS) Normal file

Binary file not shown.

BIN
doc/output.svg (Stored with Git LFS)

File diff suppressed because one or more lines are too long

Before

Width:  |  Height:  |  Size: 28 KiB

After

Width:  |  Height:  |  Size: 132 B

BIN
doc/output.webm (Stored with Git LFS) Normal file

Binary file not shown.

373
doc/record-output.sh Normal file
View file

@ -0,0 +1,373 @@
#!/bin/bash
# shellcheck disable=SC2317
set -u
# parameters
konsole=org.kde.konsole-2913641
session=2
SLEEP_LONG_READ="3"
SLEEP_SHORT_READ="2"
SLEEP_TRANSITION="0.4"
SLEEP_COMMAND_BEFORE="0.4"
SLEEP_COMMAND_AFTER="0.65"
SLEEP_MICROPAUSE="0.25"
SLEEP_TYPESPEED="0.10"
qtype() {
qdbus "$konsole" "/Sessions/$session" sendText "$1"
}
qrun() {
qdbus "$konsole" "/Sessions/$session" runCommand "$1"
}
qctrlb() {
qdbus "$konsole" "/Sessions/$session" sendText $'\002'
}
qctrlc() {
qdbus "$konsole" "/Sessions/$session" sendText $'\003'
}
qtype_slow() {
echo -n "$1" \
| sed 's/\(.\)/\1\n/g' \
| while IFS="" read -r X ; do qtype "$X" ; sleep "$SLEEP_TYPESPEED" ; done
}
tmux_key() {
qctrlb
sleep 0.5
qtype "$1"
}
qtype_arrow_up() {
qtype $'\033'
qtype "[A"
}
qtype_arrow_down() {
qtype $'\033'
qtype "[B"
}
qtype_arrow_left() {
qtype $'\033'
qtype "[D"
}
qtype_arrow_right() {
qtype $'\033'
qtype "[C"
}
## cleanup
qctrlc
tmux_key "d"
qctrlc
qrun "clear"
sleep "$SLEEP_MICROPAUSE"
qrun "cd ~/src/mfm"
sleep "$SLEEP_MICROPAUSE"
qrun "cp doc/demo.mfm.yml ~/.config/mfm.yml"
sleep "$SLEEP_MICROPAUSE"
qrun "rm -f output.rec"
sleep "$SLEEP_MICROPAUSE"
qrun "tmux kill-session -t demo"
sleep "$SLEEP_MICROPAUSE"
qrun "mkdir -p /home/vagrant/mnt"
sleep "$SLEEP_MICROPAUSE"
qrun "fusermount -u \"/home/vagrant/mnt/Public - Remote Debian Repository\""
sleep "$SLEEP_MICROPAUSE"
qrun "rm -fr \"/home/vagrant/mnt/Public - Remote Debian Repository\""
sleep "$SLEEP_MICROPAUSE"
qrun "# cleanup done"
sleep "$SLEEP_LONG_READ"
## reset demo environment
qrun "tmux new -s demo"
sleep "$SLEEP_MICROPAUSE"
tmux_key "c"
qrun "cd ~/src/mfm"
sleep "$SLEEP_MICROPAUSE"
qrun "mdp --noslidenum doc/SCRIPT.md"
sleep "$SLEEP_MICROPAUSE"
tmux_key "c"
qrun "export PATH=\$PATH:~/src/mfm/bin"
sleep "$SLEEP_MICROPAUSE"
qrun "export FZF_DEFAULT_OPTS=\"--height 40% --layout=reverse --border\""
sleep "$SLEEP_MICROPAUSE"
qrun "alias cat=\"batcat -p\""
sleep "$SLEEP_MICROPAUSE"
qrun "cd ~/src/mfm"
sleep "$SLEEP_MICROPAUSE"
qrun "clear"
sleep "$SLEEP_MICROPAUSE"
tmux_key "1"
tmux_key ":"
qrun "set -g status off"
sleep "$SLEEP_MICROPAUSE"
tmux_key "d"
## record
qrun "asciinema rec --cols 80 --rows 24 -c 'tmux attach' output.rec"
# slide 1 (title)
sleep "$SLEEP_TRANSITION"
sleep "$SLEEP_LONG_READ"
# slide 2 (config file)
qtype " "
sleep "$SLEEP_TRANSITION"
sleep "$SLEEP_LONG_READ"
# cmd 2 (show config file)
qtype " "
sleep "$SLEEP_TRANSITION"
tmux_key "2"
qtype_slow "cat "
sleep "$SLEEP_MICROPAUSE"
qtype_slow "~/.config"
sleep "$SLEEP_MICROPAUSE"
qtype_slow "/mfm.yml"
sleep "$SLEEP_MICROPAUSE"
qrun ""
sleep "$SLEEP_LONG_READ" # double
sleep "$SLEEP_LONG_READ"
tmux_key "1"
# slide 3 (config options 1)
qtype " "
sleep "$SLEEP_TRANSITION"
sleep "$SLEEP_LONG_READ"
# slide 4 (config options 2)
qtype " "
sleep "$SLEEP_TRANSITION"
sleep "$SLEEP_LONG_READ"
# slide 5 (preparation - mnt)
qtype " "
sleep "$SLEEP_TRANSITION"
sleep "$SLEEP_LONG_READ"
# demo 5 (show mnt)
qtype " "
sleep "$SLEEP_TRANSITION"
tmux_key "2"
qtype_slow "cd "
sleep "$SLEEP_MICROPAUSE"
qtype_slow "~/mnt"
sleep "$SLEEP_COMMAND_BEFORE"
qtype $'\015'
sleep "$SLEEP_COMMAND_AFTER"
qtype_slow "ls"
sleep "$SLEEP_COMMAND_BEFORE"
qtype $'\015'
sleep "$SLEEP_COMMAND_AFTER"
sleep "$SLEEP_LONG_READ"
tmux_key "1"
# slide 6 (preparation - empty mnt!)
qtype " "
sleep "$SLEEP_TRANSITION"
sleep "$SLEEP_LONG_READ"
# slide 7 (usage - run)
qtype " "
sleep "$SLEEP_TRANSITION"
sleep "$SLEEP_LONG_READ"
# demo 7 (run mfm)
qtype " "
sleep "$SLEEP_TRANSITION"
tmux_key "2"
qtype_slow "m"
sleep "$SLEEP_MICROPAUSE"
qtype_slow "f"
sleep "$SLEEP_MICROPAUSE"
qtype_slow "m"
sleep "$SLEEP_COMMAND_BEFORE"
qtype $'\015'
sleep "$SLEEP_COMMAND_AFTER"
sleep "$SLEEP_SHORT_READ"
qtype_arrow_down
sleep "$SLEEP_MICROPAUSE"
qtype_arrow_down
sleep "$SLEEP_MICROPAUSE"
qtype_arrow_up
sleep "$SLEEP_COMMAND_BEFORE"
qtype $'\015'
sleep "$SLEEP_COMMAND_AFTER"
sleep "$SLEEP_LONG_READ"
tmux_key "1"
# slide 8 (usage - what?)
qtype " "
sleep "$SLEEP_TRANSITION"
sleep "$SLEEP_LONG_READ"
# demo 8 (usage - what : show mnt)
tmux_key "2"
qtype_slow "ls"
sleep "$SLEEP_COMMAND_BEFORE"
qtype $'\015'
sleep "$SLEEP_COMMAND_AFTER"
sleep "$SLEEP_SHORT_READ"
qtype_slow "cd \"Pub"
sleep "$SLEEP_MICROPAUSE"
qtype "lic - Remote Debian Repository\""
sleep "$SLEEP_COMMAND_BEFORE"
qtype $'\015'
sleep "$SLEEP_COMMAND_AFTER"
qtype_slow "ls"
sleep "$SLEEP_MICROPAUSE"
qtype $'\015'
sleep "$SLEEP_SHORT_READ"
qtype_slow "cd pool"
sleep "$SLEEP_COMMAND_BEFORE"
qtype $'\015'
sleep "$SLEEP_COMMAND_AFTER"
qtype_slow "ls"
sleep "$SLEEP_COMMAND_BEFORE"
qtype $'\015'
sleep "$SLEEP_COMMAND_AFTER"
sleep "$SLEEP_SHORT_READ"
qtype_slow "cd main"
sleep "$SLEEP_COMMAND_BEFORE"
qtype $'\015'
sleep "$SLEEP_COMMAND_AFTER"
qtype_slow "ls"
sleep "$SLEEP_COMMAND_BEFORE"
qtype $'\015'
sleep "$SLEEP_COMMAND_AFTER"
sleep "$SLEEP_LONG_READ"
tmux_key "1"
# slide 9 (usage - explanation)
qtype " "
sleep "$SLEEP_TRANSITION"
sleep "$SLEEP_LONG_READ"
# slide 10 (usage - prepare for detach)
qtype " "
sleep "$SLEEP_TRANSITION"
sleep "$SLEEP_LONG_READ"
# demo 10 (run mfm for detach)
qtype " "
sleep "$SLEEP_TRANSITION"
tmux_key "2"
qtype_slow "cd ~/mnt/"
sleep "$SLEEP_COMMAND_BEFORE"
qtype $'\015'
sleep "$SLEEP_COMMAND_AFTER"
qtype_slow "m"
sleep "$SLEEP_MICROPAUSE"
qtype_slow "f"
sleep "$SLEEP_MICROPAUSE"
qtype_slow "m"
sleep "$SLEEP_COMMAND_BEFORE"
qtype $'\015'
sleep "$SLEEP_COMMAND_AFTER"
sleep "$SLEEP_SHORT_READ"
qtype_arrow_down
sleep "$SLEEP_MICROPAUSE"
qtype_arrow_down
sleep "$SLEEP_MICROPAUSE"
qtype_arrow_up
sleep "$SLEEP_COMMAND_BEFORE"
qtype $'\015'
sleep "$SLEEP_COMMAND_AFTER"
sleep "$SLEEP_LONG_READ"
qtype_slow "ls"
sleep "$SLEEP_COMMAND_BEFORE"
qtype $'\015'
sleep "$SLEEP_COMMAND_AFTER"
sleep "$SLEEP_SHORT_READ"
qtype_slow "cd \"Pub"
sleep "$SLEEP_MICROPAUSE"
qtype "lic - Remote Debian Repository\""
sleep "$SLEEP_COMMAND_BEFORE"
qtype $'\015'
sleep "$SLEEP_COMMAND_AFTER"
sleep "$SLEEP_SHORT_READ"
qtype_slow "ls"
sleep "$SLEEP_COMMAND_BEFORE"
qtype $'\015'
sleep "$SLEEP_COMMAND_AFTER"
sleep "$SLEEP_SHORT_READ"
qtype_slow "ls -la"
sleep "$SLEEP_COMMAND_BEFORE"
sleep "$SLEEP_COMMAND_BEFORE"
qtype $'\015'
sleep "$SLEEP_COMMAND_AFTER"
sleep "$SLEEP_LONG_READ"
tmux_key "1"
# slide 11 (usage - detached)
qtype " "
sleep "$SLEEP_TRANSITION"
sleep "$SLEEP_LONG_READ"
# slide 12 (conclusion)
qtype " "
sleep "$SLEEP_TRANSITION"
sleep "$SLEEP_LONG_READ"
# slide 13 (conclusion)
qtype " "
sleep "$SLEEP_TRANSITION"
sleep "$SLEEP_LONG_READ"
# slide 14 (conclusion)
qtype " "
sleep "$SLEEP_TRANSITION"
sleep "$SLEEP_LONG_READ"
# slide 15 (conclusion)
qtype " "
sleep "$SLEEP_TRANSITION"
sleep "$SLEEP_LONG_READ"
# detach and clean
tmux_key "d"
qrun "tmux kill-session -t demo"
qrun "termtosvg render output.rec output.svg"
qrun "# success!"
exit 0

View file

@ -0,0 +1,72 @@
#!/bin/sh
# install crystal
set -e
set -u
USER="$(test -d /vagrant && echo "vagrant" || echo "debian")"
HOSTNAME="$(hostname)"
export DEBIAN_FRONTEND=noninteractive
echo "Installing required system packages"
apt-get update --allow-releaseinfo-change
apt-get install -y \
apt-transport-https \
ca-certificates \
git \
curl \
wget \
vim \
gnupg2 \
software-properties-common
echo "Installing recording requirements"
apt-get install -y \
tmux \
mdp \
bat \
asciinema \
termtosvg
echo "Installing mfm requirements"
apt-get install -y \
fzf \
sshfs \
httpdirfs \
libyaml-0-2 \
libyaml-dev \
libpcre3-dev \
libevent-dev
#!/bin/sh
set -e
set -u
USER="$(test -d /vagrant && echo "vagrant" || echo "debian")"
CLUSTERS_DIR=/home/$USER/clusters
# Installation de kompose
if [ ! -f /usr/local/bin/kompose ]; then
DL="$(mktemp)"
curl \
-L https://github.com/kubernetes/kompose/releases/download/v1.22.0/kompose-linux-amd64 \
-o "$DL"
chmod +x "$DL"
mv "$DL" /usr/local/bin/kompose
fi
# Installing asdf
su - "$USER" -c "git config --global advice.detachedHead false"
su - "$USER" -c "rm -rf ~/.asdf"
su - "$USER" -c "git clone --quiet https://github.com/asdf-vm/asdf.git \
~/.asdf \
--branch v0.8.0"
su - "$USER" -c "echo '. \$HOME/.asdf/asdf.sh' >> ~/.bashrc"
su - "$USER" -c "source \$HOME/.asdf/asdf.sh \
&& asdf plugin add crystal 2>&1 \
&& asdf install crystal 1.7.3 >/dev/null 2>&1 \
&& asdf global crystal 1.7.3"