From 34e875cfcc8bc7922cac7205419c330c38b6420c Mon Sep 17 00:00:00 2001 From: Luke Smith Date: Wed, 30 Jun 2021 16:43:18 -0400 Subject: use .svg files --- README.md | 5 +++++ index.html | 2 +- nextcloud.html | 4 ++-- pix/nextcloud-logo.png | Bin 7836 -> 0 bytes pix/nextcloud.svg | 1 + 5 files changed, 9 insertions(+), 3 deletions(-) delete mode 100644 pix/nextcloud-logo.png create mode 100644 pix/nextcloud.svg diff --git a/README.md b/README.md index a66338f..31f4c3d 100644 --- a/README.md +++ b/README.md @@ -5,3 +5,8 @@ A site dedicated to turn web peasants into Internet LandChads. Simple step-by-step text and image-based tutorials for creating websites, email servers, chat servers, server administration and everything else. Suggestions welcome. + +## Submissions + +- follow the general style of pre-existing articles +- use `.svg` files for icons/logos and for illustrative images, keep filesize low diff --git a/index.html b/index.html index d42989c..a75332e 100644 --- a/index.html +++ b/index.html @@ -58,7 +58,7 @@ diff --git a/nextcloud.html b/nextcloud.html index 2eb8fd4..40c5dba 100644 --- a/nextcloud.html +++ b/nextcloud.html @@ -9,12 +9,12 @@ -

Setting up a Nextcloud Instance

+

logo Setting up a Nextcloud Instance

What is Nextcloud?

-

Nextcloud is a free and open source solution for cloud storage. However it can also do other things, such as manage your email, notes, calender, tasks, and can even connect to the Fediverse (think Mastodon and Pleroma). Pretty much every service that Google has to offer has a much better alternative as a Nextcloud app and this is a must-have for anyone wanting to get away from Google services but still wants a traditional cloud experience (in the likes of Google Services, anyways).

+

logoNextcloud is a free and open source solution for cloud storage. However it can also do other things, such as manage your email, notes, calender, tasks, and can even connect to the Fediverse (think Mastodon and Pleroma). Pretty much every service that Google has to offer has a much better alternative as a Nextcloud app and this is a must-have for anyone wanting to get away from Google services but still wants a traditional cloud experience (in the likes of Google Services, anyways).

Instructions

First, we need to obtain a shell prompt by ssh-ing (remote machines or local machines) or just logging in (local machines). A traditional ssh might look like this if the domain you wished to ssh into is landchad.net:

diff --git a/pix/nextcloud-logo.png b/pix/nextcloud-logo.png deleted file mode 100644 index 67d6591..0000000 Binary files a/pix/nextcloud-logo.png and /dev/null differ diff --git a/pix/nextcloud.svg b/pix/nextcloud.svg new file mode 100644 index 0000000..6f2e1a3 --- /dev/null +++ b/pix/nextcloud.svg @@ -0,0 +1 @@ + \ No newline at end of file -- cgit v1.2.3 From 20b930c363d3dbc41bac0d9b9b5d251c49137d9d Mon Sep 17 00:00:00 2001 From: Luke Smith Date: Wed, 30 Jun 2021 16:56:38 -0400 Subject: autodeploy on push --- .github/workflows/upload.yml | 32 ++++++++++++++++++++++++++++++++ 1 file changed, 32 insertions(+) create mode 100644 .github/workflows/upload.yml diff --git a/.github/workflows/upload.yml b/.github/workflows/upload.yml new file mode 100644 index 0000000..a6c9260 --- /dev/null +++ b/.github/workflows/upload.yml @@ -0,0 +1,32 @@ +name: CI + +# Controls when the action will run. +on: + # Triggers the workflow on push to master (including merged PRs) + push: + branches: [ master ] + + # Allows you to run this workflow manually from the Actions tab + workflow_dispatch: + +# A workflow run is made up of one or more jobs that can run sequentially or in parallel +jobs: + # This workflow contains a single job called "build" + update: + # The type of runner that the job will run on + runs-on: ubuntu-latest + + # Steps represent a sequence of tasks that will be executed as part of the job + steps: + - name: Updating website. + uses: appleboy/ssh-action@master + with: + host: landchad.net + username: chad + key: ${{ secrets.chad_ssh }} + passphrase: ${{ secrets.chad_pass }} + port: 22 + script: | + cd landchad + git stash + git pull --force origin master -- cgit v1.2.3 From 2152b1ec45eae26fa669d9a08100357cc3af892f Mon Sep 17 00:00:00 2001 From: Marcin Chrzanowski Date: Wed, 30 Jun 2021 22:57:50 +0200 Subject: Add git hosting tutorial --- git.html | 186 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ index.html | 1 + 2 files changed, 187 insertions(+) create mode 100644 git.html diff --git a/git.html b/git.html new file mode 100644 index 0000000..ca9ba75 --- /dev/null +++ b/git.html @@ -0,0 +1,186 @@ + + + + Hosting Your Own Git Repositories – LandChad.net + + + + + + + +

