Browse Source

add - help page

cremesk 6 months ago
Signed by: creme <> GPG Key ID: C147C3B7FBDF08D0
4 changed files with 245 additions and 0 deletions
  1. +4
  2. BIN
  3. +238
  4. +3

+ 4
- 0
.gitignore View File

@@ -0,0 +1,4 @@

docs/favicon.ico View File

Before After
Width: 96  |  Height: 96  |  Size: 3.9KB

+ 238
- 0
docs/ View File

@@ -0,0 +1,238 @@
# - help

> *write in irc (#envs) or*<br />
> *contact []( for any other help requests.*

## &#35; show public ip

## &#35; the null pointer - aliases
add the following lines to you're aliases file `~/.bash_aliases`
0file() {} curl -F"file=@$1" ; }
0url() { curl -F"url=$1" ; }
0short() { curl -F"shorten=$1" ; }
HTTP POST files here:<br />
&nbsp;&nbsp;`0file "yourfile.png"`<br />
you can also POST remote URLs:<br />
&nbsp;&nbsp;`0url ""`<br />
or you can shorten URLs:<br />
&nbsp;&nbsp;`0short ""`<br />
<br /><br />
*if you want a nice wrapper, try [~tomasino's pb](*

## &#35; termbin - aliases
`echo 'alias tb="nc 9999"' >> ~/.bash_aliases`

you can POST a text:<br />
&nbsp;&nbsp;`echo less typing now! | tb`<br />
or Content of a file:<br />
&nbsp;&nbsp;`cat ~/some_file.txt | tb`<br />

## &#35; user page
you're user page is available under<br />

**, **,<br />
** and **.<br />

the index file location for our page is `~/public_html/` and<br />
a template for the page can you found in `~/public_html/your_index_template`.<br />

static files are served normally, along with the following dynamic options:

- php - name the file with a php extension or use index.php
- perl - name the file with a pl extension and make it executable
- cgi-bin - name it whatever you want and place it in `~/public_html/cgi-bin/`<br />*don't forget to make the cgi-bin script executable*

if you're having trouble with .pl or cgi-bin scripts,<br />
make sure that you're sending the content-type header as the first thing.

## &#35; user blog
you're blog is available under ** and **.<br />
and you can also use any other blogging software. ;)

### with [ttbp]( available system-wide as `feels` and `ttbp`
just log in to you're account and enter: `feels`<br />
ttbp will ask you a few questions to get you started. after that,<br />
writing and reading entries all happen within the program.<br />
that's it!<br />
please see for more informations on the [ttbp]( page.

### with [twtxt]( available system-wide as `twtxt`
to set up your twtxt it takes the following steps

1. `twtxt quickstart` - this wizard will generate a basic configuration file for twtxt<br /> in `~/.config/twtxt/config`. *for more config option see: [twtxt - configuration](<br />*note your public twtxt location is ~/public_html/twtxt.txt*
2. now you can use `twtxt tweet "Hello, this is twtxt!"` to post a status and<br />`twtxt timeline` to view your timeline.

for more feature see `twtxt --help` and [twtxt - usage](

### with [bashblog]( available system-wide as `bb`

#### usage
- `bb post` or `bb post --html` - to use html
- write a post
- save, close and then select from the bashblog menu choices

#### config
to change the name and url and other settings for you're blog edit<br />
the `config` file in `~/public_html/blog/` see for an example [here](<br />

## &#35; user mail
we used [modoboa]( - made multidomain email hosting simple

| | |
| ------------------------- |:---:|
| webmail: | []( |
| username: | |
| | |
| smtp server-address: | |
| smtp server-address: | 587 |
| smtp connection-security: | STARTTLS |
| | |
| imap server-address: | |
| imap server-port: | 993 |
| imap connection-security: | SSL/TLS |

you can find more mail settings directly in you're [webmail](<br />
(*an secondary e-mail address, can be used for recovery needs*)<br />
<br />
we also have managesieve support. managesieve is available on the default port (4190)<br />
if you want to use an external managesieve client (like the [thunderbird add-on](<br />
you can also set up your filter in the [webmailer](

## &#35; user gopher
main gopher page: `gopher://`<br /> serves user gopherholes from your `~/public_gopher` directory.<br />
if a file called `gophermap` exists in the directory you're currently browsing to in gopher, it will get processed and displayed.<br />
see [this example]( for more information on file types and special chars.

### browse gophersites
if you're currently connected from a shell, you can use the [`lynx`]( browser.<br />
&nbsp;&nbsp;`lynx gopher://`<br />
if you want to access the gophersite in your public_gopher dir, use the following
link structure: `gopher://`<br />
<br />
otherwise, you can use our [http proxy]( to browse the gophernet.

## &#35; ssh
### ssh details and usage
ports 22, 80, 443, 2222 and 2223 are available for ssh.<br />
use to reach the secondary ip and use 80 and 443 for ssh.<br />
so, for example, you can do:<br />
&nbsp;&nbsp;`ssh`<br />
&nbsp;&nbsp;`ssh -p2223`<br />
or for the secondary ip:<br />
&nbsp;&nbsp;`ssh -p443`<br />
<br />
if you have a slightly shaky connection then you can also use `mosh`.

### create a ssh-key
make sure you have a ~/.ssh directory<br />
&nbsp;&nbsp;`mkdir -m 700 ~/.ssh`<br />
create your key<br />
&nbsp;&nbsp;`ssh-keygen -t rsa -b 4096`<br />
your public and private key will be located at<br />
&nbsp;&nbsp;`cat ~/.ssh/`

### ssh config
define ssh host aliase in `~/.ssh/config`
Port 2223
User user
LocalForward localhost:6667 localhost:6667

now you can use a simple `ssh` to connect.<br />
there are tons of other options, including this `LocalForward` line to automatically set up the tunnel as show below.<br />
for more available options, see the man page: `man ssh_config`

### ssh tunnels
for example, you want to get into znc with your local client (weechat, etc),<br />
but your local network blocks znc ports. you can connect to, and use port forwarding to get on.<br />
<br />
if you are connecting from a linux machine, you can do this:<br />
`ssh -L 6667:localhost:6667`<br />
after being logged in, open your local irc client, and use ``<br />
for your server setting. voila! you're now on znc server.<br />

what that ssh command did was open a local port tunnel (-L), using local port 6667 (6667:)<br />
pointed at localhost (from the remote's point of view), on remote port 6667 (default irc port).

putty has the same ability (for windows and mac users), under connection &gt; ssh &gt; tunnels.

you can do this for any arbitrary port.

### import &amp; authorize a public ssh-key
from URL (on remote machine)<br />
&nbsp;&nbsp;`echo &#36;(curl -sL &#124; tee -a ~/.ssh/authorized_keys`<br />
over ssh (on local machine)<br />
&nbsp;&nbsp;`ssh-copy-id -i ~/.ssh/ -p2223;`

### ssh remote execution
`ssh ping`<br />
or<br />
&nbsp;&nbsp;`ssh bash -c "'uname -a'"`<br />
exec a local script<br />
&nbsp;&nbsp;`ssh 'bash -s' <`

## &#35; scp usage
copy ssh pub key to remote:<br />
&nbsp;&nbsp;`scp -P 2223 ~/.ssh/authorized_keys`<br />
copy website index.html from remote:<br />
&nbsp;&nbsp;`scp -P 2223 ~/public_www/`<br />

## &#35; rsync usage
sync website to remote:<br />
&nbsp;&nbsp;`rsync -avz -e "ssh -p 2223" ~/public_www`<br />
sync website from remote:<br />
&nbsp;&nbsp;`rsync -avz -e "ssh -p 2223" ~/`<br />

## &#35; sftp usage
connect: `sftp -oPort=2223`

### commands:
&nbsp;&nbsp;exit: `exit`<br />
&nbsp;&nbsp;print help: `help`

### transferring
files to remote:<br />
&nbsp;&nbsp;`put localfile remotefile`<br />
dir to remote:<br />
&nbsp;&nbsp;`put -r localdir remotedir`<br />
files from remote:<br />
&nbsp;&nbsp;`get remotefile localfile`<br />
dir from remote:<br />
&nbsp;&nbsp;`get -r remotedir localdir`

### example:
add index.html to public_www Dir:<br />
&nbsp;&nbsp;`put public_www/index.html public_www`<br />
add ~/.ssh/authorized_keys:<br />
&nbsp;&nbsp;`put .ssh/authorized_keys .ssh/authorized_keys`

### single line usage (on local machine)
&nbsp;&nbsp;to remote: `sftp -P 2223 &lt;&lt;&lt; &#36;'put localfile_path'`<br />
&nbsp;&nbsp;from remote: `sftp -P 2223 localfile`

## &#35; daemonize processes
so you've got a process that you want to keep running. you might have it in a<br />
tmux or screen session. let's use systemd user units to manage it!

- ensure that your user unit loadpath is set up:<br />`mkdir -p ~/.config/systemd/user/`
- create a basic service. save something like this<br />in `~/.config/systemd/user/my-new-service.service` (adjusting where necessary)
Description=my script description
ExecStart=/bin/bash -c "while true do; echo hi; done"
- enable it:<br>`systemctl --user enable --now my-new-service.service`
- enable-linger for your user account:<br />`loginctl enable-linger`<br />this allows your user units to run even when you're not logged in.

done!<br />
you can now use `systemctl --user` to manage your daemonized process.

+ 3
- 0
mkdocs.yml View File

@@ -0,0 +1,3 @@
site_name: - help
theme: cyborg