From 7648f2f728816e40752747e7d9ffa6dcd1333e1b Mon Sep 17 00:00:00 2001 From: Hyperling Date: Thu, 6 Oct 2022 07:05:46 -0500 Subject: [PATCH 01/21] Add my test project up to this point. --- main.js | 81 ++++++++++++++++++++++++++++++++++++++++++++ package.json | 5 +++ pages/body_close.php | 8 +++++ pages/body_open.php | 12 +++++++ pages/footer.php | 3 ++ pages/head.php | 1 + pages/header.php | 7 ++++ pages/home.js | 17 ++++++++++ pages/home.php | 14 ++++++++ pages/main.css | 42 +++++++++++++++++++++++ pages/menu.php | 5 +++ pages/notice.js | 0 run.sh | 17 ++++++++++ test.html | 27 +++++++++++++++ 14 files changed, 239 insertions(+) create mode 100755 main.js create mode 100644 package.json create mode 100644 pages/body_close.php create mode 100644 pages/body_open.php create mode 100644 pages/footer.php create mode 100644 pages/head.php create mode 100644 pages/header.php create mode 100755 pages/home.js create mode 100755 pages/home.php create mode 100644 pages/main.css create mode 100644 pages/menu.php create mode 100755 pages/notice.js create mode 100755 run.sh create mode 100644 test.html diff --git a/main.js b/main.js new file mode 100755 index 0000000..492ec4e --- /dev/null +++ b/main.js @@ -0,0 +1,81 @@ +#!/usr/bin/node +'use strict'; + +/* +2022-09-14 Mockup of what a web server may look like. +Should serve very quick since it's all from scratch, nothing to load like WordPress. +May even skip out on things like +*/ + +const app_name = "www.example.com"; +let express = require('express'); +let app = express(); + +const execSync = require('child_process').execSync; + +let pages = {}; +pages.home = require('./pages/home.js'); +//pages.notice = require('./pages/notice.js'); + +let pages_php = {}; +pages.home = './pages/home.php'; +//pages.notice = './pages/notice.php'; + +// Even better, look through ./pages/ for *.php or *.js and add them to the array! + +let ports = []; +ports.push(8080); + +async function main() { + console.log("Starting Main"); + + app.use(function (req, res, next) { + res.contentType('text/html'); + next(); + }); + + console.log("Adding Routes"); + let router = express.Router(); +/* MANUAL METHOD, SPECIFY EVERY PATH+FILE + router.get('/', function (req, res) { + console.log("Fetching"); + require('lib/home.js'); // one way, maybe? + }); + router.get('/notice', function (req, res) { + pages.notice(req, res); // another way? + }); +*/ +/* AUTOMATIC METHOD BASED ON OBJECT/ARRAY + for page in pages { // FORTESTING pseudocode + router.get("/" + page.key, function (req,res) { + page.value(req, res); + }); + } +*/ +/* AUTOMATIC METHOD BASED ON OBJECT/ARRAY OF PHP scripts + for page in pages { // FORTESTING pseudocode + router.get("/" + page.key, function (req,res) { + res.send(system("php page.value")); + }); + } +*/ + // Test (Also a decent catch-all to Home!) + router.get('/*', function (req, res) { + //console.log(req); + //console.log(res); + console.log(req.socket.remoteAddress, "asked for", req.url) + let html = execSync("php ./pages/home.php"); + res.send(html); + }); + + app.use('', router); + + console.log("Adding Ports"); + ports.forEach(port => { + app.listen(port); + console.log(" * Now listening on port " + port + "."); + }); + console.log("Done! Now we wait..."); +} + +main(); diff --git a/package.json b/package.json new file mode 100644 index 0000000..0b225ee --- /dev/null +++ b/package.json @@ -0,0 +1,5 @@ +{ + "dependencies": { + "express": "^4.18.1" + } +} diff --git a/pages/body_close.php b/pages/body_close.php new file mode 100644 index 0000000..17a4126 --- /dev/null +++ b/pages/body_close.php @@ -0,0 +1,8 @@ +#!/bin/php + + + + + diff --git a/pages/body_open.php b/pages/body_open.php new file mode 100644 index 0000000..5c97c78 --- /dev/null +++ b/pages/body_open.php @@ -0,0 +1,12 @@ +#!/bin/php + + + + + + + diff --git a/pages/footer.php b/pages/footer.php new file mode 100644 index 0000000..66c16e6 --- /dev/null +++ b/pages/footer.php @@ -0,0 +1,3 @@ +#!/bin/php +
Copyright $year
+ diff --git a/pages/head.php b/pages/head.php new file mode 100644 index 0000000..4648beb --- /dev/null +++ b/pages/head.php @@ -0,0 +1 @@ +DELETEME diff --git a/pages/header.php b/pages/header.php new file mode 100644 index 0000000..b222dbe --- /dev/null +++ b/pages/header.php @@ -0,0 +1,7 @@ +#!/bin/php + + + + + + diff --git a/pages/home.js b/pages/home.js new file mode 100755 index 0000000..a3da321 --- /dev/null +++ b/pages/home.js @@ -0,0 +1,17 @@ +/* +2022-09-14 Return an example web page. + +Maybe this should this be Node or PHP/BASH? Doing HTML in Node seems gross. +*/ + +class Include { + constructor () { } + async load (request, response) { + + } +} + +include = new Include(); + +module.exports = include; + diff --git a/pages/home.php b/pages/home.php new file mode 100755 index 0000000..4b6cb4b --- /dev/null +++ b/pages/home.php @@ -0,0 +1,14 @@ +#!/bin/php + + + +

Welcome!

+ +

This is a test. It can be ignored. :)

+ + + diff --git a/pages/main.css b/pages/main.css new file mode 100644 index 0000000..e09edfd --- /dev/null +++ b/pages/main.css @@ -0,0 +1,42 @@ +/* 2022-09-14 CSS for the website. */ +/* https://www.w3schools.com/Css/css_rwd_grid.asp */ + +/* Enable dynamic stuffs */ +* { + box-sizing: border-box; +} + +/* Page Sections */ +.menu { + width: 25%; + float: left; +} +.main { + width: 75%; + float: left; +} + +.col-1 {width: 8.33%;} +.col-2 {width: 16.66%;} +.col-3 {width: 25%;} +.col-4 {width: 33.33%;} +.col-5 {width: 41.66%;} +.col-6 {width: 50%;} +.col-7 {width: 58.33%;} +.col-8 {width: 66.66%;} +.col-9 {width: 75%;} +.col-10 {width: 83.33%;} +.col-11 {width: 91.66%;} +.col-12 {width: 100%;} + +[class*="col-"] { + float: left; + padding: 15px; + border: 1px solid red; +} + +.row::after { + content: ""; + clear: both; + display: table; +} diff --git a/pages/menu.php b/pages/menu.php new file mode 100644 index 0000000..5c0ed36 --- /dev/null +++ b/pages/menu.php @@ -0,0 +1,5 @@ +#!/bin/php + + diff --git a/pages/notice.js b/pages/notice.js new file mode 100755 index 0000000..e69de29 diff --git a/run.sh b/run.sh new file mode 100755 index 0000000..c0e59f1 --- /dev/null +++ b/run.sh @@ -0,0 +1,17 @@ +#!/bin/bash +# 2022-09-14 Hyperling +# Ensure dependencies are met and start the webserver. + +### Can docker-compose do this rather than running a sh file on the host OS? +# Look at Dockerfile-ADD for doing git clones into a docker environment. +# Out of scope for this project, this project is just the site. +if [[ ! `which php` || ! `which node` ]]; then + sudo apt install -y php-fpm nodejs +fi + +npm install + +main.js +### + +exit 0 diff --git a/test.html b/test.html new file mode 100644 index 0000000..d416aff --- /dev/null +++ b/test.html @@ -0,0 +1,27 @@ + + + + + + + Header + + + + + + + MENU + + +

Welcome!

+ +

This is a test. It can be ignored. :)

