From 0381bce35845cb387fcd7ce124da60b9c45c611a Mon Sep 17 00:00:00 2001 From: ahriman Date: Mon, 2 Sep 2019 17:42:06 -0400 Subject: [PATCH] tildewiki --- .gitignore | 2 + README.md | 23 ++++++++++ assets/404.md | 5 +++ assets/500.md | 5 +++ assets/icon.png | Bin 0 -> 1037 bytes assets/wiki.css | 6 +++ assets/wiki.md | 15 +++++++ pages/bchs.md | 67 +++++++++++++++++++++++++++ pages/dcss.md | 43 ++++++++++++++++++ pages/finger.md | 63 ++++++++++++++++++++++++++ pages/gopher.md | 81 +++++++++++++++++++++++++++++++++ pages/gpgssh.md | 76 +++++++++++++++++++++++++++++++ pages/irc.md | 72 +++++++++++++++++++++++++++++ pages/pass.md | 112 ++++++++++++++++++++++++++++++++++++++++++++++ pages/unixtips.md | 36 +++++++++++++++ 15 files changed, 606 insertions(+) create mode 100644 .gitignore create mode 100644 README.md create mode 100644 assets/404.md create mode 100644 assets/500.md create mode 100644 assets/icon.png create mode 100644 assets/wiki.css create mode 100644 assets/wiki.md create mode 100644 pages/bchs.md create mode 100644 pages/dcss.md create mode 100644 pages/finger.md create mode 100644 pages/gopher.md create mode 100644 pages/gpgssh.md create mode 100644 pages/irc.md create mode 100644 pages/pass.md create mode 100644 pages/unixtips.md diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..94178be --- /dev/null +++ b/.gitignore @@ -0,0 +1,2 @@ +tildewiki +tildewiki.yaml diff --git a/README.md b/README.md new file mode 100644 index 0000000..80f970e --- /dev/null +++ b/README.md @@ -0,0 +1,23 @@ +# wiki.tilde.institute + +This repository holds the wiki data for tilde.institute + +To contribute: +* Fork the repository +* Create a branch with an appropriate name: + * `git checkout -b mycoolpage` +* Add your page in the `pages/` directory +* Submit a PR + +Don't forget to wrap lines at approximately 75 columns. If +you need to, use `fmt -w 75`. For example: + +``` +$ fmt -w 75 mypage.md | tee mypage.md +``` +Then afterwards, check the page to fix anything that got +clobbered. + +## Software + +The wiki engine being used is [TildeWiki](https://github.com/gbmor/tildewiki), developed by ahriman diff --git a/assets/404.md b/assets/404.md new file mode 100644 index 0000000..51c50ee --- /dev/null +++ b/assets/404.md @@ -0,0 +1,5 @@ +# 404 + +## Not the area code + +## I mean I can't find that :( diff --git a/assets/500.md b/assets/500.md new file mode 100644 index 0000000..8048c97 --- /dev/null +++ b/assets/500.md @@ -0,0 +1,5 @@ +# 500 + +## Oh noez + +## Something went wrong! diff --git a/assets/icon.png b/assets/icon.png new file mode 100644 index 0000000000000000000000000000000000000000..c36ec504ed922c0d495ce256005509e2ad475a1b GIT binary patch literal 1037 zcmV+o1oHcdP)e zSad^gZEa<4bO1wgWnpw>WFU8GbZ8()Nlj2!fese{00VVNL_t(Y$HkXRZyQw<$A2?- z9v<6qV!Mf*6tG$f5>43<$|8yc3pOA&72+$fXTc72!AIazuxuBI4I8Aef*?_uZiF{2{OR>*TFE!fWHp1qS+?bh4W?waUbKcRLTTwAVN?ZgHp-<^z{KlQ)jPMe&|R zZNeLnJNuj5*)A3R4(j74yfJCZf~)2RM?r+~e!RHnRUB)#fVK*)QJXNLgmXIcClLnatqVOQDW> zgGTPHv3(aj_9TU&mLA+%{+O0p!j%L~t->#*PiU4u$JRC{LS3=JAEkQ?BxN>LA82bF zT>FfQ+hxsqLT1=xUthm4v8h*S>Yq}xw<%k{quWoA{VtxUVj6GL$lbw`wfWESp;F** zX$#nz8qR%veYCI-Urqvfr}G_Idk=s>UgD?f7g67K`x|8cBzmt`zT`w00KD6INXGsR z04sBsz0yas?QtxqVpNy>9!B5+kn`;n6d>>QVo$ud&k-vVJ)QzCoJ*fJ0L26(I?HZ1 zk=;5`eJGaZ2ixZ+8U7%ACLmFE8hNP)E>d8|9xDrhb7?X7R%qM}A%SENNa4Qf&T$y> z(c&iAmr9m8P(h{lmmSeOS>IrJGY&RN^B!Hzp71PfTTj;jP~v<1sN)3Bmf%} z_bD1as%OOpBo$L+77!N_u82Q*s^3Qrd{p;o7)GVYAX2{1vfD@XW3VGval@s}2M&+J zwS-ztie5j8fF%kHM6CRr*F*Ks;?%3IF8&ANDn+pW6<3d?#8EQODK_JtqWb-@d0>99 zSWb9+LdNTk6s^+}*{CiBHoE%)kyw~57p8)zhT0bS1o#-uc|P*y)ldUSxXLRd(H$ZD z?o7$!Qje2hDX=K?e;6q`{-YQw6;!7Y<>$CPx46fq$c}9vDy2ldJa$Z9{tw_&*%&)y zpsb9oC(WM7nZ-lxOES9~Urja8FmBK==D&$t*-b*as!Q8HFDOQkD6T}500000NkvXX Hu0mjfZQkE1 literal 0 HcmV?d00001 diff --git a/assets/wiki.css b/assets/wiki.css new file mode 100644 index 0000000..99a2f63 --- /dev/null +++ b/assets/wiki.css @@ -0,0 +1,6 @@ +body { + max-width: 38rem; + padding: 1.5rem; + margin: auto; + background-color: #b3b3cc; +} diff --git a/assets/wiki.md b/assets/wiki.md new file mode 100644 index 0000000..b012ed9 --- /dev/null +++ b/assets/wiki.md @@ -0,0 +1,15 @@ +# ~institute wiki + +Welcome to the [tilde.institute](https://tilde.institute) wiki! + +If you are new here, you may want to check out the [IRC](/w/irc) page. Or, if you know your way around and want to contribute to the wiki, open a PR! tilde.institute uses [tildegit](https://tildegit.org) for all site-related version control. + +Repository: [tildegit.org/institute/wiki](https://tildegit.org/institute/wiki) + +### Pages + + +
+
+
+Powered by [tildewiki](https://github.com/gbmor/tildewiki) diff --git a/pages/bchs.md b/pages/bchs.md new file mode 100644 index 0000000..4d68eac --- /dev/null +++ b/pages/bchs.md @@ -0,0 +1,67 @@ + + +# BCHS Guide + +This will be a quick-and-dirty guide to getting started with the BCHS +stack. More information can be found at: + +* [Learn BCHS](https://learnbchs.org) +* [pledge(2)](http://man.openbsd.org/cgi-bin/man.cgi/OpenBSD-current/man2/pledge.2) +* [unveil(2)](http://man.openbsd.org/unveil.2) +* [kcgi](https://kristaps.bsd.lv/kcgi/) +* [ksql](https://kristaps.bsd.lv/ksql/) +* [kwebapp](https://kristaps.bsd.lv/kwebapp) + +tilde.institute is set up to process all files with the `.cgi` extension +via `slowcgi(8)`. This allows for a multitude of possibilities - +any compiled language can be used to develop web applications on an +OpenBSD server. It's advised to use `C` because of the `pledge(2)` and +`unveil(2)` system calls available, which allow for restricting privileges +and restricted filesystem access, respectively. + +Keep in mind that if you don't use the previously listed +`kcgi`/`ksql`/`kwebapp` libraries, you will need to work with HTTP's +eccentricities manually. For an example, [here's the Hello World +code](https://tilde.institute/helloworld.c) from the LearnBCHS +site. And [here it is running](https://tilde.institute/helloworld.cgi) +as compiled CGI here at tilde.institute. + +Once you've written your software to be served via CGI, be sure to +statically link the executables. Sure, there's a larger file size, but +the benefits outweigh that in this case - there's no relying on what +I may or may not have installed on tilde.institute. For example: + +``` +$ cc -static -g -W -Wall -o app.cgi app.c +``` + +When you've completed compilation, make sure to set permissions properly +(755) and move it to the public folder in your home directory. `httpd(8)` +is set to use `index.html` as the index file, however this can be changed +to `index.cgi` or what-have-you by contacting the admins. + +~institute user `xvetrd` has written a more detailed example on +`kcgi` than is provided on the library's site. It includes an +example `makefile` as well. The KCGI Starter archive is [available +here](https://tilde.institute/kcgi-starter.tar.gz). Simply +``` +curl -O https://tilde.institute/kcgi-starter.tar.gz +``` +it to your home directory here on ~institute, +``` +$ tar xzf kcgi-starter.tar.gz +$ cd kcgi-starter +$ make +$ make install +``` +to test the compilation. It installs to `~/public_html` with the proper +ownership and permissions. View the `index.c` source and the `makefile` +to see what goes on under the hood! Feel free to adapt it your own projects! + +[back](/) + diff --git a/pages/dcss.md b/pages/dcss.md new file mode 100644 index 0000000..c740768 --- /dev/null +++ b/pages/dcss.md @@ -0,0 +1,43 @@ + + +# Dungeon Crawl Stone Soup + +`dcss` is a fun roguelike game that is now available on a tildeverse server +for your enjoyment. There are two ways to play: via `WebTiles` for simple +2d graphics and via `ssh` for a more traditional ascii interface. + +* CTVO: [https://crawl.tildeverse.org](https://crawl.tildeverse.org) + +If you already have an account on tilde.institute, you can play via the +ascii interface by issuing the command `dcss`. This will automatically +connect to the server and present the login/registration menu. + +Some users prefer graphics. For `WebTiles`, it will be necessary to go to +[https://crawl.tildeverse.org](https://crawl.tildeverse.org). Click `PLAY` +to open the `WebTiles` interface. + +## Recorded Games + +All games on CTVO (the tildeverse crawl server) are recorded for later +playback. In order to review a previously recorded game, navigate to [the +ttyrec directory](https://crawl.tildeverse.org/ttyrec), select a username, +and download the `ttyrec` file. You'll need to have the `ttyrec` package +installed in order to review them. Issue: `ttyplay file.ttyrec` and watch +as your terminal automagically transforms into a recorded DCSS game. + +`ttyplay` is installed on tilde.institute, so feel free to download a +game to your home directory and watch it from there. + +## Morgue Files + +Want to see the run-down of a game? Check out the `morgue` +file for it. They're sorted into username directories at: +[https://crawl.tildeverse.org/morgue](https://crawl.tildeverse.org/morgue). +Each `morgue` file contains information such as how you died, your stats, +an account of monsters vanquished, among other stuff. + +[back](/) diff --git a/pages/finger.md b/pages/finger.md new file mode 100644 index 0000000..e1251bb --- /dev/null +++ b/pages/finger.md @@ -0,0 +1,63 @@ + + +# Finger + +The finger protocol was created way back in 1977. its purpose was to +display information about the queried user of a system, or all the users +of a system. + +It fell out of use in the 1990s due to various security concerns. the +old finger daemons were buggy and easily exploited, while the +information garnered from a query could be used for social engineering +attacks. nowadays, the finger daemons have been refined and are no longer +so vulnerable. + +In the post-Facebook world, new types of social networks are +popping up. the latest in this movement is a resurgence of the finger +protocol. what follows is a rough guide for getting yourself up to speed +with finger on tilde.institute. + +## Querying + +The standard query for finger is simply + +``` +finger user@host +``` + +which displays login name, home directory, shell, real name, current login +time, idle time, whether or not the user has mail, and the contents of +the user's `~/.plan` file. Here is an example of the output: + +``` +Login: username Name: Bob Bobson XXII +Directory: /home/username Shell: /bin/bash +On since Wed Jan 2 04:04 (EST) on pts/94 from 168.297.83.21 via mosh [6420] + 8 minutes 26 seconds idle +Last login Wed Jan 2 04:33 (EST) on pts/91 from 168.297.83.21 +No mail. +Plan: hey hey hey everybody! +``` + +## .plan + +The `~/.plan` file displayed at the end of the finger query response +allows for some customization. You can put literally any text you want +there. Status updates, summaries, etc. This little file allows us to use +finger as a rudimentary social network. + +For example, say you want to use it as a personal summary, like having +a blurb about what you're working on. Place the statement into `~/.plan` +and you're ready to go! + +For a more traditional social network style format, put dated and timed +status updates as if you're tooting on a mastodon instance. The sky's +the limit! Well, actually, text is the limit. But you get the idea. Right? + +Hope to see you on finger soon! + +[back](/) diff --git a/pages/gopher.md b/pages/gopher.md new file mode 100644 index 0000000..3815505 --- /dev/null +++ b/pages/gopher.md @@ -0,0 +1,81 @@ + + +# Getting Started With Gopher + +# Using `burrow` + +To create a gopher hole on tilde.institute, a user can easily get started +by doing the following: + +### Create the gopher directory +``` +$ mkdir public_gopher +``` +### Create a root gophermap +``` +$ burrow gophermap +``` +Gophernicus will interpret any text you add here as information lines unless they begin with one +of gophernicus' special characters or contains a tab. As a general rule, +don't use tabs unless you're intentionally linking something. + +Add a cool header to the file (check out `figlet`!), then somewhere +near the top, paste: +``` +==== Last Updated: February 19th, 2019 ==== +``` +The date doesn't matter, really. Whenever you "phlog" with `burrow` +it will update the date for you. How sweet is that? + +Now lets add a link to your phlog that you're totally going to have: + +``` +1phlog[tab]phlog +``` + +That `[tab]` should be a literal tab, though. Make sure your editor +doesn't convert it to spaces. Now, save and quit the editor. + +### Create a phlog directory +``` +$ mkdir ~/public_gopher/phlog +``` +### Now create a new phlog with burrow +``` +$ burrow phlog +``` + +You'll be prompted for a title. If you hit enter and give no title then +burrow will abort. + +Once you hit enter after giving your title a temporary file will open in +your default `$EDITOR`. Don't like that editor? Be sure to change your +environment var! + +If you quit your phlog file without saving the post is aborted. If you save +and quit, it will create a new phlog entry, add it to your phlog gophermap +that now exists, and update the date on your root gophermap. That's it! + +You have an RSS file sitting in the root of your gopher hole at +`rss.xml`. It will automatically generate when you phlog, like a +winner. You can edit your root `gophermap` at any time by using burrow's +`gophermap` action. If you create other folders and gophermaps in the +future you can use burrow's gophermap function to target them. For +instance, to open the phlog listings you would: +``` +$ burrow gophermap /phlog +``` +Editing gophermaps with `burrow` will ensure they're always +saved and formatted properly! Any other files are just text, so open them +directly with your editor of choice. + +That's it! Happy gophering. + +~tomasino + +[back](/) + diff --git a/pages/gpgssh.md b/pages/gpgssh.md new file mode 100644 index 0000000..96ab7cb --- /dev/null +++ b/pages/gpgssh.md @@ -0,0 +1,76 @@ + + +# Using GPG for SSH Authentication + +It's a fairly simply process to have gpg-agent handle your SSH +authentication. To start off, you'll need to have a private GnuPG key +generated with an appropriate subkey for authentication. Once that's +taken care of, open up `~/.gnupg/gpg-agent.conf` + +``` +$ cat ~/.gnupg/gpg-agent.conf + enable-ssh-support + default-cache-ttl 60 + max-cache-ttl 120 +``` + +Now you'll need to append the following to `~/.bashrc`, or the appropriate +rc file for your shell + +``` +$ cat ~/.bashrc + export GPG_TTY="$(tty)" + export SSH_AUTH_SOCK=$(gpgconf --list-dirs agent-ssh-socket) + gpg-connect-agent updatestartuptty /bye > /dev/null +``` + +Once that's done, you'll need to let `gpg-agent` know which GnuPG subkey +to use for SSH authentication. Run the following and copy the keygrip +associated with the subkey you've generated specifically for authentication. +Don't use *my* keygrip, however. The output here is just for an example. `GnuPG` +computes the keygrips from the public key, so nothing here is sensitive +or private. + +``` +$ gpg --with-keygrip -k ben@gbmor.dev + pub rsa4096/0xEAB272409CD12FF0 2018-11-25 [SC] + Key fingerprint = 291A AFF7 A291 7DAB 0E01 6B9C EAB2 7240 9CD1 2FF0 + Keygrip = DE06FAA273017BBD8778F94639611CEF53AB9EBC + uid [ultimate] Ben Morrison + sub rsa4096/0xF9C3B650612249D9 2018-11-25 [E] + Keygrip = 751ADAC109736316B6ABEBB3F2BDF4612F8A630C + sub rsa4096/0x4969E5731CFEB507 2018-11-25 [A] + Keygrip = 44D1BDC0C1931E2E018E7CE49CDE14BFB4EA11E3 + sub rsa4096/0x8F192E4720BB0DAC 2018-11-25 [S] + Keygrip = 240966CBF2791D8C34D0DA646925435FED49F9BF +``` + +Now, open `~/.gnupg/sshcontrol` and paste the keygrip into that file. +It's the keygrip just below the key marked `[A]` for authentication. +Verify that the correct keygrip has been selected by running these two +and comparing the output: +``` +$ ssh-add -L + ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAACAQCakJKfXUuX/ZDxJQySdxCeQfxTu0g + KPCESGDyadvFAPDxtcTfOrxfqJLZx8CodkC7hzHT/QEy/xMgN18Q== cardno:000609861127 +``` +``` +$ gpg --export-ssh-key + ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAACAQCakJKfXUuX/ZDxJQySdxCeQfxTu0g + KPCESGDyadvFAPDxtcTfOrxfqJLZx8CodkC7hzHT/QEy/xMgN18Q== openpgp:0x1CFEB507 +``` +The `ssh` output should match the `gpg` output (except maybe the little +trailing comment, like here). Also, I've removed most of the public key I'm using as +an example for brevity's sake. It should be quite a bit longer than this. +If `ssh` is correct, kill off `gpg-agent` +``` +$ pkill gpg-agent +``` + +Then open up a new terminal and attempt to connect to a server! + +[back](/) diff --git a/pages/irc.md b/pages/irc.md new file mode 100644 index 0000000..1c45daf --- /dev/null +++ b/pages/irc.md @@ -0,0 +1,72 @@ + + +# IRC + +To connect to the [tildeverse IRC network](https://tilde.chat) and begin +chatting while logged on to tilde.institute, simply use the command +`chat`! If you prefer to use a different IRC client than the default, +such as `irssi`, the following server information will apply: + +* institute.tilde.chat +* Port 6697 +* TLS / SSL + +Don't forget to `/join #institute` and `/join #meta` + +## Channels + +There are quite a few channels on tilde.chat, however some have more +activity than others. Here's a few channels that you may be interested in. + +* `#meta` - the general chat channel for all of the [tildeverse](https://tildeverse.org) +* `#institute`- for tilde.institute-related discussion +* `#tilderadio` - the channel for the [tildeverse radio station](https://tilderadio.org) +* `#cosmic` - discussions pertaining to [cosmic voyage](https://cosmic.voyage), a +`tilde` focusing on collaborative science fiction writing +* `#tildetel` - the channel for [tilde.tel](https://tilde.tel), the neighborhood SIP server +* `#security` - computer, software, and network security discussions +* `#uucp` - the [dataforge](https://uucp.dataforge.tk) UUCP-over-SSH project +* `#hamradio` - the channel for hams! +* `#cervezafria` - A place for our Spanish-speaking friends to relax + +You can check the currently available channels any time by issuing `/list` +in your IRC client. + +## Connecting Externally + +Want to hang out on the tildeverse when you aren't connected to +tilde.institute? No problem! Just use these settings in your favorite +IRC client: + +* irc.tilde.chat +* Port 6697 +* TLS/SSL is required + +The DNS round robin will connect you to one of the nodes in the network. + +If you're using `weechat` the following will connect you: + +``` +/server add tilde irc.tilde.chat/6697 -ssl -autoconnect +/connect tilde +``` + +And if you're using `irssi` + +``` +/connect -tls -tls_verify irc.tilde.chat 6697 +``` + +The tildeverse IRC network also runs an instance of `The Lounge`, a +web-based IRC client that allows you to stay connected even when you're +away. It's available at: + +* [https://web.tilde.chat](https://web.tilde.chat) + +Join us on the tildeverse IRC network and socialize with other tilde users! + +[back](/) diff --git a/pages/pass.md b/pages/pass.md new file mode 100644 index 0000000..2259f9e --- /dev/null +++ b/pages/pass.md @@ -0,0 +1,112 @@ + + +# pass, the CLI Password Manager + +`pass` is a command line utility to manage your passwords. + +It creates a simple file/folder structure under your `$PASSWORD_STORE_DIR` +(by default `~/.password-store`) where every file is encrypted with your +gpg key. + +You can organize that hierarchy as you see fit. For instance something like +`sites/tilde.news/myusername` is a common way of doing it. + +Those files are not limited to contain simply a password, they can contain +anything. But is recommended that the password goes alone in the first +line, so you can benefit from the `-c` option which copies that to the +clipboard directly. + +There is `bash`, `zsh` and `fish` command line completion available and +all can be tracked using `git`. So it's really convenient. + +## Setup + +This is simple, just one command (assuming you have your GnuPG key +ready). GPG-ID is the hex id of your key. + +``` +$ pass init GPG-ID + mkdir: created directory ‘/home/user/.password-store’ + Password store initialized for GPG-ID +``` + +## Basic Usage + +List all passwords "tree" style + +``` +$ pass Password Store +├── sites +│ ├── tilde.zone +│ │ ├── myUserName +│ │ ├── secondAccount ... +``` + +Find a password + +``` +$ pass find tilde.zone +Search Terms: tilde.zone +└── sites + └── tilde.zone + └── myUserName@tilde.zone +``` + +See the content of a file + +``` +$ pass email/tilde.institute/myAccount + supersecret +``` + +Copy the first line to the clipboard. Clear time can be configured with +`$PASSWORD_STORE_CLIP_TIME` + +``` +$ pass -c email/tilde.institute/myAccount + Copied email/tilde.institute/myAccount to clipboard. + Will clear in 45 seconds. +``` + +Insert a new password. It can be multiline with `-m`. Remember to put the +password on the first line if you want to use the clipboard function + +``` +$ pass insert sites/foo.com/blah + Enter password for sites/foo.com/blah: +``` + +Generate a 32 chars random password and store it. You can define the +default length with `$PASSWORD_STORE_GENERATED_LENGTH`. With `-n` the +password will not include symbols, but alphanumeric characters only. With +`-c` it gets copied to the clipboard as usual. +``` +$ pass generate sites/foo.com/abcd 32 + The generated password to sites/foo.com/abcd is: + $(-QF&Q=IN2nFBx) +``` + +take a look at the `--help` option or the complete documentation on +their website. + +## Changing Keys + +If you need to change the key being used for your password files, +simply navigate to the directory and re-issue `pass init`, but with +the ID of the new key to be used. Pass will prompt for the old key's +password, then automatically decrypt all keys and re-encrypt them +with the new key. +``` +$ cd ~/.password-store +$ pass init NEWGPGKEYID +``` + +references: + +* [pass home page](https://passwordstore.org) + +[back](/) diff --git a/pages/unixtips.md b/pages/unixtips.md new file mode 100644 index 0000000..675d644 --- /dev/null +++ b/pages/unixtips.md @@ -0,0 +1,36 @@ + + +# UNIX ProTips + +I realized today I wasn't getting mail notifications, and I hadn't set +them up on this shell. So here are some things I do on my local machine +that work here: + +To get the shell to tell you when you have new mail, after command +executions, add this to your `.profile` or your `.kshrc` files +(or other shell RC file) in your home directory. + +``` +export MAILCHECK=0 +``` + +And, if you want, you can have a persistent notification when +you have un-incorporated mail, or more specifically, when your +`/var/mail/` isn't empty. + +``` +PS1="\$([-s /var/mail/`whoami` ] && echo '* ')$PS1" +``` + +This works in `/bin/ksh`, I can't speak for other shells. + +If anybody else has some quick tips they would like to share, I encorage +them to edit this page. + +Happy Unixing! + +[back](/)