Docs & Organization

This commit is contained in:
2022-06-28 16:44:57 +00:00
parent 27bfbdd433
commit 8ae54b2a2b
4 changed files with 126 additions and 0 deletions

61
tools/help.gmi Normal file
View File

@@ -0,0 +1,61 @@
# Hackers Town TTY Help
Press 'q' to quit, run 'hthelp' to get back here
### Contents
* How To-s
* Useful Tools
* Credits
* Useful Links
## How To...
### Use Amfora (The default help viewer)
'amfora [URL]'
The URL is optional and should be in the format: 'gemini://gemini.example.com'
### Write Gemini Pages
=> gemini://gemini.circumlunar.space/docs/gemtext.gmi Gemtext Reference
## Useful Tools
### Gemini Browsers
These Links are https, and should load in w3m (ToDo)
=> https://github.com/makeworld-the-better-one/amfora Amfora
=> https://sr.ht/~julienxx/Asuka/ Asuka
=> https://bombadillo.colorfield.space/ Bombadillo
=> https://github.com/kr1sp1n/awesome-gemini Other Clients and Software
### Weather
=> https://github.com/schachmat/wego Wego: Simple weather app written in Go
* Needs ~/.wegorc updated with your geographic position !
=> https://github.com/chubin/wttr.in wttr: Web service with curl
* 'curl wttr.in/CITY'
### Editors
=> gemini://gemini.hackers.town/docs/help.gmi Vi 8.2
=> https://github.com/vim/vim ViM 8.2
=> https://neovim.io/ Neovim 0.4
=> https://www.nano-editor.org/ Nano 5.4
### Viewers
=> https://github.com/charmbracelet/glow Glow: Markdown Renderer
=> https://github.com/atanunq/viu Viu: Terminal Image Viewer
=> https://www.nongnu.org/fbi-improved/#docs FIM: Terminal Image Viewer
* Run with '-o aa' to use in a terminal
## Credits
=> https://hackers.towm/@maddiefuzz System Managed by @maddiefuzz
=> https://hackers.towm/@liz Automation and Documentation by @liz
=> https://hackers.towm/@thegibson Domain and Mastodon Instance by @thegibson
## Useful Links
=> gemini://gemini.hackers.town/ Gemini Home
=> gemini://gemini.hackers.town/docs/help.gmi This help doc
=> gemini://geminispace.info Gemini Search Engine
=> gemini://rawtext.club/~sloum/cgi/weather Weather
=> gemini://drewdevault.com/cgi-bin/man.sh POSIX Manual Lookup
=> gemini://rawtext.club/~sloum/cgi/othello/ Othello / Reversi
=> gemini://gemini.hackers.town/docs/links.gmi Other Gemini Servers

13
tools/hthelp Executable file
View File

@@ -0,0 +1,13 @@
#!/bin/bash
DOCE=/usr/bin/amfora
DOC=/var/gemini/docs/help.gmi
if [ ! -f "$DOC" ]; then
echo "Helpdoc missing!"
exit 1
fi
if [ -f "$DOCE" ]; then
$DOCE "gemini.hackers.town/docs/help.gmi"
else
$EDITOR $DOC
fi

52
tools/links.gmi Normal file
View File

