Skip to content

Commit

Permalink
Merge pull request #90 from tomeshnet/remark-module-1
Browse files Browse the repository at this point in the history
The Remark-able Overhaul!
  • Loading branch information
Shrinks99 authored Mar 1, 2019
2 parents a8be5de + 48e2b80 commit 1d17201
Show file tree
Hide file tree
Showing 185 changed files with 24,669 additions and 886 deletions.
6 changes: 2 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -52,9 +52,7 @@ This course can be facilitated in an environment without internet access. Partic

## Workshop Materials

Class materials are written as [Markdown](https://en.wikipedia.org/wiki/Markdown) files and presentation slides are created as a Markdown-based [GitBook](https://www.gitbook.com). All generated assets are hosted on [GitHub Pages](https://tomeshnet.github.io/p2p-internet-workshop/) and packaged as a downloadable archive on [GitHub Releases](https://github.com/tomeshnet/p2p-internet-workshop/releases/latest).

When facilitating the workshop in an offline environment, you can run `gitbook serve` from a `presentation` directory to serve the slides on `http://localhost:4000`.
Class materials are written as [Markdown](https://en.wikipedia.org/wiki/Markdown) files and presentation slides are created as Markdown-based [Remark slides](https://github.com/gnab/remark). All generated assets are hosted on [GitHub Pages](https://tomeshnet.github.io/p2p-internet-workshop/) and packaged as a downloadable archive on [GitHub Releases](https://github.com/tomeshnet/p2p-internet-workshop/releases/latest).

If you want to generate course assets yourself, simply run `./install-dependencies.sh` and `./build.sh`. You will find the generated assets in the `output` folder. The `./package.sh` script is used to zip up the generated assets into downloadable archives and to create the course website.

Expand Down Expand Up @@ -92,7 +90,7 @@ Other accessories:

The first version of this syllabus is created by [Toronto Mesh](https://tomesh.net) contributors: [@benhylau](https://github.com/benhylau), [@darkdrgn2k](https://github.com/darkdrgn2k), [@dcwalk](https://github.com/dcwalk), [@uditvira](https://github.com/uditvira), [@Shrinks99](https://github.com/Shrinks99), and [@Pedro-on-a-bike](https://github.com/Pedro-on-a-bike). While most of the material is created new, the course also incorporates many prior works listed [here](https://tomeshnet.github.io/p2p-internet-workshop/articles/general/general-extra-resources.pdf), or otherwise referenced in their individual course modules.

Hands-on activities rely on software from many projects: [mesh-orange](https://github.com/tomeshnet/mesh-orange), [mesh-router-builder](https://github.com/benhylau/mesh-router-builder), [mesh-workshop](https://github.com/benhylau/mesh-workshop/), [steamlink](https://github.com/steamlink), [cjdns](https://github.com/cjdelisle/cjdns/), [Yggdrasil](https://yggdrasil-network.github.io/about.html), [IPFS](https://ipfs.io/), [Secure Scuttlebutt](https://github.com/ssbc/). Course material generation uses [markdown-pdf](https://github.com/alanshaw/markdown-pdf) and [gitbook-cli](https://github.com/GitbookIO/gitbook-cli). The course website is built with [Jekyll](https://jekyllrb.com/), and the theme is from [Mozilla's Open Leadership Training Series](https://github.com/mozilla/open-leadership-training-series). Icons from [Font Awesome](http://fontawesome.io/) and [Jake Ingman](https://thenounproject.com/search/?q=mesh&i=74809) are used.
Hands-on activities rely on software from many projects: [mesh-orange](https://github.com/tomeshnet/mesh-orange), [mesh-router-builder](https://github.com/benhylau/mesh-router-builder), [mesh-workshop](https://github.com/benhylau/mesh-workshop/), [steamlink](https://github.com/steamlink), [cjdns](https://github.com/cjdelisle/cjdns/), [Yggdrasil](https://yggdrasil-network.github.io/about.html), [IPFS](https://ipfs.io/), [Secure Scuttlebutt](https://github.com/ssbc/). Course material generation uses [markdown-pdf](https://github.com/alanshaw/markdown-pdf) and [decktape](https://github.com/astefanutti/decktape). The course website is built with [Jekyll](https://jekyllrb.com/), and the theme is from [Mozilla's Open Leadership Training Series](https://github.com/mozilla/open-leadership-training-series). Icons from [Font Awesome](http://fontawesome.io/) and [Jake Ingman](https://thenounproject.com/search/?q=mesh&i=74809) are used.

## License

Expand Down
47 changes: 31 additions & 16 deletions build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -8,10 +8,14 @@ mkdir output
css="pdf.css"
echo "Using CSS styles from $css"

# Define starting directory
base_dir="$(pwd)"

# Create folder for general assets
mkdir output/general

# Generate general assets
for doc in general/*.md; do
# Create folder for general assets
mkdir output/general

# Generate assets as .pdf
if [ -f $doc ]; then
Expand All @@ -21,10 +25,13 @@ for doc in general/*.md; do
fi
done

# Copy technical files used by Remark
cp -r "slide-files" "output/"

# Go through each module
for mod in module-*; do
# Create folder for module
mkdir "$mod"
mkdir "output/$mod"

# Generate lesson plan .pdf
doc="$mod/README.md"
Expand All @@ -34,21 +41,29 @@ for mod in module-*; do
markdown-pdf "$doc" --out "$out" --cwd "$mod" --css-path "$css"
fi

# Generate worksheets as .pdf
mkdir "output/$mod/worksheet"
for doc in $mod/worksheet/*.md; do
# Generate handouts as .pdf
mkdir "output/$mod/handouts"
for doc in $mod/handouts/*.md; do
if [ -f $doc ]; then
out="output/$mod/worksheet/$(echo "$doc" | sed 's|/|-|g' | sed 's|.md|.pdf|')"
echo "Generating worksheet from $doc to $out"
markdown-pdf "$doc" --out "$out" --cwd "$mod/worksheet" --css-path "$css"
out="output/$mod/handouts/$(echo "$doc" | sed 's|/|-|g' | sed 's|.md|.pdf|')"
echo "Generating handouts from $doc to $out"
markdown-pdf "$doc" --out "$out" --cwd "$mod/handouts" --css-path "$css"
fi
done

# Generate presentation GitBook
book="$mod/presentation"
if [ -d $book ]; then
out="output/$mod/presentation"
echo "Generating presentation from $book to $out"
gitbook build "$book" "$out"
fi
# Copy Remark presentation and generate .pdf copy with DeckTape
doc="presentation.html"
cd $mod
if [ -f $doc ]; then
# Generate .pdf
out="../output/$mod/handouts/$mod-presentation.pdf"
echo "Generating presentation from $mod/$doc to $out"
decktape remark "$doc" "$out" --chrome-arg=--allow-file-access-from-files

# Copy Remark presentation
cp -r "slide-images" "../output/$mod/"
cp "$doc" "../output/$mod/"
fi
cd $base_dir

done
6 changes: 3 additions & 3 deletions install-dependencies.sh
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
#!/usr/bin/env bash

# For generating course materials in PDF
# For rendering course materials to .pdf
npm install -g markdown-pdf

# For generating presentation slides with GitBook
npm install -g gitbook-cli
# For converting Remark presentations to .pdf
npm install -g decktape

# For generating course website with Jekyll
gem install bundler
File renamed without changes.
File renamed without changes.
File renamed without changes.
168 changes: 168 additions & 0 deletions module-1/presentation.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,168 @@
<!DOCTYPE html>
<html>
<head>
<title>Module One</title>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta http-equiv="X-UA-Compatible" content="ie=edge">
<link rel="stylesheet" href="../slide-files/slide.css">
<script src="../slide-files/remark.js"></script>
</head>

<body>

<textarea id="source">
class: center, middle

# Building the Peer-to-Peer Internet

---

# Module 1: What is mesh?

1. About this workshop series
2. Meshnets and peer-to-peer applications
3. Peer-to-peer file sharing over a meshnet
4. Investigating our technologies
5. Wrap-up & homework

---
class: center, middle

# About this workshop series

---

# Who made this?

This workshop series is made by [Toronto Mesh](https://tomesh.net), a group of volunteers using off-the-shelf hardware and peer-to-peer software to build a community mesh network.

Over the course of six workshops, we will:

- Learn how to build and maintain mesh networks
- Familiarize with peer-to-peer applications and their values vs. centralized systems
- Reflect on the politics of our technologies and what a distributed web may bring

The syllabus, along with all course material is open-source and adapts resources from [Commotion Wireless](http://commotionwireless.net), [Meta Mesh](https://www.metamesh.org), [networks.land](http://networks.land), [(Re)Building Technology](http://communitytechnology.github.io/), among others.

You can find it here: https://github.com/tomeshnet/p2p-internet-workshop/

---
class: center, middle

# Meshnets and peer-to-peer applications

---

# Home internet

.center[![Home internet](slide-images/home-internet.svg)]

- In 2011, [Egypt internet shutdown](https://www.accessnow.org/five-years-later-the-internet-shutdown-that-rocked-egypt/) during Arab Spring, and in 2016, [Turkey passed legislation](https://turkeyblocks.org/2016/08/25/social-media-blocked-turkey/) allowing government to suspend access
- In 2017, [Hurrican Maria in Puerto Rico](https://dyn.com/blog/puerto-ricos-slow-internet-recovery/) caused significant damage to last-mile infrastructure, slow recovery of general internet access long after core infrastructure is restored

---

# Mesh topology

![Mesh topology](slide-images/mesh-topology.svg)

- [Great Firewall of China](https://en.wikipedia.org/wiki/Great_Firewall) routinely scans, censors, and modifies internet traffic
- In 2017 leading up to the Catalan referendum, the Spanish government [took down .cat domains](https://www.theregister.co.uk/2017/09/23/spanish_government_criticized_over_catalan_internet_registry_raid/) and [had the polling station app blocked](https://www.thespainreport.com/articles/1166-170929190146-google-removes-catalan-referendum-app-from-google-play-after-catalan-high-court-issues-take-down-order)
- [Equifax data breach of 2017](https://arstechnica.com/information-technology/2017/09/why-the-equifax-breach-is-very-possibly-the-worst-leak-of-personal-info-ever/) demonstrated significant security risk associated with large collections of personal information

---

# Peer-to-peer applications

![Peer-to-peer applications](slide-images/peer-to-peer-applications.svg)

- Distribute content to mesh nodes such that you can access them from your peers, and their peers, and so on...
- Content-addressing schemes allow you to self-verify integrity of the data, so you don't have to trust the data source
- Content replication across nodes + distributed communication infrastructure make it difficult for single actors to monitor, censor, or destroy information access, discourage large collections of personal information, and allows for democratic forms of moderation

---

# Mesh communities

- Established mesh networks such as [Freifunk](https://freifunk.net) and [Guifi](http://guifi.net/) in Europe, [Metamesh](https://www.metamesh.org) and [People's Open](https://peoplesopen.net) in the U.S., [AlterMundi](https://altermundi.net) in Argentina, and many more
- Common activities include flashing and putting up off-the-shelf routers, building free software and custom hardware, developing technical literacy material, providing low-cost internet access, community organizing locally and globally (such as [Battle Mesh](https://battlemesh.org))
- Large variations across different mesh communities in their approach and ambitions

---

# Peer-to-peer file sharing on a mesh

Each Raspberry Pi:
- Has a unique name in the form of `<hostname>.local`
- Advertises a WiFi SSID `<hostname>` which you can connect with `password` as password
- Connects to other in-range Raspberry Pis via a second WiFi interface to form a mesh

We will use the [InterPlanetary File System (IPFS)](https://ipfs.io), a peer-to-peer hypermedia protocol, to share content with each other on our own network.

You can think of the Raspberry Pi as your home router and modem connecting to your Internet Service Provider (ISP), except now it has a direct line to other content-serving mesh nodes just like itself, and has superpowers because it runs like a full computer.

---

# Investigate our technologies

Select a popular website or application and investigate based on the following criteria:

1. Mission & Ownership
2. Design & Access
3. Community & Local Impact
4. Profit & Sustainability
5. Teaching & Learning

.footnote[_This activity is based on [Explore Community Technology: Investigate Technology](https://communitytechnology.github.io/docs/intro-ct/investigate-tech/)._ ]

---
class: center, middle

# Wrap-up & Homework

---

# Recap

- Presented the general state of peer-to-peer networks and services
- Experimented with a distributed peer-to-peer application run over off-internet mesh network infrastructure
- Touched upon community models for creating and managing technologies

_Questions?_

---

# Homework

Next session we will dive into networking on GNU/Linux and explore the layers between the application we used today and the cable or WiFi radio connecting these nodes.

📝_Watch this awesome video at home!_

[Routing and the Postal System](https://www.youtube.com/watch?v=n7NBgJAhzZ0) from the [Metamesh YouTube channel](https://www.youtube.com/channel/UCGEnntxbGKMU9J9GIZ1LQUQ):
- Compares IP routing to postal delivery system
- Explains acronyms like IP, DHCP, and NAT
- Explains how addresses are distributed and routing in hierarchical ISP networks
- Provides background for future discussions about self-addressing of IPv6 and mesh based "flat" routing
</textarea>

<script>
var slideshow = remark.create({
// While the slide aspect ratio can be changed to '4:3' this can cause some content to be cut off. If you plan on changing this please reformat the slides accordingly!
ratio: '16:9',
slideNumberFormat:'',

// Presentation slide navigation options
navigation: {
scroll: false,
touch: true,
click: true,
},

// The highlight theme used by highlight.js to style code blocks
highlightStyle: 'atom-one-dark',
});
</script>

</body>
</html>
7 changes: 0 additions & 7 deletions module-1/presentation/README.md

This file was deleted.

15 changes: 0 additions & 15 deletions module-1/presentation/SUMMARY.md

This file was deleted.

1 change: 0 additions & 1 deletion module-1/presentation/part-0/README.md

This file was deleted.

7 changes: 0 additions & 7 deletions module-1/presentation/part-0/introduce-yourself.md

This file was deleted.

11 changes: 0 additions & 11 deletions module-1/presentation/part-0/who-runs-this.md

This file was deleted.

1 change: 0 additions & 1 deletion module-1/presentation/part-1/README.md

This file was deleted.

6 changes: 0 additions & 6 deletions module-1/presentation/part-1/home-internet.md

This file was deleted.

Loading

0 comments on commit 1d17201

Please sign in to comment.