Compare commits

..

3 Commits

Author SHA1 Message Date
xdovahkinx 2f3fd1fa15 Fuck this file.
This file has destroyed perfectly good PRs and is evil. I condemn it's soul to the deepest level of hell. 

I will be adding a whole topic to the wiki (soonTM) regarding how to contribute to the wiki. This file is just in the way for now...
2019-06-30 03:01:37 -04:00
dovahkin b7f7e84512 v001a-1: [Setting Up Directory Structure]
If this thing is going to work we need to follow a directory structure so anyone contributing can actually follow what goes for what, etc.

Proposed Structure;

./ << Main files, such as the welcome page, Table Of Contents, About, etc.
./wiki/ << Parent Directory for actual wiki content.
./wiki/<topic>/ << We split things into topics. So things (Primarily) pertaining to say, SSH, go in the SSH directory which will be here.
./wiki/<topic>/<sub_topic>/ << We will definitely finding ourselves with subtopics inside of topics, like "What is IRC?" and "Using Thunix's IRC (Tildechat)"

Anything unsorted or non-pertaining to any topic can be put in ./wiki/unsorted/

If you have any further questions on why I am going to be trying to use this structure, feel free to msg me on IRC directly, or optionally put it on IRIS.
2019-06-30 00:41:30 -04:00
dovahkin aef294d1cb v(N/A): [Bringing Maintainer's Fork U2D]
Needs Current PRs Added...

Up-to-date as of "5d468882d6" (6/30/19 @ 12:30a EST)
2019-06-30 00:30:20 -04:00
55 changed files with 463 additions and 3550 deletions

View File

@ -1,5 +0,0 @@
RewriteEngine On
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]

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,14 +1,8 @@
# Welcome to the Offical Thunix Wiki!
## Main Page
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Hello, and welcome to the Official Thunix wiki!
This is a multi-contributor project created to give useful guides & documentation on common and uncommon topics alike. Most of the things in here will pertain directly to **Thunix**, which is the platform you are (or if not, _should be_) using.
If you have any questions about the project, feel free to Direct Message ``dovahkin`` on IRC, or any of the other contributors/staff @ ``#thunix``.
From all the contributors and staff at **Thunix**, we hope you enjoy the project and find it helpful and informative!
* [SSH and keys](ssh)
* [Email](email)
* [Sandbox Page](sandbox)
Further notes;
* [Contributing to this wiki](contributing)
- This project is maintained at the leisure of its contributors. You might find out-of-date info or content. Each contributor is only responsible for their commits, and the topics they contribute.
- These guides, while upheld to a professional-like standard, may contain offensive language. If you are easily offended, take caution.
- There is usually more than one way to do the same job. You will most likely find pages with alternative methods that have been added by other contributors.
- Some guides may contain "Hacky" or non-recommended methods of completing certain tasks. These methods can sometimes carry some risks. You, as an individual are SOLELY RESPONSIBLE for any and all actions you take as a result of reading ANY of the content in this wiki. We will always try to provide the safest methods or guides, but we cannot fix stupid. Be careful and vigilant.
- Again, this is maintained by contributors, NOT Thunix Staff. Any content created herein are at the responsibility of the respective contributor(s). Thunix Staff are not liable/responsible for anything you do as a result of this wiki. Do NOT harass them with issues regarding the wiki or etc.

View File

@ -1,6 +0,0 @@
## Sandbox
Just a sandbox.
This document is free for you to play around with your markdown, and not worry about breaking important pages.
thunix.jpg

View File

@ -1,35 +1,6 @@
# Table of Contents
- Chapter 1 - Thunix and You.
1. What is Thunix?
- History of Thunix
2. Staff Bios
3. Thunix Rules and Policies
4. How can I help?
5. Where is Thunix?
6. [Contributions Directory](/wiki/Thunix/contribdir)
7. [System-Generated Pages](/wiki/system/main)
- Chapter 2 - SSH Tips and Tricks
1. To Be Linked. (WIP)
- Chapter 3 - Contributing
1. [What is "Contributing"?](/wiki/contrib/top1)
- Git Crash Course
- History and Usage
2. How to Contrib. (Using Git)
- General "Rule of Thumb"s
- Workflow
- Etiquette
- Methods of
3. Contrib'ing to Thunix
- Guidelines & Proceedures
- Methods Available
- Tildegit & Ansible
- Formatting
- Chapter 4 - The Wiki
1. TBA/Planned. See Contributions Directory.
- [Unsorted Pages](/wiki/unsorted/main)
- [Sandbox](/sandbox)
- Chapter 1 - Basic Shit
1. Bullshit
- More Bullshit...
-Chapter 2 - Test

View File

@ -1,26 +0,0 @@
# Contributions/Contributors Directory.
### This is a directory of who is contributing to what, and ETC. Reference the Table of Contents for full names/directories.
- Please contact these people for the respective Topic/Subtopic. DO NOT Contact Thunix Staff, unless they are a listed contrib.
- Have your name listed by contributing! See Chapter 3, Topic 3 for more info!
- If you cannot contact the relevant person for a given topic (say, after a week.)m Or otherwise N/A; contact ``dovahkin`` on IRC
###### Dovahkin (xdovahkinx) - Wiki Maintainer.
- Ch 3
- Ch 4
- Ch 1, Top 4&6.
###### Ubergeek (Ub3rg33k) - Thunix Staff.
- Ch 1
###### TechEmporium
- Ch 2
### Legend
- Chapter = "Ch." (Or Parent Topic, Ex: SSH)
- Top = "Topic"
- Sub = "Subtopic"
Example:
- Ch 1, Top 2, Sub 3 = Chapter 1, Topic 2, Subtopic 3

View File

@ -1,19 +0,0 @@
# Admin tools
There's a set of tools to ease system administration. These tools can be found in the poorly named repo [makeuser](https://tildegit.org/thunix/makeuser).
- makeuser: adds a user to our system
```makeuser {username} {email address} {ssh key}```
- rmuser: Removes user account, terminates processes, archives home directory
```rmuser {username}```
- makedb: Creates a db for a user, and emails the credentials and connection info to their thunix email address.
```makedb {username}```
- dbremove : Removes a db created by a user, after generating an mysqldump of it
```dbremove {username}```

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

@ -1,16 +0,0 @@
## Contributing to the wiki
Just do a PR on [tildegit](https://tildegit.org/thunix/wiki)
We divide things into Topics and Subtopics, each with their own Folders. So for example: ./wiki/ssh/general/howto.md
^ ^ ^
Topic Subtopic File
Note that Subtopic isnt required, but makes for nice sorting of different topics in a topic, so generic SSH guides are not confused with different SSH topics on how SSH works within thunix itself or etc…
There is also an “Unsorted” directory (located ./wiki/unsorted/), which has three purposes; These are:
* A “Hodge-Podge” for anything that doesnt have/need a specific directory
* A temporary storage area for files not classified into a category. NOTE; Maintainer/Contribs would sort these and be responsible for ensuring that any files that refer to files that have been resorted properly)

View File