@@ -0,0 +1,52 @@
# This page is a WIP so it's sort of a roulette what you get with these links
=> gemini://gemini.conman.org Original Gemini Server
=> gemini://zaibatsu.circumlunar.space Unlabeled Link
=> gemini://carcosa.net Unlabeled Link
=> gemini://heavysquare.com Unlabeled Link
=> gemini://mozz.us
=> gemini://dgold.eu Unlabeled Link
=> gemini://typed-hole.org Unlabeled Link
=> gemini://consensus.circumlunar.space Unlabeled Link
=> gemini://tilde.black Unlabeled Link
=> gemini://tilde.pink Unlabeled Link
=> gemini://vger.cloud Unlabeled Link
=> gemini://yam655.com Unlabeled Link
=> gemini://royniang.com Unlabeled Link
=> gemini://konpeito.media Unlabeled Link
=> gemini://gemini.68kmentat.com Unlabeled Link
=> gemini://gus.guru Unlabeled Link
=> gemini://pon.ix.tc Unlabeled Link
=> gemini://breadpunk.club Unlabeled Link
=> gemini://gem.bestalbumsintheuniverse.com Unlabeled Link
=> gemini://vi.rs Unlabeled Link
=> gemini://80h.dev Unlabeled Link
=> gemini://bleyble.com Unlabeled Link
=> gemini://gemini.digiprime.xyz Unlabeled Link
=> gemini://freedombone.net5 Unlabeled Link
=> gemini://earthlight.xyz Unlabeled Link
=> gemini://envs.net Unlabeled Link
=> gemini://gemini.logfile.ch Unlabeled Link
=> gemini://rawtext.club Unlabeled Link
=> gemini://gagarin.p4g.club Unlabeled Link
=> gemini://gemini.mayvaneday.art (IPv6 only!)
=> gemini://libraryoferis.org Unlabeled Link
=> gemini://kwiecien.us Unlabeled Link
=> gemini://gemini.uxq.ch Unlabeled Link
=> gemini://ecmelberk.com Unlabeled Link
=> gemini://berserk.red Unlabeled Link
=> gemini://park-city.club Unlabeled Link
=> gemini://jan.bio
=> gemini://magnacarta.press Unlabeled Link
=> gemini://x-z.se
=> gemini://commie.space Unlabeled Link
=> gemini://cybertronica.org Unlabeled Link
=> gemini://gemini.ucant.org Unlabeled Link
=> gemini://sathariel.tk Unlabeled Link
=> gemini://tokeniser.uk Unlabeled Link
=> gemini://random-projects.net Unlabeled Link
=> gemini://republic.circumlunar.space Unlabeled Link
=> gemini://cozylabs.eu Unlabeled Link
=> gemini://cosmic.voyage Unlabeled Link
=> gemini://makeworld.gq Unlabeled Link
=> gemini://otrn.org Unlabeled Link

55
tools/mkuser Executable file
View File

@@ -0,0 +1,55 @@
#!/bin/bash
# echo $@ >> /etc/ttyserver/mkuser.log
# exit 0
#whoami >> /etc/ttyserver/mkuser.log
#exit 0
# $1 = username
# $2 = tempfile
LOGFILE="/etc/ttyserver/mkuser.log"
if [ "$EUID" -ne 0 ];then
#echo "Please run as root"
echo "Not run as root" >> $LOGFILE
exit 60
fi
#echo $1 >> $LOGFILE
# If not exists, create new user with
if [[ "$1" =~ ^[a-zA-Z0-9][a-zA-Z0-9-]+$ ]]; then
echo "Valid username: \"$1\"" >> $LOGFILE
# Is valid username
CHECKUSER=`getent passwd "$1"`
if [[ ${#CHECKUSER} -gt 6 ]]; then
# User Exists
echo "\"$1\" Exists" >> $LOGFILE
else
useradd -G webadd -m -b /htusers -s /usr/bin/bash --gid 1004 "$1"
ln -s "/htusers/$1/public_gemini /var/gemini/$1"
echo "Added \"$1\" to the system" >> $LOGFILE
fi
# Ensure SSH filder exists
USERDIR="$(eval echo "~$1")"
if [ ! -d "$USERDIR/.ssh" ]; then
echo "Generate ssh directory for \"$1\"" >> $LOGFILE
mkdir -p "$USERDIR/.ssh"
chown -R "$1" "USERDIR/.ssh"
else
echo "User .ssh exists" >> $LOGFILE
fi
# Append new key
echo "$2 -> $USERDIR/.ssh/authorized_keys" >> $LOGFILE
cat "$2" >> "$USERDIR/.ssh/authorized_keys"
chmod 700 "$USERDIR/.ssh/authorized_keys"
chown "$1" "$USERDIR/.ssh/authorized_keys"
# Remove temp file
rm -f "$2"
echo "Done appending key to \"$1\"" >> $LOGFILE
exit 0
else
echo "\"$1\" Was an invalid username" >> $LOGFILE
exit 64
fi