diff --git a/composer.json b/composer.json index 5bb329e..ed8bfd9 100644 --- a/composer.json +++ b/composer.json @@ -1,5 +1,6 @@ { "require": { - "mnapoli/front-yaml": "^1.6" + "mnapoli/front-yaml": "^1.6", + "michelf/php-markdown": "^1.8" } } diff --git a/composer.lock b/composer.lock index f54cf48..bf2ce88 100644 --- a/composer.lock +++ b/composer.lock @@ -4,7 +4,7 @@ "Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies", "This file is @generated automatically" ], - "content-hash": "c1f29fb97cdd4614c2983d225e5842cc", + "content-hash": "f693531fd51bd92297c17d6a290a6f16", "packages": [ { "name": "erusev/parsedown", @@ -52,6 +52,52 @@ ], "time": "2018-03-08T01:11:30+00:00" }, + { + "name": "michelf/php-markdown", + "version": "1.8.0", + "source": { + "type": "git", + "url": "https://github.com/michelf/php-markdown.git", + "reference": "01ab082b355bf188d907b9929cd99b2923053495" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/michelf/php-markdown/zipball/01ab082b355bf188d907b9929cd99b2923053495", + "reference": "01ab082b355bf188d907b9929cd99b2923053495", + "shasum": "" + }, + "require": { + "php": ">=5.3.0" + }, + "type": "library", + "autoload": { + "psr-4": { + "Michelf\\": "Michelf/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Michel Fortin", + "email": "michel.fortin@michelf.ca", + "homepage": "https://michelf.ca/", + "role": "Developer" + }, + { + "name": "John Gruber", + "homepage": "https://daringfireball.net/" + } + ], + "description": "PHP Markdown", + "homepage": "https://michelf.ca/projects/php-markdown/", + "keywords": [ + "markdown" + ], + "time": "2018-01-15T00:49:33+00:00" + }, { "name": "mnapoli/front-yaml", "version": "1.6.0", diff --git a/wiki/index.php b/wiki/index.php index c441983..28f801d 100644 --- a/wiki/index.php +++ b/wiki/index.php @@ -3,17 +3,29 @@ require __DIR__.'/../vendor/autoload.php'; $additional_head = ' '; +class MDParser implements Mni\FrontYAML\Markdown\MarkdownParser { + public function __construct() { + $this->mdparser = new Michelf\Markdown(); + $this->mdparser->header_id_func = function ($header) { + return preg_replace('/[^a-z0-9]/', '-', strtolower($header)); + }; + } -$parser = new Mni\FrontYAML\Parser(); + public function parse($markdown) { + return $this->mdparser->transform($markdown); + } +} + +$parser = new Mni\FrontYAML\Parser(null, new MDParser()); if (!isset($_GET["page"]) || !file_exists("pages/{$_GET['page']}.md")) { @@ -33,7 +45,7 @@ if (!isset($_GET["page"]) || !file_exists("pages/{$_GET['page']}.md")) {

welcome to the tilde.team wiki!

-

if you want to contribute, check out the +

if you want to contribute, check out the source and open a PR!

diff --git a/wiki/pages/administration.md b/wiki/pages/administration.md index fdf3dc5..5e8ba60 100644 --- a/wiki/pages/administration.md +++ b/wiki/pages/administration.md @@ -1,6 +1,6 @@ --- author: ~ben -published: false +published: true title: administration description: ~team admin guide category: @@ -16,60 +16,60 @@ category: 1. generate a random password (12-20 characters, no spaces) 1. create a new user account: -```bash -sudo adduser newusername -``` + ``` + sudo adduser newusername + ``` 1. add their ssh pubkey: -```bash -echo "ssh pubkey from their signup email" | sudo tee /home/newusername/.ssh/authorized_keys -``` + + ``` + echo "ssh pubkey from their signup email" | sudo tee /home/newusername/.ssh/authorized_keys + ``` 1. drop the requested username and generated password in the placeholder below. reply all so that other admins will know that it's been handled. welcome mail template: -``` -hey ~newusername, -welcome to tilde.team! + hey ~newusername, -your new account has been established. you can ssh into tilde.team with -the ssh key you supplied on registration. + welcome to tilde.team! -your password is "[[password]]". please change it when you log in for -the first time. the password is used for imap/smtp auth, not shell login, -which is set to only use ssh key authentication. + your new account has been established. you can ssh into tilde.team with + the ssh key you supplied on registration. -to get started, type `motd` at the command prompt to see a few ways to -get started. have fun! + your password is "[[password]]". please change it when you log in for + the first time. the password is used for imap/smtp auth, not shell login, + which is set to only use ssh key authentication. -the greatest value of tilde.team is not the services provided by the -server, but rather the interesting and welcoming community built by its -users. this is possible because of people like you who choose to make -this a great place. the best way you can help tilde.team is by working -to support a great system culture. chat on irc; build cool programs and -share them with others; focus on learning, and help others learn; be a -good example for others; have fun! + to get started, type `motd` at the command prompt to see a few ways to + get started. have fun! -also, your ~/public_html directory is served at -https://tilde.team/~newusername/ -(you can also use https://newusername.tilde.team) + the greatest value of tilde.team is not the services provided by the + server, but rather the interesting and welcoming community built by its + users. this is possible because of people like you who choose to make + this a great place. the best way you can help tilde.team is by working + to support a great system culture. chat on irc; build cool programs and + share them with others; focus on learning, and help others learn; be a + good example for others; have fun! -check out our wiki at https://tilde.team/wiki/ for more information (and -maybe help us write a new wiki article:) + also, your ~/public_html directory is served at + https://tilde.team/~newusername/ + (you can also use https://newusername.tilde.team) -our irc is tilde.chat, an irc network connecting several -tilde servers. the `chat` command on your ~team shell will open up -weechat with some nice default configs and plugins. -see our wiki article (https://tilde.team/wiki/?page=irc) -or https://tilde.chat site for information on how to connect from elsewhere. -we also have a webclient at https://irc.tilde.team that you can -register for by running the `webirc` command from a shell session. + check out our wiki at https://tilde.team/wiki/ for more information (and + maybe help us write a new wiki article:) -we look forward to seeing you around! welcome to the ~team! + our irc is tilde.chat, an irc network connecting several + tilde servers. the `chat` command on your ~team shell will open up + weechat with some nice default configs and plugins. + see our wiki article (https://tilde.team/wiki/?page=irc) + or https://tilde.chat site for information on how to connect from elsewhere. + we also have a webclient at https://irc.tilde.team that you can + register for by running the `webirc` command from a shell session. -~tilde.team admins -``` + we look forward to seeing you around! welcome to the ~team! + + ~tilde.team admins @@ -79,12 +79,14 @@ we look forward to seeing you around! welcome to the ~team! tilde.team uses [tarsnap](https://tarsnap.com) for backups and is configured to save 12 hourly backups, 7 daily backups, 6 weekly backups, and 2 years' worth of monthly backups. to see a list of the backups: -```bash + +``` sudo tarsnap --list-archives ``` to restore a backup: -```bash + +``` tarsnap -x -f name-of-backup ``` diff --git a/wiki/pages/advanced-ssh.md b/wiki/pages/advanced-ssh.md index 64d4472..b3e10e1 100644 --- a/wiki/pages/advanced-ssh.md +++ b/wiki/pages/advanced-ssh.md @@ -1,8 +1,8 @@ --- -author: ~ben -published: false +author: ~ubergeek +published: true title: advanced ssh -description: advanced ssh tutorial +description: advanced ssh tricks category: - main --- @@ -13,14 +13,16 @@ Some more advanced ssh topics. ## SSH Tunnels -SSH can be used as a sort of "poor man's VPN". For example, you want to get into IRC with your local client (mIRC, Weechat, etc), but your local network blocks IRC ports. +SSH can be used as a sort of "poor man's VPN". For example, you want to get into IRC with your local client (mIRC, Weechat, etc), but your local network blocks IRC ports. -However! Your local network will almost always allow SSH (sysadmins need this for most day to day work). You can connect to tilde.team, and use port forwarding to get on. +However! Your local network will almost always allow SSH (sysadmins need this for most day to day work). You can connect to tilde.team, and use port forwarding to get on. If you are connecting from a Linux machine, you can do this: +``` ssh -L 6667:localhost:6667 tilde.team +``` -After being logged in, open your local IRC client, and use 127.0.0.1:6667 for your server setting. Voila! You're now on team's IRC server. +After being logged in, open your local IRC client, and use 127.0.0.1:6667 for your server setting. Voila! You're now on team's IRC server. What that SSH command did was open a local port tunnel (-L), using local port 6667 (6667:) pointed at localhost (From the remote's point of view), on remote port 6667 (Default IRC port). @@ -30,31 +32,38 @@ You can do this for any arbitrary port. ## File Copying -What if you don't want to edit files on the team server, but instead, you want to create it on your local machine? You don't want to have to copy/paste or re-type all of that, right? +What if you don't want to edit files on the team server, but instead, you want to create it on your local machine? You don't want to have to copy/paste or re-type all of that, right? -SCP to the rescue! SCP copies files over the ssh protocol. It works just like the cp command, but alllows you to do this: +SCP to the rescue! SCP copies files over the ssh protocol. It works just like the cp command, but alllows you to do this: -scp MyNewFileILove.txt tilde.team:~/AhYesOnTheServerNow.txt +`scp MyNewFileILove.txt tilde.team:~/AhYesOnTheServerNow.txt` -As long as you can ssh, you can copy files to and from the remote side. It also works like this, to download a file: +As long as you can ssh, you can copy files to and from the remote side. It also works like this, to download a file: -scp tilde.team:~/CrapINeedThisFileLocally.js ./AwesomeLocalJSFile.js +`scp tilde.team:~/CrapINeedThisFileLocally.js ./AwesomeLocalJSFile.js` ## Remote execution -What if you don't want to really log into team.tilde, but you just need to run a command. You can do that too, with ssh! +What if you don't want to really log into team.tilde, but you just need to run a command. You can do that too, with ssh! -ssh tilde.team ping google.com +`ssh tilde.team ping google.com` -The above executes the ping command from the server side of the house. The one thing you need to be careful of here are quotes and input redirection. It can have surprising affects, mixing remote and local pipes. +The above executes the ping command from the server side of the house. The one thing you need to be careful of here are quotes and input redirection. It can have surprising affects, mixing remote and local pipes. ## SSH config -Each user has their own, personal configuration for ssh. The configuration files lives at ~/.ssh/config. +Each user has their own, personal configuration for ssh. The configuration files lives at `~/.ssh/config.` A very common thing to do in this file is to create hosts aliases. +``` host tilde hostname tilde.team user ubergeek + LocalForward localhost:6667 localhost:6667 +``` + +There are tons of other options, including this LocalForward line to automatically set up the tunnel as show [above](#ssh-tunnels). + +For more information about the available options, check the man page: `man ssh_config`. You can set this up remotely, to make jumping to other hosts easier, or locally (If supported in your ssh setup) to make connecting easier for you. diff --git a/wiki/pages/cli-for-beginners.md b/wiki/pages/cli-for-beginners.md index f05dbb0..3a8289b 100644 --- a/wiki/pages/cli-for-beginners.md +++ b/wiki/pages/cli-for-beginners.md @@ -295,4 +295,3 @@ Not suprisingly, you'll find a lot of other intro material online or in your loc Terminus - an interactive game-like introduction to shell commands http://www.mprat.org/Terminus/ - diff --git a/wiki/pages/code-of-conduct.md b/wiki/pages/code-of-conduct.md index f70d39d..2bd5a39 100644 --- a/wiki/pages/code-of-conduct.md +++ b/wiki/pages/code-of-conduct.md @@ -88,11 +88,23 @@ we expect all tilde.team members to abide by this code of conduct while: ## 9. contact info -tilde.team admin: +tilde.team admins: + +you can also send a mail to [sudoers@tilde.team](mailto:sudoers@tilde.team) to make sure we all get it. * [ben](https://tilde.team/~ben/): - [ben@tilde.team](mailto:ben@tilde.team) - on irc `/query ben hello` +* [khuxkm](https://tilde.team/~khuxkm/): + - [khuxkm@tilde.team](mailto:khuxkm@tilde.team) + - on irc `/query khuxkm hello` +* [cmccabe](https://tilde.team/~cmccabe/): + - [cmccabe@tilde.team](mailto:cmccabe@tilde.team) + - on irc `/query cmccabe hello` +* [virtual](https://tilde.team/~virtual/): + - [virtual@tilde.team](mailto:virtual@tilde.team) + - on irc `/query virtual hello` + ## 10. license and attribution diff --git a/wiki/pages/email.md b/wiki/pages/email.md index 4ce938a..2025680 100644 --- a/wiki/pages/email.md +++ b/wiki/pages/email.md @@ -21,11 +21,11 @@ you have a couple options: * [webmail](https://mail.tilde.team) * imap/smtp - - email address: username@tilde.team + - email address: username@tilde.team (or any of the aliased domains) - username: username - password: your shell password - - imap: mail.tilde.team port 143 (starttls) - - smtp: mail.tilde.team port 587 (starttls) + - imap: imap.tilde.team port 143 (starttls) + - smtp: smtp.tilde.team port 587 (starttls) --- @@ -37,7 +37,9 @@ because [~ben](https://tilde.team/~ben/) likes to buy domain names, you can use * tildenet.org * tildeverse.org -mail sent to your_username@ any of those domains will end up in your inbox. most clients will allow you to add additional identities/aliases. feel free to use as many as you'd like :) +mail sent to your_username@ any of those domains will end up in your inbox. most clients will allow you to add additional identities/aliases. +additionally, any address with a `-` or `+` and arbitrary text behind it will be forwarded to you email: ie. your_username+somethingcool@tildeverse.org or your_username-notcool@tilde.site. +feel free to use as many as you'd like :) if you would like your tildemail to be forwarded somewhere else, put that email address in ~/.forward diff --git a/wiki/pages/getting-started.md b/wiki/pages/getting-started.md index 0ec0db2..7868fd0 100644 --- a/wiki/pages/getting-started.md +++ b/wiki/pages/getting-started.md @@ -9,6 +9,10 @@ category: # getting started +this guide is not very thorough or complete. if you want something nicer, try [our cli for beginners article](?page=cli-for-beginners). + +--- + Welcome New to the command line and all this webby cowfoolery? You're in luck! Here's a basic HELLO WORLD tutorial. diff --git a/wiki/pages/ssh.md b/wiki/pages/ssh.md index 36114e1..5881547 100644 --- a/wiki/pages/ssh.md +++ b/wiki/pages/ssh.md @@ -12,7 +12,7 @@ category: --- -> all users are now required to use an ssh keypair for login, or will be required to proceed with manual account recovery with [~ben](/~ben/) +> all users are now required to use an ssh keypair for login, or will be required to proceed with manual account recovery with [~ben](/~ben/) or another admin. drop a line to [sudoers@tilde.team](mailto:sudoers@tilde.team) or hop on [irc](https://web.tilde.chat/?join=sudoers) for assistance. ** if you just want to get right to a tutorial you can [skip over this background info](#tutorial)** @@ -33,14 +33,12 @@ for a long time, people used a tool called [`telnet`](https://en.wikipedia.org/w --- ## how to make an ssh key - pick your fighter: [[mac](#mac)] | [[windows](#windows)] | [[linux](#linux)] --- ### mac - #### generating your keypair @@ -79,7 +77,6 @@ where username is your username (~ben would use `ssh ben@tilde.team`) --- ### windows - there are a couple options for using ssh on windows these days. i like to use [git bash](https://git-scm.com). @@ -129,9 +126,8 @@ where username is your username (~ben would use `ssh ben@tilde.team`) --- ### linux - -there are a lot of linux distros, but `ssh` and `ssh-keygen` should be available in almost all cases. +there are a lot of linux distros, but `ssh` and `ssh-keygen` should be available in almost all cases. if they're not, look up how to install ssh for your distro. #### generating your keypair @@ -149,7 +145,7 @@ ssh-keygen -t rsa -b 2048 1. `cat ~/.ssh/id_rsa.pub` -1. copy the output of the last command and paste it in the sshkey field on the signup form (or email it to [~ben](mailto:ben@tilde.team) if you already have an account) +1. copy the output of the last command and paste it in the sshkey field on the signup form (or email it to [sudoers@tilde.team](mailto:sudoers@tilde.team) if you already have an account) #### using your keypair diff --git a/wiki/pages/tildeblogs.md b/wiki/pages/tildeblogs.md index 336634a..00da420 100644 --- a/wiki/pages/tildeblogs.md +++ b/wiki/pages/tildeblogs.md @@ -7,22 +7,21 @@ category: - main --- -# tildeblogs with [bashblog](https://git.tilde.team/meta/bashblog) ---- - -tildeblogs can be built with [bashblog](https://git.tilde.team/meta/bashblog) - -change to your ~/public_html/blog directory: `cd ~/public_html/blog` (or somewhere else in ~/public_html, however you like) +# tildeblogs with [bashblog](https://git.tildeverse.org/team/bashblog) bashblog is available system-wide as `bb` +tildeblogs can be built with [bashblog](https://git.tildeverse.org/team/bashblog) + +change to your ~/public_html/blog directory: `cd ~/public_html/blog` (bashblog will do this for you if you forget) + --- ## usage 1. `bb post` -1. write a post (it will open your preferred $EDITOR for you) +1. write a post (it will open your preferred $EDITOR for you, so make sure it's set) 1. save, close, and then select from the bashblog menu choices @@ -35,7 +34,9 @@ edit the `.config` file to change the name and url and other settings for your b for an example of customization, see [~ben's blog](https://tilde.team/~ben/blog/) ([config source](https://git.tilde.team/ben/tilde/src/branch/master/blog/.config)). -for more details: see [the bashblog repo](https://git.tilde.team/meta/bashblog) +for more details: see [the bashblog repo](https://git.tildeverse.org/team/bashblog) + +if you have any improvements/bugfixes, feel free to open a PR! ---