+ + +
Copyright $year
+ + + + + From e8a1b7befd953f219a0d3d16eca1c3b3dfb81779 Mon Sep 17 00:00:00 2001 From: Hyperling Date: Thu, 6 Oct 2022 07:11:58 -0500 Subject: [PATCH 02/21] Add better description. Just a start. --- README.md | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 38f76f8..d764370 100644 --- a/README.md +++ b/README.md @@ -1,2 +1,10 @@ -# www -My Website +# My Website +Custom website rather than using WordPress or anything else that handles the code for you. + +Rather than using apache or nginx just using Node.js to serve an HTML API. Gives more control. + +Use HTML and PHP files for the content because it sounds fun and I like challenges. + +Basically a "page" is just a program that echo's HTML content for the API. + +Will likely play with some pages being Bash and other fun things. From 68f70f246aa8e8587942fb19775a5366d1cc66a7 Mon Sep 17 00:00:00 2001 From: Hyperling Date: Thu, 6 Oct 2022 07:12:28 -0500 Subject: [PATCH 03/21] Add npm. Call main.js from local directory. --- run.sh | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/run.sh b/run.sh index c0e59f1..8966575 100755 --- a/run.sh +++ b/run.sh @@ -5,13 +5,13 @@ ### Can docker-compose do this rather than running a sh file on the host OS? # Look at Dockerfile-ADD for doing git clones into a docker environment. # Out of scope for this project, this project is just the site. -if [[ ! `which php` || ! `which node` ]]; then - sudo apt install -y php-fpm nodejs +if [[ ! `which php` || ! `which node`|| ! `which npm` ]]; then + sudo apt install -y php-fpm nodejs npm fi npm install -main.js +./main.js ### exit 0 From 50dea248ba1c824fd91be83709b957769d2fd917 Mon Sep 17 00:00:00 2001 From: Hyperling Date: Thu, 6 Oct 2022 07:23:07 -0500 Subject: [PATCH 04/21] Add notes for TBD's since too busy to finish any time soon. --- README.md | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) diff --git a/README.md b/README.md index d764370..58c7281 100644 --- a/README.md +++ b/README.md @@ -8,3 +8,20 @@ Use HTML and PHP files for the content because it sounds fun and I like challeng Basically a "page" is just a program that echo's HTML content for the API. Will likely play with some pages being Bash and other fun things. + +## TODO +Finish CSS + +Add Current Content +- Apps Page +- Videos Page + +Add New Content +- NOTICE Page +- Health Page (My Priorities Sheet) + - How to host files? Put them in reverse-proxy files.hyperling.com site? + +Add Favicon +[https://www.metatags.org/seo-tips/design-tips/favicon-ico/] +- Will this have to be in files.hyperling.com as well? Or will this work? + - [https://www.geeksforgeeks.org/what-is-the-use-of-serve-favicon-from-node-js-server/] \ No newline at end of file From 09ec8a72e37438d0d35e0fb0493413e9c40d9f1e Mon Sep 17 00:00:00 2001 From: Hyperling Date: Thu, 6 Oct 2022 19:53:58 -0500 Subject: [PATCH 05/21] Add more notes. --- README.md | 19 +++++++++++++------ 1 file changed, 13 insertions(+), 6 deletions(-) diff --git a/README.md b/README.md index 58c7281..cc30169 100644 --- a/README.md +++ b/README.md @@ -13,15 +13,22 @@ Will likely play with some pages being Bash and other fun things. Finish CSS Add Current Content -- Apps Page -- Videos Page +- APPS +- VIDEOS +- DONATE +- VIDEOS Add New Content -- NOTICE Page -- Health Page (My Priorities Sheet) - - How to host files? Put them in reverse-proxy files.hyperling.com site? +- NOTICE +- HEALTH (My Priorities Sheet) + - How to host files? Put them in reverse-proxy's files.hyperling.com site? +- GIFTS Add Favicon [https://www.metatags.org/seo-tips/design-tips/favicon-ico/] - Will this have to be in files.hyperling.com as well? Or will this work? - - [https://www.geeksforgeeks.org/what-is-the-use-of-serve-favicon-from-node-js-server/] \ No newline at end of file + - [https://www.geeksforgeeks.org/what-is-the-use-of-serve-favicon-from-node-js-server/] + +## Inspiration +[https://liquorix.net/] +[https://cahlen.org/] From 28c393c3395ac5ed20db3458173951dcfc6b9167 Mon Sep 17 00:00:00 2001 From: Hyperling Date: Thu, 6 Oct 2022 19:55:23 -0500 Subject: [PATCH 06/21] Fix URLs to be list. --- README.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index cc30169..52f2995 100644 --- a/README.md +++ b/README.md @@ -30,5 +30,5 @@ Add Favicon - [https://www.geeksforgeeks.org/what-is-the-use-of-serve-favicon-from-node-js-server/] ## Inspiration -[https://liquorix.net/] -[https://cahlen.org/] +- [https://liquorix.net/] +- [https://cahlen.org/] From ac20b32b574b5f08ec4656fa46f539dcb23384d5 Mon Sep 17 00:00:00 2001 From: Hyperling Date: Thu, 6 Oct 2022 22:15:36 -0500 Subject: [PATCH 07/21] Convert to tabs. --- main.js | 70 ++++++++++++++++++++++++++++----------------------------- 1 file changed, 35 insertions(+), 35 deletions(-) diff --git a/main.js b/main.js index 492ec4e..812be30 100755 --- a/main.js +++ b/main.js @@ -29,52 +29,52 @@ ports.push(8080); async function main() { console.log("Starting Main"); - app.use(function (req, res, next) { - res.contentType('text/html'); - next(); - }); + app.use(function (req, res, next) { + res.contentType('text/html'); + next(); + }); console.log("Adding Routes"); - let router = express.Router(); + let router = express.Router(); /* MANUAL METHOD, SPECIFY EVERY PATH+FILE - router.get('/', function (req, res) { - console.log("Fetching"); - require('lib/home.js'); // one way, maybe? - }); - router.get('/notice', function (req, res) { - pages.notice(req, res); // another way? - }); + router.get('/', function (req, res) { + console.log("Fetching"); + require('lib/home.js'); // one way, maybe? + }); + router.get('/notice', function (req, res) { + pages.notice(req, res); // another way? + }); */ /* AUTOMATIC METHOD BASED ON OBJECT/ARRAY - for page in pages { // FORTESTING pseudocode - router.get("/" + page.key, function (req,res) { - page.value(req, res); - }); - } + for page in pages { // FORTESTING pseudocode + router.get("/" + page.key, function (req,res) { + page.value(req, res); + }); + } */ /* AUTOMATIC METHOD BASED ON OBJECT/ARRAY OF PHP scripts - for page in pages { // FORTESTING pseudocode - router.get("/" + page.key, function (req,res) { - res.send(system("php page.value")); - }); - } + for page in pages { // FORTESTING pseudocode + router.get("/" + page.key, function (req,res) { + res.send(system("php page.value")); + }); + } */ - // Test (Also a decent catch-all to Home!) - router.get('/*', function (req, res) { - //console.log(req); - //console.log(res); - console.log(req.socket.remoteAddress, "asked for", req.url) - let html = execSync("php ./pages/home.php"); - res.send(html); - }); + // Test (Also a decent catch-all to Home!) + router.get('/*', function (req, res) { + //console.log(req); + //console.log(res); + console.log(req.socket.remoteAddress, "asked for", req.url) + let html = execSync("php ./pages/home.php"); + res.send(html); + }); - app.use('', router); + app.use('', router); console.log("Adding Ports"); - ports.forEach(port => { - app.listen(port); - console.log(" * Now listening on port " + port + "."); - }); + ports.forEach(port => { + app.listen(port); + console.log(" * Now listening on port " + port + "."); + }); console.log("Done! Now we wait..."); } From a327465e2de42693e45a92415890be8636b144f2 Mon Sep 17 00:00:00 2001 From: Hyperling Date: Thu, 6 Oct 2022 22:16:27 -0500 Subject: [PATCH 08/21] Start adding and organizing content. --- pages/about.php | 2 + pages/{ => helpers}/body_close.php | 2 +- pages/{ => helpers}/body_open.php | 2 +- pages/{ => helpers}/footer.php | 2 +- pages/{ => helpers}/head.php | 0 pages/{ => helpers}/header.php | 2 +- pages/helpers/menu.php | 7 ++ .../{notice.js => helpers/section_close.php} | 0 pages/helpers/section_open.php | 0 pages/home.js | 17 ----- pages/home.php | 23 ++++-- pages/menu.php | 5 -- pages/subpages/about/notice.php | 0 pages/subpages/about/stance.php | 0 pages/subpages/about/whoami.php | 0 pages/subpages/home/apps.php | 74 +++++++++++++++++++ pages/subpages/home/contact.php | 0 pages/subpages/home/health.php | 3 + pages/subpages/support/donate.php | 1 + pages/subpages/support/gifts.php | 1 + pages/support.php | 9 +++ 21 files changed, 118 insertions(+), 32 deletions(-) create mode 100644 pages/about.php rename pages/{ => helpers}/body_close.php (81%) rename pages/{ => helpers}/body_open.php (86%) rename pages/{ => helpers}/footer.php (73%) rename pages/{ => helpers}/head.php (100%) rename pages/{ => helpers}/header.php (79%) create mode 100644 pages/helpers/menu.php rename pages/{notice.js => helpers/section_close.php} (100%) mode change 100755 => 100644 create mode 100644 pages/helpers/section_open.php delete mode 100755 pages/home.js delete mode 100644 pages/menu.php create mode 100644 pages/subpages/about/notice.php create mode 100644 pages/subpages/about/stance.php create mode 100644 pages/subpages/about/whoami.php create mode 100644 pages/subpages/home/apps.php create mode 100644 pages/subpages/home/contact.php create mode 100644 pages/subpages/home/health.php create mode 100644 pages/subpages/support/donate.php create mode 100644 pages/subpages/support/gifts.php create mode 100644 pages/support.php diff --git a/pages/about.php b/pages/about.php new file mode 100644 index 0000000..8471a42 --- /dev/null +++ b/pages/about.php @@ -0,0 +1,2 @@ +#!/usr/bin/php + diff --git a/pages/body_close.php b/pages/helpers/body_close.php similarity index 81% rename from pages/body_close.php rename to pages/helpers/body_close.php index 17a4126..26293f9 100644 --- a/pages/body_close.php +++ b/pages/helpers/body_close.php @@ -1,4 +1,4 @@ -#!/bin/php + Copyright $year diff --git a/pages/head.php b/pages/helpers/head.php similarity index 100% rename from pages/head.php rename to pages/helpers/head.php diff --git a/pages/header.php b/pages/helpers/header.php similarity index 79% rename from pages/header.php rename to pages/helpers/header.php index b222dbe..d7fcafc 100644 --- a/pages/header.php +++ b/pages/helpers/header.php @@ -1,4 +1,4 @@ -#!/bin/php + diff --git a/pages/helpers/menu.php b/pages/helpers/menu.php new file mode 100644 index 0000000..6f2e52a --- /dev/null +++ b/pages/helpers/menu.php @@ -0,0 +1,7 @@ + + + diff --git a/pages/notice.js b/pages/helpers/section_close.php old mode 100755 new mode 100644 similarity index 100% rename from pages/notice.js rename to pages/helpers/section_close.php diff --git a/pages/helpers/section_open.php b/pages/helpers/section_open.php new file mode 100644 index 0000000..e69de29 diff --git a/pages/home.js b/pages/home.js deleted file mode 100755 index a3da321..0000000 --- a/pages/home.js +++ /dev/null @@ -1,17 +0,0 @@ -/* -2022-09-14 Return an example web page. - -Maybe this should this be Node or PHP/BASH? Doing HTML in Node seems gross. -*/ - -class Include { - constructor () { } - async load (request, response) { - - } -} - -include = new Include(); - -module.exports = include; - diff --git a/pages/home.php b/pages/home.php index 4b6cb4b..8e1a638 100755 --- a/pages/home.php +++ b/pages/home.php @@ -1,14 +1,25 @@ -#!/bin/php +#!/usr/bin/php

Welcome!

This is a test. It can be ignored. :)

- - + diff --git a/pages/menu.php b/pages/menu.php deleted file mode 100644 index 5c0ed36..0000000 --- a/pages/menu.php +++ /dev/null @@ -1,5 +0,0 @@ -#!/bin/php - - diff --git a/pages/subpages/about/notice.php b/pages/subpages/about/notice.php new file mode 100644 index 0000000..e69de29 diff --git a/pages/subpages/about/stance.php b/pages/subpages/about/stance.php new file mode 100644 index 0000000..e69de29 diff --git a/pages/subpages/about/whoami.php b/pages/subpages/about/whoami.php new file mode 100644 index 0000000..e69de29 diff --git a/pages/subpages/home/apps.php b/pages/subpages/home/apps.php new file mode 100644 index 0000000..b53a562 --- /dev/null +++ b/pages/subpages/home/apps.php @@ -0,0 +1,74 @@ +

My Public Programs

+ +

Android Apps

+
+
+
ctfu
Carb Up! BETA +
+

Calculate cost-effectiveness of foods on a High Carb Low Fat lifestyle.

+ [Play Store] + [APK] +

TBD: + [F-Droid] + [Github] +

+
+ +
45minuterule
45 Minute Rule +
+

Determine when to go to bed if you’d like to wake up during light sleep.

+ [Play Store] + [APK] +

TBD: + [F-Droid] + [Github] +

+
+
+ +
+
infinitetimer
Infinite Timer +
+

Play your notification sound at your chosen Hour:Minute:Second interval.

+ [Play Store] + [APK] +

TBD: + [F-Droid] + [Github] +

+
+ +
+
+ + hypergames +
+ HyperGames [IN DEVELOPMENT] +
+

+ Began developing some games for fun. Not near a finished state, but “playable”. +

+ [Play Store + ] + [APK] +

TBD: + [F-Droid] + [Github] +

+
+
+
+ +

Other Programs

+

+ For a full list of my programs including my Ansible automation, + Docker setup, source code for this website, and fun-type projects + like an obfuscating editor and music fixer, check out + my Github. +

diff --git a/pages/subpages/home/contact.php b/pages/subpages/home/contact.php new file mode 100644 index 0000000..e69de29 diff --git a/pages/subpages/home/health.php b/pages/subpages/home/health.php new file mode 100644 index 0000000..26c2c4c --- /dev/null +++ b/pages/subpages/home/health.php @@ -0,0 +1,3 @@ +

My Health Protocol

+ + \ No newline at end of file diff --git a/pages/subpages/support/donate.php b/pages/subpages/support/donate.php new file mode 100644 index 0000000..b1d2b3a --- /dev/null +++ b/pages/subpages/support/donate.php @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/pages/subpages/support/gifts.php b/pages/subpages/support/gifts.php new file mode 100644 index 0000000..0f92a8e --- /dev/null +++ b/pages/subpages/support/gifts.php @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/pages/support.php b/pages/support.php new file mode 100644 index 0000000..d7e8c3e --- /dev/null +++ b/pages/support.php @@ -0,0 +1,9 @@ +#!/usr/bin/php + + + From 02e5e40143c949a5995a5922b0b42d20833ee17e Mon Sep 17 00:00:00 2001 From: Hyperling Date: Thu, 6 Oct 2022 22:27:37 -0500 Subject: [PATCH 09/21] Use paths rather than URLs. --- pages/helpers/menu.php | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/pages/helpers/menu.php b/pages/helpers/menu.php index 6f2e52a..8c9242b 100644 --- a/pages/helpers/menu.php +++ b/pages/helpers/menu.php @@ -1,7 +1,7 @@ From 8cfe6e43e26e1ed18946537625bc2c45a88eee99 Mon Sep 17 00:00:00 2001 From: Hyperling Date: Thu, 6 Oct 2022 22:28:17 -0500 Subject: [PATCH 10/21] Final content work for the night. --- pages/home.php | 7 ++++--- pages/subpages/home/apps.php | 10 +++++----- pages/support.php | 20 ++++++++++++++++++++ 3 files changed, 29 insertions(+), 8 deletions(-) diff --git a/pages/home.php b/pages/home.php index 8e1a638..21a11fb 100755 --- a/pages/home.php +++ b/pages/home.php @@ -4,9 +4,10 @@ include "helpers/body_open.php"; ?> -

Welcome!

- -

This is a test. It can be ignored. :)

+

Welcome!

+

+ Website is still in testing. Don't judge too harshly. :) +

My Public Programs +

My Public Programs

-

Android Apps

+

Android Apps

ctfu
Carb Up! BETA @@ -16,7 +16,7 @@
45minuterule
45 Minute Rule
-

Determine when to go to bed if you’d like to wake up during light sleep.

+

Determine when to go to bed if you'd like to wake up during light sleep.

[Play Store] [APK]

