mirror of https://gitlab.com/octtspacc/OcttKB
Manual push Fri Jun 9 12:16:37 AM CEST 2023
This commit is contained in:
parent
d1e396e1ac
commit
5a5714ff49
|
@ -22,7 +22,7 @@ jobs:
|
|||
sudo npm install -g tiddlywiki
|
||||
sudo pip3 install beautifulsoup4 html5lib
|
||||
bash ./Bootstrap.sh
|
||||
sh ./GitHub.Main.sh
|
||||
bash ./Deploy.Main.sh
|
||||
|
||||
- name: Deploy
|
||||
uses: JamesIves/github-pages-deploy-action@v4
|
||||
|
|
|
@ -10,7 +10,7 @@ pages:
|
|||
stage: deploy
|
||||
script: |
|
||||
ash ./Bootstrap.sh
|
||||
ash ./GitLab.Main.sh
|
||||
ash ./Deploy.Main.sh
|
||||
artifacts:
|
||||
paths:
|
||||
- public
|
||||
|
|
|
@ -1,4 +1,5 @@
|
|||
#!/bin/bash
|
||||
set -e # Exit on any error
|
||||
|
||||
# Ensure important directories
|
||||
mkdir -vp ./Repo
|
||||
|
@ -25,7 +26,7 @@ cd ..
|
|||
|
||||
# Move the files of this repo to overwrite the extracted ones, then move everything back
|
||||
# This is so, if present, files from the repo are preferred, if needed in case of emergency
|
||||
mv ./Repo/* ./Repo.tmp/
|
||||
mv ./Repo/* ./Repo.tmp/ || true
|
||||
mv ./Repo.tmp/* ./Repo/
|
||||
|
||||
# Move everything to the working directory, ready for the next CI steps
|
||||
|
|
|
@ -1,8 +0,0 @@
|
|||
#!/bin/sh
|
||||
TargetRepo="OcttKB.Web"
|
||||
git clone --depth 1 https://gitlab.com/octtspacc/$TargetRepo ./Repo-$TargetRepo
|
||||
cd ./Repo-$TargetRepo
|
||||
cp -v ../Output.tmp/index.html ./public/index.html
|
||||
git add .
|
||||
git commit -m "OcttKB Cross-Repo Sync (Raw to HTML)"
|
||||
git push
|
|
@ -1,17 +0,0 @@
|
|||
#!/bin/sh
|
||||
. ./Src.*.sh || true
|
||||
sh ./OcttKB.EmptyDate.sh || true
|
||||
|
||||
# Ensure important directories
|
||||
rm -rf ./Output.tmp || true
|
||||
|
||||
# Build HTML TiddlyWiki
|
||||
tiddlywiki \
|
||||
./Wiki-OcttKB \
|
||||
--verbose \
|
||||
--output ./Output.tmp \
|
||||
--rendertiddler "$:/core/save/all" "index.html" "text/plain"
|
||||
|
||||
mkdir -vp ./public
|
||||
cp -v ./Output.tmp/index.html ./public/index.html
|
||||
sh ./Main.sh
|
|
@ -35,4 +35,10 @@ After this, I installed Windows 10 (a build from 2019 I have on a burned DVD alw
|
|||
|
||||
!! Hardening Windows
|
||||
|
||||
In this case "hardening" is meant as enhancing the privacy of our Windows against third-party apps, which we need to evade VM detection; we don't mean it as making the system more secure or robust for an exam purpose, which is something neutral to us (we as examinees don't care about it, it does neither benefit nor harm us).
|
||||
|
||||
[TODO] (https://pastebin.com/XEn7BykP)
|
||||
|
||||
!! No abuse
|
||||
|
||||
Be careful of only using this information if you actually need to run SEB on Linux or have other issues. Do not abuse the guide to create a VM for doing the exam and then getting out of it mid-session to use the host system normally and cheat. The procedure is not intended for cheating and if we start using it to do that, examiners will push for the holes that allow VM detection to be patched. If we only use it for valid reasons of OS compatibility, likely no one will protest and we will not be forced to use an OS we don't like as host on our computers. If you have to cheat at the written exam then you will fail the oral exam anyways, so study and don't use this method for cheating.
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
. ./Src.*.sh || true
|
||||
|
||||
# Update time of last edit
|
||||
sh ./OcttKB.EmptyDate.sh || true
|
||||
sh ./EmptySetDate.sh || true
|
||||
|
||||
# Ensure important directories
|
||||
rm -rf ./Output.tmp || true
|
||||
|
|
|
@ -3,5 +3,5 @@ creator: Octt
|
|||
modified: 20230417120312165
|
||||
modifier: Octt
|
||||
tags:
|
||||
title: $:/OcttKB/Repo/GitHub.Main.sh
|
||||
title: $:/OcttKB/Repo/Deploy.Main.sh
|
||||
type: text/plain
|
|
@ -10,7 +10,7 @@ tiddlywiki \
|
|||
--rendertiddler $:/core/templates/alltiddlers.template.html Static.html text/plain
|
||||
|
||||
# Apply patches to the static HTML
|
||||
python3 ../PatchStatic.py
|
||||
python3 ../PatchStatic.py ./Static.html
|
||||
|
||||
# Deploy copies of immediately previous versions
|
||||
Url="https://kb.octt.eu.org"
|
||||
|
|
0
OcttKB.EmptyDate.sh → Wiki-OcttKB/tiddlers/System/$__OcttKB_Repo_EmptySetDate.sh.txt
Executable file → Normal file
0
OcttKB.EmptyDate.sh → Wiki-OcttKB/tiddlers/System/$__OcttKB_Repo_EmptySetDate.sh.txt
Executable file → Normal file
|
@ -0,0 +1,6 @@
|
|||
created: 20230414104412035
|
||||
creator: Octt
|
||||
modified: 20230414104554549
|
||||
modifier: Octt
|
||||
title: $:/OcttKB/Repo/EmptySetDate.sh
|
||||
type: text/plain
|
|
@ -1,3 +1,4 @@
|
|||
#!/bin/sh
|
||||
. ./Src.*.sh || true
|
||||
sh ./BuildSPA.sh
|
||||
sh ./DeployAll.sh
|
||||
|
|
|
@ -1,12 +1,35 @@
|
|||
#!/usr/bin/env python3
|
||||
from base64 import b64encode
|
||||
from bs4 import BeautifulSoup
|
||||
from re import sub
|
||||
from sys import argv
|
||||
|
||||
File = 'Static.html'
|
||||
File = argv[-1]
|
||||
B64Prefix = 'data:text/html;base64,'
|
||||
|
||||
def b64encodeStr(Data):
|
||||
return b64encode(Data.encode()).decode()
|
||||
|
||||
def MkHtml(Content:str):
|
||||
return f'''\
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
<body>{Content}</body>
|
||||
</html>
|
||||
'''
|
||||
|
||||
def Fix1(m):
|
||||
return f'<details><a name="{m.group(1)}"></a><summary>{m.group(2)}</summary>'
|
||||
|
||||
Source = str(BeautifulSoup(open(File, 'r'), 'html5lib'));
|
||||
def SafeIframe(m):
|
||||
SrcData = m.group(2)
|
||||
SrcData = b64encodeStr(MkHtml(f'<a href="{SrcData}">Click to load: {SrcData}</a>'))
|
||||
return f'<iframe {m.group(1)} src="{B64Prefix}{SrcData}"></iframe>'
|
||||
|
||||
open(File, 'w').write(sub('<details><a name="(.+)"><summary>(.+)<\/summary>\s*<\/a>', Fix1, Source));
|
||||
Html = str(BeautifulSoup(open(File, 'r'), 'html5lib'))
|
||||
|
||||
Html = sub('<details><a name="(.+)"><summary>(.+)<\/summary>\s*<\/a>', Fix1, Html)
|
||||
Html = sub('<iframe( +)src="(.+)"><\/iframe>', SafeIframe, Html)
|
||||
Html = sub('<iframe (.+) src="(.+)"><\/iframe>', SafeIframe, Html)
|
||||
|
||||
open(File, 'w').write(Html)
|
||||
|
|
|
@ -1,5 +1,3 @@
|
|||
#!/bin/sh
|
||||
|
||||
ToLower(){
|
||||
echo "$1" | tr "[:upper:]" "[:lower:]"
|
||||
}
|
||||
ToLower(){ echo "$1" | tr "[:upper:]" "[:lower:]"; }
|
||||
|
|
|
@ -54,7 +54,9 @@ title: $:/Styles/Breadcrumbs
|
|||
|
||||
.tc-static-story-river > .tc-tiddler-frame > .tc-tiddler-title details > summary,
|
||||
.View-Breadcrumbs details > summary {
|
||||
width: fit-content;
|
||||
list-style: none;
|
||||
cursor: pointer;
|
||||
}
|
||||
|
||||
tc-table-of-contents
|
||||
|
|
19
local.sh
19
local.sh
|
@ -1,14 +1,27 @@
|
|||
#!/bin/sh
|
||||
set -e # Exit on any error
|
||||
cd "$( dirname "$( realpath "$0" )" )"
|
||||
|
||||
pull() {
|
||||
pull(){
|
||||
git pull
|
||||
}
|
||||
|
||||
push() {
|
||||
push(){
|
||||
git add .
|
||||
git commit -m "Manual push $(date)"
|
||||
git push
|
||||
}
|
||||
|
||||
$1
|
||||
deploy(){
|
||||
Path="$1"
|
||||
[ -n "$Path" ] || Path="/tmp/OcttKB-Deploy"
|
||||
echo "Local Deploy to: $Path"
|
||||
sleep 5
|
||||
rm -rf "$Path"
|
||||
cp -r . "$Path"
|
||||
cd "$Path"
|
||||
bash ./Bootstrap.sh
|
||||
bash ./Deploy.Main.sh
|
||||
}
|
||||
|
||||
$@
|
||||
|
|
Loading…
Reference in New Issue