2023-11-12 20:09:21 > deploy

This commit is contained in:
Pavel 2023-11-12 20:09:21 +00:00
parent 7664830875
commit 9194efc1e5
28 changed files with 241 additions and 3622 deletions

View File

@ -1,37 +0,0 @@
kind: pipeline
type: docker
name: default
steps:
- name: generate
image: golang:1.19-alpine
commands:
- apk add --no-cache curl make bash
- make all
- name: release
image: alpine:latest
environment:
SSH_KEY:
from_secret: ssh_key
commands:
- apk add --no-cache git openssh
- mkdir -p $HOME/.ssh
- echo "$SSH_KEY" > $HOME/.ssh/id_rsa
- ssh-keyscan -H git.neur0tx.site > $HOME/.ssh/known_hosts 2> /dev/null
- chmod -R 600 $HOME/.ssh
- cd .pub
- git clone --filter=tree:0 git@git.neur0tx.site:Neur0toxine/neur0tx.site.git
- cd neur0tx.site
- git checkout gitea-pages || git checkout -b gitea-pages
- cd ..
- mv neur0tx.site/.git .
- rm -rf neur0tx.site
- git add .
- git commit -a -m "`date +'%Y-%m-%d %R:%S'` > deploy"
- git push -u origin gitea-pages
- cd ..
- rm -rf .pub
trigger:
branch:
- master

4
.gitignore vendored
View File

@ -1,4 +0,0 @@
*~
*.bak
**/.DS_Store
/.pub

View File

@ -1,7 +0,0 @@
{
"cSpell.words": [
"insideme",
"Shiprock",
"wikilinks"
]
}

View File

@ -1,17 +0,0 @@
---
title: neur0tx.site
description: neur0tx.site contents
extensions:
- anchor
- d2
- definitionlist
- embed
- fences
- linkify
- footnote
- strikethrough
- table
- tasklist
- typography
- wikilink

View File

@ -1,7 +0,0 @@
#!/bin/sh
GITEA_BASE_URL="https://gitea.neur0tx.site/Neur0toxine/neur0tx.site/_edit/master"
url="${GITEA_BASE_URL}/${ZS_FILE}"
printf "<a href=\"%s\" rel=\"nofollow\" target=\"_blank\">✍️ Edit this page on Gitea.</a>" "$url"

View File