@ -1,40 +0,0 @@
# What is "Contributing"?
### Definitions:
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;[My Favorite](https://www.urbandictionary.com/define.php?term=contributing)
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;[The Actual Definition](https://www.dictionary.com/browse/contributing)
### The Answer to the Title.
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Contributing is the act of helping further the given environment/community by means of labor or assistance, over other methods; such as Moderating or Donating.
The most classic way of doing so is through means like Bughunting, Bug Reporting, Patches, or other meaningful contributions, such as this nice wiki you are reading.
The basic goal is to ease off some of the pressure on the given leadership of the community; in the case of Thunix, the SysAdmins/Staff. As such, contributing is really any task that accomplishes that goal.
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Contributing is a great way to give back to a community you love and support where you cannot be part of the staff team or compensate some other way, usually financially.
It is understandable that everyone cannot pitch in through these other means, as everyone is on their own walks of life, so these little things add up and help make a community like Thunix what it is.
***
Take my personal case for example:
I (dovahkin) have been part of Thunix for a good while, about 2(ish) years. I was part of the original Thunix, and honestly was shocked when I heard about the service!
I mean, who wouldn't be?!?! A completely free SSH Shell that offers no caps on pretty much anything, Where the SysAdmins are a message away, with only rudimentary rules? Not to mention an active community, often which is friendly enough to help you when you are doing something stupid or unfamiliar?
HELLS YES. I'll take two! (Anyhow, I digress...)
I honestly should've contributed more; and I feel that could be said for a majority of the service at the time.
(Mad props to ``hexhaxtron`` for putting up with us on his own time, btw.)
Anyhow; that's a mistake I made sure not to repeat. When I heard about the re-launch of Thunix, I immediately sent 5$ as a donation.
It isn't much when you consider the cost of the bottom line of what it takes to operate Thunix as we know it, but it was what I could spare; and I know it was appreciated :).
Seeing how my financial situation doesn't exactly allow me to be sending donations every month, I put my brain to work on how I might contribute by other means.
I proposed I head and maintain the wiki, as a sort of weekend project; just something to do in my spare time. Look at how it expanded!
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Instead of some random things every week/other week, we have three contributors! All making more pushes to the wiki than I can bear listening to the notifications for!
Something so innocuous, as this little weekend project, turned into a major part of Thunix, and set an example of how powerful small contributions are.
With every push to this wiki, is one less thing that the SysAdmins have to explain to the skid asking questions in IRC (Which is usually me, lets be real....).
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?
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;The point was this; No matter how big or small a contribution might be, it has the potential to really affect the entire ecosystem.
Now, let's talk about the giant in the room, being the way most might be familiar with contributing to; [Git/Version Control.](/wiki/contrib/top1_sub1). Prepare yourself for a crash-course and generic overview of Git. (We will probably release a dedicated topic for just git EventuallyTM)

View File

@ -1,24 +0,0 @@
# Databases
There are some database technologies available on Thunix.
* MySQL/MariaDB
* Sqlite
## Sqlite
In the spirit of minimalism, the recommended database technology to use here is sqlite. Sqlite DB's exist as a single, atomic file, and are a good use for light applications, with low to medium concurrent loads.
As an example, [tildegit](https://tildegit.org) is backed by a sqlite database. It also allows for greater flexibility, and segregation for your application's data: You can create as many sqlite databases as you need.
## MySQL/MariaDB
We have MariaDB server running on Thunix, and should you desire, we can provision a database for you. In order to minimize admin overhead, the database will be named the same as your user account. It's recommended that in order to segregate your applications in the single DB, use table-prefixes.
### Requesting a MySQL/MariaDB Database
Either opening an issue on [tildegit](https://tildegit.org/thunix), shooting an email to root, or asking in IRC is the way to get a DB created for your.
### Admin notes
The makedb and dbremove commands are used to create and destroy their respective databases. See [makedb](/wiki/makedb) and [dbremove](/wiki/dbremove) for more information.

View File

@ -1,3 +0,0 @@
# dbremove
Coming soon

View File

@ -1,34 +0,0 @@
## Your Thunix Email
---
Every thunix account comes with a functional email address and mail box. This email address is the same as your SSH login name and your password is that which you received from the server's staff, in your signup confirmation email. However, if need to change your password on your thunix SSH account, use the `PASSWD` command through SSH. Though your SSH account has a password, this will NOT affect how you log into your account using SSH or an SFTP client, as your public/private key pair will always work. The account password, however, will affect only your thunix email address and ZNC IRC bouncer.
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)
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).
## Mutt and Alpine Email Clients
---
Both Mutt and Alpine email clients are installed on thunix's server. They're open and accessible to every user, simply by running either the command `mutt` or `alpine` through SSH. For further assistance with either of these programs, it's highly suggested to read their man pages on the server; do this by running either `man mutt` or `man alpine` through SSH. The server is set up in such a way that allows both Mutt and Alpine to be able to fetch and send emails, so no manual configuration is required.
## Rainloop Web Mail Service
---
Thunix uses the Rainloop web interface to give users email access through their web browsers. Logging in requires the same username and password as your SSH account. Rainloop's interface is very easy to navigate, comparable to those of Microsoft Outlook, Google Mail or other browser-based email services, with utilities for organising your inbox, reporting spam and writing new messages.
## Email Client Setup with IMAP
---
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)

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

@ -1,14 +0,0 @@
# Iris
Iris is a command-line based forum software. If you've ever used a BBS in the past, you'll fine this interface quite similar to forums of that style. Not quite as complicated as bboard.
## Usage
To use iris, once logged into your shell account, just type `iris`.
Once there, type `t` to see the topics. To read a topic, just type the topic number. To reply, `r` followed by the topic number.
To quite, just type `q`.
## See Also
* [iris](/wiki/system/iris)

View File

@ -1,14 +0,0 @@
# Current List of Pages
### Page will be depreciated once Table of Contents is in full swing, as that is the effective point of this page, and etc.
###### Links here MAY break depending on updates to the ToC. We will try to reflect those changes here.
* ~~Contributing to the wiki~~ (See Table of Contents)
* [How to use email](/wiki/email)
* [Using SSH with thunix](/wiki/ssh)
* [Iris](/wiki/iris)
* [Databases](/wiki/databases)
* [Admin Tools](/wiki/admintools)
* [VNC](/wiki/vnc)
* ~~Unsorted~~ (See Table of Contents)

View File

@ -1,3 +0,0 @@
# Makedb
Coming soon.

View File

@ -1,33 +0,0 @@
## SSH and Thunix (And magic!)
---
When you [sign up](https://www.thunix.net/signup) for an account on thunix, you'll be given remote access to a Linux shell server, with web hosting, gopher hosting and email. And because of our [GDPR and privacy policy](https://www.thunix.net/gdpr), we take security seriously. This is why we use SSH key pairs to grant access to our server through SSH or SFTP.
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:
`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.
## Logging into Thunix through SSH
---
Now that you have an account with us, it's time for you to connect to our server with an SSH client program. On all operating systems using OpenSSH Client, it's a simple matter of opening a terminal and running the command:
`ssh -i [path_to-private_key] [username]@thunix.net`
Where `[path_to-private_key]` is the directory path to your previously generated private SSH key and where `[username]` is the username you registered when signing up for our services.
Logging into your account with PuTTY is also quite simple. When you first run PuTTY, simply fill in `[username]@thunix.net` as your host name, where '[username]` is the username you registered when signing up for our services. Then, in the Category column of PuTTY's interface, expand the SSH category, select the Auth category and look for a text field called Private Key for Authentication; click on the Browse button, open the private key that you generated earlier and click on the Open button at the bottom of the program window.
If everything has been done correctly, you should see a BASH terminal prompt; you're not logged into Thunix!

View File

@ -1,42 +0,0 @@
man(8) Ansible on Thunix man(8)
NAME Ansible on Thunix - how we manage the server
SYNOPSIS ansible-pull
DESCRIPTION We use ansible to manage the servers running the systems and
services for Thunix. Ansible consists of a "playbook" of YAML files,
that declare the state of the system.
The first step is to clone the repo used to manage the environment:
git clone git@ttm.sh:thunix/ansible.git (You will need a tidegit account for this, and a key loaded into your account there)
From there, the typical github-type workflow is used:
* Create a local branch, to track your issue's changes.
* Commit changes to your local branch.
* Send a URI pointing to your repo, with branch name to someone with merge permissions
Inside of the tildegit interface:
* Create a new branch, selecting option to create a branch and pull request
* Make changes in your branch
* Update PR
* Wait for someone to merge your changes
Hourly, a job runs that pulls the latest version of the repo, and the runs ansible-playbook against the playbook. A sudoer can manually run this job, if desired,
and it's located at /etc/cron.hourly/ansible-pull.
SEE ALSO tildegit.org(8), git(8), ansible-playbook(8)
BUGS No known bugs.
AUTHOR Uber Geek (ubergeek@thunix.net)
1.1 19 February 2019 man(8)

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

@ -1,19 +0,0 @@
man(8) Thunix chat man(8)
NAME chat - chat script
SYNOPSIS chat
DESCRIPTION This is a simple script to launch weechat for new users, and
get them into the correct channel for chat and support.
BUGS \* If you have a customized list of servers in your weechat config
already, this may try to connect you twice, and you'll have two nicks
going at once, which will be confusing. Once you've customized weechat
to your liking, just invoke 'weechat' or 'weechat-curses'.
SEE ALSO weechat(8)
AUTHOR Uber Geek (ubergeek@thunix.net)
1.1 19 February 2019 man(8)

View File

@ -1,562 +0,0 @@
# Iris
## Serverless text-based forum for tilde-likes
Iris is a tiny bit of shared message and file convention that pretends to be forum software.
It is a fully usable message system, designed for use between different users on a single server.
Iris is strictly text-based, requiring no GUI or web servers.
* [Installation](#installation)
* [Usage](#usage)
* [Commands](#commands)
* [Command-line Options](#command-line-options)
* [Text Features/Markup](#text-featuresmarkup)
* [Philosophy](#philosophy)
* [Technical Bits](#technical-bits)
* [License](#license)
## Installation
At its core, Iris is simply a single, executable Ruby script. It has been tested and is known to work with Ruby 2.3.5. No extra gems or libraries are required.
Copy or symlink `iris.rb` somewhere the whole server can use it; `/usr/local/bin` is a good candidate:
```
chmod 755 ./iris.rb
mv ./iris.rb /usr/local/bin/iris
```
## Usage
Iris has a readline interface that can be used to navigate the message corpus.
### Readline Interface Example
```
%> iris
Welcome to Iris v. 1.0.7. Type "help" for a list of commands.; Ctrl-D or 'quit' to leave.
| ID | U | TIMESTAMP | AUTHOR | TITLE
| 1 | | 2018-01-24T05:49:53Z | jimmy_foo@ctrl-c.club | Welcome!
| 2 | 1 | 2018-01-24T16:13:05Z | jerry_berry@ctrl-c.club | Suggestions for imp...
jimmy_foo@ctrl-c.club>
```
## Commands
* [[t]opics](#topics)
* [Display topic](#display-topic)
* [[c]ompose](#compose)
* [[r]eply](#reply)
* [[e]dit](#edit)
* [[d]elete and un[d]elete](#delete)
* [[f]reshen](#freshen)
* [reset OR clear](#reset-or-clear)
* [[i]nfo](#info)
* [[h]elp](#help)
---
### [t]opics
`topics, t - List all topics`
This outputs a list of top-level topics that have been composed by everyone on the server.
```
jimmy_foo@ctrl-c.club> topics
| ID | U | TIMESTAMP | AUTHOR | TITLE
| 1 | | 2018-01-24T05:49:53Z | jimmy_foo@ctrl-c.club | Welcome!
| 2 | 1 | 2018-01-24T16:13:05Z | jerry_berry@ctrl-c.club | Suggestions for i...
```
1. The first column is the topic index. This is the reference number to use when displaying or replying to a topic.
1. The second column is unread count. This shows how many messages under this topic you haven't seen.
1. The third column is the timestamp. This is the server-local time when the topic was composed or last replied to.
1. The fourth column is the author. This is the user who composed the topic.
1. The fifth column is the title. This is the truncated first line of the topic.
---
### Display topic
`# (topic id) - Read specified topic`
Type in the index of the topic you wish to read. This will display the topic and all its replies.
```
jimmy_foo@ctrl-c.club> topics
| ID | U | TIMESTAMP | AUTHOR | TITLE
| 1 | | 2018-01-24T05:49:53Z | jimmy_foo@ctrl-c.club | Welcome!
| 2 | 1 | 2018-01-24T16:13:05Z | jerry_berry@ctrl-c.club | Suggestions for i...
jimmy_foo@ctrl-c.club> 1
*** [1] On 2018-01-24T05:49:53Z, jimmy_foo@ctrl-c.club posted...-----------------
Welcome!
It's good to see everyone here!
---------------------------------------------------------------------------------
| === [M2] On 2018-01-30T22:50:38Z, jerry_berry@ctrl-c.club replied...---------
| Thanks!
| -----------------------------------------------------------------------------
```
---
### [c]ompose
`compose, c - Add a new topic`
This allows you to add a new top-level topic to the board. The first line of your new topic will be used as the topic title.
The line editor is quite basic. Enter your message, line-by-line, and type a single period on a line by itself to end the message.
If you post an empty message, the system will discard it.
```
jimmy_foo@ctrl-c.club~> compose
Writing a new topic. Type a period on a line by itself to end message.
new~> How do I spoo the fleem?
new~> It's not in the docs and my boss is asking. Any help is appreciated!
new~> .
Topic saved!
jimmy_foo@ctrl-c.club~> topics
| ID | U | TIMESTAMP | AUTHOR | TITLE
| 1 | | 2018-01-24T05:49:53Z | jimmy_foo@ctrl-c.club | Welcome!
| 2 | | 2018-01-24T16:13:05Z | jerry_berry@ctrl-c.club | Suggestions for i...
| 3 | 1 | 2018-01-23T00:13:44Z | jimmy_foo@ctrl-c.club | How do I spoo the...
```
---
### [r]eply
`reply #, r # - Reply to a specific topic`
Replies are responses to a specific topic -- they only appear when displaying the topic.
The line editor is quite basic. Enter your message, line-by-line, and type a single period on a line by itself to end the message.
If you post an empty message, the system will discard it.
```
jennie_minnie@ctrl-c.club~> reply 3
Writing a reply to topic 'How do I spoo the fleem?'.
Type a period on a line by itself to end message.
reply~> Simple, you just boondoggle the flibbertigibbet. That should be in the manual.
reply~> .
Reply saved!
jennie_minnie@ctrl-c.club~> 3
*** [3] On 2018-01-23T00:13:44Z, jimmy_foo@ctrl-c.club posted...-----------------
How do I spoo the fleem?
It's not in the docs and my boss is asking. Any help is appreciated!
---------------------------------------------------------------------------------
| === [M5] On 2018-01-31T05:59:27Z, jennie_minnie@ctrl-c.club replied...-------
| Simple, you just boondoggle the flibbertigibbet. That should be in the
| manual.
| -----------------------------------------------------------------------------
```
---
### [e]dit
`edit #, e # - Edit a topic or message`
Editing a message or topic will replace the message you select with an all-new message.
To select the message you wish to edit, use either the topic index or the message number.
The message number will always start with the capital letter "M", message "M5" for example.
A topic ID will always be strictly numeric, "3" in the following example.
The message or topic ID can be found in square brackets in the informational text above each message.
The line editor is quite basic. Enter your edited message, line-by-line, and type a single period on a line by itself to end the message.
If you post an empty message, the system will discard it and the edit will be ignored.
After an edit, a status flag will appear on the message, letting others know the content of the message has been changed.
```
jennie_minnie@ctrl-c.club~> 3
*** [3] On 2018-01-23T00:13:44Z, jimmy_foo@ctrl-c.club posted...-----------------
How do I spoo the fleem?
It's not in the docs and my boss is asking. Any help is appreciated!
---------------------------------------------------------------------------------
| === [M5] On 2018-01-31T05:59:27Z, jennie_minnie@ctrl-c.club replied...-------
| Simple, you just boondoggle the flibbertigibbet. That should be in the
| manual.
| -----------------------------------------------------------------------------
jennie_minnie@ctrl-c.club~> edit M5
Editing message 'Simple, you just boondoggle the flibbertigibbet. That shoul...'
Type a period on a line by itself to end message.
edit~> Simple, you just boondoggle the flibbertigibbet. That's in the manual on page 45.
edit~> .
Message edited!
jennie_minnie@ctrl-c.club~> 3
*** [3] On 2018-01-23T00:13:44Z, jimmy_foo@ctrl-c.club posted...-----------------
How do I spoo the fleem?
It's not in the docs and my boss is asking. Any help is appreciated!
---------------------------------------------------------------------------------
| === [M5] (edited) On 2018-01-31T05:59:27Z, jennie_minnie@ctrl-c.club repli...
| Simple, you just boondoggle the flibbertigibbet. That's in the manual on
| page 45.
| -----------------------------------------------------------------------------
```
---
### [d]elete
`delete #, d #, undelete # - Delete or undelete a topic or message`
Deleting a message or topic will remove the message you select.
To select the message you wish to delete, use either the topic index or the message number.
The message number will always start with the capital letter "M", message "M5" for example.
A topic ID will always be strictly numeric, "3" in the following example.
The message or topic ID can be found in square brackets in the informational text above each message.
After a deletion, a status flag will appear on the message, letting others know the content of the message has been deliberately removed.
If you wish to revert your deletion, "delete" the deleted message or topic ID to restore it.
The `undelete` command is provided as a mnemonic convenience; it is identical in function to the `delete` command.
```
jennie_minnie@ctrl-c.club~> 3
*** [3] On 2018-01-23T00:13:44Z, jimmy_foo@ctrl-c.club posted...-----------------
How do I spoo the fleem?
It's not in the docs and my boss is asking. Any help is appreciated!
---------------------------------------------------------------------------------
| === [M5] On 2018-01-31T05:59:27Z, jennie_minnie@ctrl-c.club replied...-------
| Simple, you just boondoggle the flibbertigibbet. That should be in the
| manual.
| -----------------------------------------------------------------------------
jennie_minnie@ctrl-c.club~> delete M5
Deleted message 'Simple, you just boondoggle the flibbertigibbet. That shoul...'
jennie_minnie@ctrl-c.club~> 3
*** [3] On 2018-01-23T00:13:44Z, jimmy_foo@ctrl-c.club posted...-----------------
How do I spoo the fleem?
It's not in the docs and my boss is asking. Any help is appreciated!
---------------------------------------------------------------------------------
| === [M5] (deleted) On 2018-01-31T05:59:27Z, jennie_minnie@ctrl-c.club repl...
| -----------------------------------------------------------------------------
jennie_minnie@ctrl-c.club~> undelete M5
Undeleted message 'Simple, you just boondoggle the flibbertigibbet. That sho...'
jennie_minnie@ctrl-c.club~> 3
*** [3] On 2018-01-23T00:13:44Z, jimmy_foo@ctrl-c.club posted...-----------------
How do I spoo the fleem?
It's not in the docs and my boss is asking. Any help is appreciated!
---------------------------------------------------------------------------------
| === [M5] On 2018-01-31T05:59:27Z, jennie_minnie@ctrl-c.club replied...-------
| Simple, you just boondoggle the flibbertigibbet. That should be in the
| manual.
| -----------------------------------------------------------------------------
```
---
### [f]reshen
`freshen, f - Reload to get any new messages`
This command reloads all users' message files to get any new messages that might have come in since you started the program.
---
### reset OR clear
`reset, clear - Fix screen in case of text corruption`
This clears the screen and resets the cursor. If you experience screen corruption due to wide characters or terminal resizing, this may fix your visual issues.
---
### [i]nfo
`info, i - Display Iris version and message stats`
This outputs the current version of Iris, along with messsage, topic, and author counts.
```
jennie_minnie@ctrl-c.club~> info
Iris 1.0.7
13 topics, 0 unread.
50 messages, 0 unread.
10 authors.
```
---
### [h]elp
`help, h, ? - Display help text`
This displays helpful reminders of the commands that Iris supports.
## Command-line Options
There are a few options you can pass in from the command-line:
* [--version, -v](#--version-v)
* [--stats, -s](#--stats-s)
* [--interactive, -i](#--interactive-i)
* [--dump, -d](#--dump-d)
* [--help, -h](#--help-h)
### --version/-v
This displays the current version of Iris and exits.
```
iris --version
```
```
Iris 1.0.7
```
---
### --stats/-s
This outputs the current version of Iris, along with messsage, topic, and author counts.
This command does not enter Iris' interactive mode.
```
iris --stats
```
```
Iris 1.0.7
13 topics, 0 unread.
50 messages, 0 unread.
10 authors.
```
---
### --interactive/-i
This command enters Iris' interactive mode, the default mode with which users can compose and read topics and replies.
This is the mode that Iris enters if no options are passed on the command-line.
---
### --dump/-d
This reads the entire message corpus and outputs it as a stream of JSON data, suitable for piping into a backup file, `jq` parser, or similar.
This command does not enter Iris' interactive mode.
---
### --help/-h
This command displays a complete list of options that Iris recognizes.
## Text Features/Markup
### Color
Iris supports 7 colors and 4 text features.
#### Colors
| Marker | Color |
|:------:|:--------|
| r | Red |
| g | Green |
| y | Yellow |
| b | Blue |
| m | Magenta |
| c | Cyan |
| w | White |
#### Text Features
| Marker | Feature |
|:------:|:-----------|
| n | Normal |
| i | Intense |
| u | Underlined |
| v | Reversed |
#### Markup
Colors and Text Features are applied by a simple markup. Surround the text you want colored with an opening curly brace (`{`), add some number of text modification markers (`riu`, for example), and `}`), and close with a closing curly brace (`}`).
For example, if you have the text:
```
The blue fox and the yellow dog
```
...and you wanted to color it appropriately, you would wrap the text "blue fox" and "yellow dog" like so:
```
The {b blue fox} and the {y yellow dog}
```
The result, in your final message, would look like:
![blue_fox_and_yellow_dog.png](docs/images/blue_fox_and_yellow_dog.png)
---
Text features can be added as well:
```
The {b blue fox} {u will} jump over the {y yellow dog}
```
![blue_fox_jumping.png](docs/images/blue_fox_jumping.png)
---
A color can be combined with multiple text features:
```
The {b blue fox} {riuv will} jump over the {y yellow dog}
```
![blue_fox_really_jumping.png](docs/images/blue_fox_really_jumping.png)
---
Marker order does not matter. These two statements are equivalent:
```
The {bv blue fox} {riuv will} jump over the {yi yellow dog}
The {vb blue fox} {uirv will} jump over the {iy yellow dog}
```
---
If you want to type a curly brace, preface it with a backslash (`\`):
```
No colors for me, please. I just want to \{ write: code \}
```
...yields:
```
No colors for me, please. I just want to { write: code }
```
---
#### Color and Text Feature Sample
![color_and_text_feature_sample.png](docs/images/color_and_text_feature_sample.png)
---
#### Caveats
Color and text feature markup cannot be nested. It won't break anything, but it will probably not look like you are expecting.
## Philosophy
Iris must:
* Be a single file
* There should be no specific directory structure or complicated setup required.
* Run a single file, answer one question, and you should be going with Iris!
* Not require administrator intervention to install
* Any user on a tilde, or with his or her own server, should be able to start using Iris just by running the file.
* Not require any other software to function
* No databases, web servers, GUIs, or frameworks are require to use Iris fully.
* Require only Ruby
* Not everybody uses Ruby or is familiar with the Ruby ecosystem.
* Installing gems and libraries can be a major hassle if you don't have admin access or if there are library version conflicts.
* Iris needs no extra gems or libraries to function.
* Be durable
* A user deleting or modifying his or her messages or message file should not break Iris.
* Deleted or edited messages should leave flags or placeholders for other users to know that other content was there before.
* The Iris client should expect that any message file could be missing, altered, or corrupted, and should handle those cases gracefully.
* Be portable
* All Iris files should be human-readable (and -editable, in a pinch)
* The use of the official Iris client should be optional for a user to manage his or her messages. A text editor should suffice.
* Other clients which follow the Iris file format should work seamlessly with the official Iris client.
* Be secure
* Message files should be owned and only editable by their author.
* Iris should warn the user if this is not the case.
* Be a teacher
* Code should be clean, well-organized, and readable.
* Be limited in scope
* The source code should not exceed 1,000 LOC
## Technical Bits
* [Conventions](#conventions)
* [Message Files](#message-files)
* [Messages](#messages)
* [Message Hash](#message-hash)
* [Bad Hashes](#bad-hashes)
* [Edit Chain](#edit-chain)
* [Deleted Messages](#deleted-messages)
* [Topic List](#topic-list)
* [Replies](#replies)
### Conventions
Iris leans heavily on convention. Iris' security and message authentication is provided by filesystem permissions and message hashing.
### Message Files
Each user has their own message file. This is a JSON file containing all the messages that the user has authored. It is named `.iris.messages` and is located in the user's home directory.
`/home/jimmy_foo/.iris.messages`
In order to operate correctly and safely, this file _must_ be:
* World-readable
* Owner-writable
* Non-executable
* Owned by the user account that will be storing messages for
```
%> ls -la ~/.iris.messages
-rw-r--r-- 1 jimmy_foo jimmy_foo /home/jimmy_foo/.iris.messages
```
### Messages
#### Message Hash
##### Bad Hashes
#### Edit Chain
#### Deleted Messages
### Topic List
###Replies
## License
GPLv2

View File

@ -1,10 +0,0 @@
# List of System Generated Pages
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)

View File

@ -1,120 +0,0 @@
man(8) Thunix man(8)
NAME Thunix - a public Linux server
SYNOPSIS ssh thunix.net
ADMINISTRATORS List of system adminstrators are:
* amcclure - Email: amcclure@thunix.net
IRC: amcclure/irc.tilde.chat, amcclure/irc.freenode.net
* naglfar - Email: naglfar@thunix.net
IRC: Naglfar/irc.tilde.chat, Naglfar/irc.freenode.net
* ubergeek - Email: ubergeek@thunix.net, ubergeek@yourtilde.com
- IRC: ubergeek/irc.tilde.chat, ub3g33k/irc.freenode.net
* fosslinux - Email: fosslinux@thunix.net
- IRC: fosslinux/irc.tilde.chat
DESCRIPTION Thunix is a publicly accesible Linux server, running Debian
9, and managed using ansible playbooks.
There are many optional things to do on Thunix. There is IRC chat availble with the weechat client. Most build tools are available to you as well, to include
git, make, gcc, go, python, and perl. Mail facilties are also available for you to use via alpine, mutt, or even mailx.
To enter chat, just type 'chat' and hit enter. You'll be dropped into the #thunix chat room on the irc.tilde.chat network.
You should create an account at tildegit.org, where Thunix's git repos are hosted, to include the system configuration definition files.
Ansible is the tool we use to configure the systems that comprise Thunix. Git and ansible are two tools your should familiarize yourself with.
Purpose The goal of Thunix is to be an open and collaborative
environment, conducive to learning the principles of \*Nix operating
systems, regarding how they work, how to administer them, how to use
them, and how to collaborate using them.
Thunix tries to adhere to the values and philosophy of the Hacker Ethic whenever possible. The hacker ethics and beliefs as described by Levy are:
* Access to computers - and anything which might teach you something about the way the world works - should be unlimited and total. Always yield to the
Hands-On Imperative!
* All information should be free
* Mistrust authority - promote decentralization
* Hackers should be judged by their hacking, not criteria such as degrees, age, race, sex, or position
* You can create art and beauty on a computer
* Computers can change your life for the better
Thunix will never use proprietary software but users can do that if they wish. This is something they should avoid however.
Terms of Service Nothing is without its rules and regulations; thunix is
no exception. Below are the site's service terms. Everything in this
page should be clear to everyone who wishes to use thunix's services;
failure to abide by these terms can result in penalties such as service
bans and may result in legal action against any offending users,
depending on the severity of each case and any other individuals who may
have been affected. Thunix may conduct investigations on any suspected
violations, and we will cooperate with law enforcement agencies with
their investigations. Be sure to read this page carefully and understand
it.
You are responsibe for checking your local mail account from time to time. This email address is the only one we retain, and as such, any warnings and notices
regarding your account, or service status will be sent to this account.
* Deliberately defacing the accounts of other users
* Deliberately trying to disrupt thunix's server
* Using thunix as a launch pad for disrupting other servers
* Using thunix to impersonate other websites and businesses for criminal purposes
* Storing/distributing pornography of any genre and medium (especially child pornography)
* Storing/distributing content that defames any individual
* Promoting racial, ethnic, religious, political and other forms of bigotry
* Storing/distributing, promoting, or encouraging use of pirated/cracked software, license keys, license/registration circumvention programs, or any ques
tionable programs/scripts that can risk causing unauthorized modifications, or disrupts network services for any programs or devices.
* Mining cryptocurrencies
* Spamming on any forums, mailing lists, irc channels, newsgroups, etc.
* Leaking or publishing any user's or individual's personal information without that person's consent.
Copyright infringement is not allowed on thunix, and we will not allow any illegal content to be distributed. It's also expected that all users respect the copy
rights of those who produce original content of any kind and only share if the author or license grants you permission. Content hosted on accounts used for exter
nal file storage must also follow copyright law.
If you want to request for content you own the copyright for to be removed from thunix, please refer to our abuse reporting page (https://www.thu
nix.net/contac). In the email, please identify who you are, if you are the copyright holder or legally representing them, the exact files you want removed with
links to the files and infringed content, and contact information such as phone numbers or a reply-to email address.
Users that repeatedly violate the Terms of Service will have their account removed. Depending on the degree of the offense, their account may be removed immedi
ately. These terms also apply to communication services such as forums, mailing lists, irc channels, newsgroups, and any other service either hosted on or used
for thunix. If you come across anything that violates the terms of service, please let us know with the abuse reporting page (https://www.thunix.net/contac).
Architecture The Thunix system consists of one server, running Debian 9,
which runs inside of an LXD container. This allows for an out-of-band
administration of the host, in case of configuration-gone-awry.
Hourly, thunix reaches out to tildegit, pull down the latest version of the configuration, and run the configuration tool, ensuring it is in a known, and easily
replicable state.
All repos for system configuration, Thunix-supplied/ran code is hosted on tildegit.org. Thunix users are recommended to create accounts on tildegit, and contrib
ute pull requests to make their desired changes to the system, or very minimally, submit issues for problems and/or requests.
SEE ALSO ssh(8), weechat(8), git(8), make(8), gcc(8), go(8), python(8),
perl(8), alpine(8), mutt(8), mailx(8), ansible-playbook(8),
tildegit.org(8)
AUTHOR Uber Geek (ubergeek@thunix.net) amcclure (amcclure@thunix.net)
1.5 24 May 2019 man(8)

View File

@ -1,29 +0,0 @@
man(8) tildegit.org" man(8)
NAME tildegit.org - a public web based source repository for the
tildeverse
SYNOPSIS https://tildegit.org
DESCRIPTION Tildegit is a web based source control system available for
the tildeverse, that runs gitea. Thunix uses tildegit.org for all source
control.
The following git repos are used:
* ansible (https://tildegit.org/thunix/ansible) This repo stores the configuration spec for all machines comprising Thunix. The repo consists of declarative YAML
files that describes the state the machines should be in.
* www (https://tildegit.org/thunix/www) This repo stores the source code that makes up the https:/thunix.net website. It's mostly php.
* documentation (https://tildegit.org/thunix/documentation) This repo stores the man pages, and accompanying documentation for the system.
* thunix_gopher (https://tildegit.org/thunix/thunix_gopher) This repo houses our gopher hole
SEE ALSO git(8), ansible(8)
BUGS No known bugs.
AUTHOR Uber Geek (ubergeek@thunix.net)
1.2 24 May 2019 man(8)

View File

@ -0,0 +1,74 @@
man {#man align="center"}
===
[NAME](#NAME)\
[SYNOPSIS](#SYNOPSIS)\
[DESCRIPTION](#DESCRIPTION)\
[SEE ALSO](#SEE%20ALSO)\
[BUGS](#BUGS)\
[AUTHOR](#AUTHOR)\
------------------------------------------------------------------------
NAME []()
---------
Ansible on Thunix - how we manage the server
SYNOPSIS []()
-------------
ansible-pull
DESCRIPTION []()
----------------
We use ansible to manage the servers running the systems and services
for Thunix. Ansible consists of a "playbook" of YAML files, that declare
the state of the system.
The first step is to clone the repo used to manage the environment:
git clone git@ttm.sh:thunix/ansible.git (You will need a tidegit account
for this, and a key loaded into your account there)
From there, the typical github-type workflow is used:
\* Create a local branch, to track your issues changes.
\* Commit changes to your local branch.
\* Send a URI pointing to your repo, with branch name to someone with
merge permissions
Inside of the tildegit interface:
\* Create a new branch, selecting option to create a branch and pull
request
\* Make changes in your branch
\* Update PR
\* Wait for someone to merge your changes
Hourly, a job runs that pulls the latest version of the repo, and the
runs ansible-playbook against the playbook. A sudoer can manually run
this job, if desired, and its located at /etc/cron.hourly/ansible-pull.
SEE ALSO []()
-------------
tildegit.org(8), git(8), ansible-playbook(8)
BUGS []()
---------
No known bugs.
AUTHOR []()
-----------
Uber Geek (ubergeek@thunix.net)
------------------------------------------------------------------------

View File

@ -0,0 +1,47 @@
man {#man align="center"}
===
[NAME](#NAME)\
[SYNOPSIS](#SYNOPSIS)\
[DESCRIPTION](#DESCRIPTION)\
[BUGS](#BUGS)\
[SEE ALSO](#SEE%20ALSO)\
[AUTHOR](#AUTHOR)\
------------------------------------------------------------------------
NAME []()
---------
chat - chat script
SYNOPSIS []()
-------------
chat
DESCRIPTION []()
----------------
This is a simple script to launch weechat for new users, and get them
into the correct channel for chat and support.
BUGS []()
---------
\* If you have a customized list of servers in your weechat config
already, this may try to connect you twice, and youll have two nicks
going at once, which will be confusing. Once youve customized weechat
to your liking, just invoke weechat or weechat-curses.
SEE ALSO []()
-------------
weechat(8)
AUTHOR []()
-----------
Uber Geek (ubergeek@thunix.net)
------------------------------------------------------------------------

View File

@ -0,0 +1,3 @@
## Contributing to the wiki
Just do a PR on [tildegit](https://tildegit.org/thunix/wiki)

View File

@ -1,18 +0,0 @@
# What is Git?
### Definitions:
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; [Git Definition, explained by git itself.](https://git-scm.com/book/en/v2/Getting-Started-What-is-Git%3F)
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; [In a broader sense:](https://aws.amazon.com/devops/source-control/)
### Definition in summary
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;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.
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;

View File

@ -1 +0,0 @@
# WIP

View File

@ -0,0 +1,9 @@
## Your Thunix Email
Every thunix account comes with a functional and encrypted email address. This email is the same as your SSH login name. However, you will need to set a password on your thunix SSH account, using the PASSWD command in BASH. Though your SSH account will have a password, this will NOT affect how you log into your account using SSH or an SFTP client, as your public/private key pair will always work. The account password, however, will affect your thunix email address.
Your email can be accessed in one of three ways:
1. Running the Mutt email client through your SSH account
2. Logging into your email account from our [web mail](https://www.thunix.net/webmail/) service
3. Through an email client program installed on your computer, using IMAP

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,6 +0,0 @@
# Unsorted Wiki Pages
* ubergeek
* [Don't Say Hello](/wiki/unsorted/ubergeek/nohello)
* [Don't Be Impatient](/wiki/unsorted/ubergeek/impatient)
* [Don't Ask to Ask](/wiki/unsorted/ubergeek/askingtoask)

View File

@ -0,0 +1,2 @@
## Sandbox
Just a sandbox

View File

@ -0,0 +1,5 @@
## SSH and Thunix (And magic!)
When you [sign up](https://www.thunix.net/signup.php) for an account on thunix, you'll be given remote access to a Linux shell server, with web hosting, gopher hosting and email. And because of our [GDPR and privacy policy](https://www.thunix.net/gdpr.php), we take security seriously. This is why we use SSH key pairs to grant access to our server through SSH or SFTP.
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.

View File

@ -0,0 +1,224 @@
man {#man align="center"}
===
[NAME](#NAME)\
[SYNOPSIS](#SYNOPSIS)\
[ADMINISTRATORS](#ADMINISTRATORS)\
[DESCRIPTION](#DESCRIPTION)\
[Purpose](#Purpose)\
[Terms of Service](#Terms%20of%20Service)\
[Architecture](#Architecture)\
[SEE ALSO](#SEE%20ALSO)\
[AUTHOR](#AUTHOR)\
------------------------------------------------------------------------
NAME []()
---------
Thunix - a public Linux server
SYNOPSIS []()
-------------
ssh thunix.net
ADMINISTRATORS []()
-------------------
List of system adminstrators are:
\* amcclure - Email: amcclure@thunix.net\
IRC: amcclure/irc.tilde.chat, amcclure/irc.freenode.net
\* naglfar - Email: naglfar@thunix.net\
IRC: Naglfar/irc.tilde.chat, Naglfar/irc.freenode.net
\* ubergeek - Email: ubergeek@thunix.net, ubergeek@yourtilde.com\
- IRC: ubergeek/irc.tilde.chat, ub3g33k/irc.freenode.net
\* fosslinux - Email: fosslinux@thunix.net\
- IRC: fosslinux/irc.tilde.chat
DESCRIPTION []()
----------------
Thunix is a publicly accesible Linux server, running Debian 9, and
managed using ansible playbooks.
There are many optional things to do on Thunix. There is IRC chat
availble with the weechat client. Most build tools are available to you
as well, to include git, make, gcc, go, python, and perl. Mail facilties
are also available for you to use via alpine, mutt, or even mailx.
To enter chat, just type chat and hit enter. Youll be dropped into
the \#thunix chat room on the irc.tilde.chat network.
You should create an account at tildegit.org, where Thunixs git repos
are hosted, to include the system configuration definition files.
Ansible is the tool we use to configure the systems that comprise
Thunix. Git and ansible are two tools your should familiarize yourself
with.
Purpose []()
------------
The goal of Thunix is to be an open and collaborative environment,
conducive to learning the principles of \*Nix operating systems,
regarding how they work, how to administer them, how to use them, and
how to collaborate using them.
Thunix tries to adhere to the values and philosophy of the Hacker Ethic
whenever possible. The hacker ethics and beliefs as described by Levy
are:
+--------------------------+--------------------------+--------------------------+
| | | \* Access to computers - |
| | | and anything which might |
| | | teach you something |
| | | about the way the world |
| | | works - should be |
| | | unlimited and total. |
| | | Always yield to the |
| | | Hands-On Imperative! |
+--------------------------+--------------------------+--------------------------+
| | | \* All information |
| | | should be free |
+--------------------------+--------------------------+--------------------------+
| | | \* Mistrust authority - |
| | | promote decentralization |
+--------------------------+--------------------------+--------------------------+
| | | \* Hackers should be |
| | | judged by their hacking, |
| | | not criteria such as |
| | | degrees, age, race, sex, |
| | | or position |
+--------------------------+--------------------------+--------------------------+
| | | \* You can create art |
| | | and beauty on a computer |
+--------------------------+--------------------------+--------------------------+
| | | \* Computers can change |
| | | your life for the better |
+--------------------------+--------------------------+--------------------------+
Thunix will never use proprietary software but users can do that if they
wish. This is something they should avoid however.
Terms of Service []()
---------------------
Nothing is without its rules and regulations; thunix is no exception.
Below are the sites service terms. Everything in this page should be
clear to everyone who wishes to use thunixs services; failure to abide
by these terms can result in penalties such as service bans and may
result in legal action against any offending users, depending on the
severity of each case and any other individuals who may have been
affected. Thunix may conduct investigations on any suspected violations,
and we will cooperate with law enforcement agencies with their
investigations. Be sure to read this page carefully and understand it.
You are responsibe for checking your local mail account from time to
time. This email address is the only one we retain, and as such, any
warnings and notices regarding your account, or service status will be
sent to this account.
+--------------------------------------+--------------------------------------+
| | \* Deliberately defacing the |
| | accounts of other users |
+--------------------------------------+--------------------------------------+
| | \* Deliberately trying to disrupt |
| | thunixs server |
+--------------------------------------+--------------------------------------+
| | \* Using thunix as a launch pad for |
| | disrupting other servers |
+--------------------------------------+--------------------------------------+
| | \* Using thunix to impersonate other |
| | websites and businesses for criminal |
| | purposes |
+--------------------------------------+--------------------------------------+
| | \* Storing/distributing pornography |
| | of any genre and medium (especially |
| | child pornography) |
+--------------------------------------+--------------------------------------+
| | \* Storing/distributing content that |
| | defames any individual |
+--------------------------------------+--------------------------------------+
| | \* Promoting racial, ethnic, |
| | religious, political and other forms |
| | of bigotry |
+--------------------------------------+--------------------------------------+
| | \* Storing/distributing, promoting, |
| | or encouraging use of |
| | pirated/cracked software, license |
| | keys, license/registration |
| | circumvention programs, or any |
| | questionable programs/scripts that |
| | can risk causing unauthorized |
| | modifications, or disrupts network |
| | services for any programs or |
| | devices. |
+--------------------------------------+--------------------------------------+
| | \* Mining cryptocurrencies |
+--------------------------------------+--------------------------------------+
| | \* Spamming on any forums, mailing |
| | lists, irc channels, newsgroups, |
| | etc. |
+--------------------------------------+--------------------------------------+
| | \* Leaking or publishing any users |
| | or individuals personal information |
| | without that persons consent. |
+--------------------------------------+--------------------------------------+
Copyright infringement is not allowed on thunix, and we will not allow
any illegal content to be distributed. Its also expected that all users
respect the copyrights of those who produce original content of any kind
and only share if the author or license grants you permission. Content
hosted on accounts used for external file storage must also follow
copyright law.
If you want to request for content you own the copyright for to be
removed from thunix, please refer to our abuse reporting page
(https://www.thunix.net/abuse.php). In the email, please identify who
you are, if you are the copyright holder or legally representing them,
the exact files you want removed with links to the files and infringed
content, and contact information such as phone numbers or a reply-to
email address.
Users that repeatedly violate the Terms of Service will have their
account removed. Depending on the degree of the offense, their account
may be removed immediately. These terms also apply to communication
services such as forums, mailing lists, irc channels, newsgroups, and
any other service either hosted on or used for thunix. If you come
across anything that violates the terms of service, please let us know
with the abuse reporting page (https://www.thunix.net/abuse.php).
Architecture []()
-----------------
The Thunix system consists of one server, running Debian 9, which runs
inside of an LXD container. This allows for an out-of-band
administration of the host, in case of configuration-gone-awry.
Hourly, thunix reaches out to tildegit, pull down the latest version of
the configuration, and run the configuration tool, ensuring it is in a
known, and easily replicable state.
All repos for system configuration, Thunix-supplied/ran code is hosted
on tildegit.org. Thunix users are recommended to create accounts on
tildegit, and contribute pull requests to make their desired changes to
the system, or very minimally, submit issues for problems and/or
requests.
SEE ALSO []()
-------------
ssh(8), weechat(8), git(8), make(8), gcc(8), go(8), python(8), perl(8),
alpine(8), mutt(8), mailx(8), ansible-playbook(8), tildegit.org(8)
AUTHOR []()
-----------
Uber Geek (ubergeek@thunix.net) amcclure (amcclure@thunix.net)
------------------------------------------------------------------------

View File

@ -0,0 +1,61 @@
man {#man align="center"}
===
[NAME](#NAME)\
[SYNOPSIS](#SYNOPSIS)\
[DESCRIPTION](#DESCRIPTION)\
[SEE ALSO](#SEE%20ALSO)\
[BUGS](#BUGS)\
[AUTHOR](#AUTHOR)\
------------------------------------------------------------------------
NAME []()
---------
tildegit.org - a public web based source repository for the tildeverse
SYNOPSIS []()
-------------
https://tildegit.org
DESCRIPTION []()
----------------
Tildegit is a web based source control system available for the
tildeverse, that runs gitea. Thunix uses tildegit.org for all source
control.
The following git repos are used:
\* ansible (https://tildegit.org/thunix/ansible) This repo stores the
configuration spec for all machines comprising Thunix. The repo consists
of declarative YAML files that describes the state the machines should
be in.
\* www (https://tildegit.org/thunix/www) This repo stores the source
code that makes up the https:/thunix.net website. Its mostly php.
\* documentation (https://tildegit.org/thunix/documentation) This repo
stores the man pages, and accompanying documentation for the system.
\* thunix\_gopher (https://tildegit.org/thunix/thunix\_gopher) This repo
houses our gopher hole
SEE ALSO []()
-------------
git(8), ansible(8)
BUGS []()
---------
No known bugs.
AUTHOR []()
-----------
Uber Geek (ubergeek@thunix.net)
------------------------------------------------------------------------

View File

@ -1,28 +0,0 @@
# Don't Ask to Ask
Don't ask to ask a question in [chat](/wiki/system/chat), or on [iris](/wiki/iris). Just ask your question!
Asking to ask is pointless. Either someone will answer your question, or they wont. Corollary: [Don't be Impatient](/wiki/unsorted/ubergeek/impatient). Sometimes, people are busy, and might take more than 10 seconds to respond.
Bad Convo Example:
```
9:00 You: Can I get some help with something?
... waiting ...
9:10 You: can I get someone to help me?
9:15 ubergeek: My bad, I was busy... What do you need?
9:18 You: My foo isn't bar'ing! And I have no idea what to do.
9:19 ubergeek: Oh, you have to flim the flam, and then foo will bar.
```
Good Convo Example:
```
9:00 You: I need some help, my foo isn't bar'ing. Anyone to lend a hand?
9:15 ubergeek: Sorry, was busy. But you need to flim the flam, then your foo will bar.
9:16 You: Thanks! I owe you a beer!
```
In bad convo, your resolution took longer, and you likely irritated ubergeek by being impatient. In Good Convo, your problem was resolved a bit quicker, and ubergeek was happy to help!
PS [Ubergeek](https://thunix.net/~ubergeek) is happy to help, regardless.

View File

@ -1,9 +0,0 @@
# Don't Be Impatient
Being impatient in getting help on Thunix will score you no points at all in credibility... For a few reasons:
* Thunix is ran by an all-volunteer team. We don't get paid to do this. We get some donations, but usually, not even enough to break even.
* Thunix is self-documented, generally (If it's not, it's a bug, and an issue should be submitted [here](https://tildegit.org/thunix/documentation) or a new wiki page made [here](https://tildegit.org/thunix/wiki).
* Thunix is maintained by a set of automation scripts. If something isn't working, a PR [here](https://tildegit.org/thunix/ansible) can be done, to fix the problem.
So, if you ask a question in [#thunix](https://web.tilde.chat/?join=thunix), be patient. There's generally not a lot of chatter, and it just takes a bit to catch up. If it's been "too long", feel free to open an issue in [the pertinent repo](https://tildegit.org/thunix) or email the admin team at root at thunix.net.

View File

@ -1,36 +0,0 @@
# Don't Just Say 'Hello' In Chat
For another article about this, see [nohello.com](http://nohello.com).
Just saying "Hello", and nothing else in a chat room is just as bad as [asking to ask](askingtoask). Just saying "Hello" does two kinda bad things:
* Interrupts the person you're asking.
* The person you're interrupting is likely in the middle of something. A chat client "pings" them, and they go to check (Stopping what they are doing).
* If you just say,"Hello", you've given them no information, and thusly, interrupted them needlessly.
* It wastes time to resolution for your problem
* If you say,"Hello", you wait 30-60 seconds, for the other person to say "Hi back". Then they spend 30-60 seconds waiting for you to say what it is you need. That's 60 second to 120 seconds to even begin researching the answer.
* If instead, you say,"Hello, I have a problem with my key. Here is the pastebin for it, can you check, please?", instantly that person has all the info to begin answering your question. We saved 60-120 seconds of everyone's time!
Example of bad convo:
```
9:00 Person 1: Hi.
9:01 Person 2: Hai back!
9:02 Person 1: I have a problem with my key? Can you check on it?
9:03 Person 2: Sure!
9:04 Person 2: All fixed!
9:05 Person 1: Yep, looks good! Thanks a bunch!
```
Example of good convo:
```
9:00 Person 1: Hi, I have an issue with my key, can you check on it? Here is what I think it is: pastebinurls.com/XYZZY
9:01 Person 2: Sure, hang on a sec...
9:01 Person 2: All fixed! Give it a try!
9:02 Person 1 Yep, all good, thanks a bunch!
```
In Bad Convo, it took 5 minutes to resolution. In Good Convo, took 2 minutes. See why it's better?
It very well seems rude, because you don't just jam a person up with a question right when you see them face-to-face. But face-to-face convos have a lot of nuance to them, that is lacking in IRC. And, while maybe rude, it allows for asynchronous communication, whereas Bad Convo demands a serialized communication. Asynch is better :)

View File

@ -1,34 +0,0 @@
# VNC
## Setup
If you came here, you are most likely wanting to gain access to vnc. The process
is not very difficult:
1. Open your shell and type `acquirevnc`. This will
automatically give you a port number. **Note this down.**
2. The script will also prompt you to give a password. Follow the on-screen
prompts, and note this password down, preferably in a password manager.
3. Install a VNC client on your local machine. The client for tigervnc is
recommended.
## Connection
1. Forward the port to your local machine. To do this, run
`ssh -L xxxx:localhost:xxxx -f -N -C username@thunix.net` on
your local machine **every time** before you connect to your vnc. Replace
username with your username and xxxx with your port nummber.
2. Connect to `localhost:xxxx` in your vnc client, where xxxx is your port number.
3. Type in your password you chose earlier when prompted.
## Starting VNC Server
You normally should not need to start your vnc server, as the `acquirevnc`
script starts your server for you. However, in the unlikely case of a server
reboot or a vnc crash, all you need to do is run `startvnc` and vnc will begin
in the background.
## Support
While the process is designed to be as easy as possible, it is easy to trip up.
For help, jump in our IRC channel on irc.tilde.chat/6697 in channel #thunix.

View File

@ -1,4 +0,0 @@
<?php
//Name of your site
$site_name="Thunix Wiki";
?>

View File

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

View File

@ -1 +1 @@
☣ Thunix Wiki ☣
# Thunix Wiki

File diff suppressed because one or more lines are too long

View File

@ -1,8 +1 @@
* [Home](/main)
* [Table of Contents](/tableofcontents)
* [User Contributed Pages](/wiki/main)
* [System Generated Pages](/wiki/system/main)
* [Sandbox](/sandbox)
* [Thunix.net](https://thunix.net)
* [Contact Thunix Staff](https://thunix.net/contact)
* [Home](/)

File diff suppressed because one or more lines are too long

View File

@ -1,76 +0,0 @@
/*
This file is licensed under the GPL 3.0 or later.
*/
body {
font-family: "Courier New", Courier, monospace;
background: black;
color: lime;
}
#body {
width: 95%;
}
#body h1 {
background: white;
color: green;
}
#body h2 {
background: white;
color: green;
}
#body h3 {
background: white;
color: green;
}
#body a {
background: black;
color: lime;
}
#body a:visited {
color: green;
}
#header {
width: 90%;
text-align: center;
font-size: xx-large;
}
#content {
width: 78%;
float: left;
font-size: medium;
}
#content img {
max-height: 400px;
max-width: 98%;
}
#sidebar {
width: 18%;
float: right;
font-size: small;
}
#sidebar h1 {
color: lime;
background: black;
}
#sidebar h2 {
color: lime;
background: black;
}
#footer {
width: 95%;
text-align: center;
clear: both;
font-size: smaller;
}

View File

@ -1,20 +0,0 @@
The MIT License (MIT)
Copyright (c) 2013-2018 Emanuil Rusev, erusev.com
Permission is hereby granted, free of charge, to any person obtaining a copy of
this software and associated documentation files (the "Software"), to deal in
the Software without restriction, including without limitation the rights to
use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of
the Software, and to permit persons to whom the Software is furnished to do so,
subject to the following conditions:
The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS
FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR
COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

File diff suppressed because it is too large Load Diff

View File

@ -1,86 +0,0 @@
> I also make [Caret](https://caret.io?ref=parsedown) - a Markdown editor for Mac and PC.
## Parsedown
[![Build Status](https://img.shields.io/travis/erusev/parsedown/master.svg?style=flat-square)](https://travis-ci.org/erusev/parsedown)
<!--[![Total Downloads](http://img.shields.io/packagist/dt/erusev/parsedown.svg?style=flat-square)](https://packagist.org/packages/erusev/parsedown)-->
Better Markdown Parser in PHP
[Demo](http://parsedown.org/demo) |
[Benchmarks](http://parsedown.org/speed) |
[Tests](http://parsedown.org/tests/) |
[Documentation](https://github.com/erusev/parsedown/wiki/)
### Features
* One File
* No Dependencies
* Super Fast
* Extensible
* [GitHub flavored](https://help.github.com/articles/github-flavored-markdown)
* Tested in 5.3 to 7.1 and in HHVM
* [Markdown Extra extension](https://github.com/erusev/parsedown-extra)
### Installation
Include `Parsedown.php` or install [the composer package](https://packagist.org/packages/erusev/parsedown).
### Example
``` php
$Parsedown = new Parsedown();
echo $Parsedown->text('Hello _Parsedown_!'); # prints: <p>Hello <em>Parsedown</em>!</p>
```
More examples in [the wiki](https://github.com/erusev/parsedown/wiki/) and in [this video tutorial](http://youtu.be/wYZBY8DEikI).
### Security
Parsedown is capable of escaping user-input within the HTML that it generates. Additionally Parsedown will apply sanitisation to additional scripting vectors (such as scripting link destinations) that are introduced by the markdown syntax itself.
To tell Parsedown that it is processing untrusted user-input, use the following:
```php
$parsedown = new Parsedown;
$parsedown->setSafeMode(true);
```
If instead, you wish to allow HTML within untrusted user-input, but still want output to be free from XSS it is recommended that you make use of a HTML sanitiser that allows HTML tags to be whitelisted, like [HTML Purifier](http://htmlpurifier.org/).
In both cases you should strongly consider employing defence-in-depth measures, like [deploying a Content-Security-Policy](https://scotthelme.co.uk/content-security-policy-an-introduction/) (a browser security feature) so that your page is likely to be safe even if an attacker finds a vulnerability in one of the first lines of defence above.
#### Security of Parsedown Extensions
Safe mode does not necessarily yield safe results when using extensions to Parsedown. Extensions should be evaluated on their own to determine their specific safety against XSS.
### Escaping HTML
> ⚠️  **WARNING:** This method isn't safe from XSS!
If you wish to escape HTML **in trusted input**, you can use the following:
```php
$parsedown = new Parsedown;
$parsedown->setMarkupEscaped(true);
```
Beware that this still allows users to insert unsafe scripting vectors, such as links like `[xss](javascript:alert%281%29)`.
### Questions
**How does Parsedown work?**
It tries to read Markdown like a human. First, it looks at the lines. Its interested in how the lines start. This helps it recognise blocks. It knows, for example, that if a line starts with a `-` then perhaps it belongs to a list. Once it recognises the blocks, it continues to the content. As it reads, it watches out for special characters. This helps it recognise inline elements (or inlines).
We call this approach "line based". We believe that Parsedown is the first Markdown parser to use it. Since the release of Parsedown, other developers have used the same approach to develop other Markdown parsers in PHP and in other languages.
**Is it compliant with CommonMark?**
It passes most of the CommonMark tests. Most of the tests that don't pass deal with cases that are quite uncommon. Still, as CommonMark matures, compliance should improve.
**Who uses it?**
[Laravel Framework](https://laravel.com/), [Bolt CMS](http://bolt.cm/), [Grav CMS](http://getgrav.org/), [Herbie CMS](http://www.getherbie.org/), [Kirby CMS](http://getkirby.com/), [October CMS](http://octobercms.com/), [Pico CMS](http://picocms.org), [Statamic CMS](http://www.statamic.com/), [phpDocumentor](http://www.phpdoc.org/), [RaspberryPi.org](http://www.raspberrypi.org/), [Symfony demo](https://github.com/symfony/symfony-demo) and [more](https://packagist.org/packages/erusev/parsedown/dependents).
**How can I help?**
Use it, star it, share it and if you feel generous, [donate](https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=528P3NZQMP8N2).

View File

@ -1,33 +0,0 @@
{
"name": "erusev/parsedown",
"description": "Parser for Markdown.",
"keywords": ["markdown", "parser"],
"homepage": "http://parsedown.org",
"type": "library",
"license": "MIT",
"authors": [
{
"name": "Emanuil Rusev",
"email": "hello@erusev.com",
"homepage": "http://erusev.com"
}
],
"require": {
"php": ">=5.3.0",
"ext-mbstring": "*"
},
"require-dev": {
"phpunit/phpunit": "^4.8.35"
},
"autoload": {
"psr-0": {"Parsedown": ""}
},
"autoload-dev": {
"psr-0": {
"TestParsedown": "test/",
"ParsedownTest": "test/",
"CommonMarkTest": "test/",
"CommonMarkTestWeak": "test/"
}
}
}

100
wiki.php
View File

@ -1,91 +1,35 @@
<?php
/*
This code is Copyright(c) 2019 by ubergeek under the GPL 3 or later.
Parsedown is licensed under the MIT license.
*/
include('config.php');
include('parsedown-1.7.3/Parsedown.php');
$page = $_GET['page'];
$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";
$Parsedown = new Parsedown();
$Parsedown->setSafeMode(true);
if(isset($_GET['style']))
$site_style = $_GET['style'];
else
$site_style="site";
$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 ( $page == "") {
$page = "main";
}
print "<!DOCTYPE html>
<html lang='en'>
<html lang='e'>
<head>
<title>$site_name - $page</title>
<link rel='stylesheet' type='text/css' href='/includes/$site_style.css'>
<title>Thunix Wiki - $page</title>
<link rel='stylesheet' type='text/css' href='includes/site.css'>
</head>
<body>
<!-- Begin Header -->
<body>";
echo ( shell_exec("/usr/bin/pandoc includes/header.md") );
<div id='header'>";
print $Parsedown->text($header);
print "
</div>
<!-- End Header -->
";
print "<hr>
<div id='body'>
<!-- Begin Sidebar -->
<div id='sidebar'>
";
echo $Parsedown->text($sidebar);
print " </div>
<!-- End Sidebar -->
<!-- Begin Body -->
<div id='content'>";
echo $Parsedown->text($content);
print " </div>
<!-- End Body -->
</div>
<!-- Begin Footer -->
<div id='footer'>
<hr>
";
echo $Parsedown->text($footer);
print "<hr/>
<div id='content' style='width=90%'>
<div id='sidebar' style='20%'>";
echo ( shell_exec("/usr/bin/pandoc includes/sidebar.md") );
print " </div>
<!-- End Footer -->
<div='content' style='width=80%'>";
</body>
echo ( shell_exec("/usr/bin/pandoc articles/$page.md") );
print " </div><hr/>
</div>";
echo ( shell_exec("/usr/bin/pandoc includes/footer.md") );
print " </body>
</html>";
?>