Hosting Your Own Git Repositories

+ +
+

+ Once you have your own VPS or other Internet-available server, you can + start hosting your own git repositories. The goal of this tutorial is + for you to go from + +

git clone github.com/...
+ + to + +
git clone YourLandChadDomainName.xyz/...
+ + so you can cultivate your own homegrown, grass fed code, rather than + relying on a centralized proprietary service like GitHub. +

+ +

What's not included in this tutorial

+ +
    +
  • + We will not set up a web front end. Your only interaction with + these repos will be via the git command line tool. +
  • +
  • + We will not support multiple users. It's expected only you, the + server owner, have write access to these repos. +
  • +
+ +

Installing git

+ +

+ You most likely already have it installed on your server, but if not, + run + +

apt install git
+ + We don't need any additional software, git itself ships + with everything needed to host a remote repository! +

+ +

Creating bare repositories

+ +

+ For each repository you want to host, you will need to manually create + what's called a "bare" repository on your server. These hold all the + commits and any other git data needed for your repository, but without + an expanded "index" in which you can just browse all the files of a + certain commit in the file system. +

+ +

+ These repositories need to be owned by the git user, and + you should probably pick a directory where you will store them all. One + sane choice is under /srv/git/, and we will use this as the + example directory for the rest of the tutorial, but any other path will + do as well. +

+ +

Become the git user and create the directory

+ +

+ If you're logged in to your server as root and have git + installed, you can become the git user by executing + +

su git
+ + Now navigate to/create your desired directory, for example + +

+cd /srv
+mkdir git
+        
+ +

Create the repo

+ +

+ Now you can create the bare repository with + + +

git init --bare my-repo.git
+ + By convention, bare repository names end with ".git". +

+ +

+ Repeat the above command for any other repositories you want to host. +

+ +

Syncing local repositories with your server

+ +

Set up SSH login for the git user

+ +

+ You will need to be able to login remotely via ssh as the + git user we've used before. To do this, you will either + need to set up a password for the git user with + +

passwd git
+ + or copy your public SSH key from your local machine to + /home/git/.ssh/authorized_keys. +

+ +

Syncing a new repository with your server

+

+ If you've just created a new repository on your local machine, you will + need to tell git where the remote repository is to be able + to sync with it (using commands like git push or + git pull). We do this by defining a "remote" for your + repository. +

+ +

+ A remote is just a named URL remembered in your repo's configuration. So + we need a name and a URL. By convention, the "main" remote is called + "origin". The URL has the format user@host:path, where + +

    +
  • + user is git, the git user + we've already worked with before. +
  • +
  • + host is a DNS hostname pointing to your server. + Alternatively you could even use your server's raw IP address. +
  • +
  • + path is the absolute path to the repository on the + server, in our example /srv/git/my-repo.git +
  • +
+

+ +

+ So, to create a new remote, run + +

git remote add origin git@yourdomain.xyz:/srv/git/my-repo.git
+ + Now you'll be able to run git push origin master to push + your commits or git pull origin to pull from the remote. +

+ +

Syncing an existing repository

+ +

+ If you've already set up your local repository to sync with a service + like GitHub it probably already has a remote called "origin". You can + see your repo's remotes with + +