@ -1,14 +0,0 @@
#!/bin/sh
set -e
if [ ! $# = 1 ]; then
printf "Usage: %s <file>\n" "$(basename "$0")"
exit 0
fi
if [ -f "$1" ]; then
cat "$1"
else
echo "error: file not found $1"
fi

View File

@ -1,34 +0,0 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
{{ styles }}
<link rel="apple-touch-icon" sizes="180x180" href="/apple-touch-icon.png">
<link rel="icon" type="image/png" sizes="32x32" href="/favicon-32x32.png">
<link rel="icon" type="image/png" sizes="16x16" href="/favicon-16x16.png">
<title>{{ title }}</title>
<meta name="title" content="{{ title }}" />
<meta name="description" content="{{ description }}" />
<meta name="keywords" content="{{ keywords }}" />
</head>
<body>
<nav>
<a id="brand" href="/">home 🏠</a>
<a href="https://proxy.neur0tx.site">proxy 💻</a>
</nav>
<article>{{ content }}</article>
{{ editthispage }}
<footer>
Copyright &copy; Neur0toxine ·
Last modified <time datetime="{{ date +%Y-%m-%dT%H:%M:%SZ%:z }}">{{ date }}</time> ·
</footer>
{{ scripts }}
<script>
hljs.highlightAll();
</script>
</body>
</html>

View File

@ -1,29 +0,0 @@
#!/bin/sh
set -e
if [ ! $# = 1 ]; then
printf >&2 "Usage: %s <path> [ext]\n" "$(basename "$0")"
exit 0
fi
p="$1"
t="${2:-md}"
if [ ! -d "$p" ]; then
printf >&2 "error: path %s not found\n" "$p"
exit 1
fi
find "$p" -type f -name "*.$t" | while read -r file; do
name="${file#"$p"}"
name="${name#"/"}"
name="${name%.*}"
title="$(zs vars "$file" title)"
if [ -z "$title" ]; then
title="$name"
fi
echo "- [$title](${p}/${name}.html)"
done

View File

@ -1,17 +0,0 @@
#!/bin/sh
set -e
minify_assets() {
p="$1"
t="$2"
find "$p" -type f -name "*.$t" | while read -r file; do
name="${file#"$p"}"
name="${name#"/"}"
minify -o "${p}/${name}" "$file"
done
}
minify_assets "$ZS_OUTDIR" "css"
minify_assets "$ZS_OUTDIR" "js"

View File

@ -1,3 +0,0 @@
#!/bin/sh
exit 0

View File

@ -1,14 +0,0 @@
#!/bin/sh
set -e
JS="highlight umbrella"
# Load live.js for non-production builds for faster development
if [ -z "$ZS_PRODUCTION" ]; then
JS="$JS live"
fi
for js in $JS; do
printf "<script type=\"application/javascript\" src=\"/assets/js/%s.js\"></script>\n" "$js"
done

View File

@ -1,9 +0,0 @@
#!/bin/sh
set -e
CSS="bahunya board highlight site"
for css in $CSS; do
printf "<link rel=\"stylesheet\" href=\"/assets/css/%s.css\">\n" "$css"
done

View File

@ -1,4 +0,0 @@
*~
*.bak
Makefile
README.md

View File

@ -1,20 +0,0 @@
.PHONY: deps dev build clean
GOCMD=go
TAG := latest
all: deps build
deps:
@$(GOCMD) install go.mills.io/zs@latest
@$(GOCMD) install github.com/tdewolff/minify/v2/cmd/minify@latest
dev : DEBUG=1
dev : build
@zs serve
build:
@zs build
clean:
@git clean -f -d -X

View File

@ -1,3 +0,0 @@
# neur0tx.site
Site contents.

File diff suppressed because one or more lines are too long

View File

@ -1,35 +1 @@
.board { .board{display:grid;column-gap:50px;justify-items:center}.board h1{grid-column:1/6;justify-self:left;padding-left:5%}.board h2{grid-row:2}.board h2:hover .anchor:before{display:none}.board ul{grid-row:3;padding-left:0}.board li{display:block;border:1px solid;padding:15px;margin-bottom:30px;text-align:center;border-radius:25px}
display: grid;
column-gap: 50px;
justify-items: center;
}
/* Display long board titles without extending first grid column. Will display at least 6 columns */
.board h1 {
grid-column: 1/6;
justify-self: left;
padding-left: 5%;
}
.board h2 {
grid-row: 2;
}
/* Disable anchor hover effect */
.board h2:hover .anchor:before {
display: none;
}
.board ul {
grid-row: 3;
padding-left: 0;
}
.board li {
display: block;
border: 1px solid;
padding: 15px;
margin-bottom: 30px;
text-align: center;
border-radius: 25px;
}

View File

@ -1,9 +1,6 @@
pre code.hljs{display:block;overflow-x:auto;padding:1em}code.hljs{padding:3px 5px}/*! pre code.hljs{display:block;overflow-x:auto;padding:1em}code.hljs{padding:3px 5px}/*!Theme: GitHub Dark Dimmed
Theme: GitHub Dark Dimmed Description: Dark dimmed theme as seen on github.com
Description: Dark dimmed theme as seen on github.com Author: github.com
Author: github.com Maintainer: @Hirse
Maintainer: @Hirse Updated: 2021-05-15
Updated: 2021-05-15 Colors taken from GitHub's CSS*/.hljs{color:#adbac7;background:#22272e}.hljs-doctag,.hljs-keyword,.hljs-meta .hljs-keyword,.hljs-template-tag,.hljs-template-variable,.hljs-type,.hljs-variable.language_{color:#f47067}.hljs-title,.hljs-title.class_,.hljs-title.class_.inherited__,.hljs-title.function_{color:#dcbdfb}.hljs-attr,.hljs-attribute,.hljs-literal,.hljs-meta,.hljs-number,.hljs-operator,.hljs-selector-attr,.hljs-selector-class,.hljs-selector-id,.hljs-variable{color:#6cb6ff}.hljs-meta .hljs-string,.hljs-regexp,.hljs-string{color:#96d0ff}.hljs-built_in,.hljs-symbol{color:#f69d50}.hljs-code,.hljs-comment,.hljs-formula{color:#768390}.hljs-name,.hljs-quote,.hljs-selector-pseudo,.hljs-selector-tag{color:#8ddb8c}.hljs-subst{color:#adbac7}.hljs-section{color:#316dca;font-weight:700}.hljs-bullet{color:#eac55f}.hljs-emphasis{color:#adbac7;font-style:italic}.hljs-strong{color:#adbac7;font-weight:700}.hljs-addition{color:#b4f1b4;background-color:#1b4721}.hljs-deletion{color:#ffd8d3;background-color:#78191b}
Colors taken from GitHub's CSS
*/.hljs{color:#adbac7;background:#22272e}.hljs-doctag,.hljs-keyword,.hljs-meta .hljs-keyword,.hljs-template-tag,.hljs-template-variable,.hljs-type,.hljs-variable.language_{color:#f47067}.hljs-title,.hljs-title.class_,.hljs-title.class_.inherited__,.hljs-title.function_{color:#dcbdfb}.hljs-attr,.hljs-attribute,.hljs-literal,.hljs-meta,.hljs-number,.hljs-operator,.hljs-selector-attr,.hljs-selector-class,.hljs-selector-id,.hljs-variable{color:#6cb6ff}.hljs-meta .hljs-string,.hljs-regexp,.hljs-string{color:#96d0ff}.hljs-built_in,.hljs-symbol{color:#f69d50}.hljs-code,.hljs-comment,.hljs-formula{color:#768390}.hljs-name,.hljs-quote,.hljs-selector-pseudo,.hljs-selector-tag{color:#8ddb8c}.hljs-subst{color:#adbac7}.hljs-section{color:#316dca;font-weight:700}.hljs-bullet{color:#eac55f}.hljs-emphasis{color:#adbac7;font-style:italic}.hljs-strong{color:#adbac7;font-weight:700}.hljs-addition{color:#b4f1b4;background-color:#1b4721}.hljs-deletion{color:#ffd8d3;background-color:#78191b}

View File

@ -1,26 +1 @@
/* Anchors */ h1:hover .anchor:before,h2:hover .anchor:before,h3:hover .anchor:before,h4:hover .anchor:before,h5:hover .anchor:before,h6:hover .anchor:before{width:16px;height:16px;content:' ';display:inline-block;background-color:currentColor;-webkit-mask-image:url("data:image/svg+xml,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' version='1.1' aria-hidden='true'><path fill-rule='evenodd' d='M7.775 3.275a.75.75 0 001.06 1.06l1.25-1.25a2 2 0 112.83 2.83l-2.5 2.5a2 2 0 01-2.83 0 .75.75 0 00-1.06 1.06 3.5 3.5 0 004.95 0l2.5-2.5a3.5 3.5 0 00-4.95-4.95l-1.25 1.25zm-4.69 9.64a2 2 0 010-2.83l2.5-2.5a2 2 0 012.83 0 .75.75 0 001.06-1.06 3.5 3.5 0 00-4.95 0l-2.5 2.5a3.5 3.5 0 004.95 4.95l1.25-1.25a.75.75 0 00-1.06-1.06l-1.25 1.25a2 2 0 01-2.83 0z'></path></svg>");mask-image:url("data:image/svg+xml,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' version='1.1' aria-hidden='true'><path fill-rule='evenodd' d='M7.775 3.275a.75.75 0 001.06 1.06l1.25-1.25a2 2 0 112.83 2.83l-2.5 2.5a2 2 0 01-2.83 0 .75.75 0 00-1.06 1.06 3.5 3.5 0 004.95 0l2.5-2.5a3.5 3.5 0 00-4.95-4.95l-1.25 1.25zm-4.69 9.64a2 2 0 010-2.83l2.5-2.5a2 2 0 012.83 0 .75.75 0 001.06-1.06 3.5 3.5 0 00-4.95 0l-2.5 2.5a3.5 3.5 0 004.95 4.95l1.25-1.25a.75.75 0 00-1.06-1.06l-1.25 1.25a2 2 0 01-2.83 0z'></path></svg>")}body{max-width:60rem}body nav:first-of-type{padding:0 calc((100vw - 60rem)/2)}
h1:hover .anchor:before,
h2:hover .anchor:before,
h3:hover .anchor:before,
h4:hover .anchor:before,
h5:hover .anchor:before,
h6:hover .anchor:before {
width: 16px;
height: 16px;
content: ' ';
display: inline-block;
background-color: currentColor;
-webkit-mask-image: url("data:image/svg+xml,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' version='1.1' aria-hidden='true'><path fill-rule='evenodd' d='M7.775 3.275a.75.75 0 001.06 1.06l1.25-1.25a2 2 0 112.83 2.83l-2.5 2.5a2 2 0 01-2.83 0 .75.75 0 00-1.06 1.06 3.5 3.5 0 004.95 0l2.5-2.5a3.5 3.5 0 00-4.95-4.95l-1.25 1.25zm-4.69 9.64a2 2 0 010-2.83l2.5-2.5a2 2 0 012.83 0 .75.75 0 001.06-1.06 3.5 3.5 0 00-4.95 0l-2.5 2.5a3.5 3.5 0 004.95 4.95l1.25-1.25a.75.75 0 00-1.06-1.06l-1.25 1.25a2 2 0 01-2.83 0z'></path></svg>");
mask-image: url("data:image/svg+xml,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' version='1.1' aria-hidden='true'><path fill-rule='evenodd' d='M7.775 3.275a.75.75 0 001.06 1.06l1.25-1.25a2 2 0 112.83 2.83l-2.5 2.5a2 2 0 01-2.83 0 .75.75 0 00-1.06 1.06 3.5 3.5 0 004.95 0l2.5-2.5a3.5 3.5 0 00-4.95-4.95l-1.25 1.25zm-4.69 9.64a2 2 0 010-2.83l2.5-2.5a2 2 0 012.83 0 .75.75 0 001.06-1.06 3.5 3.5 0 00-4.95 0l-2.5 2.5a3.5 3.5 0 004.95 4.95l1.25-1.25a.75.75 0 00-1.06-1.06l-1.25 1.25a2 2 0 01-2.83 0z'></path></svg>");
}
/* Wider site */
body {
max-width: 60rem;
}
body nav:first-of-type {
padding: 0 calc((100vw - 60rem)/2);
}

File diff suppressed because one or more lines are too long

View File

@ -1,233 +1 @@
/* (function(){var r={Etag:1,"Last-Modified":1,"Content-Length":1,"Content-Type":1},n={},i={},s={},o={},c=1e3,a=!1,t={html:1,css:1,js:1},e={heartbeat:function(){document.body&&(a||e.loadresources(),e.checkForChanges()),setTimeout(e.heartbeat,c)},loadresources:function(){function h(e){var t=document.location,n=new RegExp("^\\.|^/(?!/)|^[\\w]((?!://).)*$|"+t.protocol+"//"+t.host);return e.match(n)}for(var i,f,g,b,p=document.getElementsByTagName("script"),m=document.getElementsByTagName("link"),r=[],o=0;o<p.length;o++)if(f=p[o],i=f.getAttribute("src"),i&&h(i)&&r.push(i),i&&i.match(/\blive.js#/)){for(g in t)t[g]=i.match("[#,|]"+g)!=null;i.match("notify")&&alert("Live.js is loaded.")}t.js||(r=[]),t.html&&r.push(document.location.href);for(o=0;o<m.length&&t.css;o++){var u=m[o],v=u.getAttribute("rel"),l=u.getAttribute("href",2);l&&v&&v.match(new RegExp("stylesheet","i"))&&h(l)&&(r.push(l),s[l]=u)}for(o=0;o<r.length;o++)b=r[o],e.getHead(b,function(e,t){n[e]=t});var j=document.getElementsByTagName("head")[0],c=document.createElement("style"),d="transition: all .3s ease-out;";css=[".livejs-loading * { ",d," -webkit-",d,"-moz-",d,"-o-",d,"}"].join(""),c.setAttribute("type","text/css"),j.appendChild(c),c.styleSheet?c.styleSheet.cssText=css:c.appendChild(document.createTextNode(css)),a=!0},checkForChanges:function(){for(var t in n){if(i[t])continue;e.getHead(t,function(t,s){var o,i=n[t],a=!1;n[t]=s;for(o in i){var c=i[o],r=s[o],l=s["Content-Type"];switch(o.toLowerCase()){case"etag":if(!r)break;default:a=c!=r;break}if(a){e.refreshResource(t,l);break}}})}},refreshResource:function(t,n){switch(n.toLowerCase()){case"text/css":var a=s[t],r=document.body.parentNode,c=a.parentNode,l=a.nextSibling,i=document.createElement("link");r.className=r.className.replace(/\s*livejs-loading/gi,"")+" livejs-loading",i.setAttribute("type","text/css"),i.setAttribute("rel","stylesheet"),i.setAttribute("href",t+"?now="+new Date*1),l?c.insertBefore(i,l):c.appendChild(i),s[t]=i,o[t]=a,e.removeoldLinkElements();break;case"text/html":if(t!=document.location.href)return;case"text/javascript":case"application/javascript":case"application/x-javascript":document.location.reload()}},removeoldLinkElements:function(){t=0;for(n in o){try{var t,n,i=s[n],a=o[n],r=document.body.parentNode,c=i.sheet||i.styleSheet,l=c.rules||c.cssRules;l.length>=0&&(a.parentNode.removeChild(a),delete o[n],setTimeout(function(){r.className=r.className.replace(/\s*livejs-loading/gi,"")},100))}catch{t++}t&&setTimeout(e.removeoldLinkElements,50)}},getHead:function(e,t){i[e]=!0;var n=window.XMLHttpRequest?new XMLHttpRequest:new ActiveXObject("Microsoft.XmlHttp");n.open("HEAD",e,!0),n.onreadystatechange=function(){if(delete i[e],n.readyState==4&&n.status!=304){n.getAllResponseHeaders();var s,o,a={};for(o in r)s=n.getResponseHeader(o),o.toLowerCase()=="etag"&&s&&(s=s.replace(/^W\//,"")),o.toLowerCase()=="content-type"&&s&&(s=s.replace(/^(.*?);.*?$/i,"$1")),a[o]=s;t(e,a)}},n.send()}};document.location.protocol!="file:"?(window.liveJsLoaded||e.heartbeat(),window.liveJsLoaded=!0):window.console&&console.log("Live.js doesn't support the file protocol. It needs http.")})()
Live.js - One script closer to Designing in the Browser
Written for Handcraft.com by Martin Kool (@mrtnkl).
Version 4.
Recent change: Made stylesheet and mimetype checks case insensitive.
http://livejs.com
http://livejs.com/license (MIT)
@livejs
Include live.js#css to monitor css changes only.
Include live.js#js to monitor js changes only.
Include live.js#html to monitor html changes only.
Mix and match to monitor a preferred combination such as live.js#html,css
By default, just include live.js to monitor all css, js and html changes.
Live.js can also be loaded as a bookmarklet. It is best to only use it for CSS then,
as a page reload due to a change in html or css would not re-include the bookmarklet.
To monitor CSS and be notified that it has loaded, include it as: live.js#css,notify
*/
(function () {
var headers = { "Etag": 1, "Last-Modified": 1, "Content-Length": 1, "Content-Type": 1 },
resources = {},
pendingRequests = {},
currentLinkElements = {},
oldLinkElements = {},
interval = 1000,
loaded = false,
active = { "html": 1, "css": 1, "js": 1 };
var Live = {
// performs a cycle per interval
heartbeat: function () {
if (document.body) {
// make sure all resources are loaded on first activation
if (!loaded) Live.loadresources();
Live.checkForChanges();
}
setTimeout(Live.heartbeat, interval);
},
// loads all local css and js resources upon first activation
loadresources: function () {
// helper method to assert if a given url is local
function isLocal(url) {
var loc = document.location,
reg = new RegExp("^\\.|^\/(?!\/)|^[\\w]((?!://).)*$|" + loc.protocol + "//" + loc.host);
return url.match(reg);
}
// gather all resources
var scripts = document.getElementsByTagName("script"),
links = document.getElementsByTagName("link"),
uris = [];
// track local js urls
for (var i = 0; i < scripts.length; i++) {
var script = scripts[i], src = script.getAttribute("src");
if (src && isLocal(src))
uris.push(src);
if (src && src.match(/\blive.js#/)) {
for (var type in active)
active[type] = src.match("[#,|]" + type) != null
if (src.match("notify"))
alert("Live.js is loaded.");
}
}
if (!active.js) uris = [];
if (active.html) uris.push(document.location.href);
// track local css urls
for (var i = 0; i < links.length && active.css; i++) {
var link = links[i], rel = link.getAttribute("rel"), href = link.getAttribute("href", 2);
if (href && rel && rel.match(new RegExp("stylesheet", "i")) && isLocal(href)) {
uris.push(href);
currentLinkElements[href] = link;
}
}
// initialize the resources info
for (var i = 0; i < uris.length; i++) {
var url = uris[i];
Live.getHead(url, function (url, info) {
resources[url] = info;
});
}
// add rule for morphing between old and new css files
var head = document.getElementsByTagName("head")[0],
style = document.createElement("style"),
rule = "transition: all .3s ease-out;"
css = [".livejs-loading * { ", rule, " -webkit-", rule, "-moz-", rule, "-o-", rule, "}"].join('');
style.setAttribute("type", "text/css");
head.appendChild(style);
style.styleSheet ? style.styleSheet.cssText = css : style.appendChild(document.createTextNode(css));
// yep
loaded = true;
},
// check all tracking resources for changes
checkForChanges: function () {
for (var url in resources) {
if (pendingRequests[url])
continue;
Live.getHead(url, function (url, newInfo) {
var oldInfo = resources[url],
hasChanged = false;
resources[url] = newInfo;
for (var header in oldInfo) {
// do verification based on the header type
var oldValue = oldInfo[header],
newValue = newInfo[header],
contentType = newInfo["Content-Type"];
switch (header.toLowerCase()) {
case "etag":
if (!newValue) break;
// fall through to default
default:
hasChanged = oldValue != newValue;
break;
}
// if changed, act
if (hasChanged) {
Live.refreshResource(url, contentType);
break;
}
}
});
}
},
// act upon a changed url of certain content type
refreshResource: function (url, type) {
switch (type.toLowerCase()) {
// css files can be reloaded dynamically by replacing the link element
case "text/css":
var link = currentLinkElements[url],
html = document.body.parentNode,
head = link.parentNode,
next = link.nextSibling,
newLink = document.createElement("link");
html.className = html.className.replace(/\s*livejs\-loading/gi, '') + ' livejs-loading';
newLink.setAttribute("type", "text/css");
newLink.setAttribute("rel", "stylesheet");
newLink.setAttribute("href", url + "?now=" + new Date() * 1);
next ? head.insertBefore(newLink, next) : head.appendChild(newLink);
currentLinkElements[url] = newLink;
oldLinkElements[url] = link;
// schedule removal of the old link
Live.removeoldLinkElements();
break;
// check if an html resource is our current url, then reload
case "text/html":
if (url != document.location.href)
return;
// local javascript changes cause a reload as well
case "text/javascript":
case "application/javascript":
case "application/x-javascript":
document.location.reload();
}
},
// removes the old stylesheet rules only once the new one has finished loading
removeoldLinkElements: function () {
var pending = 0;
for (var url in oldLinkElements) {
// if this sheet has any cssRules, delete the old link
try {
var link = currentLinkElements[url],
oldLink = oldLinkElements[url],
html = document.body.parentNode,
sheet = link.sheet || link.styleSheet,
rules = sheet.rules || sheet.cssRules;
if (rules.length >= 0) {
oldLink.parentNode.removeChild(oldLink);
delete oldLinkElements[url];
setTimeout(function () {
html.className = html.className.replace(/\s*livejs\-loading/gi, '');
}, 100);
}
} catch (e) {
pending++;
}
if (pending) setTimeout(Live.removeoldLinkElements, 50);
}
},
// performs a HEAD request and passes the header info to the given callback
getHead: function (url, callback) {
pendingRequests[url] = true;
var xhr = window.XMLHttpRequest ? new XMLHttpRequest() : new ActiveXObject("Microsoft.XmlHttp");
xhr.open("HEAD", url, true);
xhr.onreadystatechange = function () {
delete pendingRequests[url];
if (xhr.readyState == 4 && xhr.status != 304) {
xhr.getAllResponseHeaders();
var info = {};
for (var h in headers) {
var value = xhr.getResponseHeader(h);
// adjust the simple Etag variant to match on its significant part
if (h.toLowerCase() == "etag" && value) value = value.replace(/^W\//, '');
if (h.toLowerCase() == "content-type" && value) value = value.replace(/^(.*?);.*?$/i, "$1");
info[h] = value;
}
callback(url, info);
}
}
xhr.send();
}
};
// start listening
if (document.location.protocol != "file:") {
if (!window.liveJsLoaded)
Live.heartbeat();
window.liveJsLoaded = true;
}
else if (window.console)
console.log("Live.js doesn't support the file protocol. It needs http.");
})();

File diff suppressed because one or more lines are too long

49
index.html Normal file
View File

@ -0,0 +1,49 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<link rel="stylesheet" href="/assets/css/bahunya.css">
<link rel="stylesheet" href="/assets/css/board.css">
<link rel="stylesheet" href="/assets/css/highlight.css">
<link rel="stylesheet" href="/assets/css/site.css">
<link rel="apple-touch-icon" sizes="180x180" href="/apple-touch-icon.png">
<link rel="icon" type="image/png" sizes="32x32" href="/favicon-32x32.png">
<link rel="icon" type="image/png" sizes="16x16" href="/favicon-16x16.png">
<title>neur0tx.site</title>
<meta name="title" content="neur0tx.site" />
<meta name="description" content="neur0tx.site contents" />
<meta name="keywords" content="" />
</head>
<body>
<nav>
<a id="brand" href="/">home 🏠</a>
<a href="https://proxy.neur0tx.site">proxy 💻</a>
</nav>
<article><h1 id="links">Links <a class="anchor" href="#links"> </a></h1>
<ul>
<li><a href="https://gitea.neur0tx.site">gitea</a></li>
<li><a href="https://drone.neur0tx.site">drone CI</a></li>
<li><a href="https://proxy.neur0tx.site">proxy</a></li>
</ul>
</article>
<a href="https://gitea.neur0tx.site/Neur0toxine/neur0tx.site/_edit/master/index.md" rel="nofollow" target="_blank">✍️ Edit this page on Gitea.</a>
<footer>
Copyright &copy; Neur0toxine ·
Last modified <time datetime="2023-11-12T20:09:16Z
">Sun Nov 12 20:09:16 UTC 2023
</time> ·
</footer>
<script type="application/javascript" src="/assets/js/highlight.js"></script>
<script type="application/javascript" src="/assets/js/umbrella.js"></script>
<script type="application/javascript" src="/assets/js/live.js"></script>
<script>
hljs.highlightAll();
</script>
</body>
</html>

View File

@ -1,5 +0,0 @@
# Links
- [gitea](https://gitea.neur0tx.site)
- [drone CI](https://drone.neur0tx.site)
- [proxy](https://proxy.neur0tx.site)

88
proxy.html Normal file
View File

@ -0,0 +1,88 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<link rel="stylesheet" href="/assets/css/bahunya.css">
<link rel="stylesheet" href="/assets/css/board.css">
<link rel="stylesheet" href="/assets/css/highlight.css">
<link rel="stylesheet" href="/assets/css/site.css">
<link rel="apple-touch-icon" sizes="180x180" href="/apple-touch-icon.png">
<link rel="icon" type="image/png" sizes="32x32" href="/favicon-32x32.png">
<link rel="icon" type="image/png" sizes="16x16" href="/favicon-16x16.png">
<title>neur0tx.site</title>
<meta name="title" content="neur0tx.site" />
<meta name="description" content="neur0tx.site contents" />
<meta name="keywords" content="" />
</head>
<body>
<nav>
<a id="brand" href="/">home 🏠</a>
<a href="https://proxy.neur0tx.site">proxy 💻</a>
</nav>
<article><p>EN | <a href="proxy_ru.html">RU</a></p>
<hr />
<h1 id="how-to-use-the-service">How to use the service <a class="anchor" href="#how-to-use-the-service"> </a></h1>
<h2 id="easiest-method">Easiest method <a class="anchor" href="#easiest-method"> </a></h2>
<p>Add this to your <code>~/.bashrc</code> or <code>~/.zshrc</code>:</p>
<pre><code class="language-sh">http () {
ssh -p 2222 -oHostKeyAlgorithms=+ssh-rsa -R 80:localhost:&quot;$1&quot; ssh.neur0tx.site
}
httpa () {
ssh -p 2222 -oHostKeyAlgorithms=+ssh-rsa -R &quot;$1&quot;:80:localhost:&quot;$2&quot; ssh.neur0tx.site
}
</code></pre>
<p>and then run <code>source ~/.bashrc</code> or <code>source ~/.zshrc</code>.</p>
<p>Now you can forward your services like this:</p>
<ul>
<li><code>http 80</code> to forward a service on port <code>:80</code> with random subdomain. Service will be available at <code>&lt;something&gt;.proxy.neur0tx.site</code>.</li>
<li><code>httpa domain 80</code> to forward a service on port <code>:80</code> with subdomain <code>domain</code>. Service will be available at <code>domain.proxy.neur0tx.site</code> (if this domain is not taken yet).</li>
</ul>
<h2 id="all-methods">All methods <a class="anchor" href="#all-methods"> </a></h2>
<ul>
<li>Forward service on port <code>:80</code> with random subdomain:</li>
</ul>
<pre><code class="language-sh">$ ssh -p 2222 -R 80:localhost:80 ssh.neur0tx.site
</code></pre>
<ul>
<li>Forward service on port <code>:8080</code> with custom subdomain:</li>
</ul>
<pre><code class="language-sh">$ ssh -p 2222 -R subdomain:80:localhost:80 ssh.neur0tx.site
</code></pre>
<ul>
<li>For Fedora you can add <code>-oHostKeyAlgorithms=+ssh-rsa</code> before <code>ssh -p 2222</code> to prevent any problems with the key compatibility.</li>
<li>Function for <code>bash</code> / <code>zsh</code> to use as an alias (usage: <code>http 80</code>):</li>
</ul>
<pre><code class="language-sh">http () {
ssh -p 2222 -oHostKeyAlgorithms=+ssh-rsa -R 80:localhost:&quot;$1&quot; ssh.neur0tx.site
}
</code></pre>
<ul>
<li>Same function but with custom subdomain (usage: <code>httpa subdomain 80</code>):</li>
</ul>
<pre><code class="language-sh">httpa () {
ssh -p 2222 -oHostKeyAlgorithms=+ssh-rsa -R &quot;$1&quot;:80:localhost:&quot;$2&quot; ssh.neur0tx.site
}
</code></pre>
</article>
<a href="https://gitea.neur0tx.site/Neur0toxine/neur0tx.site/_edit/master/proxy.md" rel="nofollow" target="_blank">✍️ Edit this page on Gitea.</a>
<footer>
Copyright &copy; Neur0toxine ·
Last modified <time datetime="2023-11-12T20:09:16Z
">Sun Nov 12 20:09:16 UTC 2023
</time> ·
</footer>
<script type="application/javascript" src="/assets/js/highlight.js"></script>
<script type="application/javascript" src="/assets/js/umbrella.js"></script>
<script type="application/javascript" src="/assets/js/live.js"></script>
<script>
hljs.highlightAll();
</script>
</body>
</html>

View File

@ -1,49 +0,0 @@
EN | [RU](proxy_ru.html)
___
# How to use the service
## Easiest method
Add this to your `~/.bashrc` or `~/.zshrc`:
```sh
http () {
ssh -p 2222 -oHostKeyAlgorithms=+ssh-rsa -R 80:localhost:"$1" ssh.neur0tx.site
}
httpa () {
ssh -p 2222 -oHostKeyAlgorithms=+ssh-rsa -R "$1":80:localhost:"$2" ssh.neur0tx.site
}
```
and then run `source ~/.bashrc` or `source ~/.zshrc`.
Now you can forward your services like this:
* `http 80` to forward a service on port `:80` with random subdomain. Service will be available at `<something>.proxy.neur0tx.site`.
* `httpa domain 80` to forward a service on port `:80` with subdomain `domain`. Service will be available at `domain.proxy.neur0tx.site` (if this domain is not taken yet).
## All methods
* Forward service on port `:80` with random subdomain:
```sh
$ ssh -p 2222 -R 80:localhost:80 ssh.neur0tx.site
```
* Forward service on port `:8080` with custom subdomain:
```sh
$ ssh -p 2222 -R subdomain:80:localhost:80 ssh.neur0tx.site
```
* For Fedora you can add `-oHostKeyAlgorithms=+ssh-rsa` before `ssh -p 2222` to prevent any problems with the key compatibility.
* Function for `bash` / `zsh` to use as an alias (usage: `http 80`):
```sh
http () {
ssh -p 2222 -oHostKeyAlgorithms=+ssh-rsa -R 80:localhost:"$1" ssh.neur0tx.site
}
```
* Same function but with custom subdomain (usage: `httpa subdomain 80`):
```sh
httpa () {
ssh -p 2222 -oHostKeyAlgorithms=+ssh-rsa -R "$1":80:localhost:"$2" ssh.neur0tx.site
}
```

88
proxy_ru.html Normal file
View File

@ -0,0 +1,88 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<link rel="stylesheet" href="/assets/css/bahunya.css">
<link rel="stylesheet" href="/assets/css/board.css">
<link rel="stylesheet" href="/assets/css/highlight.css">
<link rel="stylesheet" href="/assets/css/site.css">
<link rel="apple-touch-icon" sizes="180x180" href="/apple-touch-icon.png">
<link rel="icon" type="image/png" sizes="32x32" href="/favicon-32x32.png">
<link rel="icon" type="image/png" sizes="16x16" href="/favicon-16x16.png">
<title>neur0tx.site</title>
<meta name="title" content="neur0tx.site" />
<meta name="description" content="neur0tx.site contents" />
<meta name="keywords" content="" />
</head>
<body>
<nav>
<a id="brand" href="/">home 🏠</a>
<a href="https://proxy.neur0tx.site">proxy 💻</a>
</nav>
<article><p><a href="proxy.html">EN</a> | RU</p>
<hr />
<h1 id="---">Инструкция по использованию сервиса <a class="anchor" href="#---"> </a></h1>
<h2 id="--">Самый простой метод <a class="anchor" href="#--"> </a></h2>
<p>Добавьте код ниже в <code>~/.bashrc</code> или <code>~/.zshrc</code>:</p>
<pre><code class="language-sh">http () {
ssh -p 2222 -oHostKeyAlgorithms=+ssh-rsa -R 80:localhost:&quot;$1&quot; ssh.neur0tx.site
}
httpa () {
ssh -p 2222 -oHostKeyAlgorithms=+ssh-rsa -R &quot;$1&quot;:80:localhost:&quot;$2&quot; ssh.neur0tx.site
}
</code></pre>
<p>и выполните <code>source ~/.bashrc</code> или <code>source ~/.zshrc</code>.</p>
<p>Теперь вы можете проксировать сервисы вот так:</p>
<ul>
<li><code>http 80</code> чтобы проксировать сервис на порту <code>:80</code> со случайным поддоменом. Сервис будет доступен на <code>&lt;something&gt;.proxy.neur0tx.site</code>.</li>
<li><code>httpa domain 80</code> чтобы проксировать сервис на порту <code>:80</code> с поддоменом <code>domain</code>. Сервис будет доступен на <code>domain.proxy.neur0tx.site</code> (если поддомен еще свободен).</li>
</ul>
<h2 id="-">Все методы <a class="anchor" href="#-"> </a></h2>
<ul>
<li>Проксировать сервис на порту <code>:80</code> на случайный поддомен:</li>
</ul>
<pre><code class="language-sh">$ ssh -p 2222 -R 80:localhost:80 ssh.neur0tx.site
</code></pre>
<ul>
<li>Проксировать сервис на порту <code>:8080</code> на заранее определенный поддомен:</li>
</ul>
<pre><code class="language-sh">$ ssh -p 2222 -R subdomain:80:localhost:80 ssh.neur0tx.site
</code></pre>
<ul>
<li>Для Fedora можно использовать аргумент <code>-oHostKeyAlgorithms=+ssh-rsa</code> перед <code>ssh -p 2222</code> чтобы предотвратить проблемы совместимости с ключом.</li>
<li>Функции для <code>bash</code> / <code>zsh</code> чтобы использовать как alias (пример: <code>http 80</code>):</li>
</ul>
<pre><code class="language-sh">http () {
ssh -p 2222 -oHostKeyAlgorithms=+ssh-rsa -R 80:localhost:&quot;$1&quot; ssh.neur0tx.site
}
</code></pre>
<ul>
<li>Та же функция с кастомным поддоменом (пример: <code>httpa subdomain 80</code>):</li>
</ul>
<pre><code class="language-sh">httpa () {
ssh -p 2222 -oHostKeyAlgorithms=+ssh-rsa -R &quot;$1&quot;:80:localhost:&quot;$2&quot; ssh.neur0tx.site
}
</code></pre>
</article>
<a href="https://gitea.neur0tx.site/Neur0toxine/neur0tx.site/_edit/master/proxy_ru.md" rel="nofollow" target="_blank">✍️ Edit this page on Gitea.</a>
<footer>
Copyright &copy; Neur0toxine ·
Last modified <time datetime="2023-11-12T20:09:16Z
">Sun Nov 12 20:09:16 UTC 2023
</time> ·
</footer>
<script type="application/javascript" src="/assets/js/highlight.js"></script>
<script type="application/javascript" src="/assets/js/umbrella.js"></script>
<script type="application/javascript" src="/assets/js/live.js"></script>
<script>
hljs.highlightAll();
</script>
</body>
</html>

View File

@ -1,49 +0,0 @@
[EN](proxy.html) | RU
___
# Инструкция по использованию сервиса
## Самый простой метод
Добавьте код ниже в `~/.bashrc` или `~/.zshrc`:
```sh
http () {
ssh -p 2222 -oHostKeyAlgorithms=+ssh-rsa -R 80:localhost:"$1" ssh.neur0tx.site
}
httpa () {
ssh -p 2222 -oHostKeyAlgorithms=+ssh-rsa -R "$1":80:localhost:"$2" ssh.neur0tx.site
}
```
и выполните `source ~/.bashrc` или `source ~/.zshrc`.
Теперь вы можете проксировать сервисы вот так:
* `http 80` чтобы проксировать сервис на порту `:80` со случайным поддоменом. Сервис будет доступен на `<something>.proxy.neur0tx.site`.
* `httpa domain 80` чтобы проксировать сервис на порту `:80` с поддоменом `domain`. Сервис будет доступен на `domain.proxy.neur0tx.site` (если поддомен еще свободен).
## Все методы
* Проксировать сервис на порту `:80` на случайный поддомен:
```sh
$ ssh -p 2222 -R 80:localhost:80 ssh.neur0tx.site
```
* Проксировать сервис на порту `:8080` на заранее определенный поддомен:
```sh
$ ssh -p 2222 -R subdomain:80:localhost:80 ssh.neur0tx.site
```
* Для Fedora можно использовать аргумент `-oHostKeyAlgorithms=+ssh-rsa` перед `ssh -p 2222` чтобы предотвратить проблемы совместимости с ключом.
* Функции для `bash` / `zsh` чтобы использовать как alias (пример: `http 80`):
```sh
http () {
ssh -p 2222 -oHostKeyAlgorithms=+ssh-rsa -R 80:localhost:"$1" ssh.neur0tx.site
}
```
* Та же функция с кастомным поддоменом (пример: `httpa subdomain 80`):
```sh
httpa () {
ssh -p 2222 -oHostKeyAlgorithms=+ssh-rsa -R "$1":80:localhost:"$2" ssh.neur0tx.site
}
```