feat: fleshed out the rest of teh skynet powerpoints
This commit is contained in:
parent
43b778d832
commit
5c4a61542c
6 changed files with 1740 additions and 4 deletions
3
.md.toml
3
.md.toml
|
@ -26,7 +26,8 @@ html_void = []
|
|||
enable = true
|
||||
# Set a base template
|
||||
# Optional
|
||||
general = "./src/template.html"
|
||||
#general = "./src/template.html"
|
||||
powerpoint = "./src/templates/powerpoint.html"
|
||||
|
||||
# Priority of the templates to use, first one to match a markdown file is used.
|
||||
# An Empty array below is also valid
|
||||
|
|
|
@ -7,11 +7,11 @@
|
|||
"utils": "utils"
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1683064728,
|
||||
"narHash": "sha256-Xj0HWfvNBpMl0RNRLRwLMk4uvGIZKzR6Ntiq3qk0ne0=",
|
||||
"lastModified": 1695591744,
|
||||
"narHash": "sha256-3gbqM5smCXV/MrEO9frmc/cJbKHFoUW/eOfFu88Dg9w=",
|
||||
"owner": "silver_rust",
|
||||
"repo": "bfom",
|
||||
"rev": "be713b865e5ee822b72926f1b4a1e058be9ee721",
|
||||
"rev": "12301d7e8dca2312c2e7db9760b953458b43b076",
|
||||
"type": "gitlab"
|
||||
},
|
||||
"original": {
|
||||
|
|
294
src/skynet/1_setup.md
Normal file
294
src/skynet/1_setup.md
Normal file
|
@ -0,0 +1,294 @@
|
|||
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
|
||||
title = "Skynet: Setup"
|
||||
date = 2023-09-23
|
||||
slides = true
|
||||
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
|
||||
|
||||
# Skynet: Setup
|
||||
|
||||
----------------------------------------------------------------------------
|
||||
|
||||
Now that ye have the history time to get you Skynet accounts.
|
||||
|
||||
----------------------------------------------------------------------------
|
||||
|
||||
This is for new members, if there are any older members please wait a little while.
|
||||
|
||||
----------------------------------------------------------------------------
|
||||
|
||||
## New Members
|
||||
|
||||
----------------------------------------------------------------------------
|
||||
|
||||
1. Be a fully paid up member of UL Computer Society
|
||||
|
||||
----------------------------------------------------------------------------
|
||||
|
||||
2. Go to <<https://account.skynet.ie/signup>> and enter the same email used for UL Wolves
|
||||
|
||||
----------------------------------------------------------------------------
|
||||
|
||||
3. You will get an email to verify your address, follow the link.
|
||||
|
||||
----------------------------------------------------------------------------
|
||||
|
||||
4. Choose a ``username`` and ``password``.
|
||||
|
||||
----------------------------------------------------------------------------
|
||||
|
||||
Congrats! You are in! //heist music//
|
||||
|
||||
----------------------------------------------------------------------------
|
||||
|
||||
## Returning Members
|
||||
|
||||
----------------------------------------------------------------------------
|
||||
|
||||
1. Please go to <<https://account.skynet.ie/modify>> and enter the same email used for UL Wolves
|
||||
|
||||
----------------------------------------------------------------------------
|
||||
|
||||
Congrats! You are in! //heist music//
|
||||
|
||||
----------------------------------------------------------------------------
|
||||
|
||||
## Returning Members
|
||||
|
||||
----------------------------------------------------------------------------
|
||||
|
||||
If you have forgotten your ``username`` please use <<https://account.skynet.ie/recover/username>>
|
||||
|
||||
----------------------------------------------------------------------------
|
||||
|
||||
If you have forgotten your ``password`` please use <<https://account.skynet.ie/recover/password>>
|
||||
|
||||
----------------------------------------------------------------------------
|
||||
|
||||
## All Members
|
||||
|
||||
----------------------------------------------------------------------------
|
||||
|
||||
Now that we are all on the same page we can now set an SSH key.
|
||||
|
||||
----------------------------------------------------------------------------
|
||||
|
||||
Prepwork:
|
||||
```bash
|
||||
cd ~/.ssh
|
||||
mkdir skynet
|
||||
cd skynet
|
||||
```
|
||||
|
||||
----------------------------------------------------------------------------
|
||||
|
||||
```bash
|
||||
ssh-keygen -t ed25519 -C "<comment>"
|
||||
```
|
||||
|
||||
Location: username
|
||||
Password: Press Enter twice
|
||||
|
||||
We will use the ``{username}.pub`` file later
|
||||
|
||||
----------------------------------------------------------------------------
|
||||
|
||||
Back to the ssh folder
|
||||
```bash
|
||||
cd ../
|
||||
```
|
||||
----------------------------------------------------------------------------
|
||||
|
||||
Windows
|
||||
```powershell
|
||||
"" > config
|
||||
```
|
||||
|
||||
|
||||
Linux
|
||||
```bash
|
||||
touch config
|
||||
```
|
||||
|
||||
----------------------------------------------------------------------------
|
||||
|
||||
Into it pop this
|
||||
```
|
||||
Host *.skynet.ie
|
||||
User %r
|
||||
IdentityFile ~/.ssh/skynet/%r
|
||||
IdentitiesOnly yes
|
||||
```
|
||||
(we will also ping this on discord)
|
||||
|
||||
----------------------------------------------------------------------------
|
||||
|
||||
Remember the ``{username}.pub`` in ``~/.ssh/skynet`` ?
|
||||
|
||||
----------------------------------------------------------------------------
|
||||
|
||||
```bash
|
||||
cat ~/.ssh/skynet/{username}.pub
|
||||
```
|
||||
|
||||
----------------------------------------------------------------------------
|
||||
|
||||
Copy the text and go to <<https://account.skynet.ie/modify>>
|
||||
|
||||
----------------------------------------------------------------------------
|
||||
|
||||
Select the SSH Key field and submit.
|
||||
|
||||
----------------------------------------------------------------------------
|
||||
|
||||
Congratulations, you now have full access to all of Skynet's services!
|
||||
|
||||
----------------------------------------------------------------------------
|
||||
|
||||
Now to learn //how// to access them!
|
||||
|
||||
----------------------------------------------------------------------------
|
||||
|
||||
## Gitlab
|
||||
|
||||
----------------------------------------------------------------------------
|
||||
|
||||
1. Go to <<https://gitlab.skynet.ie>>
|
||||
2. Login with ``username`` and ``password``
|
||||
3. Done
|
||||
|
||||
----------------------------------------------------------------------------
|
||||
|
||||
In a future session we will discuss Gitlab (and git in general) more.
|
||||
|
||||
----------------------------------------------------------------------------
|
||||
|
||||
## Email
|
||||
|
||||
----------------------------------------------------------------------------
|
||||
|
||||
1. Go to <<https://mail.skynet.ie/>>
|
||||
2. Login with ``username@skynet.ie`` and ``password``
|
||||
3. Done
|
||||
|
||||
----------------------------------------------------------------------------
|
||||
|
||||
## Email (Thunderbird)
|
||||
|
||||
----------------------------------------------------------------------------
|
||||
|
||||
0. Have Thunderbird Installed
|
||||
1. Add Account
|
||||
2. Login with ``username@skynet.ie`` and ``password``
|
||||
3. It can take a few min.
|
||||
4. Done
|
||||
|
||||
----------------------------------------------------------------------------
|
||||
|
||||
## Skynet Webserver
|
||||
|
||||
----------------------------------------------------------------------------
|
||||
|
||||
```bash
|
||||
ssh {username}@skynet.skynet.ie
|
||||
```
|
||||
|
||||
----------------------------------------------------------------------------
|
||||
|
||||
Thats it, you have logged into Skynet (webserver)!
|
||||
|
||||
----------------------------------------------------------------------------
|
||||
|
||||
## Skynet Website
|
||||
|
||||
----------------------------------------------------------------------------
|
||||
|
||||
The server you logged onto is a webserver.
|
||||
|
||||
----------------------------------------------------------------------------
|
||||
|
||||
This means it can serve content on the web.
|
||||
|
||||
----------------------------------------------------------------------------
|
||||
|
||||
Due to aforementioned //issues// we can only serve static files (no database)
|
||||
|
||||
----------------------------------------------------------------------------
|
||||
|
||||
This is more than enough for most folks needs.
|
||||
|
||||
----------------------------------------------------------------------------
|
||||
|
||||
We are going to create a ``public_html`` in your own home directory with correct permissions
|
||||
|
||||
----------------------------------------------------------------------------
|
||||
|
||||
```bash
|
||||
mkdir ~/public_html
|
||||
chmod 711 ~
|
||||
chmod -R 755 ~/public_html
|
||||
cd ~/public_html
|
||||
```
|
||||
|
||||
----------------------------------------------------------------------------
|
||||
|
||||
Now we have a folder, time to put something in it.
|
||||
|
||||
----------------------------------------------------------------------------
|
||||
|
||||
```bash
|
||||
nano index.html
|
||||
```
|
||||
|
||||
----------------------------------------------------------------------------
|
||||
|
||||
This brings up a terminal based editor, type whatever ye want here.
|
||||
|
||||
----------------------------------------------------------------------------
|
||||
|
||||
To exit press ``[ctrl]``+``[x]`` to bring up save options.
|
||||
You cna rename the file, for now just press ``[enter]``
|
||||
|
||||
----------------------------------------------------------------------------
|
||||
|
||||
If you go to <<https://{username}.users.skynet.ie>> then teh contents will be displayed.
|
||||
|
||||
----------------------------------------------------------------------------
|
||||
|
||||
That was cumbersome to do right?
|
||||
|
||||
----------------------------------------------------------------------------
|
||||
|
||||
Logging in only to change a file on terminal that you have never used before.
|
||||
|
||||
----------------------------------------------------------------------------
|
||||
|
||||
Surely there is a better way?
|
||||
|
||||
----------------------------------------------------------------------------
|
||||
|
||||
Well luckily for you programmers are lazy
|
||||
|
||||
----------------------------------------------------------------------------
|
||||
|
||||
There are ways to transfer files from your local computer to the server.
|
||||
|
||||
----------------------------------------------------------------------------
|
||||
|
||||
Fow Windows you have WinSCP: <<https://winscp.net/>>
|
||||
|
||||
----------------------------------------------------------------------------
|
||||
|
||||
If ye are using linux you can use put ``sftp://{username}@skynet.skynet.ie`` (or use filezilla)
|
||||
|
||||
----------------------------------------------------------------------------
|
||||
|
||||
Here completes the rough introduction to Skynet and creating websites.
|
||||
|
||||
----------------------------------------------------------------------------
|
||||
|
||||
If ye have any questions/ideas feel free to ask.
|
||||
|
||||
----------------------------------------------------------------------------
|
||||
|
||||
If ye want to take a deeper look into server administration feel free to ask.
|
||||
|
1366
src/templates/highlight.min.js
vendored
Normal file
1366
src/templates/highlight.min.js
vendored
Normal file
File diff suppressed because one or more lines are too long
1
src/templates/hybrid.min.css
vendored
Normal file
1
src/templates/hybrid.min.css
vendored
Normal file
|
@ -0,0 +1 @@
|
|||
pre code.hljs{display:block;overflow-x:auto;padding:1em}code.hljs{padding:3px 5px}.hljs{background:#1d1f21;color:#c5c8c6}.hljs span::selection,.hljs::selection{background:#373b41}.hljs span::-moz-selection,.hljs::-moz-selection{background:#373b41}.hljs-name,.hljs-title{color:#f0c674}.hljs-comment,.hljs-meta,.hljs-meta .hljs-keyword{color:#707880}.hljs-deletion,.hljs-link,.hljs-literal,.hljs-number,.hljs-symbol{color:#c66}.hljs-addition,.hljs-doctag,.hljs-regexp,.hljs-selector-attr,.hljs-selector-pseudo,.hljs-string{color:#b5bd68}.hljs-attribute,.hljs-code,.hljs-selector-id{color:#b294bb}.hljs-bullet,.hljs-keyword,.hljs-selector-tag,.hljs-tag{color:#81a2be}.hljs-subst,.hljs-template-tag,.hljs-template-variable,.hljs-variable{color:#8abeb7}.hljs-built_in,.hljs-quote,.hljs-section,.hljs-selector-class,.hljs-type{color:#de935f}.hljs-emphasis{font-style:italic}.hljs-strong{font-weight:700}
|
74
src/templates/powerpoint.html
Normal file
74
src/templates/powerpoint.html
Normal file
|
@ -0,0 +1,74 @@
|
|||
<!DOCTYPE html>
|
||||
<html lang='en'>
|
||||
<head>
|
||||
<title>{title}</title>
|
||||
|
||||
<!-- for code formatting -->
|
||||
<link rel="stylesheet" href="../templates/hybrid.min.css">
|
||||
<script src="../templates/highlight.min.js"></script>
|
||||
<script>hljs.highlightAll()</script>
|
||||
</head>
|
||||
<body>
|
||||
{body}
|
||||
</body>
|
||||
<style>
|
||||
section.slide {
|
||||
position: absolute;
|
||||
top: 50%;
|
||||
left: 50%;
|
||||
transform: translate(-50%, -50%) scale(3);
|
||||
}
|
||||
</style>
|
||||
<script>
|
||||
let slide_number = 0;
|
||||
let slide_max = 0;
|
||||
|
||||
for (let section of document.querySelectorAll("section.slide")) {
|
||||
let number = parseInt(section.id, 10);
|
||||
if (number > slide_max) {
|
||||
slide_max = number;
|
||||
}
|
||||
}
|
||||
|
||||
slide_next = (change) => {
|
||||
// make old hidden
|
||||
document.getElementById(`${slide_number}`).style.display = "none";
|
||||
|
||||
// make the change
|
||||
let slide_number_new = slide_number + change;
|
||||
if (slide_number_new >= 0 && slide_number_new <= slide_max) {
|
||||
slide_number += change;
|
||||
}
|
||||
|
||||
// make current visible
|
||||
document.getElementById(`${slide_number}`).style.display = "block";
|
||||
}
|
||||
|
||||
// add event listner
|
||||
onkeydown = (event) => {
|
||||
if (event.key === "ArrowRight" || event.key === "ArrowDown") {
|
||||
slide_next(1);
|
||||
}
|
||||
if (event.key === "ArrowLeft" || event.key === "ArrowUp") {
|
||||
slide_next(-1);
|
||||
}
|
||||
};
|
||||
|
||||
on_events = (clickTargetWidth, xCoordInClickTarget) => {
|
||||
if (clickTargetWidth / 2 > xCoordInClickTarget) {
|
||||
slide_next(-1);
|
||||
} else {
|
||||
slide_next(1);
|
||||
}
|
||||
}
|
||||
|
||||
onclick = (event) => {
|
||||
on_events(event.target.offsetWidth, event.clientX - event.target.getBoundingClientRect().left);
|
||||
};
|
||||
ontouchstart = (event) => {
|
||||
on_events(event.target.offsetWidth, event.touches[0].clientX - event.target.getBoundingClientRect().left);
|
||||
};
|
||||
// show the first slide
|
||||
slide_next(0)
|
||||
</script>
|
||||
</html>
|
Loading…
Reference in a new issue