TBD: @@ -51,7 +51,7 @@ HyperGames [IN DEVELOPMENT]

- Began developing some games for fun. Not near a finished state, but “playable”. + Began developing some games for fun. Not near a finished state, but "playable".

[Play Store @@ -65,7 +65,7 @@
-

Other Programs

+

Other Programs

For a full list of my programs including my Ansible automation, Docker setup, source code for this website, and fun-type projects diff --git a/pages/support.php b/pages/support.php index d7e8c3e..7601f26 100644 --- a/pages/support.php +++ b/pages/support.php @@ -1,8 +1,28 @@ #!/usr/bin/php + + +

Support

+

+ While I do not ask for anything, and prefer to take care of myself, + I acknowledge that some people enjoy gift giving and would like to + help me out. Below are my preferred ways that this be done. +

+ + From 2e5ef4391a912b1237bcedde47480d42dc6d9bc1 Mon Sep 17 00:00:00 2001 From: Hyperling Date: Sat, 8 Oct 2022 09:19:40 -0500 Subject: [PATCH 11/21] Made page gathering dynamic, added favicon, included css, worked on some content, created first bash page. Still very much in-progress but the framework is pretty much done. Needs more CSS and content. --- main.js | 104 ++++++++++++++++++------------ pages/about.php | 24 +++++++ pages/helpers/advisory.php | 1 + pages/helpers/body_close.php | 3 +- pages/helpers/body_open.php | 9 ++- pages/helpers/footer.php | 9 ++- pages/helpers/head.php | 1 - pages/helpers/header.php | 15 ++++- pages/{ => helpers}/main.css | 15 +++++ pages/helpers/menu.php | 3 +- pages/helpers/section_close.php | 1 + pages/helpers/section_open.php | 1 + pages/subpages/about/notice.php | 1 + pages/subpages/about/stance.php | 1 + pages/subpages/about/whoami.php | 1 + pages/subpages/home/apps.php | 1 + pages/subpages/home/contact.php | 1 + pages/subpages/home/health.php | 5 +- pages/subpages/support/donate.php | 3 +- pages/subpages/support/gifts.php | 3 +- pages/support.php | 4 +- pages/test.sh | 31 +++++++++ run.sh | 16 ++++- test.html | 27 -------- 24 files changed, 190 insertions(+), 90 deletions(-) mode change 100644 => 100755 pages/about.php create mode 100755 pages/helpers/advisory.php mode change 100644 => 100755 pages/helpers/body_close.php mode change 100644 => 100755 pages/helpers/body_open.php mode change 100644 => 100755 pages/helpers/footer.php delete mode 100644 pages/helpers/head.php mode change 100644 => 100755 pages/helpers/header.php rename pages/{ => helpers}/main.css (80%) mode change 100644 => 100755 pages/helpers/menu.php mode change 100644 => 100755 pages/helpers/section_close.php mode change 100644 => 100755 pages/helpers/section_open.php mode change 100644 => 100755 pages/subpages/about/notice.php mode change 100644 => 100755 pages/subpages/about/stance.php mode change 100644 => 100755 pages/subpages/about/whoami.php mode change 100644 => 100755 pages/subpages/home/apps.php mode change 100644 => 100755 pages/subpages/home/contact.php mode change 100644 => 100755 pages/subpages/home/health.php mode change 100644 => 100755 pages/subpages/support/donate.php mode change 100644 => 100755 pages/subpages/support/gifts.php mode change 100644 => 100755 pages/support.php create mode 100755 pages/test.sh delete mode 100644 test.html diff --git a/main.js b/main.js index 812be30..8793957 100755 --- a/main.js +++ b/main.js @@ -1,76 +1,98 @@ #!/usr/bin/node 'use strict'; - /* -2022-09-14 Mockup of what a web server may look like. -Should serve very quick since it's all from scratch, nothing to load like WordPress. -May even skip out on things like + 2022-09-14 Hyperling + Coding my own website rather than using WordPress or anything bloaty. */ -const app_name = "www.example.com"; +//// Libraries //// + let express = require('express'); let app = express(); const execSync = require('child_process').execSync; -let pages = {}; -pages.home = require('./pages/home.js'); -//pages.notice = require('./pages/notice.js'); +const fs = require('fs'); -let pages_php = {}; -pages.home = './pages/home.php'; -//pages.notice = './pages/notice.php'; +//// Global Variables //// -// Even better, look through ./pages/ for *.php or *.js and add them to the array! +const DEBUG = false; + +const app_name = "hyperling.com"; + +let pages = []; +const pages_dir = "./pages/"; +const file_types = ["php", "sh"]; let ports = []; ports.push(8080); -async function main() { - console.log("Starting Main"); +//// Functions //// +async function main() { + console.log("...Starting Main..."); + + console.log("Set app to return HTML documents."); app.use(function (req, res, next) { res.contentType('text/html'); next(); }); - console.log("Adding Routes"); + /* Loop through all file in the pages subdirectory and add the allowed + // file types into the pages array for automatic router creation. + */ + console.log("...Starting Main..."); + let ls = await fs.promises.readdir(pages_dir); + if (DEBUG) console.log("DEBUG: Results of ls, ", ls); + for (let file of ls) { + let file_test = file.split("."); + let file_name = file_test[0]; + let file_type = file_test[file_test.length - 1]; + if (file_types.includes(file_type)) { + if (DEBUG) console.log("DEBUG: Hooray!", file, "is being added."); + pages[file_name] = pages_dir + file; + console.log(" * Added page", file); + } else { + if (DEBUG) console.log("DEBUG: ", file, "is not an approved type, skipping."); + } + } + console.log(" * Pages loaded: ", pages); + //return; // Stop execution FORTESTING + + console.log("...Adding Routes..."); let router = express.Router(); -/* MANUAL METHOD, SPECIFY EVERY PATH+FILE - router.get('/', function (req, res) { - console.log("Fetching"); - require('lib/home.js'); // one way, maybe? - }); - router.get('/notice', function (req, res) { - pages.notice(req, res); // another way? - }); -*/ -/* AUTOMATIC METHOD BASED ON OBJECT/ARRAY - for page in pages { // FORTESTING pseudocode - router.get("/" + page.key, function (req,res) { - page.value(req, res); + + /* AUTOMATIC METHOD BASED ON OBJECT/ARRAY OF PHP scripts + // Creates routes with the URL of the key and location of the value. + */ + for (let key in pages) { + console.log(" * Creating router for", key); + router.get("/" + key, function (req,res) { + console.log(key, "fulfilling request to", req.socket.remoteAddress, "asking for", req.url) + res.send(execSync(pages[key])); }); } -*/ -/* AUTOMATIC METHOD BASED ON OBJECT/ARRAY OF PHP scripts - for page in pages { // FORTESTING pseudocode - router.get("/" + page.key, function (req,res) { - res.send(system("php page.value")); - }); - } -*/ - // Test (Also a decent catch-all to Home!) + + // Provide css. + router.get('/main.css', function (req, res) { + console.log("css being provided to", req.socket.remoteAddress) + let html = execSync("cat ./pages/main.css"); + res.send(html); + }); + + // Originally a test, now a catch-all redirection to Home! router.get('/*', function (req, res) { + // WARNING: These are huge so only look when you need to. //console.log(req); //console.log(res); - console.log(req.socket.remoteAddress, "asked for", req.url) - let html = execSync("php ./pages/home.php"); + console.log("*wildcard* replying to", req.socket.remoteAddress, "asking for", req.url) + let html = execSync("./pages/home.php"); res.send(html); }); app.use('', router); - console.log("Adding Ports"); + console.log("...Adding Ports..."); ports.forEach(port => { app.listen(port); console.log(" * Now listening on port " + port + "."); @@ -78,4 +100,6 @@ async function main() { console.log("Done! Now we wait..."); } +//// Program Execution //// + main(); diff --git a/pages/about.php b/pages/about.php old mode 100644 new mode 100755 index 8471a42..2e4c7d7 --- a/pages/about.php +++ b/pages/about.php @@ -1,2 +1,26 @@ #!/usr/bin/php + + +

Curious About Me?

+

+ TBD +

+ + diff --git a/pages/helpers/advisory.php b/pages/helpers/advisory.php new file mode 100755 index 0000000..ed3f2eb --- /dev/null +++ b/pages/helpers/advisory.php @@ -0,0 +1 @@ +#!/usr/bin/php diff --git a/pages/helpers/body_close.php b/pages/helpers/body_close.php old mode 100644 new mode 100755 index 26293f9..d88d9ce --- a/pages/helpers/body_close.php +++ b/pages/helpers/body_close.php @@ -1,5 +1,4 @@ - - +#!/usr/bin/php diff --git a/pages/helpers/body_open.php b/pages/helpers/body_open.php old mode 100644 new mode 100755 index 3313b5e..ef6b335 --- a/pages/helpers/body_open.php +++ b/pages/helpers/body_open.php @@ -1,12 +1,11 @@ - - +#!/usr/bin/php - diff --git a/pages/helpers/footer.php b/pages/helpers/footer.php old mode 100644 new mode 100755 index b662d86..fd45d7c --- a/pages/helpers/footer.php +++ b/pages/helpers/footer.php @@ -1,3 +1,6 @@ - -
Copyright $year
- +#!/usr/bin/php +
+ + Copyright + +
diff --git a/pages/helpers/head.php b/pages/helpers/head.php deleted file mode 100644 index 4648beb..0000000 --- a/pages/helpers/head.php +++ /dev/null @@ -1 +0,0 @@ -DELETEME diff --git a/pages/helpers/header.php b/pages/helpers/header.php old mode 100644 new mode 100755 index d7fcafc..51e12eb --- a/pages/helpers/header.php +++ b/pages/helpers/header.php @@ -1,7 +1,16 @@ - - +#!/usr/bin/php + Hyperling + + + + - diff --git a/pages/main.css b/pages/helpers/main.css similarity index 80% rename from pages/main.css rename to pages/helpers/main.css index e09edfd..f7c822e 100644 --- a/pages/main.css +++ b/pages/helpers/main.css @@ -40,3 +40,18 @@ clear: both; display: table; } + +/* MyStuff ***/ +/** Dark Theme **/ +body { + background-color: #333333; +} +* { + color: #CCCCCC; +} +a { + color: #FF9900 +} +h1,h2,h3,h4,h5,h6 { + color: #6633FF +} \ No newline at end of file diff --git a/pages/helpers/menu.php b/pages/helpers/menu.php old mode 100644 new mode 100755 index 8c9242b..599a575 --- a/pages/helpers/menu.php +++ b/pages/helpers/menu.php @@ -1,5 +1,4 @@ - - +#!/usr/bin/php
  • Home
  • About
  • diff --git a/pages/helpers/section_close.php b/pages/helpers/section_close.php old mode 100644 new mode 100755 index e69de29..ed3f2eb --- a/pages/helpers/section_close.php +++ b/pages/helpers/section_close.php @@ -0,0 +1 @@ +#!/usr/bin/php diff --git a/pages/helpers/section_open.php b/pages/helpers/section_open.php old mode 100644 new mode 100755 index e69de29..ed3f2eb --- a/pages/helpers/section_open.php +++ b/pages/helpers/section_open.php @@ -0,0 +1 @@ +#!/usr/bin/php diff --git a/pages/subpages/about/notice.php b/pages/subpages/about/notice.php old mode 100644 new mode 100755 index e69de29..ed3f2eb --- a/pages/subpages/about/notice.php +++ b/pages/subpages/about/notice.php @@ -0,0 +1 @@ +#!/usr/bin/php diff --git a/pages/subpages/about/stance.php b/pages/subpages/about/stance.php old mode 100644 new mode 100755 index e69de29..ed3f2eb --- a/pages/subpages/about/stance.php +++ b/pages/subpages/about/stance.php @@ -0,0 +1 @@ +#!/usr/bin/php diff --git a/pages/subpages/about/whoami.php b/pages/subpages/about/whoami.php old mode 100644 new mode 100755 index e69de29..ed3f2eb --- a/pages/subpages/about/whoami.php +++ b/pages/subpages/about/whoami.php @@ -0,0 +1 @@ +#!/usr/bin/php diff --git a/pages/subpages/home/apps.php b/pages/subpages/home/apps.php old mode 100644 new mode 100755 index 685cf94..51ece63 --- a/pages/subpages/home/apps.php +++ b/pages/subpages/home/apps.php @@ -1,3 +1,4 @@ +#!/usr/bin/php

    My Public Programs

    Android Apps

    diff --git a/pages/subpages/home/contact.php b/pages/subpages/home/contact.php old mode 100644 new mode 100755 index e69de29..ed3f2eb --- a/pages/subpages/home/contact.php +++ b/pages/subpages/home/contact.php @@ -0,0 +1 @@ +#!/usr/bin/php diff --git a/pages/subpages/home/health.php b/pages/subpages/home/health.php old mode 100644 new mode 100755 index 26c2c4c..2e5dd1e --- a/pages/subpages/home/health.php +++ b/pages/subpages/home/health.php @@ -1,3 +1,4 @@ -

    My Health Protocol

    +#!/usr/bin/php +

    My Health Protocol

    - \ No newline at end of file + \ No newline at end of file diff --git a/pages/subpages/support/donate.php b/pages/subpages/support/donate.php old mode 100644 new mode 100755 index b1d2b3a..84d9165 --- a/pages/subpages/support/donate.php +++ b/pages/subpages/support/donate.php @@ -1 +1,2 @@ - \ No newline at end of file +#!/usr/bin/php + \ No newline at end of file diff --git a/pages/subpages/support/gifts.php b/pages/subpages/support/gifts.php old mode 100644 new mode 100755 index 0f92a8e..0e5f265 --- a/pages/subpages/support/gifts.php +++ b/pages/subpages/support/gifts.php @@ -1 +1,2 @@ - \ No newline at end of file +#!/usr/bin/php + \ No newline at end of file diff --git a/pages/support.php b/pages/support.php old mode 100644 new mode 100755 index 7601f26..6f9695d --- a/pages/support.php +++ b/pages/support.php @@ -8,8 +8,8 @@ include "helpers/body_open.php"; ?> -

    Support

    -

    +

    Support

    +

    While I do not ask for anything, and prefer to take care of myself, I acknowledge that some people enjoy gift giving and would like to help me out. Below are my preferred ways that this be done. diff --git a/pages/test.sh b/pages/test.sh new file mode 100755 index 0000000..9af2b93 --- /dev/null +++ b/pages/test.sh @@ -0,0 +1,31 @@ +#!/bin/bash + +# Move to the directory that this file is in. +cd `dirname $0` + +# Create the necessary HTML components for a web page. +./helpers/body_open.php +echo -e "\t\t

    This is a web page written in BASH!!!

    " +cat << EOF +

    + Look at all the fancy things we can do! +

    +

    Current Time

    +

    + We can use the date command to spit out the time! +

    +

    + `date` +

    +EOF + +# Create a subsection +./helpers/section_open.php +echo -e "\t\t

    Server Neofetch

    " +echo -e "\t\t

    " +neofetch --stdout +echo -e "\t\t

    " +./helpers/section_close.php + +# Finish the web page +./helpers/body_close.php diff --git a/run.sh b/run.sh index 8966575..5ac4d8b 100755 --- a/run.sh +++ b/run.sh @@ -2,13 +2,27 @@ # 2022-09-14 Hyperling # Ensure dependencies are met and start the webserver. +# Ensure we are executing from this file's directory. +cd `dirname $0` + ### Can docker-compose do this rather than running a sh file on the host OS? # Look at Dockerfile-ADD for doing git clones into a docker environment. -# Out of scope for this project, this project is just the site. +# Out of scope for this project, this project is just the site, leave for now. if [[ ! `which php` || ! `which node`|| ! `which npm` ]]; then sudo apt install -y php-fpm nodejs npm fi +# Fix any file permissions +# Directories and allowed page types are executable, others are not. +find ./pages/ | while read file; do + if [[ $file == *".php" || $file == *".sh" || -d $file ]]; then + mode=755 + else + mode=644 + fi + chmod -c $mode $file +done + npm install ./main.js diff --git a/test.html b/test.html deleted file mode 100644 index d416aff..0000000 --- a/test.html +++ /dev/null @@ -1,27 +0,0 @@ - - - - - - - Header - - - - - - - MENU - - -

    Welcome!

    - -

    This is a test. It can be ignored. :)

    - - -
    Copyright $year
    - - - - - From 1c7088719904da5ef694b669103f07ece7376348 Mon Sep 17 00:00:00 2001 From: Hyperling Date: Sun, 9 Oct 2022 09:43:38 -0500 Subject: [PATCH 12/21] Implemented the grid formatting. Dark theme came along nicely. Got the home page laid out and still trying to determine which subcontent to put on which page. --- README.md | 1 + pages/about.php | 19 ++- pages/helpers/dark.css | 30 +++++ pages/helpers/footer.php | 11 +- pages/helpers/header.php | 3 + pages/helpers/main.css | 39 +++--- pages/helpers/menu.php | 15 ++- pages/home.php | 18 +-- pages/journey.sh | 1 + pages/subpages/about/health.php | 34 ++++++ pages/subpages/home/apps.php | 209 +++++++++++++++++++++----------- pages/subpages/home/health.php | 4 - pages/videos.php | 1 + 13 files changed, 263 insertions(+), 122 deletions(-) create mode 100644 pages/helpers/dark.css create mode 100644 pages/journey.sh create mode 100755 pages/subpages/about/health.php delete mode 100755 pages/subpages/home/health.php create mode 100644 pages/videos.php diff --git a/README.md b/README.md index 52f2995..ceb80b8 100644 --- a/README.md +++ b/README.md @@ -32,3 +32,4 @@ Add Favicon ## Inspiration - [https://liquorix.net/] - [https://cahlen.org/] +- [https://merkinvineyardsosteria.com/] diff --git a/pages/about.php b/pages/about.php index 2e4c7d7..4bf2c0e 100755 --- a/pages/about.php +++ b/pages/about.php @@ -3,17 +3,26 @@ - -

    Curious About Me?

    -

    - TBD -

    +
    +

    Curious About Me?

    +

    + TBD +

    +
    - - Copyright + +
    + + This website is free software! Click to learn more.
    diff --git a/pages/helpers/header.php b/pages/helpers/header.php index 51e12eb..ce47b3a 100755 --- a/pages/helpers/header.php +++ b/pages/helpers/header.php @@ -13,4 +13,7 @@ + diff --git a/pages/helpers/main.css b/pages/helpers/main.css index f7c822e..7007bfd 100644 --- a/pages/helpers/main.css +++ b/pages/helpers/main.css @@ -1,21 +1,13 @@ /* 2022-09-14 CSS for the website. */ /* https://www.w3schools.com/Css/css_rwd_grid.asp */ -/* Enable dynamic stuffs */ +/* Enable dynamic stuffs, maks the element think its entire size includes padding. */ * { box-sizing: border-box; } -/* Page Sections */ -.menu { - width: 25%; - float: left; -} -.main { - width: 75%; - float: left; -} - +/*** Page Sections ***/ +/** Page with 12 columns **/ .col-1 {width: 8.33%;} .col-2 {width: 16.66%;} .col-3 {width: 25%;} @@ -32,26 +24,27 @@ [class*="col-"] { float: left; padding: 15px; - border: 1px solid red; + /*border: 1px solid green;*/ /* FORTESTING otherwise disable */ } +/* Ensure columns are respected as if they always exist. */ .row::after { content: ""; clear: both; display: table; } -/* MyStuff ***/ -/** Dark Theme **/ -body { - background-color: #333333; +/** Make the menu items centered and layout horizontal. **/ +.menu-list { + text-align: center; + list-style-type: none; + padding-left: 0px; } -* { - color: #CCCCCC; + +.menu_item { + display: inline-block; } -a { - color: #FF9900 -} -h1,h2,h3,h4,h5,h6 { - color: #6633FF + +.center { + text-align: center; } \ No newline at end of file diff --git a/pages/helpers/menu.php b/pages/helpers/menu.php index 599a575..26e9cf3 100755 --- a/pages/helpers/menu.php +++ b/pages/helpers/menu.php @@ -1,6 +1,11 @@ #!/usr/bin/php - +
    + +
    diff --git a/pages/home.php b/pages/home.php index 21a11fb..e709af7 100755 --- a/pages/home.php +++ b/pages/home.php @@ -4,23 +4,17 @@ include "helpers/body_open.php"; ?> -

    Welcome!

    -

    - Website is still in testing. Don't judge too harshly. :) -

    +
    +

    Welcome!

    +

    + Website is still in testing. Don't judge too harshly. :) +

    +
    diff --git a/pages/journey.sh b/pages/journey.sh new file mode 100644 index 0000000..a9bf588 --- /dev/null +++ b/pages/journey.sh @@ -0,0 +1 @@ +#!/bin/bash diff --git a/pages/subpages/about/health.php b/pages/subpages/about/health.php new file mode 100755 index 0000000..ca25a82 --- /dev/null +++ b/pages/subpages/about/health.php @@ -0,0 +1,34 @@ +#!/usr/bin/php +
    +

    My Health Protocol

    +
    +
    +
    +

    + I have not been sick since I cleaned up my lifestyle in 2014. + No colds, flus, fevers, etc. My suggestions for accomplishing this are simple. + Consistently eat enough clean food, drink enough clean water, get enough good sleep, and enjoy life. + Unfortunately our society today has very different views on how to do these things. + A full list of my protocol without getting too into the weeds can be found here: +

    + +

    + Other free sources of imformation I recommend would be + Dr John McDougall, + Dr Neal Barnard, and + Dr Caldwell Esselstyn. + All of them have plenty of videos and resources online, there is no need to buy their books unless you want to support them. + They have been reversing sickness for decades and their plans follow a similar whole food carb-based lifestyle such as my own, with NO OIL! +

    +

    + For more information on my specifics and why I came to this lifestyle please visit + My Journey. +

    +
    +
    \ No newline at end of file diff --git a/pages/subpages/home/apps.php b/pages/subpages/home/apps.php index 51ece63..eacef4b 100755 --- a/pages/subpages/home/apps.php +++ b/pages/subpages/home/apps.php @@ -1,75 +1,144 @@ #!/usr/bin/php -

    My Public Programs

    - -

    Android Apps

    -
    -
    -
    ctfu
    Carb Up! BETA -
    -

    Calculate cost-effectiveness of foods on a High Carb Low Fat lifestyle.

    - [Play Store] - [APK] -

    TBD: - [F-Droid] - [Github] -

    -
    - -
    45minuterule
    45 Minute Rule -
    -

    Determine when to go to bed if you'd like to wake up during light sleep.

    - [Play Store] - [APK] -

    TBD: - [F-Droid] - [Github] -

    -
    +
    +

    My Public Programs

    +

    + I write free software! Please feel welcome to browse anything I have created. +

    -
    -
    infinitetimer
    Infinite Timer -
    -

    Play your notification sound at your chosen Hour:Minute:Second interval.

    - [Play Store] - [APK] -

    TBD: - [F-Droid] - [Github] -

    -
    - -
    -
    - - hypergames -
    - HyperGames [IN DEVELOPMENT] -
    -

    - Began developing some games for fun. Not near a finished state, but "playable". -

    - [Play Store - ] - [APK] -

    TBD: - [F-Droid] - [Github] -

    -
    -
    +
    +

    Android Apps

    -

    Other Programs

    -

    - For a full list of my programs including my Ansible automation, - Docker setup, source code for this website, and fun-type projects - like an obfuscating editor and music fixer, check out - my Github. -

    +
    +
    +
    + + ctfu_image +
    +

    Carb Up! BETA

    +
    +

    + Calculate cost-effectiveness of foods on a High Carb Low Fat lifestyle. +

    +

    + [Play Store] + [APK] +

    +

    + TBD: + + [F-Droid] + [Github] + +

    +
    +
    +
    + +
    +
    + + 45minuterule +
    +

    45 Minute Rule

    +
    +

    + Determine when to go to bed if you'd like to wake up during light sleep. +

    +

    + [Play Store] + [APK] +

    +

    + TBD: + + [F-Droid] + [Github] + +

    +
    +
    +
    + +
    +
    + + infinitetimer_image +
    +

    Infinite Timer

    +
    +

    + Play your notification sound at your chosen Hour:Minute:Second interval. +

    +

    + [Play Store] + [APK] +

    +

    + TBD: + + [F-Droid] + [Github] + +

    +
    +
    +
    + +
    +
    + + hypergames_image +
    +

    + HyperGames +

    +
    +

    + Began developing some games for fun. Not near a finished state, but "playable". +

    +

    + [Play Store + ] + [APK] +

    +

    + TBD: + + [F-Droid] + [Github] + +

    +
    +
    +
    +
    + +
    +

    Other Programs

    +
    +
    +

    + For a full list of my programs including my Ansible automation, + Docker setup, source code for this website, and fun projects + like an obfuscating editor and music fixer, check out + my Github. +

    +
    diff --git a/pages/subpages/home/health.php b/pages/subpages/home/health.php deleted file mode 100755 index 2e5dd1e..0000000 --- a/pages/subpages/home/health.php +++ /dev/null @@ -1,4 +0,0 @@ -#!/usr/bin/php -

    My Health Protocol

    - - \ No newline at end of file diff --git a/pages/videos.php b/pages/videos.php new file mode 100644 index 0000000..ed3f2eb --- /dev/null +++ b/pages/videos.php @@ -0,0 +1 @@ +#!/usr/bin/php From ce20fa0f6faa76ede30ee14cee845e781a6a81bd Mon Sep 17 00:00:00 2001 From: Hyperling Date: Thu, 13 Oct 2022 07:29:46 -0500 Subject: [PATCH 13/21] Created a banner, added more content, converted spaces to tabs, figured out hrefs with # based on id. --- README.md | 3 +++ pages/about.php | 30 ++++++++++++++++++++----- pages/helpers/banner.css | 23 +++++++++++++++++++ pages/helpers/banner.php | 6 +++++ pages/helpers/body_open.php | 1 + pages/helpers/dark.css | 19 ++++++++-------- pages/helpers/header.php | 5 ++++- pages/helpers/main.css | 26 ++++++++++----------- pages/home.php | 8 ++++++- pages/journey.sh | 0 pages/subpages/about/health.php | 40 ++++++++++++++++++++++++--------- pages/subpages/about/whoami.php | 1 - pages/support.php | 15 +++++++------ pages/videos.php | 29 ++++++++++++++++++++++++ 14 files changed, 158 insertions(+), 48 deletions(-) create mode 100644 pages/helpers/banner.css create mode 100644 pages/helpers/banner.php mode change 100644 => 100755 pages/journey.sh delete mode 100755 pages/subpages/about/whoami.php mode change 100644 => 100755 pages/videos.php diff --git a/README.md b/README.md index ceb80b8..32528ae 100644 --- a/README.md +++ b/README.md @@ -31,5 +31,8 @@ Add Favicon ## Inspiration - [https://liquorix.net/] + - The linux-zen kernel, a really great one if you're running FOSS OS's! - [https://cahlen.org/] + - Also has really interesting and important content, it is highly recommended. - [https://merkinvineyardsosteria.com/] + - A winery website for MJ Keenan. \ No newline at end of file diff --git a/pages/about.php b/pages/about.php index 4bf2c0e..c90b75f 100755 --- a/pages/about.php +++ b/pages/about.php @@ -6,15 +6,35 @@

    Curious About Me?

    - TBD + Hi there! My name is Chad, I am the primary content creator behind the + Hyperling and HyperVegan brands. Thank you for your interest! +

    +

    + My hobbies go further than just coding and video making. I am big into + health and believe it is humanity's most important asset. I was fortunate + to have time off school/work/hobbies in my early 20's was able to lock + in a great lifestyle after a life of chronic sickness. See more below in + My Health Protocol, it also includes a link to the + full history. +

    +

    + I am also an avid gardener, focusing on the principles of nature-based + permaculture in order to grow fruits and vegetables, like in a Food + Forest system. This comes with other outdoor interests such as hiking, + camping, backpacking, foraging, and traveling. +

    +

    + For all of my life I have resided in Indiana, USA, but in Spring 2023 I + am making a big leap and heading to the southwest, most likely Arizona + or Colorado. The humidity in the midwest is miserable and the terrain + is flat and boring. There are all sorts of insect pests and the ground + is so fertile that yard grass takes over a garden in a jiffy. I look + forward to the challenge of growing food in the new climate, but also + plan to reduce costs by living outdoors. Home ownership isn't for me.

    + + + +
    \ No newline at end of file diff --git a/pages/helpers/body_open.php b/pages/helpers/body_open.php index ef6b335..5e2ec0e 100755 --- a/pages/helpers/body_open.php +++ b/pages/helpers/body_open.php @@ -6,6 +6,7 @@ diff --git a/pages/helpers/dark.css b/pages/helpers/dark.css index 98b8967..576a6fb 100644 --- a/pages/helpers/dark.css +++ b/pages/helpers/dark.css @@ -1,30 +1,29 @@ -/*** MyStuff ***/ -/** Dark Theme **/ +/*** Dark Theme ***/ body { - background-color: #444444; + background-color: #444444; } * { - color: #CCCCCC; + color: #CCCCCC; } a { - color: #FF9900 + color: #FF9900 } h1,h2,h3,h4,h5,h6 { - color: #6633FF; + color: #6633FF; } .header { - /*background-color: #113311;*/ - background-color: #222222; + /*background-color: #113311;*/ + background-color: #222222; } .title { - background-color: #111111; + background-color: #111111; } .text { - background-color: #333333; + background-color: #333333; } diff --git a/pages/helpers/header.php b/pages/helpers/header.php index ce47b3a..752deab 100755 --- a/pages/helpers/header.php +++ b/pages/helpers/header.php @@ -9,11 +9,14 @@ - + + diff --git a/pages/helpers/main.css b/pages/helpers/main.css index 7007bfd..f34de83 100644 --- a/pages/helpers/main.css +++ b/pages/helpers/main.css @@ -3,7 +3,7 @@ /* Enable dynamic stuffs, maks the element think its entire size includes padding. */ * { - box-sizing: border-box; + box-sizing: border-box; } /*** Page Sections ***/ @@ -22,29 +22,29 @@ .col-12 {width: 100%;} [class*="col-"] { - float: left; - padding: 15px; - /*border: 1px solid green;*/ /* FORTESTING otherwise disable */ + float: left; + padding: 15px; + /*border: 1px solid green;*/ /* FORTESTING otherwise disable */ } /* Ensure columns are respected as if they always exist. */ .row::after { - content: ""; - clear: both; - display: table; + content: ""; + clear: both; + display: table; } /** Make the menu items centered and layout horizontal. **/ .menu-list { - text-align: center; - list-style-type: none; - padding-left: 0px; + text-align: center; + list-style-type: none; + padding-left: 0px; } .menu_item { - display: inline-block; + display: inline-block; } .center { - text-align: center; -} \ No newline at end of file + text-align: center; +} diff --git a/pages/home.php b/pages/home.php index e709af7..30fc51b 100755 --- a/pages/home.php +++ b/pages/home.php @@ -7,7 +7,13 @@

    Welcome!

    - Website is still in testing. Don't judge too harshly. :) + [ Website is still in testing. Don't judge too harshly. :) ] +

    +

    + Welcome to my site! It is the central hub of my activities, linking you + to most of my projects and providing ways to contact and support me. + I've also included information such as my health protocol which was + currently only scattered throughout videos.

    diff --git a/pages/journey.sh b/pages/journey.sh old mode 100644 new mode 100755 diff --git a/pages/subpages/about/health.php b/pages/subpages/about/health.php index ca25a82..73cbd07 100755 --- a/pages/subpages/about/health.php +++ b/pages/subpages/about/health.php @@ -1,17 +1,23 @@ #!/usr/bin/php -
    +

    My Health Protocol

    -
    -

    - I have not been sick since I cleaned up my lifestyle in 2014. - No colds, flus, fevers, etc. My suggestions for accomplishing this are simple. - Consistently eat enough clean food, drink enough clean water, get enough good sleep, and enjoy life. - Unfortunately our society today has very different views on how to do these things. - A full list of my protocol without getting too into the weeds can be found here: + I have not been sick since I cleaned up my lifestyle in 2014. No colds, + flus, fevers, etc. My suggestions for accomplishing this are simple. + Consistently: +

      +
    • eat enough clean food,
    • +
    • drink enough clean water,
    • +
    • get enough good sleep, and
    • +
    • enjoy a low-stress life.
    • +
    + Unfortunately our society today has many different views on how to + do these things, most of which I would say do not work. A full list of + my protocol without getting too into the weeds can be found here:

    + Health Is A Priority (PDF Download) [TBD]

    Other free sources of imformation I recommend would be Dr Caldwell Esselstyn. - All of them have plenty of videos and resources online, there is no need to buy their books unless you want to support them. - They have been reversing sickness for decades and their plans follow a similar whole food carb-based lifestyle such as my own, with NO OIL! + All of them have plenty of free videos and resources online, there is + no need to buy their books unless you want to support them. They have + been reversing sickness for decades and their plans follow a similar + whole food carb-based lifestyle such as my own, with NO OIL! +

    +

    + Even though I run the brand HyperVegan, I am like the doctors and do + not have a strict adherence to the cultism of "veganism". Yes, when I + waver from healthy eating I always keep my diet plant + based due to compassion, but I do not and will never + subscribe to an absolutist ideaology which divides people. Think of + people shaming others for stepping on ants, accidentally eating gelatin + or a certain food coloring, etc. I do what I can for the planet and its + beings but am also practical and stay friendly with carnists, just as + I am still friendly with statists. The banner at the top of the page + is not just for decoration, I truly believe in those values. ;)

    For more information on my specifics and why I came to this lifestyle please visit diff --git a/pages/subpages/about/whoami.php b/pages/subpages/about/whoami.php deleted file mode 100755 index ed3f2eb..0000000 --- a/pages/subpages/about/whoami.php +++ /dev/null @@ -1 +0,0 @@ -#!/usr/bin/php diff --git a/pages/support.php b/pages/support.php index 6f9695d..b78d043 100755 --- a/pages/support.php +++ b/pages/support.php @@ -8,12 +8,14 @@ include "helpers/body_open.php"; ?> -

    Support

    -

    - While I do not ask for anything, and prefer to take care of myself, - I acknowledge that some people enjoy gift giving and would like to - help me out. Below are my preferred ways that this be done. -

    +
    +

    Support

    +

    + While I do not ask for anything, and prefer to take care of myself, + I acknowledge that some people enjoy gift giving and would like to + help me out. Below are my preferred ways to do this. +

    +
    - diff --git a/pages/videos.php b/pages/videos.php old mode 100644 new mode 100755 index ed3f2eb..e9ce05a --- a/pages/videos.php +++ b/pages/videos.php @@ -1 +1,30 @@ #!/usr/bin/php + + + + + +
    +

    Videos

    +

    + I enjoy making video content when I have free time. Other life duties take + priority so this is not always frequent of often. +

    +
    + + + From 239aa26b498ebaf2f691b205f22a766189ae5523 Mon Sep 17 00:00:00 2001 From: Hyperling Date: Sun, 16 Oct 2022 09:22:44 -0500 Subject: [PATCH 14/21] Getting much closer! Still need to finalize About and write Journey. --- README.md | 31 ++++---- package.json | 2 +- pages/about.php | 74 +++++++++--------- pages/contact.php | 34 +++++++++ pages/helpers/banner.css | 36 ++++----- pages/helpers/banner.php | 2 +- pages/helpers/dark.css | 44 +++++------ pages/helpers/main.css | 120 +++++++++++++++++++----------- pages/helpers/menu.php | 5 +- pages/home.php | 30 +++++--- pages/subpages/about/health.php | 8 +- pages/subpages/about/notice.php | 10 +++ pages/subpages/about/stance.php | 11 +++ pages/subpages/home/apps.php | 15 ++-- pages/subpages/home/contact.php | 1 - pages/subpages/support/donate.php | 35 ++++++++- pages/subpages/support/gifts.php | 59 ++++++++++++++- pages/support.php | 20 ++--- pages/videos.php | 43 ++++++----- run.sh | 2 +- 20 files changed, 394 insertions(+), 188 deletions(-) create mode 100755 pages/contact.php mode change 100644 => 100755 pages/helpers/banner.php delete mode 100755 pages/subpages/home/contact.php diff --git a/README.md b/README.md index 32528ae..a8d109f 100644 --- a/README.md +++ b/README.md @@ -1,4 +1,5 @@ # My Website + Custom website rather than using WordPress or anything else that handles the code for you. Rather than using apache or nginx just using Node.js to serve an HTML API. Gives more control. @@ -9,30 +10,32 @@ Basically a "page" is just a program that echo's HTML content for the API. Will likely play with some pages being Bash and other fun things. -## TODO -Finish CSS +All content is formatted so that the page source is readible. -Add Current Content -- APPS -- VIDEOS -- DONATE -- VIDEOS +# How To Run + +The install script is currently only set up for apt, and the package names only tested on Ubuntu. + +`git clone https://github.com/Hyperling/www www` +`cd www` +`./run.sh` + +Then in a web browser, navigate to `your_machines_ip_address:8080`. + +## TODO Add New Content - NOTICE - HEALTH (My Priorities Sheet) - How to host files? Put them in reverse-proxy's files.hyperling.com site? -- GIFTS - -Add Favicon -[https://www.metatags.org/seo-tips/design-tips/favicon-ico/] -- Will this have to be in files.hyperling.com as well? Or will this work? - - [https://www.geeksforgeeks.org/what-is-the-use-of-serve-favicon-from-node-js-server/] +- STANCE +- JOURNEY ## Inspiration + - [https://liquorix.net/] - The linux-zen kernel, a really great one if you're running FOSS OS's! - [https://cahlen.org/] - Also has really interesting and important content, it is highly recommended. - [https://merkinvineyardsosteria.com/] - - A winery website for MJ Keenan. \ No newline at end of file + - A winery website for MJ Keenan. diff --git a/package.json b/package.json index 0b225ee..f609c55 100644 --- a/package.json +++ b/package.json @@ -1,5 +1,5 @@ { "dependencies": { - "express": "^4.18.1" + "express": ">=4.18.1" } } diff --git a/pages/about.php b/pages/about.php index c90b75f..fadbb14 100755 --- a/pages/about.php +++ b/pages/about.php @@ -1,55 +1,57 @@ #!/usr/bin/php - -
    -

    Curious About Me?

    -

    - Hi there! My name is Chad, I am the primary content creator behind the - Hyperling and HyperVegan brands. Thank you for your interest! -

    -

    - My hobbies go further than just coding and video making. I am big into - health and believe it is humanity's most important asset. I was fortunate - to have time off school/work/hobbies in my early 20's was able to lock - in a great lifestyle after a life of chronic sickness. See more below in - My Health Protocol, it also includes a link to the - full history. -

    -

    - I am also an avid gardener, focusing on the principles of nature-based - permaculture in order to grow fruits and vegetables, like in a Food - Forest system. This comes with other outdoor interests such as hiking, - camping, backpacking, foraging, and traveling. -

    -

    - For all of my life I have resided in Indiana, USA, but in Spring 2023 I - am making a big leap and heading to the southwest, most likely Arizona - or Colorado. The humidity in the midwest is miserable and the terrain - is flat and boring. There are all sorts of insect pests and the ground - is so fertile that yard grass takes over a garden in a jiffy. I look - forward to the challenge of growing food in the new climate, but also - plan to reduce costs by living outdoors. Home ownership isn't for me. -

    + +
    +

    Who Am I?

    +
    +
    +

    + Hi there! My name is Chad, I am the primary content creator behind the + Hyperling and HyperVegan brands. Thank you for your interest! +

    +

    + My hobbies go further than just coding and video making. I am big into + health and believe it is humanity's most important asset. I was fortunate + to have time off school/work/hobbies in my early 20's was able to lock + in a great lifestyle after a life of chronic sickness. See more below in + My Health Protocol, it also includes a link to the + full history. +

    +

    + I am also an avid gardener, focusing on the principles of nature-based + permaculture in order to grow fruits and vegetables, like in a Food + Forest system. This comes with other outdoor interests such as hiking, + camping, backpacking, foraging, and traveling. +

    + +
    +
    diff --git a/pages/contact.php b/pages/contact.php new file mode 100755 index 0000000..687b84c --- /dev/null +++ b/pages/contact.php @@ -0,0 +1,34 @@ +#!/usr/bin/php + + +
    +

    Contact Me

    +
    +
    +
    +

    + Public inquries can be made on my Odysee channel's discussion board. +

    + +

    + For private matters, my email address may be used, but there is no + guarantee of timely response. If I do not know of you then please be + sure to form the email in a way that does not look like spam. +

    + +
    +
    + + diff --git a/pages/helpers/banner.css b/pages/helpers/banner.css index 0a08c0a..912de36 100644 --- a/pages/helpers/banner.css +++ b/pages/helpers/banner.css @@ -1,23 +1,23 @@ /*** Logo In Header ***/ -/* Shared Attributes */ -.banner-top, .banner-middle, .banner-bottom { - color: white; - width: 100%; - height: 69px; - font-size: 50px; - text-align: center; -} + /* Shared Attributes */ + .banner-top, .banner-middle, .banner-bottom { + color: white; + width: 100%; + height: 69px; + font-size: 50px; + text-align: center; + } -/* Specific Attributes */ -.banner-top { - background-color: #6633FF; -} + /* Specific Attributes */ + .banner-top { + background-color: #6633FF; + } -.banner-middle { - background-color: #FF9900; -} + .banner-middle { + background-color: #FF9900; + } -.banner-bottom { - background-color: #339933; -} + .banner-bottom { + background-color: #339933; + } diff --git a/pages/helpers/banner.php b/pages/helpers/banner.php old mode 100644 new mode 100755 index 300218c..8281851 --- a/pages/helpers/banner.php +++ b/pages/helpers/banner.php @@ -1,5 +1,5 @@ #!/usr/bin/php -
    +
    diff --git a/pages/helpers/dark.css b/pages/helpers/dark.css index 576a6fb..6763fae 100644 --- a/pages/helpers/dark.css +++ b/pages/helpers/dark.css @@ -1,29 +1,29 @@ /*** Dark Theme ***/ -body { - background-color: #444444; -} + body { + background-color: #444444; + } -* { - color: #CCCCCC; -} + * { + color: #CCCCCC; + } -a { - color: #FF9900 -} + a { + color: #FF9900 + } -h1,h2,h3,h4,h5,h6 { - color: #6633FF; -} + h1,h2,h3,h4,h5,h6 { + color: #6633FF; + } -.header { - /*background-color: #113311;*/ - background-color: #222222; -} + .header { + /*background-color: #113311;*/ + background-color: #222222; + } -.title { - background-color: #111111; -} + .title { + background-color: #111111; + } -.text { - background-color: #333333; -} + .text { + background-color: #333333; + } diff --git a/pages/helpers/main.css b/pages/helpers/main.css index f34de83..25427d1 100644 --- a/pages/helpers/main.css +++ b/pages/helpers/main.css @@ -1,50 +1,84 @@ -/* 2022-09-14 CSS for the website. */ -/* https://www.w3schools.com/Css/css_rwd_grid.asp */ +/*** 2022-09-14 CSS for the website. ***/ + /* https://www.w3schools.com/Css/css_rwd_grid.asp */ -/* Enable dynamic stuffs, maks the element think its entire size includes padding. */ -* { - box-sizing: border-box; -} + /* Enable dynamic stuffs, maks the element think its entire size includes padding. */ + * { + box-sizing: border-box; + } -/*** Page Sections ***/ -/** Page with 12 columns **/ -.col-1 {width: 8.33%;} -.col-2 {width: 16.66%;} -.col-3 {width: 25%;} -.col-4 {width: 33.33%;} -.col-5 {width: 41.66%;} -.col-6 {width: 50%;} -.col-7 {width: 58.33%;} -.col-8 {width: 66.66%;} -.col-9 {width: 75%;} -.col-10 {width: 83.33%;} -.col-11 {width: 91.66%;} -.col-12 {width: 100%;} + /*** Page Sections ***/ + /** Page with 12 columns **/ + .col-1 {width: 8.33%;} + .col-2 {width: 16.66%;} + .col-3 {width: 25%;} + .col-4 {width: 33.33%;} + .col-5 {width: 41.66%;} + .col-6 {width: 50%;} + .col-7 {width: 58.33%;} + .col-8 {width: 66.66%;} + .col-9 {width: 75%;} + .col-10 {width: 83.33%;} + .col-11 {width: 91.66%;} + .col-12 {width: 100%;} -[class*="col-"] { - float: left; - padding: 15px; - /*border: 1px solid green;*/ /* FORTESTING otherwise disable */ -} + [class*="col-"] { + float: left; + padding: 15px; + /*border: 1px solid green;*/ /* FORTESTING otherwise disable */ + } -/* Ensure columns are respected as if they always exist. */ -.row::after { - content: ""; - clear: both; - display: table; -} + /* Ensure columns are respected as if they always exist. */ + .row::after { + content: ""; + clear: both; + display: table; + } -/** Make the menu items centered and layout horizontal. **/ -.menu-list { - text-align: center; - list-style-type: none; - padding-left: 0px; -} + /** Make the menu items centered and layout horizontal. **/ + .menu-list { + text-align: center; + list-style-type: none; + padding-left: 0px; + } + .menu_item { + display: inline-block; + } -.menu_item { - display: inline-block; -} + /** Be able to position anything easily. **/ + .center { + text-align: center; + } + .left { + text-align: start; + } + .right { + text-align: end; + } -.center { - text-align: center; -} + /** Use ul to create an indent but without the bullet point. **/ + .indent { + list-style-type: none; + } + + /** Objects which need borders **/ + .border { + border: 1px solid #339933; + } + + /* Also have this apply to a table's cells. */ + .border * th,td { + border: 1px solid #339933; + } + + /** Format tables and allow contents to be broken up. **/ + table { + /*width: 100%;*/ + border-collapse: collapse; + /*table-layout: fixed;*/ + } + table * th,td { + word-wrap: break-word; + overflow-wrap: break-word; + /*max-width: 1px;*/ + padding: 7px; + } diff --git a/pages/helpers/menu.php b/pages/helpers/menu.php index 26e9cf3..b0cba81 100755 --- a/pages/helpers/menu.php +++ b/pages/helpers/menu.php @@ -1,11 +1,12 @@ #!/usr/bin/php diff --git a/pages/home.php b/pages/home.php index 30fc51b..335d396 100755 --- a/pages/home.php +++ b/pages/home.php @@ -1,20 +1,26 @@ #!/usr/bin/php - + -
    -

    Welcome!

    -

    - [ Website is still in testing. Don't judge too harshly. :) ] -

    -

    - Welcome to my site! It is the central hub of my activities, linking you - to most of my projects and providing ways to contact and support me. - I've also included information such as my health protocol which was - currently only scattered throughout videos. -

    +
    +

    Welcome!

    +
    +
    +
    +

    + [ Website is still in development, please treat this as an unfinished product. ] +

    +

    + Thanks for visiting my site! It is the central hub of my activities, + linking you to most of my projects and providing ways to contact and + support me. I've also included information such as my health protocol + which was currently only scattered throughout videos. +

    +

    My Health Protocol

    +
    +

    I have not been sick since I cleaned up my lifestyle in 2014. No colds, flus, fevers, etc. My suggestions for accomplishing this are simple. Consistently: -

      +
      • eat enough clean food,
      • drink enough clean water,
      • get enough good sleep, and
      • @@ -34,6 +36,7 @@ been reversing sickness for decades and their plans follow a similar whole food carb-based lifestyle such as my own, with NO OIL!

        +

        For more information on my specifics and why I came to this lifestyle please visit My Journey.

    -
    \ No newline at end of file +
    diff --git a/pages/subpages/about/notice.php b/pages/subpages/about/notice.php index ed3f2eb..277897a 100755 --- a/pages/subpages/about/notice.php +++ b/pages/subpages/about/notice.php @@ -1 +1,11 @@ #!/usr/bin/php +
    +

    Public Notice

    +
    +
    +
    +

    + [TBD] +

    +
    +
    diff --git a/pages/subpages/about/stance.php b/pages/subpages/about/stance.php index ed3f2eb..a5d9d08 100755 --- a/pages/subpages/about/stance.php +++ b/pages/subpages/about/stance.php @@ -1 +1,12 @@ #!/usr/bin/php + +
    +

    Philosophical Stance

    +
    +
    +
    +

    + [TBD] +

    +
    +
    diff --git a/pages/subpages/home/apps.php b/pages/subpages/home/apps.php index eacef4b..35545dc 100755 --- a/pages/subpages/home/apps.php +++ b/pages/subpages/home/apps.php @@ -2,7 +2,7 @@

    My Public Programs

    - I write free software! Please feel welcome to browse anything I have created. + I write free software! Please feel welcome to browse and use anything I have created.

    @@ -54,7 +54,8 @@ Determine when to go to bed if you'd like to wake up during light sleep.

    - [Play Store] + [Play Store] [APK]

    @@ -83,7 +84,8 @@ Play your notification sound at your chosen Hour:Minute:Second interval.

    - [Play Store] + [Play Store] [APK]

    @@ -115,8 +117,7 @@

    [Play Store - ] + target="_blank" rel="noopener noreferrer">Play Store] [APK]

    @@ -136,9 +137,9 @@

    - For a full list of my programs including my Ansible automation, + For a full list of programs including my Ansible automation, Docker setup, source code for this website, and fun projects like an obfuscating editor and music fixer, check out - my Github. + my Github.

    diff --git a/pages/subpages/home/contact.php b/pages/subpages/home/contact.php deleted file mode 100755 index ed3f2eb..0000000 --- a/pages/subpages/home/contact.php +++ /dev/null @@ -1 +0,0 @@ -#!/usr/bin/php diff --git a/pages/subpages/support/donate.php b/pages/subpages/support/donate.php index 84d9165..da8de11 100755 --- a/pages/subpages/support/donate.php +++ b/pages/subpages/support/donate.php @@ -1,2 +1,35 @@ #!/usr/bin/php - \ No newline at end of file + + +
    +
    +

    + Monetary donations can be provided below through cryptocurrencies. +

    +
    • + + + + + + + + + + + + + + + + + + + + +
      DescriptionTicker#Address
      MoneroXMR4ATk6owoMki46CuVfyAHS57FB5deqVFudTsaifQC1cfmcaQemgPEftcjZcW9DmcyfrfdRjxHQ9m4JAVSorYTgm6h8JnT7ao
      LBRY/Odysee CreditLBCbDWP6qZajtm9Q9EkryKTorRwKFd5eDbPJj
      +
    +
    +
    diff --git a/pages/subpages/support/gifts.php b/pages/subpages/support/gifts.php index 0e5f265..61540da 100755 --- a/pages/subpages/support/gifts.php +++ b/pages/subpages/support/gifts.php @@ -1,2 +1,59 @@ #!/usr/bin/php - \ No newline at end of file + + +
    +
    +

    + Please reach out before purchasing any of these to make sure that I do + not already have an excess supply. I can also provide a good address + in case I have moved around. I also recommend you buying these for + yourself if you'd like to add delicious nutritious food to your diet! +

    + Food Items + + Bulk Teas + +
    +
    diff --git a/pages/support.php b/pages/support.php index b78d043..ea936b1 100755 --- a/pages/support.php +++ b/pages/support.php @@ -1,20 +1,22 @@ #!/usr/bin/php - - -
    -

    Support

    -

    - While I do not ask for anything, and prefer to take care of myself, - I acknowledge that some people enjoy gift giving and would like to - help me out. Below are my preferred ways to do this. -

    +
    +

    Support

    +
    +
    +
    +

    + While I do not ask for anything, and prefer to take care of myself, + I acknowledge that some people enjoy gift giving and would like to + help me out. Below are my preferred ways to do this. +

    +
    - -
    -

    Videos

    -

    - I enjoy making video content when I have free time. Other life duties take - priority so this is not always frequent of often. -

    +
    +

    Videos

    +
    +
    +
    +

    + I enjoy making video content when I have free time. Other life duties + take priority so this is not always frequent of often. For the best + viewing experience, please go directly to my channel here: +

    + +

    I also have a separate channel for reposting content, found here:

    + +
    - diff --git a/run.sh b/run.sh index 5ac4d8b..74e2ba3 100755 --- a/run.sh +++ b/run.sh @@ -28,4 +28,4 @@ npm install ./main.js ### -exit 0 +exit $? From 9b0cf7edd0e338dd8759921a5e9dfb0057041ba4 Mon Sep 17 00:00:00 2001 From: Hyperling Date: Sun, 16 Oct 2022 09:23:29 -0500 Subject: [PATCH 15/21] Fix readability of How To Run. --- README.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/README.md b/README.md index a8d109f..2b7c883 100644 --- a/README.md +++ b/README.md @@ -17,7 +17,9 @@ All content is formatted so that the page source is readible. The install script is currently only set up for apt, and the package names only tested on Ubuntu. `git clone https://github.com/Hyperling/www www` + `cd www` + `./run.sh` Then in a web browser, navigate to `your_machines_ip_address:8080`. From 3cf1665197522bbb9a89b18bd3434277d9791184 Mon Sep 17 00:00:00 2001 From: Hyperling Date: Tue, 18 Oct 2022 20:12:45 -0500 Subject: [PATCH 16/21] Some work on the About page and initial work on Stance and Notice subpages. --- pages/about.php | 34 +++++++++++++++++++++++---------- pages/subpages/about/notice.php | 14 +++++++++++++- pages/subpages/about/stance.php | 29 +++++++++++++++++++++++++++- 3 files changed, 65 insertions(+), 12 deletions(-) diff --git a/pages/about.php b/pages/about.php index fadbb14..33f19f3 100755 --- a/pages/about.php +++ b/pages/about.php @@ -26,17 +26,31 @@ Forest system. This comes with other outdoor interests such as hiking, camping, backpacking, foraging, and traveling.

    - +

    + Currently I reside in the US state of Indiana and am working to move + to the southwest for the following reasons: +

    +
      +
    • Dry Heat
    • +
    • Mountains
    • +
    • Lack of Bugs
    • +
    • Cactus and Spruce
    • +
    +

    + The search will begin in Arizona. Colorado and Mexico will likely + be explored. New Mexico and other locations will be visited as well + but have not yet revealed areas which offer exactly what I'm looking + for.

    - -->
    diff --git a/pages/subpages/about/notice.php b/pages/subpages/about/notice.php index 277897a..24a1ba4 100755 --- a/pages/subpages/about/notice.php +++ b/pages/subpages/about/notice.php @@ -4,8 +4,20 @@
    + No Guarentee

    - [TBD] + Anything I say, do, or produce comes with no guarentee or warranty + unless explicitly noted. +

    + Freedom of Choice +

    + My time is my own and I choose what to do with it. I am in the process + of reclaiming any of it which I feel has been given away in error. +

    + Freedom of Association +

    + I choose who and what I do my business with and hold the right to make + different choices at any time.

    diff --git a/pages/subpages/about/stance.php b/pages/subpages/about/stance.php index a5d9d08..75a45b5 100755 --- a/pages/subpages/about/stance.php +++ b/pages/subpages/about/stance.php @@ -5,8 +5,35 @@
    + General

    - [TBD] + My thoughts are my own. I do not subscribe to any external systems. +

    +

    + I believe in: +

    +
      +
    • Peace over War
    • +
    • Love over Hate
    • +
    • Happiness over Currency
    • +
    • Free Time over Salaray
    • +
    • People over Profit
    • +
    • Freedom over Security
    • +
    • Rules over Rulers
    • +
    • Simplicity over Features
    • +
    • Trust over Discipline
    • +
    +

    + I prefer interacting with human beings and creatures of the Earth. + Electronics and artifical persons are of decreasing interest to me. +

    + Politics +

    + I would like to be left alone to be a morally responsible adult. I do + not choose a side in the divisive hobby known as politics. I follow + arbitrary and meaningless rules only to avoid being abused by a + fictitious entity called government. I refuse any rules which are + immoral such as requiring one to cause harm to another living being.

    From 471d5e157345320a2980e0ac2d911c2c546ae30f Mon Sep 17 00:00:00 2001 From: Hyperling Date: Wed, 19 Oct 2022 04:56:51 -0500 Subject: [PATCH 17/21] Added sitemap for humans and bots. Some content tweaks. Starting to feel close to done! --- README.md | 2 - main.js | 105 ++++++++++++++++++++++++++++--- pages/about.php | 11 ++-- pages/contact.php | 2 +- pages/helpers/advisory.php | 3 + pages/helpers/footer.php | 19 +++--- pages/journey.sh | 26 ++++++++ pages/subpages/home/apps.php | 8 +-- pages/subpages/support/gifts.php | 5 ++ 9 files changed, 154 insertions(+), 27 deletions(-) diff --git a/README.md b/README.md index 2b7c883..61e2dcd 100644 --- a/README.md +++ b/README.md @@ -27,10 +27,8 @@ Then in a web browser, navigate to `your_machines_ip_address:8080`. ## TODO Add New Content -- NOTICE - HEALTH (My Priorities Sheet) - How to host files? Put them in reverse-proxy's files.hyperling.com site? -- STANCE - JOURNEY ## Inspiration diff --git a/main.js b/main.js index 8793957..37bc194 100755 --- a/main.js +++ b/main.js @@ -29,9 +29,15 @@ ports.push(8080); //// Functions //// +/* Code exists inside a main function so that we may use async/await. +*/ async function main() { console.log("...Starting Main..."); + // Getting dates in Node.js is awful, just use Linux. + const start_datetime = "" + await execSync('date "+%Y-%m-%dT%H:%M:%S%:z"'); + const start_datetime_trimmed = start_datetime.trim(); + console.log("Set app to return HTML documents."); app.use(function (req, res, next) { res.contentType('text/html'); @@ -59,28 +65,113 @@ async function main() { console.log(" * Pages loaded: ", pages); //return; // Stop execution FORTESTING + /* Create both an XML and HTML sitemap based on these entries. XML is used for + // bots like SEO scrapers. HTML will be for human users looking for a list of + // all pages. Some are not in the menu. Generated an example XML sitemap at + // www.xml-sitemaps.com then stripped it apart and made it dynamic. + */ + let sitemap_xml = ` + + + https://hyperling.com/ + `+start_datetime_trimmed+` + 1.00 + + + https://hyperling.com/sitemap/ + `+start_datetime_trimmed+` + 0.80 + + `; + let sitemap_html = ` + + Special Pages + + Web Pages (Alphabetical) +
      + `; + console.log("...Adding Routes..."); let router = express.Router(); - /* AUTOMATIC METHOD BASED ON OBJECT/ARRAY OF PHP scripts + /* AUTOMATIC METHOD BASED ON OBJECT/ARRAY OF WEB SCRIPTS // Creates routes with the URL of the key and location of the value. */ for (let key in pages) { console.log(" * Creating router for", key); router.get("/" + key, function (req,res) { console.log(key, "fulfilling request to", req.socket.remoteAddress, "asking for", req.url) - res.send(execSync(pages[key])); + res.send("" + execSync(pages[key])); }); + + /* Append the page to the sitemap variables. + */ + console.log(" * * Adding to sitemap.xml"); + sitemap_xml = sitemap_xml + ` + + https://hyperling.com/`+key+`/ + `+start_datetime_trimmed+` + 0.80 + + `; + console.log(" * * Adding to sitemap.html"); + sitemap_html = sitemap_html + ` +
    • + `+key+` + (Local) + (Hardlink) +
    • + `; } - // Provide css. - router.get('/main.css', function (req, res) { - console.log("css being provided to", req.socket.remoteAddress) - let html = execSync("cat ./pages/main.css"); - res.send(html); + /* Close the sitemap variables + */ + sitemap_xml = sitemap_xml + ` + + `; + sitemap_html = sitemap_html + ` +
    + `; + + // Provide sitemap.xml file for "SEO". + console.log(" * Creating router for sitemap.xml"); + router.get('/sitemap.xml', function (req, res) { + console.log("sitemap.xml being provided to", req.socket.remoteAddress) + res.contentType('text/xml'); + res.send(sitemap_xml); + }); + + // Provide human-usable sitemap links. + console.log(" * Creating router for sitemap*"); + router.get('/sitemap*', function (req, res) { + console.log("sitemap.html being provided to", req.socket.remoteAddress) + res.send(sitemap_html); }); // Originally a test, now a catch-all redirection to Home! + console.log(" * Creating router for redirection"); router.get('/*', function (req, res) { // WARNING: These are huge so only look when you need to. //console.log(req); diff --git a/pages/about.php b/pages/about.php index 33f19f3..6bbb148 100755 --- a/pages/about.php +++ b/pages/about.php @@ -36,20 +36,19 @@

    -->

    - Currently I reside in the US state of Indiana and am working to move + As of 2022 I reside in the US state of Indiana and am working to move to the southwest for the following reasons:

      -
    • Dry Heat
    • +
    • Dry Climate
    • Mountains
    • Lack of Bugs
    • -
    • Cactus and Spruce
    • +
    • Permaculture Possibilities
    • +
    • Native Cactus and/or Spruce

    The search will begin in Arizona. Colorado and Mexico will likely - be explored. New Mexico and other locations will be visited as well - but have not yet revealed areas which offer exactly what I'm looking - for. + be explored. New Mexico and other locations will be visited as well.

    diff --git a/pages/contact.php b/pages/contact.php index 687b84c..3828143 100755 --- a/pages/contact.php +++ b/pages/contact.php @@ -4,7 +4,7 @@ ?>
    -

    Contact Me

    +

    Contact Me

    diff --git a/pages/helpers/advisory.php b/pages/helpers/advisory.php index ed3f2eb..1c39eb2 100755 --- a/pages/helpers/advisory.php +++ b/pages/helpers/advisory.php @@ -1 +1,4 @@ #!/usr/bin/php +
    + +
    \ No newline at end of file diff --git a/pages/helpers/footer.php b/pages/helpers/footer.php index 200a748..e6fcc5f 100755 --- a/pages/helpers/footer.php +++ b/pages/helpers/footer.php @@ -2,10 +2,15 @@ -
    - - This website is free software! Click to learn more. - -
    + diff --git a/pages/journey.sh b/pages/journey.sh index a9bf588..9114639 100755 --- a/pages/journey.sh +++ b/pages/journey.sh @@ -1 +1,27 @@ #!/bin/bash + +# Move to the directory that this file is in. +cd `dirname $0` + +# Create the necessary HTML components for a web page. +./helpers/body_open.php + +#Content for this page +cat << EOF +
    +

    + My Journey +

    +

    + [ TBD, check back soon. ] +

    +
    +EOF + +# Any subpages +###./helpers/section_open.php +###./subpages/journey/??? +###./helpers/section_close.php + +# Finish the web page +./helpers/body_close.php diff --git a/pages/subpages/home/apps.php b/pages/subpages/home/apps.php index 35545dc..0c58241 100755 --- a/pages/subpages/home/apps.php +++ b/pages/subpages/home/apps.php @@ -11,7 +11,7 @@
    -
    + -
    + -
    + - diff --git a/pages/journey.sh b/pages/journey.sh index 9114639..e36b61f 100755 --- a/pages/journey.sh +++ b/pages/journey.sh @@ -19,9 +19,7 @@ cat << EOF EOF # Any subpages -###./helpers/section_open.php ###./subpages/journey/??? -###./helpers/section_close.php # Finish the web page ./helpers/body_close.php diff --git a/pages/support.php b/pages/support.php index ea936b1..d915c77 100755 --- a/pages/support.php +++ b/pages/support.php @@ -20,13 +20,8 @@
    diff --git a/pages/test.sh b/pages/test.sh index 9af2b93..8058e61 100755 --- a/pages/test.sh +++ b/pages/test.sh @@ -20,12 +20,10 @@ cat << EOF EOF # Create a subsection -./helpers/section_open.php echo -e "\t\t

    Server Neofetch

    " echo -e "\t\t

    " neofetch --stdout echo -e "\t\t

    " -./helpers/section_close.php # Finish the web page ./helpers/body_close.php From 0287e13e195cacecf954e1d085ee6a26dc7ea863 Mon Sep 17 00:00:00 2001 From: Hyperling Date: Wed, 19 Oct 2022 05:28:49 -0500 Subject: [PATCH 19/21] Anchor consistency. Modify IDs. --- pages/subpages/home/apps.php | 18 +++++++++--------- pages/subpages/support/gifts.php | 2 +- 2 files changed, 10 insertions(+), 10 deletions(-) diff --git a/pages/subpages/home/apps.php b/pages/subpages/home/apps.php index 0c58241..d08d5ea 100755 --- a/pages/subpages/home/apps.php +++ b/pages/subpages/home/apps.php @@ -1,17 +1,17 @@ #!/usr/bin/php -
    +

    My Public Programs

    I write free software! Please feel welcome to browse and use anything I have created.

    -
    +

    Android Apps

    -
    + -
    + -
    + -
    + -
    -

    Other Programs

    +
    +

    Other Programs

    diff --git a/pages/subpages/support/gifts.php b/pages/subpages/support/gifts.php index 7f764b2..f8d78c1 100755 --- a/pages/subpages/support/gifts.php +++ b/pages/subpages/support/gifts.php @@ -1,6 +1,6 @@ #!/usr/bin/php -
    - - [ WARNING: - This content is still In Progress and needs a full review. - There may be typos, out of order content, and missing content. - ] - + Fast Asleep

    Headaches, depression, digestive issues, lack of energy, and eventually unprovoked anxiety/panic attacks. This was the norm for me for most of my life. I ate a standard diet including fast food with meat always - being the whether going out or cooking at home. + being the main portion whether going out or cooking at home.

    Eventually I became lactose intolerant due to antibiotics but that was @@ -38,9 +33,9 @@ cat << EOF What finally hit me hard enough to start changing things was the panic attacks and an itchy mole that had to be surgically removed. By this point in my early 20s I was already plenty skeptical of things like organized - religion and businesses profitting off of people, but it started to occur + religion and businesses profiting off of people, but it started to occur to me that there were not many facts about health in my knowledge bank. - What most people were doing and what I was doing is not working. + What most people were doing and what I was doing is not working for us.

    When I looked in the mirror to see my eyes dilating frantically and body @@ -50,9 +45,10 @@ cat << EOF so many health issues that they consistently die prematurely or suffer chronically?"

    + Waking Up

    This lead me into a more nature-based approach to my lifestyle. Obvious - things such as soda and candy were elminated first. Next was fast food. + things such as soda and candy were eliminated first. Next was fast food. By the end of it I had eliminated "food" such as meat as well since I admitted that if I was living in the wild, I wouldn't be able to kill a cow with my bare hands or teeth, much less chew on its raw carcass. @@ -63,7 +59,7 @@ cat << EOF were oatmeal or peanut butter sandwiches with either jelly or bananas. I was feeling better, but knew that bread didn't grow on trees so I needed to keep going further. This was around the time that a nasty looking and - extremely itchy mole cropped had to be cut out of the the back of my leg. + extremely itchy mole had to be cut out of the back of my leg.

    My saving grace was quitting a restaurant job in order to seek a job @@ -73,6 +69,7 @@ cat << EOF I didn't have luck finding an internship, but I had plenty of time to research health, and ended up doing an apple fast.

    + Enter Fruitarianism

    I gorged on apples. Multiple pounds a day for at least three days. I honestly did it not expecting it to work. Being able to live on apples @@ -90,7 +87,7 @@ cat << EOF

    I still tell people this to this day: those three months in 2014 were the - best feeling of my life. My body felt light lightning. I had so much energy + best feeling of my life. My body felt like lightning. I had so much energy and felt like I could literally accomplish anything. I started riding a bike without having done it since I was a kid, and was able to ride to a town dozens of miles away with no training or practice, and didn't even feel @@ -101,18 +98,25 @@ cat << EOF the heat and humidity of summer? Gone as well! My body was able to cool off so much faster without having cooked food stuck in digestion. There were so many weird things that people wouldn't think of being related to - diet and lifestyle. + diet and lifestyle. Michael Arnstein even mentions in some interviews that + being fruitarian stopped him from getting earwax!

    + Health is a Lifestyle, not Diet

    Speaking of lifestyle, that is something else I learned from listening to my new role models. "Sleep Water Sugar" as Durianrider used to say. The - PDF on my main Health section covers the 6 pillars that I found to be - highly important. "CTFU" (Carb The Fuck Up) is first for a reason, in my - experimentation it was the most important one. Water and sleep follow - because I found my body does not operate or digest well if those are - missing. Exercise is next because it can go longer without being kept up. - The last two are more spiritual, and reuire the first four to be maintained - in order for them to be beneficial, but once they are achieved then they + [TBD: PDF] + on my main + Health + section covers the 6 pillars that I found to be highly important. +

    +

    + "CTFU" (Carb The Fuck Up) is first for a reason, in my experimentation + it was the most important one. Water and sleep follow because I found + my body does not operate or digest well if those are missing. Exercise + is next because it can go longer without being kept up. The last two + are more spiritual, and require the first four to be maintained in + order for them to be beneficial, but once they are achieved then they can help keep the first four in check when they dwindle.

    @@ -123,9 +127,10 @@ cat << EOF street after our home, I started nodding off at the wheel. What a quick indication that certain foods are a no-go!

    + Back to the Real World

    Why would I stop eating like this, you ask? This was a temporary situation. - I was on summer break from school and was free from a job. When the fall + I was on summer break from school and free from any job. When the fall semester started I needed a job again to pay for gas, books, etc. So I added in clean RawTil4 type foods like rice. For many years I ate like this and still felt great. No oil, which I still don't do to this day. Also no @@ -134,18 +139,66 @@ cat << EOF reasons I don't like seasonings and prefer not to use them.

    - There are other things I was able to discover about my body as well, such - as alliums causing headaches, body pain, nightmares, and with garlic it - becomes full-on night terrors. These are an absolute no when I'm able - to dictate it. Nightshades have also been slowly phased out, avoiding - all potato unless deep fried so that the poison is destroyed even things - like tomatoes and non-spicy peppers. These are less of an issue, but raw - and undercooked potatoes cause an obvious head and body tingle/ache, - eggplant digests terribly, and tomatoes cause bloat. In 2022 as an - experiment with my wife while she tried a low histamine experiment I - also found that tomatoes were the reason that my nose has been running - consistently for years! I had been blaming bad air, but just goes to - show that you can never stop learning! + Eventually I was corrupted and did end up adding more junk food vegan + foods. I tried the fake cheeses, meats, ate food with oils, had processed + snacks, etc. During this time though I stuck to the main principles of + the PDF, and kept the carb ratio high as well as stayed hydrated and + rested. I could tell that the processed food was lowering my energy levels + but I remained disease free and was still able to accomplish a lot. I + still ate simple meals like fruits and rice when alone but was more + willing to go out with coworkers and family to restaurants. +

    + Learning My Sensitivities +

    + There are other things I was able to discover about my body as well when + reintroducing cooked foods, such as alliums causing headaches, body pain, + nightmares, and with garlic specifically it becomes full-on night terrors. + These are an absolute no when I'm able to control it. +

    +

    + Nightshades have also been slowly phased out. I avoid all potato unless + deep fried so that the poison is destroyed, although I do try to avoid + deep fried food when possible. In 2022 as an experiment with my wife + while she tried a low histamine experiment I also found that tomatoes + were the reason that my nose has been running consistently for years! + I had been blaming bad air, but just goes to show that you can never + stop learning! So now even things like tomatoes and non-spicy peppers + have been cut out. These are less of an issue, but raw and undercooked + potatoes cause an obvious head and body tingle/ache. I've also found + that eggplant digests terribly for me. +

    +

    + Stress is also a sensitivity for me. I tend to put myself in my work, + so creating a work/life balance is important to prevent me from getting + overwhelmed from a needy environment. When deadlines are not realistic + or there is just too much work to go around I have learned to accept + that it is other's responsibilities to manage these things wisely. If + the people saying these things need done are the same people who do not + offer overtime compensation or other benefits for overworking then the + blame and stress of not accomplishing these things cannot be mine. I + cannot accept the responsibility of other people's mismanagement. +

    + Current Lifestyle +

    + Today I lean towards a more RawTilX style diet again. Breakfast consists + of fruit, such as a pound or two of apples, or half a pound of dried + mango rehydrated for a few hours in water. Lunch is a grain such as + rice or quinoa. Dinner is usually a high-vegetable dish and tends to + include beans. Sometimes breakfast may be a water or dry fast, the fruit + meal is done as lunch, and lunch and dinner are combined into one meal. +

    +

    + Exercise comes and goes. Cycling is no longer a hobby of mine. A normal + week will have multiple 20-30 minute dog walks as well as a few strenuous + hikes. Yard and garden work also contribute to keeping the body active + and strong. It also aids in getting sunand fresh air! +

    + Thank You! +

    + I appreciate you making it through this! Hopefully you've not only learned + a thing or two about me, but you've also obtained knowledge that you can + help improve your life. That's my goal after all, helping others! + Take care, friend. :)

    diff --git a/pages/subpages/about/health.php b/pages/subpages/about/health.php index 17ea97f..8f7e3f6 100755 --- a/pages/subpages/about/health.php +++ b/pages/subpages/about/health.php @@ -19,7 +19,9 @@ my protocol without getting too into the weeds can be found here:

    - Health Is A Priority (PDF Download) [TBD] + + Health Is A Priority (PDF Download) [TBD] +

    Other free sources of imformation I recommend would be