From 30b2e43574560fb167524f04d4323bf7482256e1 Mon Sep 17 00:00:00 2001 From: ahriman Date: Fri, 23 Nov 2018 16:10:46 -0500 Subject: Upload files to '' --- logo.png | Bin 0 -> 4340 bytes logo.txt | 6 ++++++ logo.xcf | Bin 0 -> 30466 bytes start.html | 38 +++++++++++++++++++++++++++++++++ tilde.css | 71 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 5 files changed, 115 insertions(+) create mode 100644 logo.png create mode 100644 logo.txt create mode 100644 logo.xcf create mode 100644 start.html create mode 100644 tilde.css diff --git a/logo.png b/logo.png new file mode 100644 index 0000000..17daea0 Binary files /dev/null and b/logo.png differ diff --git a/logo.txt b/logo.txt new file mode 100644 index 0000000..41f5c99 --- /dev/null +++ b/logo.txt @@ -0,0 +1,6 @@ + __ _ __ __ _ __ _ __ __ + / /_(_) /___/ /__ (_)___ _____/ /_(_) /___ __/ /____ + / __/ / / __ / _ \ / / __ \/ ___/ __/ / __/ / / / __/ _ \ + / /_/ / / /_/ / __/ / / / / (__ ) /_/ / /_/ /_/ / /_/ __/ + \__/_/_/\__,_/\___/ /_/_/ /_/____/\__/_/\__/\__,_/\__/\___/ + diff --git a/logo.xcf b/logo.xcf new file mode 100644 index 0000000..bea945c Binary files /dev/null and b/logo.xcf differ diff --git a/start.html b/start.html new file mode 100644 index 0000000..7c6adae --- /dev/null +++ b/start.html @@ -0,0 +1,38 @@ + + + + + Tilde Institute for OpenBSD Education + + + + +
+ + +
+

This will be a quick-and-dirty guide to getting started with the BCHS stack. It will pertain to using C specifically, however, if you develop in another language, the general information regarding static compilation will apply as well. More C-specific information can be found at:

+ +

tilde.institute is set up to process all files with the .cgi extension via slowcgi(8). This allows for a multitude of possibilities - any compiled language can be used to develop web applications on an OpenBSD server. It's advised to use C because of the pledge(2) and unveil(2) system calls available, which allow for restricting privileges and restricted filesystem access, respectively. However, C is not always an easy language to develop in, and other languages such as Rust include robust memory safety by design.

+

Keep in mind that if you don't use the previously listed kcgi/ksql/kwebapp libraries, you will need to work with HTTP's eccentricities manually. For an example, here's the Hello World code from the LearnBCHS site. And here it is running as compiled CGI here at the Tilde Institute.

+

Once you've written your software to be served via CGI, be sure to statically link the executables. Sure, there's a larger file size, but the benefits outweigh that in this case - there's no relying on what I may or may not have installed on the Tilde Institute's server. For example:

+

$ cc -static -g -W -Wall -o app.cgi app.c

+

When you've completed compilation, make sure to set permissions properly (755) and move it to the public_html folder in your home directory. httpd(8) is set to use index.html as the index file, however this can be changed to index.cgi or what-have-you by contacting ahriman via the tilde.town or tilde.team IRC networks.

+
+
+ + diff --git a/tilde.css b/tilde.css new file mode 100644 index 0000000..7ca1a09 --- /dev/null +++ b/tilde.css @@ -0,0 +1,71 @@ +body { + background-color: #000000; + font-family: monospace; + font: Noto Mono; + color: green; + padding-right: 0px; + margin-top: 10px; + margin-bottom: 10px; + margin-right: 0px; + margin-left: 10px; + width: 850px; +} +.date { + font-weight: bold; +} +#logo { + margin-left: 40px; + margin-bottom: 10px; + font-size: 30px; +} +#logobyline { + margin-left: 80px; + margin-top: -20px; +} +#navigation { + margin-left: auto; + margin-right: 40px; + width: 850px; + text-align: center; +} +#content { + width: 650px; + margin-left: 100px; +} +#container { + width: 850px; +} +#news { + width: 550px; + margin-left: 50px; +} +a:link { +text-decoration: none; +color:#cccccc; +} + +a:visited { +color:#999999; +text-decoration: none; +} + +a:hover { +color:#ffffff; +font-weight: bold; +} + +p { + text-indent: 15px; +} +code { + text-indent: 30px; +} +em { + font-style: bold; +} +h1 { + font-size: 20px; + text-align: center; + margin-left: auto; + margin-right: auto; +} -- cgit