Compare commits

..

No commits in common. "master" and "master" have entirely different histories.

17 changed files with 37 additions and 318 deletions

View File

@ -2,4 +2,4 @@
RewriteRule ^$ main [QSA]
RewriteRule ^index\.php$ wiki.php?page=main [QSA]
RewriteCond %{REQUEST_URI} !(/includes/|/media)
RewriteRule ^([A-Za-z0-9\.\/]+)/?$ wiki.php?page=$1 [QSA]
RewriteRule ^([A-Za-z0-9\/]+)/?$ wiki.php?page=$1 [QSA]

View File

@ -1,26 +0,0 @@
# thunix wiki
Requires a webserver and PHP. The web server needs to be configured to:
- serve wiki.php by default (not index.php)
- when a requested URL does not correspond to an actual file, pass the requested page to wiki.php?page=
On apache, this is achieved by provided [.htaccess](.htaccess). On nginx, you can do something like:
```
server {
listen 80;
root /var/www/wiki_webroot;
index wiki.php;
server_name _;
location ~ \.php$ {
include snippets/fastcgi-php.conf;
fastcgi_pass unix:/var/run/php/php7.3-fpm.sock;
}
location ~ ^/(.+)$ {
try_files $uri $uri/ /wiki.php?page=$1;
}
}
```

View File

@ -1,7 +1,7 @@
# Table of Contents
- Chapter 1 - Thunix and You.
1. What is Thunix?
1. What the fuck is Thunix?
- History of Thunix
2. Staff Bios
3. Thunix Rules and Policies
@ -10,7 +10,7 @@
6. [Contributions Directory](/wiki/Thunix/contribdir)
7. [System-Generated Pages](/wiki/system/main)
- Chapter 2 - SSH Tips and Tricks
- Chapter 2 - SSH Shit.
1. To Be Linked. (WIP)
- Chapter 3 - Contributing

View File

@ -1,88 +0,0 @@
# Thunix API
This is the working spec for the Thunix API. Until finalization, the spec will be consider v1. v1 of the API shall be considered unstable, and a work in progress.
The API will be authenticated, at all times, using the user's credentials sent in the host headers.
The API shall return a 200 for successful requests, with the JSON paylod.
The API shall return a 400 for any endpoint not existent.
The API shall return a 401 for unauthenticated requests.
The API shall return a 403 for requests which are authenticated, but not permissible for the authenticated user.
The API shall return a 418 for requests to the "/teapot" endpoint.
The API shall return a 420 for requests exceeding the rate limits.
The API shall return a 501 for requests which exist in the spec, but have not been implemented yet.
## API Format
The API is a RESTful API, and the following URIs will be used:
```
https://{hostname}/api/1/{action}
```
## Informational APIs
### ip_info
This endpoint shall return a JSON payload containing interfaces, with the name, address, and netmask:
```
{
"Interfaces":[
{
"Interface":"lo",
"Address":"127.0.0.1",
"Netmask":"255.0.0.0"
},
{
"Interface":"eth0",
"Address":"213.239.234.117",
"Netmask":"255.255.255.255"
},
{
"Interface":"client1",
"Address":"10.0.1.1",
"Netmask":"255.255.255.0"
},
{
"Interface":"wg-p2p",
"Address":"10.0.0.5",
"Netmask":"255.255.255.0"
}
]
}
```
### uptime
This will return a JSON payload of system uptime:
```
{
"days":164,
"hours":16,
"mins":22,
"secs":3
}
```
### teapot
This shall return a JSON payload, describing the current tea making capabilities of the system:
```
{
"tea" : "available",
"height" : "short",
"width" : "stout
}
```

View File

@ -33,7 +33,7 @@ With every push to this wiki, is one less thing that the SysAdmins have to expla
At this point, I am rambling... You get the point? Contributing is an effective means to help where one cannot by other means.
### Cool story bro, now how is that relevant to outside of Thunix?
### Cool story bro, now how the fuck is that relevant to outside of Thunix?
      The point was this; No matter how big or small a contribution might be, it has the potential to really affect the entire ecosystem.