git remote -v
+ + You can follow the above instructions, substituting an arbitrary other + name other than "origin" to create a differently named remote, e.g. + +
git remote add vps git@...
+ + Now you'll be able to push/pull with git push vps master + and git pull vps, respectively. +

+ +

+ Or, to completely sever ties with your centralized git provider, first + remove the original origin with + +

git remote remove origin
+ + and then follow the instructions as above. +

+
+
LandChad.net
Because Everyone should be an Internet LandChad.
  • chad
  • RSS
  • BTC
  • XMR
  • Github
  • + + diff --git a/index.html b/index.html index a75332e..06286fa 100644 --- a/index.html +++ b/index.html @@ -58,6 +58,7 @@
    -- cgit v1.2.3 From 89c47b9236bbb7b05f9d24fbe2ad9d3239082429 Mon Sep 17 00:00:00 2001 From: Luke Smith Date: Wed, 30 Jun 2021 17:15:38 -0400 Subject: git tweaks --- git.html | 65 ++++++++++++++++++++++++++++++-------------------------------- index.html | 4 ++-- 2 files changed, 33 insertions(+), 36 deletions(-) diff --git a/git.html b/git.html index bfeb086..ad0fbae 100644 --- a/git.html +++ b/git.html @@ -9,45 +9,34 @@ -

    Hosting Your Own Git Repositories

    +

    Hosting Your Own Git Repositories

    Once you have your own VPS or other Internet-available server, you can start hosting your own git repositories. The goal of this tutorial is - for you to go from + for you to go from

    git clone github.com/...
    - to +

    to

    git clone YourLandChadDomainName.xyz/...
    - so you can cultivate your own homegrown, grass fed code, rather than +

    + so you can cultivate your own homegrown, grass-fed code, rather than relying on a centralized proprietary service like GitHub.

    -

    What's not included in this tutorial

    - -
      -
    • - We will not set up a web front end. Your only interaction with - these repos will be via the git command line tool. -
    • -
    • - We will not support multiple users. It's expected only you, the - server owner, have write access to these repos. -
    • -
    -

    Installing git

    You most likely already have it installed on your server, but if not, - run + run:

    apt install git
    +

    We don't need any additional software, git itself ships with everything needed to host a remote repository!

    @@ -75,24 +64,27 @@

    If you're logged in to your server as root and have git installed, you can become the git user by executing +

    su git
    +

    Now navigate to/create your desired directory, for example +

    -
    
    -cd /srv
    -mkdir git
    -        
    +
    cd /srv
    +mkdir git

    Create the repo

    Now you can create the bare repository with +

    git init --bare my-repo.git
    +

    By convention, bare repository names end with ".git".

    @@ -107,12 +99,12 @@ mkdir git

    You will need to be able to login remotely via ssh as the git user we've used before. To do this, you will either - need to set up a password for the git user with - -

    passwd git
    - + need to set up a password for the git user by running + passwd git, or copy your public SSH key from your local machine to /home/git/.ssh/authorized_keys. + See the SSH keys instructional for details + (just log in as git instead of root).

    Syncing a new repository with your server

    @@ -127,7 +119,8 @@ mkdir git

    A remote is just a named URL remembered in your repo's configuration. So we need a name and a URL. By convention, the "main" remote is called - "origin". The URL has the format user@host:path, where + "origin". The URL has the format user@host:path, where: +

    • @@ -135,7 +128,7 @@ mkdir git we've already worked with before.
    • - host is a DNS hostname pointing to your server. + host is your domain name. Alternatively you could even use your server's raw IP address.
    • @@ -146,10 +139,12 @@ mkdir git

      - So, to create a new remote, run + So, to create a new remote, run: +

      git remote add origin git@yourdomain.xyz:/srv/git/my-repo.git
      +

      Now you'll be able to run git push origin master to push your commits or git pull origin to pull from the remote.

      @@ -159,25 +154,27 @@ mkdir git

      If you've already set up your local repository to sync with a service like GitHub it probably already has a remote called "origin". You can - see your repo's remotes with + see your repo's remotes with: +

      git remote -v
      +

      You can follow the above instructions, substituting an arbitrary other name other than "origin" to create a differently named remote, e.g. +

      git remote add vps git@...
      +

      Now you'll be able to push/pull with git push vps master and git pull vps, respectively.

      Or, to completely sever ties with your centralized git provider, first - remove the original origin with - -

      git remote remove origin
      - + remove the original origin with: + git remote remove origin and then follow the instructions as above.

      diff --git a/index.html b/index.html index 06286fa..7c3b9ab 100644 --- a/index.html +++ b/index.html @@ -58,8 +58,8 @@ -- cgit v1.2.3 From f22f0fdc29a55bde2cabe3db26a4388b5c96ba5f Mon Sep 17 00:00:00 2001 From: Luke Smith Date: Wed, 30 Jun 2021 17:34:27 -0400 Subject: random tweaks --- git.html | 3 ++- index.html | 24 ++++++++++++++---------- nextcloud.html | 4 ++-- pix/tor.png | Bin 28118 -> 0 bytes pix/tor.svg | 41 +++++++++++++++++++++++++++++++++++++++++ style.css | 5 +++++ tor.html | 4 +++- 7 files changed, 67 insertions(+), 14 deletions(-) delete mode 100644 pix/tor.png create mode 100644 pix/tor.svg diff --git a/git.html b/git.html index ad0fbae..b5dd616 100644 --- a/git.html +++ b/git.html @@ -9,9 +9,10 @@ -

      Hosting Your Own Git Repositories

      +

      Hosting Your Own Git Repositories

      +

      Once you have your own VPS or other Internet-available server, you can start hosting your own git repositories. The goal of this tutorial is diff --git a/index.html b/index.html index 7c3b9ab..f6803ea 100644 --- a/index.html +++ b/index.html @@ -45,6 +45,20 @@

    • Get a secure HTTPS connection with Certbot.
    • +

      Excellent Extras

      + + +

      "Build your own platform!"

      + +

      Accepting Cryptocurrency Tips

      -

      Excellent Extras

      - -

      In the Works...

      diff --git a/nextcloud.html b/nextcloud.html index 40c5dba..b5b7021 100644 --- a/nextcloud.html +++ b/nextcloud.html @@ -9,10 +9,10 @@ -

      logo Setting up a Nextcloud Instance

      +

      Setting up a Nextcloud Instance

      - +logo

      What is Nextcloud?

      logoNextcloud is a free and open source solution for cloud storage. However it can also do other things, such as manage your email, notes, calender, tasks, and can even connect to the Fediverse (think Mastodon and Pleroma). Pretty much every service that Google has to offer has a much better alternative as a Nextcloud app and this is a must-have for anyone wanting to get away from Google services but still wants a traditional cloud experience (in the likes of Google Services, anyways).

      diff --git a/pix/tor.png b/pix/tor.png deleted file mode 100644 index 1bac8e2..0000000 Binary files a/pix/tor.png and /dev/null differ diff --git a/pix/tor.svg b/pix/tor.svg new file mode 100644 index 0000000..4d7eefd --- /dev/null +++ b/pix/tor.svg @@ -0,0 +1,41 @@ + + + + onion-bg + Created with Sketch. + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/style.css b/style.css index 1b6a37a..40eee45 100644 --- a/style.css +++ b/style.css @@ -69,6 +69,7 @@ pre { p img, li img, h1 img, h2 img, h3 img, h4 img { vertical-align: middle ; max-width: 1em; + max-height: 1em; border: none ; display: inline ; } @@ -79,6 +80,10 @@ img { display: block ; border: solid 5px beige ; } +.titleimg { + border: none ; + height: 150px ; +} strong { color: orange ; } diff --git a/tor.html b/tor.html index 1da2656..db4ec64 100644 --- a/tor.html +++ b/tor.html @@ -9,9 +9,11 @@ -

      Mirror Your Site Over Tor onion

      +

      Mirror Your Site Over Tor

      + + Tor logo

      Now that you have a website, why not offer it on a private alternative such as the onion network?

      -- cgit v1.2.3