View File

@ -8,8 +8,7 @@ Your email can be accessed in one of three ways:
1. Running the Mutt or Alpine email clients through your SSH account
2. Logging into your email account from our [Rainloop web mail](https://www.thunix.net/webmail/) service
3. Through an email client program installed on your computer, using IMAP or POP
4. Some other tool, such as [getmail](/wiki/unsorted/lugubris/getmail)
3. Through an email client program installed on your computer, using IMAP
Unlike the email services provided by Microsoft, Yahoo, Google and other providers, who intrusively spy on its users beyond reasonable law enforcement and advertising tactics, thunix email services will always respect user privacy, as you can see through our [GDPR Statement and Privacy Policy](https://www.thunix.net/gdpr).
@ -31,4 +30,4 @@ Thunix uses the Rainloop web interface to give users email access through their
You can also access thunix email using your favourite client software, including but not limited to Mozilla Thunderbird, Microsoft Office Outlook, Claws Mail or any email client that supports IMAP. The below picture illustrates the settings needed to configure your email client to fetch mail from thunix. Though it shows Thunderbird's configuration menu, this applies to all email client programs.
![Email settings in a Thunderbird dialog](https://www.thunix.net/media/mail.png)
![Email settings in a Thunderbird dialog](https://www.thunix.net/images/mail.png)

View File

@ -1,72 +0,0 @@
**This document is unfinished, and in draft state**
# Git Crash Course
Git can take some getting used to, but once you've mastered a few of the operations, it really begins to make sense.
## Common Workflow
A common workflow goes like this:
1. Clone Repo
2. Create a *feature branch*
3. Switch to your feature branch
4. Make changes
5. Ask for a merge/merge into master
6. Push to your origin
### Clone Repo
To clone a repo, you use the git clone command, ie
```
git clone https://tildegit.org/thunix/ansible
```
This makes a local copy of the code repo. Whatever changes you make here, nobody else sees what you did, until you *commit* and then *push*.
### Create Feature Branch
You usually don't want to work right on the *master* branch, until you're ready to push the code live. So, to make a new feature branch, try this:
```
git branch -v
```
This will show you what branches you currently have. You probably only have one right now: *master*. Let's make a new one:
```
git checkout -b UpdatingKey
```
Now do look at your branches again:
```
git branch -v
```
You'll see you know have *master* and *UpdatingKey*. You'll see there's an asterisk next to *UpdatingKey*. This means that is the branch you're currently working on.
### Make Changes
Let's make some changes in your new feature branch.
```
touch mykey.asc
git status
```
You'll see there is a file *mykey.asc* which says it's not currently tracked. Let's add the file:
```
git add mykey.asc
git status
```
You should see there's a new file to commit. Let's do that:
```
git commit -am 'Adding my key'
```

View File

@ -6,17 +6,13 @@ When you [sign up](https://www.thunix.net/signup) for an account on thunix, you'
On our signup page, you'll seen an entry for a "Public SSH Key." SSH key pairs work on the basis of having two files; one is a public key that you can send to us when we create your account, while the other is a private key that you keep on your computer, away from public knowledge. If you're wondering where to find these things, you have to generate them yourself.
Generating SSH key pairs requires software that also allows you to connect to a shell server using SSH (such as OpenSSH, ConnectBot, Termius, OpenSSH-Win32/64 or PuTTY).
With [OpenSSH](http://www.openssh.com/) Client software installed on Windows and UNIX-like operating systems, including all Linux variants, BSD variants and macOS, the terminal command:
Generating SSH key pairs requires software that also allows you to connect to a shell server using SSH (such as OpenSSH or PuTTY). On Windows and UNIX-like operating systems with OpenSSH Client software installed, including all Linux variants, BSD variants and macOS, the terminal command:
`ssh-keygen`
Will generate both the public and private SSH key files for you. You would be prompted for a file name to save the key files as, then a passphrase to help generate the files from. Then, out of the two files, open the public key file (the file with the file suffix \*.pub) in your favourite text editor, copy all its text and paste it in the Public SSH Key section of our signup page when submitting your registration form.
[PuTTY](https://www.putty.org/) handles key generation differently, as the PuTTYGen program is graphical. However, the interface makes key generation very self-explanatory (it simply involves moving your mouse cursor around your screen). The resulting key files can be saved and, as with the public key file saved by OpenSSH's shh-keygen program, open your new public key file in your favourite text editor, copy all its text and paste it in the Public SSH Key section of our signup page when submitting your registration form.
[ConnectBot](https://f-droid.org/en/packages/org.connectbot/) is the SSH client available for Android smartphone. You can generate an type rsa 2048 bits and copy this public key, in the "Manage Public Keys" menu.
PuTTY handles key generation differently, as the PuTTYGen program is graphical. However, the interface makes key generation very self-explanatory (it simply involves moving your mouse cursor around your screen). The resulting key files can be saved and, as with the public key file saved by OpenSSH's shh-keygen program, open your new public key file in your favourite text editor, copy all its text and paste it in the Public SSH Key section of our signup page when submitting your registration form.
## Logging into Thunix through SSH

View File

@ -1,22 +0,0 @@
backup(1) Thunix backup backup(1)
NAME backup - creating data backup script
SYNOPSIS backup
DESCRIPTION Thunix uses a daily cron job that runs /usr/local/bin/backup
script to store tar gzip compressed files located on local disk in BACKUP
Cycle: full weekly and incrementals daily.
Incremental backup restore process:
First extract files from the full backup.
Then extract files in the correct order from each incremental backup.
BUGS No known bugs.
SEE ALSO tar(1), gzip(1), crontab(1), find(1), mysqldump(1)
AUTHOR Thunix Corporation (http://thunix.net)
11.0 24 September 2021 backup(1)

View File

@ -3,8 +3,7 @@
These documents are autogenerated from our man pages, and various readmes used here on thunix.
* [ansible](/wiki/system/ansible)
* [backup](/wiki/system/backup)
* [chat](/wiki/system/chat)
* [iris](/wiki/system/iris)
* [thunix](/wiki/system/thunix)
* [tildegit.org](/wiki/system/tildegit.org)
* [iris](/wiki/system/iris)

View File

@ -1,18 +1 @@
# What is Git?
### Definitions:
       [Git Definition, explained by git itself.](https://git-scm.com/book/en/v2/Getting-Started-What-is-Git%3F)
       [In a broader sense:](https://aws.amazon.com/devops/source-control/)
### Definition in summary
      Basically, the point of Git/SCM's is to keep track of changes to any file, project, or workspace in an enviroment offsite where you can view, manage, revert, and effectively maintain said items.
Example. Say you wanted to make a simple website from scratch. Git would allow you to take every change, or a group of changes, and make these into updates; called commits. These commits store data of everything inside the repository(a fancy word for workspace/project) from the start, allowing you to watch how a project grows. This record allows you to keep backups of your project, in case you lose it locally. It even allows you to undo changes in the event a new change causes issues.
Honestly, you could go on and **on** and ***on*** about how git can enhance the way you work on projects. Where it REALLY shines though is when you group together with other individuals and work together! Git allows MANY people to work on the same project. If a change is made, these users can store their earlier progress, and pull the new changes made!(more on this later.) This entire system builds an ecosystem; where work is done efficiently and effectively.
For example. THIS ENTIRE WIKI is a Git Repository! Every contributor works together to build this project! We all come together to build you a central place to find guides and things. How nice and handy, right? I mean having a *full guide* of things like contribing and git; all in one place, with nice and pretty text?!? Fucking awesome.
### A more in-depth look at Git and History of.
      
# WIP

View File

@ -1,43 +0,0 @@
## getmail
---
getmail is a mail retriever designed to allow you to get your mail from one or more mail accounts on various mail servers to your local machine for reading with a minimum of fuss. getmail is designed to be secure, flexible, reliable, and easy-to-use.
### Configuration
- Create a file under .getmail in your home directory (Default: .getmail/getmailrc)
#### Retrieving email
Here is an example configuration file used with a thunix account:
```
[retriever]
type = SimplePOP3SSLRetriever
server = thunix.net
username = user
port = 995
password_command = ("/path/to/password-retriever", "-p", "myaccount@thunix.net")
[destination]
type = Maildir
path = ~/Maildir/inbox/
``
If the default filename (getmailrc) is not used then one can retrieve email by executing `$ getmail --rcfile thunix`, replace thunix with the filename used.
#### Password management
Passwords can be directly stored in the config file instead of using an external password retriever. To store password in config file use "password" parameter:
```
password = correct horse battery staple
```
This is not recommended, you should instead use an external retriever if possible. If "password" parameter is used then users should set right permission for ".getmail" directory, use `$ mkdir -m 0700 ~/.getmail` to create the directory.
### Related
- [getmail documentation](http://pyropus.ca/software/getmail/)
- [getmail - Arch Wiki](https://wiki.archlinux.org/index.php/Getmail)

View File

@ -1,4 +1,11 @@
<?php
//Name of your site
$site_name="Thunix Wiki";
//Root for the site, in a browser
$site_root="https://wiki.thunix.net";
//Local base root for app files
$doc_root="/var/www/wiki.thunix.net/";
?>

View File

@ -1,3 +0,0 @@
# 404
This page ("$page") does not exist.

View File

@ -5,4 +5,4 @@
* [Sandbox](/sandbox)
* [Thunix.net](https://thunix.net)
* [Contact Thunix Staff](https://thunix.net/contact)
* [Contact Thunix Staff](https://thunix.net/contact.php)

View File

@ -88,8 +88,3 @@ body {
text-align: center;
padding-top: 30pt;
}
pre > code {
overflow-x: auto;
display: block;
}

View File

@ -7,40 +7,34 @@ Parsedown is licensed under the MIT license.
include('config.php');
include('parsedown-1.7.3/Parsedown.php');
$page = isset($_GET['page']) ? $_GET['page'] : 'main';
// Sanitize page request so we don't allow to read EVERY markdown file
// for example ../../../home/foobar/mysecretdocument
if (strpos($page, "../") !== false) {
header('HTTP/1.0 403 Forbidden');
exit();
}
$content_file = "articles/$page.md";
// When you need some debugging
//echo "<br>page: $page";
//echo "<br>content file: $content_file";
$page = $_GET['page'];
$style = $_GET['style'];
$Parsedown = new Parsedown();
$Parsedown->setSafeMode(true);
if(isset($_GET['style']))
$site_style = $_GET['style'];
else
$site_style="site";
if ( $page == "") {
$page = "main";
}
$header = file_get_contents("includes/header.md");
$sidebar = file_get_contents("includes/sidebar.md");
$content = file_exists($content_file) ? file_get_contents($content_file) : str_replace('$page', "$page", file_get_contents("includes/404.md"));
$footer = file_get_contents("includes/footer.md");
// TODO: Stylesheet URL assumes wiki is not operate in subfolder
if ( $style == "") {
if ( $site_style == "") {
$site_style="site";
}
}
else {
$site_style=$style;
}
$header = file_get_contents("$doc_root/includes/header.md");
$sidebar = file_get_contents("$doc_root/includes/sidebar.md");
$content = file_get_contents("$doc_root/articles/$page.md");
$footer = file_get_contents("$doc_root/includes/footer.md");
print "<!DOCTYPE html>
<html lang='en'>
<head>
<title>$site_name - $page</title>
<link rel='stylesheet' type='text/css' href='/includes/$site_style.css'>
<link rel='stylesheet' type='text/css' href='$site_root/includes/$site_style.css'>
</head>
<body>
<!-- Begin Header -->