Merge branch 'release/0.10.0'

master
Nathan Steel 2 years ago
commit 1627f92eb6

@ -14,9 +14,10 @@
<body>
<header>
<a href="#main" class="vh">Jump directly to main content</a>
<h1>Error 404</h1>
<input id="burger-toggle" type="checkbox"/>
<label class="burger-container" for="burger-toggle"><div class="burger"></div></label>
<label class="burger-container" for="burger-toggle"><div class="burger"></div><span class="sr">Burger menu</span></label>
<hr/>
<nav>
<a href="/">home</a>
@ -29,7 +30,7 @@
<hr/>
</header>
<main>
<main id="main">
<section>
<h2>You broke the internet</h2>
<p>This page probably doesn't exist, but if it's supposed to a developer will be looking into why it's borked.</p>

@ -24,6 +24,18 @@ semantic, accessable, and snappy.
## Release Notes
### v0.10.0
- Tweaks to blog articles, and pages
### v0.9.0
- Accessibility changes
- Change colours
- Increase font size/whitespace
- Add "skip to content" button
- Redesign burger navigation
[Patch notes](https://aney.co.uk/blog/release-0.9.0)
### v0.8.0
- Add about page

@ -14,9 +14,10 @@
<body>
<header>
<a href="#main" class="vh">Jump directly to main content</a>
<h1>About me</h1>
<input id="burger-toggle" type="checkbox"/>
<label class="burger-container" for="burger-toggle"><div class="burger"></div></label>
<label class="burger-container" for="burger-toggle"><div class="burger"></div><span class="sr">Burger menu</span></label>
<hr/>
<nav>
<a href="/">home</a>
@ -29,7 +30,7 @@
<hr/>
</header>
<main>
<main id="main">
<section>
<h2>Who are you</h2>
<p>I'm Aney, a developer, and self-hoster that enjoys art/design, automation, Unix, and those pesky Japanese cartoons. Yes, that's a straight up rip from the homepage, why re-invent the wheel right?</p>
@ -37,7 +38,7 @@
<p>I set this website up as a means to share information to educate, and help people, as well as to easily point people to my answers for common questions.</p>
<h2>What do you do?</h2>
<p>I'm currently employed as a web developer, and I enjoy it to an extent. I love solving problems, optimising sites, and creating designs/experiences, but building the guts, not so much.</p>
<p>I'm currently taking some time away from work, but looking for places I believe I'd be a good fit. I love solving problems, optimising sites, and creating designs/experiences, so I'm kind of a developer at heart.</p>
<p>Outside of work I practise minimalism, frugalism (to an extent), and work towards Financial Independance (FI/RE). I also love the idea of OneBagging, self-sufficiency, and travelling, so these are things I'm trying to work towards.</p>
<h2>What else do you do?</h2>

@ -15,9 +15,10 @@
<body>
<header>
<a href="#main" class="vh">Jump directly to main content</a>
<h1>Blog Thoughts</h1>
<input id="burger-toggle" type="checkbox"/>
<label class="burger-container" for="burger-toggle"><div class="burger"></div></label>
<label class="burger-container" for="burger-toggle"><div class="burger"></div><span class="sr">Burger menu</span></label>
<hr/>
<nav>
<a href="/">home</a>
@ -30,7 +31,7 @@
<hr/>
</header>
<main>
<main id="main">
<section>
<p class="intro">I've been having some thoughts about potential changes to the blog, including layouts, moving existing content, and such.</p>

@ -14,9 +14,10 @@
<body>
<header>
<a href="#main" class="vh">Jump directly to main content</a>
<h1>Hello, Burger menu!</h1>
<input id="burger-toggle" type="checkbox"/>
<label class="burger-container" for="burger-toggle"><div class="burger"></div></label>
<label class="burger-container" for="burger-toggle"><div class="burger"></div><span class="sr">Burger menu</span></label>
<hr/>
<nav>
<a href="/">home</a>
@ -29,7 +30,7 @@
<hr/>
</header>
<main>
<main id="main">
<section>
<p class="intro">On Friday 18th of November 2022, I released version 0.8.0 of this website. With that a large, and very noticable change occured. The addition of a burger menu.</p>

@ -15,9 +15,10 @@
<body>
<header>
<a href="#main" class="vh">Jump directly to main content</a>
<h1>Aney's Blog</h1>
<input id="burger-toggle" type="checkbox"/>
<label class="burger-container" for="burger-toggle"><div class="burger"></div></label>
<label class="burger-container" for="burger-toggle"><div class="burger"></div><span class="sr">Burger menu</span></label>
<hr/>
<nav>
<a href="/">home</a>
@ -30,12 +31,17 @@
<hr/>
</header>
<main>
<main id="main">
<section>
<p>You may be looking for my <a href="/guides/">guides</a>, or <a href="/recipes/">recipes</a>.</p>
</section>
<section>
<h2>2022</h2>
<ul>
<li><a href="/blog/release-0.9.0.html">Release 0.9.0</a> - 21/02/2023</li>
</ul>
<h2>2022</h2>
<ul>
<li><a href="/blog/burger-menu.html">Hello, Burger menu!</a> - 21/11/2022</li>

@ -15,9 +15,10 @@
<body>
<header>
<a href="#main" class="vh">Jump directly to main content</a>
<h1>I've started a blog</h1>
<input id="burger-toggle" type="checkbox"/>
<label class="burger-container" for="burger-toggle"><div class="burger"></div></label>
<label class="burger-container" for="burger-toggle"><div class="burger"></div><span class="sr">Burger menu</span></label>
<hr/>
<nav>
<a href="/">home</a>
@ -30,7 +31,7 @@
<hr/>
</header>
<main>
<main id="main">
<section>
<p>To preface, I am not an author. In fact my skill with the pen was much more proficient when I was a youngling, but alas I have returned to write.</p>
<h2>Why?</h2>

@ -15,9 +15,10 @@
<body>
<header>
<a href="#main" class="vh">Jump directly to main content</a>
<h1>My SteamDeck Arrived!</h1>
<input id="burger-toggle" type="checkbox"/>
<label class="burger-container" for="burger-toggle"><div class="burger"></div></label>
<label class="burger-container" for="burger-toggle"><div class="burger"></div><span class="sr">Burger menu</span></label>
<hr/>
<nav>
<a href="/">home</a>
@ -30,7 +31,7 @@
<hr/>
</header>
<main>
<main id="main">
<section>
<p class="intro">The title does not decieve you, my SteamDeck has in fact arrived! Well actually it arrived on the 15th of August, and I've been using it since.</p>

@ -14,9 +14,10 @@
<body>
<header>
<a href="#main" class="vh">Jump directly to main content</a>
<h1>Reducing my Homelab</h1>
<input id="burger-toggle" type="checkbox"/>
<label class="burger-container" for="burger-toggle"><div class="burger"></div></label>
<label class="burger-container" for="burger-toggle"><div class="burger"></div><span class="sr">Burger menu</span></label>
<hr/>
<nav>
<a href="/">home</a>
@ -29,7 +30,7 @@
<hr/>
</header>
<main>
<main id="main">
<section>
<p>Homelabbing, and with it self-hosting, has been a great exploration into server maintance, dabbling with new technologies, and has overall (sometimes it's been a hassle, but it comes with the territory) been an enjoyable little hobby.</p>
<p>As the title implies, however, I have reduced the amount of services, and horsepower in my homelab, at least for the time being, starting from 24/09/2022.</p>

@ -0,0 +1,128 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<meta name="description" content="">
<meta name="author" content="Nathan (Aney) Steel">
<meta name="theme-color" content="white">
<meta name="theme-color" content="green">
<link rel="stylesheet" type="text/css" href="/main.css">
<link rel="icon" type="image/png" href="/images/favicon.svg">
<title>Release 0.9.0</title>
</head>
<body>
<header>
<a href="#main" class="vh">Jump directly to main content</a>
<h1>Release 0.9.0</h1>
<input id="burger-toggle" type="checkbox"/>
<label class="burger-container" for="burger-toggle"><div class="burger"></div><span class="sr">Burger menu</span></label>
<hr/>
<nav>
<a href="/">home</a>
<a href="/about.html">about</a>
<a href="/projects.html">projects</a>
<a href="/blog/">blog</a>
<a href="/sitemap.html">misc</a>
<a href="/support.html">support</a>
</nav>
<hr/>
</header>
<main id="main">
<h2>Accessibility and Design</h2>
<p>Release 0.9.0 was a non-functionality release, as I focussed my lil' brain on Accessibility, the User Experience (UX), and the design of the website. Also this is my first publicised "patch note" so go easy, ok.</p>
<h2>Accessiblity</h2>
<ul>
<li>Fix burger menu's accessiblity issues
<ul>
<li>Add label content, but make hidden for non screen-readers.</li>
<li>Make top of burger clickable. The burger wasn't fitting to its elements container, as a negative margin was used.</li>
</ul></li>
<li>Add "Skip nav" functionality
<ul>
<li>Added a hidden button for keyboard tab-targetting that skips over the navigation, straight to the content.</li>
</ul></li>
</ul>
<h2>User Experience</h2>
<ul>
<li>Styled <code>&lt;code&gt;</code> tags
<ul>
<li>So they can be used in-line to aid with any development guides.</li>
</ul>
</li>
<li>
Make mobile nav/burger fixed
<ul>
<li>This allows the navigation to be opened/closed and visible from anywhere on the page, not just the top.</li>
</ul>
</li></ul>
<h2>Design/User Interface</h2>
<ul>
<li>Font<ul>
<li>Increase the font-size.</li>
<li>Increase the whitespace used around the site.</li>
</ul></li>
<li>Colours<ul>
<li>Altered colours to improve the visual hierarchy of the elements.</li>
</ul></li>
<li>Remove hr above navigation<ul>
<li>Due to the nav now being atop the page, this wasn't needed to seperate the content.</li>
</ul></li>
<li>Restyle mobile nav<ul>
<li>Instead of having the nav just pop-up atop the page, it now displays as a sidebar.</li>
</ul></li>
<li>Add background and border to burger<ul>
<li>As it's not fixed it needed to be visually differentiated from content.</li>
</ul></li>
<li>Scrollable table<ul>
<li>Super basic overflow-x on a parent of table so tables fit on screen, but all content can still be accessed.</li>
</ul></li>
<li>Add <code>&amp;nbsp;</code> to tags<ul>
<li>Multiple word tags were breaking, and looked pretty bad, so made them non-breakable.</li>
</ul></li>
</ul>
<h2>Dev</h2>
<ul>
<li>Colour simplification<ul>
<li>I changed the colours to all be 3 digit HEX values, saving a few bytes for the CSS.</li>
</ul></li>
<li>Add test.html page<ul>
<li>For <a href="/test.html">testing elements</a> without navigating through the site, it's public too because why not.</li>
<li>Side note: This got me thinking about writing a lil' CSS framework.</li>
</ul></li>
</ul>
<h2>Known Issues</h2>
<ul>
<li>When the burger menu is active, the page is still scrollable<ul>
<li>Easily fixed with JS (and a basic overflow), however I want to stay away from JS as much as possible. I believe the approach I took is the best-case scenario, as users at least know if they're scrolling with the sidebar styled nav.</li>
</ul></li>
<li>Burger nav animation<ul>
<li>Changes to clickable area of burger icon meant the animation needed tweaking, and it looks worse. It's not really important though.</li>
</ul></li>
<li>h1 in nav<ul>
<li>I was contemplating moving this into the main, but have yet to do so. Not sure if this is technically an issue, but will need to look into it.</li>
</ul></li>
<li>Scrollable table<ul>
<li>I'd like a better solution than this, preferably one that doesn't require an additional element.</li>
</ul></li>
</ul>
<h2>Final words</h2>
<p>This release should offer better accesibility, and a nicer look and feel all around.</p>
<p>All changes were made as semantic as possible, and the site has been kept accessible, and usable for those not running CSS/JS at all (for instance terminal browsers, and neo-luddites with everything disabled).</p>
</main>
<footer>
<hr/>
<p>Written by <a href="https://aney.co.uk" target="_blank" rel="noopener">@aney</a> with <a href="https://danluu.com/web-bloat/" target="_blank" rel="noopener">web bloat</a> in mind | <a href="https://github.com/Aney/website" target="_blank" rel="noopener">Source Code</a></p>
</footer>
</body>
</html>

@ -14,9 +14,10 @@
<body>
<header>
<a href="#main" class="vh">Jump directly to main content</a>
<h1>Aney's CV</h1>
<input id="burger-toggle" type="checkbox"/>
<label class="burger-container" for="burger-toggle"><div class="burger"></div></label>
<label class="burger-container" for="burger-toggle"><div class="burger"></div><span class="sr">Burger menu</span></label>
<hr/>
<nav>
<a href="/">home</a>
@ -29,7 +30,7 @@
<hr/>
</header>
<main>
<main id="main">
<section id="about">
<h2>About Me</h2>
<p>I'm a helpful and well-mannered person that can work both alone, and as part of a team. I have a willingness to learn, and a proficiency with post-optimisation, and problem-solving. A goal of mine is to always help people to the best of my ability, and to improve myself wherever possible.</p>
@ -41,7 +42,7 @@
<h3><a href="https://www.tjs.co.uk/" target="_blank" rel="noopener">TJS</a></h3>
<p>April 2021 - January 2023</p>
<p>Position: Developer</p>
<p>My time at TJS online is spent developing, and maintaining both the front, and back-end of the dozens of client websites, primarily using a Symfony based stack.</p>
<p>My time at TJS online was spent developing, and maintaining both the front, and back-end of the dozens of client websites, primarily using a Symfony based stack. This also entailed working with the databases, and ensuring service, and cronjob uptimes.</p>
<p>Skills: <span class="tag">PHP</span> <span class="tag">Symfony</span> <span class="tag">SCSS</span> <span class="tag">Git</span> <span class="tag">Linux</span> <span class="tag">NGINX</span> <span class="tag">SEO</span></p>
</section>
<section>
@ -49,7 +50,7 @@
<p>Time: October 2018 - March 2021</p>
<p>Position: System Developer and Technician</p>
<p>I worked as part of the DevOps team at the car financing company, Advantage Finance. Whilst there I worked full-stack on the numerous bespoke systems; adding features, working on bug fixes, and rewriting legacy code for both desktop and web applications. I also assumed the position of IT support, aiding with general AD and PC issues, along with assisting in the training of new starters.</p>
<p>Skills: <span class="tag">VB6</span> <span class="tag">VB.net</span> <span class="tag">ASP Classic</span> <span class="tag">SVN</span> <span class="tag">SQL</span> <span class="tag">Active Directory</span></p>
<p>Skills: <span class="tag">VB6</span> <span class="tag">VB.net</span> <span class="tag">ASP&nbsp;Classic</span> <span class="tag">SVN</span> <span class="tag">SQL</span> <span class="tag">Active&nbsp;Directory</span></p>
</section>
<section>
<h3><a href="https://www.oxfam.org.uk/" target="_blank" rel="noopener">Oxfam</a></h3>
@ -122,7 +123,8 @@
<section id="contact">
<h2>Contact</h2>
<p>If you like what you see, feel free to contact me via one of the methods below:</p>
<p><a href="mailto:the.nathan.steel@outlook.com">the.nathan.steel@outlook.com</a></p>
<p>Email: <a href="mailto:the.nathan.steel@outlook.com">the.nathan.steel@outlook.com</a></p>
<p>LinkedIn: <a href="https://www.linkedin.com/in/nathan-steel-a72247267/" target="_blank" rel="noopener">Nathan Steel</a></p>
</section>
</main>

@ -15,9 +15,10 @@
<body>
<header>
<a href="#main" class="vh">Jump directly to main content</a>
<h1>Aney's Hardware</h1>
<input id="burger-toggle" type="checkbox"/>
<label class="burger-container" for="burger-toggle"><div class="burger"></div></label>
<label class="burger-container" for="burger-toggle"><div class="burger"></div><span class="sr">Burger menu</span></label>
<hr/>
<nav>
<a href="/">home</a>
@ -30,7 +31,7 @@
<hr/>
</header>
<main>
<main id="main">
<section>
<h2>My everyday tech</h2>
<p>This is what I use basically every day. It's either at my desk, in my bag, or within arms reach.</p>

@ -4,7 +4,6 @@
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<meta name="description" content="To avoid using an IP, this guide will help you point your domain name at your server.">
<meta name="keywords" content="Blog, articles, news, DNS, domain, server">
<meta name="author" content="Nathan (Aney) Steel">
<meta name="theme-color" content="white">
<meta name="theme-color" content="black">
@ -15,9 +14,10 @@
<body>
<header>
<a href="#main" class="vh">Jump directly to main content</a>
<h1>Link your domain name to your server</h1>
<input id="burger-toggle" type="checkbox"/>
<label class="burger-container" for="burger-toggle"><div class="burger"></div></label>
<label class="burger-container" for="burger-toggle"><div class="burger"></div><span class="sr">Burger menu</span></label>
<hr/>
<nav>
<a href="/">home</a>
@ -30,30 +30,28 @@
<hr/>
</header>
<main>
<main id="main">
<section>
<p class="intro">To avoid needing to remember an IP, this guide will help to link your domain name to your server.</p>
<p class="intro">To avoid needing to remember an IP, this guide will help to link your domain name to your server. It assumes you have already <a href="/guides/get-a-domain-name">attained a domain name</a>.</p>
<h2>Login to your domain name registrar</h2>
<p>Login to the registrar, and select the domain name you want to point at your server.</p>
<h2>Find the section for DNS</h2>
<p>The domain name should have a section named, "DNS", "Custom DNS records", or something similar to this. Find, and open it, there should be a bunch of boxes and an option to add a new record</p>
<p>The domain name should have a section named, "DNS", "Custom DNS records", or something similar to this. Find, and open it, there should be a bunch of boxes and an option to add a new record.</p>
<h2>Add the A record</h2>
<p>There will likely be many option for adding records, but all we need is to add a singular A record</p>
<p>Find the box that allows you to "Add a new record" and input the below, changing <IP> and <DOMAIN> with your IP address, and domain name</p>
<pre><code></code></pre>
<p>Find the box that allows you to "Add a new record" and input the below, changing <IP> and <DOMAIN> with your IP address, and domain name.</p>
<p>If there are not multiple boxes, but instead a single box to input your record into, this will be what you add instead</p>
<pre><code></code></pre>
<pre><code>&lt;DOMAIN&gt; A 86400 &lt;IP&gt;</code></pre>
<h2>Wait for propagation</h2>
<p>Now there's a bit of a waiting game, as you need to wait for the new DNS record to propagate (get updated) for all nameservers. This can be anywhere from instantly to 72 hours, but typically takes an hour or two.</p>
<h3>Check your domain has propagated</h3>
<p>Pinging the domain name will let you know when the IP has propagated, as when the ping command shows your IP, you're all set</p>
<p>Pinging the domain name will let you know when the IP has propagated, as when the ping command shows your IP, you're all set.</p>
<pre><code>ping -c 3 domainname.com</code></pre>
</section>
</main>

@ -15,9 +15,10 @@
<body>
<header>
<a href="#main" class="vh">Jump directly to main content</a>
<h1>Adding PHP to NGINX server</h1>
<input id="burger-toggle" type="checkbox"/>
<label class="burger-container" for="burger-toggle"><div class="burger"></div></label>
<label class="burger-container" for="burger-toggle"><div class="burger"></div><span class="sr">Burger menu</span></label>
<hr/>
<nav>
<a href="/">home</a>
@ -30,47 +31,43 @@
<hr/>
</header>
<main>
<main id="main">
<section>
<p class="intro">PHP is one of the highest used programming languages for websites, and it allows you to add practically any functionality you'd ever want to your sites.</p>
<h2>Install</h2>
<pre><code>sudo apt install php-fpm php-mysql</code></pre>
<h2>Um, I forgor</h2>
<pre><code>sudo nano /etc/php/<VERSION>/fpm/php.ini</code></pre>
<p>Comment the cgi.fix_pathinfo line, to look like below</p>
<pre><code>#set cgi.fix_pathinfo = 0</code></pre>
<pre><code>sudo apt install php-fpm</code></pre>
<p>If you want to work with mysql, then you also need to install <strong>php-mysql</strong>.
<h2>Add to Website's NGINX conf</h2>
<p>For each website you want to use php, you'll need to edit the confige file</p>
<p>For each website you want to use php, you'll need to edit the config file.</p>
<pre><code>sudo vim /etc/nginx/sites-available/<WEBSITE></code></pre>
<p>The following code needs adding within the XXX block</p>
<p>The following code needs adding within the <strong>server</strong> block.</p>
<pre><code>location ~ \.php$ {
include snippets/fastcgi-php.conf;
fastcgi_pass unix:/run/php/php<VERSION>-fpm.sock;
fastcgi_pass unix:/run/php/php&lt;VERSION&gt;-fpm.sock;
}</pre></code>
<p>This will use nginx's fastcgi-php.conf snippet which is more secure by deafult than many other php/nginx configs because it 404s if the files doesn't exist. Read Neal Poole's<a href="https://nealpoole.com/blog/2011/04/setting-up-php-fastcgi-and-nginx-dont-trust-the-tutorials-check-your-configuration/" target="_blank" rel="noopener">Don't trust the tutorials</a> for more info.</p>
<p>This will use nginx's fastcgi-php.conf snippet which is more secure by default than many other php/nginx configs because it 404s if the requested file doesn't exist. Read Neal Poole's <q><a href="https://nealpoole.com/blog/2011/04/setting-up-php-fastcgi-and-nginx-dont-trust-the-tutorials-check-your-configuration/" target="_blank" rel="noopener">Don't trust the tutorials</a></q> for more info.</p>
<h2>Reload NGINX</h2>
<pre><code>sudo systemctl reload nginx</code></pre>
<h2>Test it works</h2>
<p>Create a PHP file e.g. <strong>filename.php</strong> in the website's directory, and add the snippet below into it</p>
<pre><code><?php phpinfo(); ?></code></pre>
<p>Create a PHP file e.g. <strong>filename.php</strong> in the website's directory, and add the snippet below into it.</p>
<pre><code>&lt;?php phpinfo(); ?&gt;</code></pre>
<p>Go to that webpage in your browser e.g. <strong>domain.co.uk/filename.php</strong>, and if php is working you should see a dump of your PHP's version, headers, etc.</p>
<h2>Make nginx use index.php as homepage/root</h2>
<p>Now we'll set nginx to load up index.php as the root of the website, if it exists. Open the site's config with an editor</p>
<p>Now we'll set nginx to load up index.php as the root of the website, if it exists. Open the site's config with an editor.</p>
<pre><code>vim /etc/nginx/sites-available/<WEBSITE></code></pre>
<p>Change the index line to read as below. This will then tell the server to load index.php, and if it doesn't exists, load index.html in it's stead</p>
<p>Change the index line to read as below. This will then tell the server to load index.php, and if it doesn't exists, load index.html in its stead.</p>
<pre><code>index index.php index.html</code></pre>
</section>
</main>
<footer>
<hr/>
<p>Written by <a href="https://aney.co.uk" target="_blank" rel="noopener">@aney</a> with <a href="https://danluu.com/web-bloat/" target="_blank" rel="noopener">web bloat</a> in mind | <a href="https://github.com/Aney/website" target="_blank" rel="noopener">Source Code</a></p>
<p>Written by <a href="https://aney.co.uk" target="_blank" rel="noopener">@aney</a> with <a href="https://danluu.com/web-bloat/" target="_blank" rel="noopener">web bloat</a> in mind | <a href="https://github.com/Aney/website" target="_blank" rel="noopener">Source Code</a>.</p>
</footer>
</body>
</html>

@ -15,9 +15,10 @@
<body>
<header>
<a href="#main" class="vh">Jump directly to main content</a>
<h1>Adminer Setup</h1>
<input id="burger-toggle" type="checkbox"/>
<label class="burger-container" for="burger-toggle"><div class="burger"></div></label>
<label class="burger-container" for="burger-toggle"><div class="burger"></div><span class="sr">Burger menu</span></label>
<hr/>
<nav>
<a href="/">home</a>
@ -30,7 +31,7 @@
<hr/>
</header>
<main>
<main id="main">
<section>
<p>Adminer is a simple front-end for your database server that can be access through the browser</p>
<h2>Pre-Requirements</h2>
@ -49,10 +50,10 @@
chmod 755 /var/www/html/adminer.php</code></pre>
<h2>Access it</h2>
<p>Head to your <WEBSITE/IP>/adminer.php, and you should load into the adminer login. Using your mysql/mariaDB credentials, you can then login, and use the GUI to manage your database(s)</p>
<p>Head to your <strong>&lt;WEBSITE/IP&gt;/adminer.php</strong>, and you should load into the adminer login. Using your mysql/mariaDB credentials, you can then login, and use the GUI to manage your database(s)</p>
<h2>Make it a directory, not a file</h2>
<p>Instead of accessing /adminer.php?<ARGUMENTS>, we can make it look like /adminer/<ARGUMENTS></p>
<p>Instead of accessing <strong>/adminer.php?&lt;ARGUMENTS&gt;</strong>, we can make it look like <strong>/adminer/&lt;ARGUMENTS&gt;</strong></p>
<pre><code>location /adminer/ {
root /var/www/html ;
try_files $uri $uri/ /adminer/index.php/$is_args$args ;
@ -61,16 +62,16 @@ chmod 755 /var/www/html/adminer.php</code></pre>
<h2>Password Protect</h2>
<p>An additional level of security, just in case. Using Htaccess, any file, or directory can be password protected</p>
<pre><code>sudo apt install apache2-utils
htpasswd -c /home/<USER>/.htpasswd admin</code></pre>
htpasswd -c /home/&lt;USER&gt;/.htpasswd admin</code></pre>
<h3>Add to location</h3>
<p>Add the location of the auth file to the adminer location block</p>
<pre><code>auth_basic "Adminer" ;
auth_basic_user_file /home/<USER>/.htpasswd ;</code></pre>
auth_basic_user_file /home/&lt;USER/&gt;.htpasswd ;</code></pre>
<p>They block should look like below</p>
<pre><code>location /adminer/ {
auth_basic "Adminer" ;
auth_basic_user_file /home/<USER>/.htpasswd ;
auth_basic_user_file /home/&lt;USER&gt;/.htpasswd ;
root /var/www/html ;
try_files $uri $uri/ /adminer/index.php/$is_args$args ;
}</code></pre>

@ -15,9 +15,10 @@
<body>
<header>
<a href="#main" class="vh">Jump directly to main content</a>
<h1>Backup MySQL/MariaDB</h1>
<input id="burger-toggle" type="checkbox"/>
<label class="burger-container" for="burger-toggle"><div class="burger"></div></label>
<label class="burger-container" for="burger-toggle"><div class="burger"></div><span class="sr">Burger menu</span></label>
<hr/>
<nav>
<a href="/">home</a>
@ -30,7 +31,7 @@
<hr/>
</header>
<main>
<main id="main">
<section>
<p>A database if a huge part of many projects, services, and servers. If something goes wrong, data is wrongly updated/deleted there could be many problems. Thankfully we can make backups to make sure our data is safe.</p>
<h2>Manual Backup of a DB</h2>

@ -15,9 +15,10 @@
<body>
<header>
<a href="#main" class="vh">Jump directly to main content</a>
<h1>Automating Backups with Cronjobs</h1>
<input id="burger-toggle" type="checkbox"/>
<label class="burger-container" for="burger-toggle"><div class="burger"></div></label>
<label class="burger-container" for="burger-toggle"><div class="burger"></div><span class="sr">Burger menu</span></label>
<hr/>
<nav>
<a href="/">home</a>
@ -30,7 +31,7 @@
<hr/>
</header>
<main>
<main id="main">
<section>
<p class="intro">Backups are wonderful things that save hours upon hours of work, and stress, so long as they're actually made in the first place!</p>
<p>Automatically taking backups allows for peace of mind that your work won't be lost forever whilst you go about your normal workflow..</p>

@ -15,9 +15,10 @@
<body>
<header>
<a href="#main" class="vh">Jump directly to main content</a>
<h1>Backup with rdiff-backup</h1>
<input id="burger-toggle" type="checkbox"/>
<label class="burger-container" for="burger-toggle"><div class="burger"></div></label>
<label class="burger-container" for="burger-toggle"><div class="burger"></div><span class="sr">Burger menu</span></label>
<hr/>
<nav>
<a href="/">home</a>
@ -30,7 +31,7 @@
<hr/>
</header>
<main>
<main id="main">
<section>
<p class="intro">Like rsync, rdiff-backup is a tool used for incremental backups. Unlike rsync however, rdiff keeps the most-recent file change, along with any previous changes, deletions, etc.</p>
<h2>Install</h2>

@ -15,9 +15,10 @@
<body>
<header>
<a href="#main" class="vh">Jump directly to main content</a>
<h1>Backup with rsync</h1>
<input id="burger-toggle" type="checkbox"/>
<label class="burger-container" for="burger-toggle"><div class="burger"></div></label>
<label class="burger-container" for="burger-toggle"><div class="burger"></div><span class="sr">Burger menu</span></label>
<hr/>
<nav>
<a href="/">home</a>
@ -30,7 +31,7 @@
<hr/>
</header>
<main>
<main id="main">
<section>
<p class="intro">Rsync is a program that allows for incremental backups. This means that rsync will not create an additional copy of the data when backing up, it will only backup changes to the files/directories, saving bandwidth and storage space.</p>
@ -58,8 +59,7 @@
<pre><code>rsync -auv $USER@$HOST:$BACKUP $RESTORE</code></pre>
<h2>Notes/Advanced</h2>
<pre><code>
-r recursive. All files/directories in the path will be backed up
<pre><code>-r recursive. All files/directories in the path will be backed up
-a archive mode. Recursive, but with file permissions, symlinks, etc retained.
-z compress
-b backups

@ -15,9 +15,10 @@
<body>
<header>
<a href="#main" class="vh">Jump directly to main content</a>
<h1>Setup SSL with Certbot</h1>
<input id="burger-toggle" type="checkbox"/>
<label class="burger-container" for="burger-toggle"><div class="burger"></div></label>
<label class="burger-container" for="burger-toggle"><div class="burger"></div><span class="sr">Burger menu</span></label>
<hr/>
<nav>
<a href="/">home</a>
@ -30,7 +31,7 @@
<hr/>
</header>
<main>
<main id="main">
<section>
<p>An SSL certificate is used to secure a domain, preventing people from seeing many things, including those entered into forms (username, password, etc.).</p>
<h2>Install Certbot</h2>

@ -4,7 +4,6 @@
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<meta name="description" content="A basic guide on how to purchase a domain name">
<meta name="keywords" content="Blog, articles, news, domain name, website">
<meta name="author" content="Nathan (Aney) Steel">
<meta name="theme-color" content="white">
<meta name="theme-color" content="black">
@ -15,9 +14,10 @@
<body>
<header>
<a href="#main" class="vh">Jump directly to main content</a>
<h1>Get a domain name</h1>
<input id="burger-toggle" type="checkbox"/>
<label class="burger-container" for="burger-toggle"><div class="burger"></div></label>
<label class="burger-container" for="burger-toggle"><div class="burger"></div><span class="sr">Burger menu</span></label>
<hr/>
<nav>
<a href="/">home</a>
@ -30,21 +30,21 @@
<hr/>
</header>
<main>
<main id="main">
<section>
<p>A domain name, as many will know is what people typing into their browser, e.g. google.com, facebook.com, etc.</p>
<p>The primary use for these is to have a memorable thing for users, instead of needing to type the IP address of the server</p>
<p>A domain name, as many will know is what you type into a browser to access a website. Without a domain name, everyone accessing your server/website would need to be entering the IP address.</p>
<h2>Choose a registrar</h2>
<p>First thing is to choose a registrar (who you are leasing the domain from). You can search for "domain name registrars" and find who is cheapest. So long as they handle DNS (which all I've used do) you're good.</p>
<p>First thing is to choose a registrar (who you are leasing the domain from). You can search for "domain name registrars" and find who is cheapest. So long as they handle DNS (which most do) you're good.</p>
<p>I'm currently using <a href="https://tsohost.com" target="_blank" rel="noopener" >tsohost.com</a>, as they're pretty cheap, and besides a few little issues, it works for me.</p>
<h2>Choose a domain name</h2>
<p>On the registrar's website there will be a section to purchase a domain. Upon clicking this you'll likely be greeted with a searchbar, search for whatever domain you'd like here, and they'll let you know if it's available, and what similar domains there are</p>
<p>On the registrar's website there will be a section to purchase a domain. Upon clicking this you'll likely be greeted with a searchbar, search for whatever domain you'd like here, and they'll let you know if it's available, and what similar domains there are.</p>
<p>Select the domain(s) you wish, and add it/them to your cart.</p>
<h2>Purchase your domain name</h2>
<p>Simply checkout, and make your way through the process</p>
<p>Simply checkout, and make your way through the process. Tada, you now have a domain name!</p>
<p>Next up you'll need to <a href="/guides/add-domain-to-server">link your server and domain name</a> with DNS.</p>
</section>
</main>

@ -15,9 +15,10 @@
<body>
<header>
<a href="#main" class="vh">Jump directly to main content</a>
<h1>Aney' guide to server hosting</h1>
<input id="burger-toggle" type="checkbox"/>
<label class="burger-container" for="burger-toggle"><div class="burger"></div></label>
<label class="burger-container" for="burger-toggle"><div class="burger"></div><span class="sr">Burger menu</span></label>
<hr/>
<nav>
<a href="/">home</a>
@ -30,31 +31,39 @@
<hr/>
</header>
<main>
<main id="main">
<section>
<p class="intro">If you want to start getting into server hosting, system administration, or just want to get a basic minecraft/web server up for you and your friends, then welcome. We all start somewhere, and I would love if I could get your foot in the door.</p>
<h2>Notice</h2>
<p>This is heavily a WIP, so I'll be adding to this guide whenever I get time, and will update it's readibility, and correct/add anything missing once it's 'complete'. If I didn't put it up in an unfinished state, it would never go live, so bear with.</p>
<h2>Basic Server setup</h2>
<ul>
<li>Get a server and <a href="/guides/server-install-debian.html">Install Debian</a></li>
<li><a href="/guides/initial-server-setup.html">Basic Debian Server setup (with some security)</a></li>
<li>TODO:<a href="/guides/get-a-domain-name.html">Get a domain name</a></li>
<li><a href="/guides/get-a-domain-name.html">Get a domain name</a></li>
<li><a href="/guides/add-domain-to-server.html">Connect your server and domain name</a></li>
<li>TODO:Port Forwarding (home server)</li>
</ul>
<p>Now you officially own, and have setup a server. Currently all you can do is SSH into it though, so let's get some services on there</p>
<h2>Virtualisation</h2>
<p>Virtual machines allow you to use your server as multiple servers at once, with different operating systems, services, files, etc. If you're self-hosting this is a great way to separate concerns, having one system for each distinct task.</p>
<ul>
<li><a href="/guides/setup-qemu-kvm.html">Setup Qemu/KVM</a></li>
<li><a href="/guides/setup-kvm-bridge.html">Setup a bridged adapter</a></li>
<li>TODO:<a href="/guides/install-kvm-virtual-machine.html">Install a virtual machine</a></li>
<li>TODO:<a href="/guides/kvm-optimisation.html">Optimisate KVM Virtual Machines</a></li>
<li>TODO:<a href="/guides/virsh-cheatsheet.html">Virsh cheatsheet</a></li>
<li><a href="/guides/vm-seperation-of-concerns">Example of Separation of Concerns (SoC)</a></li>
</ul>
<h2>Nginx Webserver</h2>
<p>A great first service for any server is a website, even if it's just a little page to let people know you own the server/domain name</p>
<ul>
<li><a href="/guides/nginx-install.html">Install nginx</a></li>
<li><a href="/guides/setup-nginx-website.html">Setup an nginx website</a></li>
<li><a href="/guides/certbot-ssl.html">Add an SSL certificate w/Certbot</a></li>
<li><a href="/guides/nginx-web-optimisation.html">TODO: Nginx web optimisation</a></li>
<li>TODO:<a href="/guides/add-php-to-nginx.html">(Optional) Add PHP to your webserver</a></li>
<li>TODO:Guide to front-end web development</li>
<li>TODO:<a href="/guides/nginx-web-optimisation.html">Nginx web optimisation</a></li>
<li><a href="/guides/add-php-to-nginx.html">(Optional) Add PHP to your webserver</a></li>
</ul>
<h2>MariaDB Database</h2>
@ -62,63 +71,33 @@
<ul>
<li><a href="/guides/install-mysql-mariadb.html">Install mariaDB</a></li>
<li>TODO:<a href="/guides/sql-cheatsheet.html">SQL cheatsheet</a></li>
<li>TODO:<a href="/guides/adminer-setup.html">(Optional) Adminer setup</a></li>
<li><a href="/guides/adminer-setup.html">(Optional) Adminer setup</a></li>
<li>TODO:<a href="/guides/backup-mysql-mariadb.html">(Optional) Backup databases</a></li>
</ul>
<h2>Backup your server!</h2>
<p>Backups are super useful. If something breaks, or gets accidentally deleted you can always use a backup to get it back</p>
<ul>
<li>TODO:<a href="/guides/backup-with-rsync.html">Backup with rsync</a></li>
<li><a href="/guides/backup-with-rsync.html">Backup with rsync</a></li>
<li>TODO:<a href="/guides/backup-with-rdiff.html">Backup with rdiff-backup</a></li>
<li>TODO:<a href="/guides/backup-with-cron.html">Setup backup cronjob(s)</a></li>
</ul>
<h2>Run virtual machines</h2>
<p>Virtual machines allow you to use your server as multiple servers at once, with different operating systems, services, files, etc. If you're self-hosting this is a great way to separate concerns, having one system for each distinct task.</p>
<ul>
<li>TODO:<a href="/guides/setup-qemu-kvm.html">Setup Qemu/KVM</a></li>
<li>TODO:<a href="/guides/setup-kvm-bridge.html">Setup a bridged adapter</a></li>
<li>TODO:<a href="/guides/install-kvm-virtual-machine.html">Install a virtual machine</a></li>
<li>TODO:<a href="/guides/virsh-cheatsheet.html">Virsh cheatsheet</a></li>
<li>TODO:<a href="/guides/vm-seperation-of-concerns">Example of Separation of Concerns (SoC)</a></li>
<li><a href="/guides/backup-with-cron.html">Setup backup cronjob(s)</a></li>
</ul>
<h2>Additional services/potential guides</h2>
<p>Unless there is an anchor, these are all "TODO", and may just be omitted from this list</p>
<h3>Useful tidbits</h3>
<ul>
<li><a href="/guides/nginx-proxy.html">Proxy services with NGINX proxy pass</a></li>
<li><a href="/guides/password-protect-webpage.html">Password protect webpages</a></li>
<li>TODO:<a href="/guides/nginx-proxy.html">Proxy services with NGINX proxy pass</a></li>
<li>TODO:<a href="/guides/password-protect-webpage.html">Password protect webpages</a></li>
</ul>
<h3>Additional Services</h3>
<ul>
<li><a href="/guides/setup-git-server.html">git</a></li>
<li>samba</li>
<li>Open Media Vault</li>
<li>umami</li>
<li>uptime kuma</li>
<li>Uptime Kuma</li>
<li>torrentbox</li>
<li>jellyfin</li>
<li>Jellyfin</li>
<li>VPN</li>
<li>mailserver</li>
<li>Host client websites</li>
</ul>
<h3>Game Servers</h3>
<ul>
<li>minecraft</li>
<li>terraria</li>
<li>factorio</li>
</ul>
<h3>Additional guides</h3>
<p>These are some guides for specific use-cases, that will aid with setting up
<ul>
<li>Basic Homeserver for a web developer/designer</li>
</ul>
</section>

@ -14,9 +14,10 @@
<body>
<header>
<a href="#main" class="vh">Jump directly to main content</a>
<h1>Aney's Guides</h1>
<input id="burger-toggle" type="checkbox"/>
<label class="burger-container" for="burger-toggle"><div class="burger"></div></label>
<label class="burger-container" for="burger-toggle"><div class="burger"></div><span class="sr">Burger menu</span></label>
<hr/>
<nav>
<a href="/">home</a>
@ -29,7 +30,7 @@
<hr/>
</header>
<main>
<main id="main">
<section>
<h2>Pinned</h2>

@ -15,9 +15,10 @@
<body>
<header>
<a href="#main" class="vh">Jump directly to main content</a>
<h1>Initial Server Setup</h1>
<input id="burger-toggle" type="checkbox"/>
<label class="burger-container" for="burger-toggle"><div class="burger"></div></label>
<label class="burger-container" for="burger-toggle"><div class="burger"></div><span class="sr">Burger menu</span></label>
<hr/>
<nav>
<a href="/">home</a>
@ -30,15 +31,21 @@
<hr/>
</header>
<main>
<main id="main">
<section>
<p>This section assumes you have a fresh Debian 11 install on a server (either physical or VPS)</p>
<p>It will cover installing the essentials for access, and basic security so you don't need to worry in the future. This section may seem a little daunting for a first-time linux user, but most of it is copy/paste, hopefully with enough description to understand what is being done. Just remember not to copy the $/root$ they're there to show what user/directory we're in. </p>
<p>This section assumes you have a fresh Debian install on a server (either physical or VPS)</p>
<p>It will cover installing the essentials for access, and basic security so you don't need to worry in the future. This section may seem a little daunting for a first-time linux user, but most of it is copy/paste, hopefully with enough description to understand what is being done.</p>
</section>
<section>
<p>This first section will be done on the physical PC, or on the VPS via their website, or SSH'd as root if that's the option given.</p>
<h2>Login</h2>
<p>Perhaps silly, but login as your user with root priveleges or the root user if a user isn't currently setup.</p>
<p>For the first few steps it's written as if you're logged in as root, if you followed my <a href="/guides/server-install-debian.html" target="_blank" rel="noopener">install guide</a>, this won't have a password, so we'll change user with the following command</p>
<pre><code>sudo su -</code></pre>
<p>Now just follow along with the remainder of the guide. If you wish not to change users you could also just add sudo in-front of the commands to run them as root that way.</p>
<h2>Update the OS</h2>
<p>Even with a fresh install of Debian from the latest ISO, there may be some updates you're missing, and it's a good idea to have these, especially in case they're security updates.</p>
@ -47,13 +54,14 @@
<h2>Install essential packages</h2>
<p>These are packages that are needed for accessing, and controlling the server</p>
<pre><code>apt install sudo ssh</code></pre>
<pre><code>apt install sudo ssh -y</code></pre>
<h3>Some useful packages too</h3>
<pre><code>apt install vim htop wget curl tmux</code></pre>
<pre><code>apt install vim htop wget curl tmux -y</code></pre>
<h2>Add a user, and give super user privilleges</h2>
<p>You want to avoid using root as much as possible in regular use, so a new user for yourself is a must</p>
<p>This can be ignored if my guide was followed, or you already have a user setup. Some VPS just have root however, so I believe this should be included.</p>
<p>The reason for a new account instead of using root, basically comes down to security. If you want multiple people on the server too, it's best to have a unique account for each.</p>
<pre><code>adduser $USERNAME$
usermod -aG sudo $USERNAME$</code></pre>
@ -61,20 +69,19 @@ usermod -aG sudo $USERNAME$</code></pre>
<p>*replace $USERNAME$ with the user you want to create, e.g. nathan</p>
<h2>(Local server) Set static IP</h2>
<p>If the server is a physical PC in your home you will need to set a static IP, otherwise your router could assign a differnent IP on reboot, and this would mess with port forwarding, and internal DNS.</p>
<p><a href="#">Set static IP for local server</a></p>
<h3>Port forwarding for local server</h3>
<p>If you've set the static IP for your local server, you'll also have an additional step when making public (internet served) services, as unlike a VPS your ISP will likely have all outbound ports disabled by default</p>
<p><a href="#">Port forward your local server</a></p>
<p>If the server is a physical PC in your home you will need to set a static IP, otherwise your router could assign a different IP on reboot, and this would mess with port forwarding, and internal DNS.</p>
<p>If you're using a VPS, this step can be ignored.</p>
<p><a href="#" target="_blank" rel="noopener">Set static IP for local server</a></p>
<h2>Secure ssh</h2>
<p>Although this is optional, I recommend it, as SSH (secure shell) will be the primary means of access to the server.</p>
<p>Although this is optional, I recommend it, as SSH (secure shell) will likely be the primary means of access to the server. You don't want to be next to it whenever you've got a change to make.</p>
<p>Open the following file with your editor of choice, I use vim.</p>
<pre><code>vim /etc/ssh/sshd_config</code></pre>
<p>Within the editor you will need to search for <strong>PermitRootLogin</strong> and set it to <strong>no</strong>, this prevents ssh as root</p>
<p>Search for <strong>Port</strong> and set it to a different port to 22, a port over 1024 prevents basic nmap scans, and therefor a lot of bruteforcing, so let's go with 2020 so it's easy to remember</p>
<p>Below the <strong>Port</strong> line, add a new line with <strong>Protocol 2</strong> this enables ssh2, which is more secure</p>
<p>Search for <strong>Port</strong> and set it to a different port than 22, a port over 1024 prevents basic nmap scans, and therefor a lot of bruteforcing, so let's go with 2020 as it's easy to remember</p>
<p>Below the <strong>Port</strong> line, add a new line and write <strong>Protocol 2</strong> this enables ssh2, which is more secure than the standard ssh protocol.</p>
<p>(Optional) Comment/Add a <strong>#</strong> to the beginning of the <strong>passwordlogin</strong> line. This will prevent sshing to the server from any PC that doesn't have it's SSH key on the server already. I recommend only doing this if your sshkeys are on the server, or you're comfortable adding them.</p>
<pre><code>systemctl reload sshd</code></pre>
@ -83,52 +90,73 @@ usermod -aG sudo $USERNAME$</code></pre>
<h2>Setup UFW</h2>
<p>UFW (Uncomplicated Firewall) is a simple to use firewall, that can be used to easily open/close ports on your server.</p>
<p>We'll install ufw, deny access inwards to all ports, but allow our server to access any ports outwards. We will then manually allow inwards traffic to the SSH port we set, in this case 2020</p>
<p>We'll install ufw, deny access inwards to all ports, but allow our server to access any ports outwards. We will then manually allow traffic to the SSH port we set, in this case 2020.</p>
<pre><code>apt install ufw</code></pre>
<pre><code>ufw default deny incoming &amp;&amp;
ufw default allow outgoing &amp;&amp;
ufw default allow 2020 &amp;&amp;
ufw allow 2020 &amp;&amp;
ufw enable</code></pre>
<p>If there are any other ports that need to be opened in the future this can be done with:</p>
<pre><code>ufw allow $PORT</code></pre>
<p>or</p>
<pre><code>sudo ufw allow $PORT</code></pre>
<p>Then enable it, <strong>making sure you've allowed ssh first</strong></p>
<pre><code>sudo ufw enable</code></pre>
<h2>Set hostname</h2>
<p>Setting the name for a server is an important step, but the name doesn't need to be serious</p>
<p>Setting the name for a server is not an important step, but it's nice to have each server easily identifable.</p>
<p>Simply change the hostname within the two files below. Ensure they share the same name between files.</p>
<pre><code>vim /etc/hosts</code></pre>
<p>and</p>
<pre><code>vim /etc/hostname</code></pre>
<p>Within both of these files the hostname should be changed to the same thing</p>
</section>
<section>
<p>This next section can be done via a terminal, or an SSH client e.g. PuTTY for Windowss. For the sake of the guide, this assume you're using a Unix terminal</p>
<h2>Create an SSH key</h2>
<p>We'll create an ed25519 ssh-key, as it's more secure, and performant than the defaultrsa</p>
<pre><code>ssh-keygen -t ed25519</code></pre>
<hr>
<p>This next section is to be done via a terminal, or an SSH client e.g. PuTTY for Windows. This part of the guide is written for a Unix terminal.</p>
<h2>SSH into the server</h2>
<p>This is a two part section, and I recommend using this every time you SSH into a server from a new PC</p>
<p>This is a two part section, and I recommend using this every time you SSH into a server from a new PC.</p>
<pre><code>ssh $USER$@$HOST$ -p 2020</code></pre>
<p>This will likely display a message asking to verify the key for the server. This is to prevent man-in-the-middle attacks, so I reccommend verifying this whenever asked.</p>
<p>To check the key for the server, you need to run this command on the server.</p>
<p>This will likely display a message asking to verify the key for the server. This is to prevent man-in-the-middle attacks, so I recommend verifying this whenever asked.</p>
<h3>Verify SSH</h3>
<p>To verify, you'll need to run the following command on the server.</p>
<pre><code>ssh-keygen -l -f /etc/ssh/ssh_host_$KEY$_key.pub</code></pre>
<pre><code>ssh-keygen -l -f /etc/ssh/ssh_host_ed25519_key.pub</code></pre>
<p>Then if the key the server shows matches that on your PC's SSH prompt, type <strong>yes</strong> and hit enter from your PC.</p>
<h2>SSH without a password</h2>
<p>To be more secure, and to SSH faster we can setup an SSH key, and use that for user authentication.</p>
<h3>Create an SSH key</h3>
<p>We'll create an ed25519 ssh-key, as it's more secure, and performant than the default rsa.</p>
<pre><code>ssh-keygen -t ed25519</code></pre>
<p>Replace $KEY$ with the key the message is asking about (e.g. ecdsa, rsa, ed25519). Then if key the server shows matches that on your PC you are SSHing from, type <strong>yes</strong> and hit enter</p>
<h3>Copy the SSH key onto the server</h3>
<p>From the terminal there's a nifty command to copy ssh keys to a server.</p>
<pre><code>ssh-copy-id -p 2020 -i ~/.ssh/id_ed25519 USER@HOST</code></pre>
<h2>TODO:(Optional) Fail2Ban</h2>
<p>Alternatively you can add the key to the server manually. This is recommended, especially when adding other users.</p>
<p>First on your PC you need to run the following, and take note of the output.</p>
<pre><code>cat ~/.ssh/id_ed25519.pub</pre></code>
<p>Then on the server, open the following file, and add the output to a new line.</p>
<pre><code>vim /home/USER/.ssh/authorized_keys</code></pre>
<h3>SSH again</h3>
<p>Now simply run the same ssh command as before, and you shouldn't get a password prompt.</p>
<pre><code>ssh $USER$@$HOST$ -p 2020</code></pre>
<h2>(Optional) Fail2Ban</h2>
<p>Fail2ban is used to periodically check server logs, and bans IPs that appear to be trying to brute-force into your server. It's only "required" for servers exposed to the internet.</p>
<pre><code>apt install fail2ban -y</code></pre>
<pre><code>systemctl enable fail2ban</code></pre>
<p>There's a lot of options for fail2ban, this just installs it. For a little more detail checkout <a href="https://wiki.crowncloud.net/?How_To_Protect_SSH_With_Fail2Ban_on_Debian_12" target="_blank" rel="noopener">Crownclouds fail2ban guide</a>.</p>
<h2>TODO:(Optional) Unattended Upgrades</h2>
<p>Updates to a server typically want to be done by a human in case things go wrong, but smaller updates can be set to be done automatically</p>
<p>Updates to a server typically want to be done by a human in case things go wrong, but smaller updates can be set to be done automatically.</p>
<pre><code>apt install unattended-upgrades</pre></code>
<p>The above downlads, and starts unattended-upgrades with some good defaults, but if you want a some more details check cyberciti's<a href="https://www.cyberciti.biz/faq/how-to-keep-debian-linux-patched-with-latest-security-updates-automatically/" target="_blank" rel="noopener">unattended upgrades guide</a>.</p>
<h2>(Optional) Setup User preferences</h2>
<p>These are a few things I personally like to have on a basic server. If you have your own preferences, dotfiles, or intend to use oh-my-zsh fell free to skip over this.</p>
@ -141,27 +169,12 @@ ufw enable</code></pre>
<pre><code>set -o vi</code></pre>
<h3>Aliases</h3>
<p>Instead of typing out long commands you can alias them, and type a shorthand version.I've written an <a href="#">article about aliases</a> that explains setting up, and aliases I use. Below are some essentials for those that don't want to jump to another article.</p>
<p>Instead of typing out long commands you can alias them, and type a shorthand version. I've written an <a href="#">article about aliases</a> that explains setting up, and aliases I use. Below are some essentials for those that don't want to jump to another article.</p>
<pre><code>alias ll="ls -lhtr"
alias df="df -h"
alias ta="tmux attach || tmux new"
alias ipe="curl ifconfig.co"</code></pre>
<h3>Ctrl-L clear-screen</h3>
<p>Sometimes a new system doesn't have this by default, and it's probably the thing I use most after ls.</p>
<p>Add, or create an .inputrc file</p>
<pre><code>vim ~/.inputrc</code></pre>
<p>Add the following line to the file</p>
<pre><code>"C-l": clear-screen</code></pre>
<h3>BashRC PS1</h3>
<p>This will make your terminal look a little nicer, and display a directory path, user, and hostname. A ridiculously useful feature if you're managing multiple servers, or virtual machines</p>
<p>This is also in the .bashrc file, so open that up</p>
<pre><code>vim ~/.bashrc</code></pre>
<p>Then add the following to the bottom of the file</p>
<pre><code>export PS1="\[\e[01;33m\]\u\[\e[0m\]\[\e[00;37m\]@\[\e[0m\]\[\e[01;36m\]\h\[\e[0m\]\[\e[00;37m\] \t \[\e[0m\]\[\e[01;35m\]\w\[\e[0m\]\[\e[01;37m\] \[\e[0m\]\n$ "</code></pre>
<p>If you want to customise your terminal, you can do so with <a href="https://bashrcgenerator.com/" target="_blank" rel="noopener">.bashrc PS1 generator</a>.
<h2>Reads shouldn't write!</h2>
<p>Another personal opinion, and change is to enable noatime, and nodiratime. Be careful with this change! And ignore if you followed my Debian install guide, as they're already enabled.</p>
<p>Basically without these, when a file is opened (read) on your filesystem, a write is invoked to update the time it was opened, which causes unwanted writes, and CPU cycles.</p>

@ -15,9 +15,10 @@
<body>
<header>
<a href="#main" class="vh">Jump directly to main content</a>
<h1>Template for Blog</h1>
<input id="burger-toggle" type="checkbox"/>
<label class="burger-container" for="burger-toggle"><div class="burger"></div></label>
<label class="burger-container" for="burger-toggle"><div class="burger"></div><span class="sr">Burger menu</span></label>
<hr/>
<nav>
<a href="/">home</a>
@ -30,7 +31,7 @@
<hr/>
</header>
<main>
<main id="main">
<section>
<p class="intro">This is an intro, you gotta believe me</p>
<h2>Heading</h2>
@ -39,6 +40,20 @@
<h2>Install with virt (CLI)</h2>
<h2>Install with virt-manager (GUI)</h2>
By default virsh lists vms belonging to user
virsh --connect qemu:///system list --all
The above run as root shows all vms
For virtmanager, etc to controll vms from an remote host
It needs ssh-key shared
If a different port, then use virt-manager -c 'qemu+ssh://myuser@192.168.1.139:2222/system?keyfile=id_rsa'
e.g.
virt-manager -c 'qemu+ssh://nathan@aney.co.uk:2020/system?keyfile=id_rsa'
</section>
</main>

@ -15,9 +15,10 @@
<body>
<header>
<a href="#main" class="vh">Jump directly to main content</a>
<h1>MySQL (actually MariaDB) Setup Guide</h1>
<input id="burger-toggle" type="checkbox"/>
<label class="burger-container" for="burger-toggle"><div class="burger"></div></label>
<label class="burger-container" for="burger-toggle"><div class="burger"></div><span class="sr">Burger menu</span></label>
<hr/>
<nav>
<a href="/">home</a>
@ -30,7 +31,7 @@
<hr/>
</header>
<main>
<main id="main">
<section>
<p>MySQL is a well known free, open-source relational database service, and it's great. MariaDB is just MySQL (a fork of it), but better.</p>
@ -39,15 +40,20 @@
<h2>Secure Install/Setup</h2>
<pre><code>sudo mysql_secure_installation</code></pre>
<p>Run the above command, and follow the instructions, if you don't want to then follow mine.</p>
<p>Press enter for the current password, and again when asked if you want to set a root password. Enter the password, then press enter for everything else.
<h2>Create Admin user</h2>
<pre><code>sudo mysql</code></pre>
<pre><code>GRANT ALL ON *.* TO 'admin'@'localhost' IDENTIFIED BY 'password' WITH GRANT OPTION;</code></pre>
<pre><code>GRANT ALL ON *.* TO 'admin'@'localhost' IDENTIFIED BY '&lt;DESIRED_PASSWORD&gt;' WITH GRANT OPTION;</code></pre>
<pre><code>FLUSH PRIVILEGES;</code></pre>
<pre><code>exit;</code></pre>
<h2>Test it works</h2>
<p>Simply try logging in as the admin account.</p>
<pre><code>mysql -u admin -p</code></pre>
<p>It should ask for a password, so enter your <strong>DESIRED_PASSWORD</strong>, and if you get mysql access, it's successful.</p>
<h2>(Optional) Make it easier to access on command line</h2>
<p>If you're working with a terminal, when calling <code>mysql</code> you'll need to enter a password each time. You can store the passwordwith a special .cnf file, making it faster to get into writing SQL.</p>
@ -55,9 +61,9 @@
<pre><code>vim ~/.my.cnf</code></pre>
<p>Add the following, with your credentials</p>
<pre><code>[mysql]
user=<USERNAME>
password=<PASSWORD></code></pre>
<p>The above can be used for mysqldump, mysqladmin, and others too, by replacing the <code>[mysql]</code> block</p>
user=&lt;USERNAME&gt;
password=&lt;PASSWORD&gt;</code></pre>
<p>The above can be used for mysqldump, mysqladmin, and others too, by replacing the <code>[mysql]</code> block, with the related. e.g. <code>[mysqldump]</code>.</p>
</section>
</main>

@ -0,0 +1,73 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<meta name="description" content="">
<meta name="author" content="Nathan (Aney) Steel">
<meta name="theme-color" content="white">
<meta name="theme-color" content="black">
<link rel="stylesheet" type="text/css" href="/main.css">
<link rel="icon" type="image/png" href="/images/favicon.svg">
<title>KVM Optimisation</title>
</head>
<body>
<header>
<a href="#main" class="vh">Jump directly to main content</a>
<h1>KVM Optimisation</h1>
<input id="burger-toggle" type="checkbox"/>
<label class="burger-container" for="burger-toggle"><div class="burger"></div><span class="sr">Burger menu</span></label>
<hr/>
<nav>
<a href="/">home</a>
<a href="/about.html">about</a>
<a href="/projects.html">projects</a>
<a href="/blog/">blog</a>
<a href="/sitemap.html">misc</a>
<a href="/support.html">support</a>
</nav>
<hr/>
</header>
<main id="main">
<section>
<h2>KVM Optimisations</h2>
transmit queue
virsh domiflist <vm>
# this is then the txqueuelen change below ???
# changing to 4096
ifconfig <interface_name> txqueuelen <length>
txqueuelen (iwbcman comment)
defaults to 1000, apparently 200 is good
ip link set eth0 txqueuelen 200
vim /etc/network/interfaces
add
post-up /sbin/ip link set eth0 txqueuelen 200
to the end
If virtual hdd is slow can try
Cache mode: none (not default!)
I/O mode: native<Paste>
https://unix.stackexchange.com/a/48584
non caching on dirves?
https://blog.jdpfu.com/2012/07/30/improving-kvm-performance
://documentation.suse.com/smart/linux/html/concept-virtual-disk-cache-modes/concept-virtual-disk-cache-modes.html#:~:text=A%20disk%20cache%20is%20a,example%2C%20by%20setting%20its%20type.
On VM turning cache off essentially acts like accessing the drive itself. No exactly a passthrough, but decent enough
http://www.linux-kvm.org/page/Tuning_KVM
</section>
</main>
<footer>
<hr/>
<p>Written by <a href="https://aney.co.uk" target="_blank" rel="noopener">@aney</a> with <a href="https://danluu.com/web-bloat/" target="_blank" rel="noopener">web bloat</a> in mind | <a href="https://github.com/Aney/website" target="_blank" rel="noopener">Source Code</a></p>
</footer>
</body>
</html>

@ -15,9 +15,10 @@
<body>
<header>
<a href="#main" class="vh">Jump directly to main content</a>
<h1>How to install an NGINX web server</h1>
<input id="burger-toggle" type="checkbox"/>
<label class="burger-container" for="burger-toggle"><div class="burger"></div></label>
<label class="burger-container" for="burger-toggle"><div class="burger"></div><span class="sr">Burger menu</span></label>
<hr/>
<nav>
<a href="/">home</a>
@ -30,7 +31,7 @@
<hr/>
</header>
<main>
<main id="main">
<section>
<p>NGINX (engine X) is one of the top webservers. It has relatively easy learning curve, is fast, and <a href="">secure</a>. It's a great step into web hosting, and a good first service for many servers.</p>
<h2>Install</h2>

@ -15,9 +15,10 @@
<body>
<header>
<a href="#main" class="vh">Jump directly to main content</a>
<h1>Template for Blog</h1>
<input id="burger-toggle" type="checkbox"/>
<label class="burger-container" for="burger-toggle"><div class="burger"></div></label>
<label class="burger-container" for="burger-toggle"><div class="burger"></div><span class="sr">Burger menu</span></label>
<hr/>
<nav>
<a href="/">home</a>
@ -30,7 +31,7 @@
<hr/>
</header>
<main>
<main id="main">
<section>
<p class="intro">This is an intro, you gotta believe me</p>
<h2>Install</h2>

@ -15,9 +15,10 @@
<body>
<header>
<a href="#main" class="vh">Jump directly to main content</a>
<h1>NGINX web optimisation</h1>
<input id="burger-toggle" type="checkbox"/>
<label class="burger-container" for="burger-toggle"><div class="burger"></div></label>
<label class="burger-container" for="burger-toggle"><div class="burger"></div><span class="sr">Burger menu</span></label>
<hr/>
<nav>
<a href="/">home</a>
@ -30,7 +31,7 @@
<hr/>
</header>
<main>
<main id="main">
<section>
<p>Optimisations for the nginx configs will increase both the security, and performance of your website
<h2>TODO: Headers</h2>

@ -15,9 +15,10 @@
<body>
<header>
<a href="#main" class="vh">Jump directly to main content</a>
<h1>Template for Blog</h1>
<input id="burger-toggle" type="checkbox"/>
<label class="burger-container" for="burger-toggle"><div class="burger"></div></label>
<label class="burger-container" for="burger-toggle"><div class="burger"></div><span class="sr">Burger menu</span></label>
<hr/>
<nav>
<a href="/">home</a>
@ -30,7 +31,7 @@
<hr/>
</header>
<main>
<main id="main">
<section>
<p class="intro">This is an intro, you gotta believe me</p>
<h2>Heading</h2>

@ -15,9 +15,10 @@
<body>
<header>
<a href="#main" class="vh">Jump directly to main content</a>
<h1>Debian Install Guide for Servers</h1>
<input id="burger-toggle" type="checkbox"/>
<label class="burger-container" for="burger-toggle"><div class="burger"></div></label>
<label class="burger-container" for="burger-toggle"><div class="burger"></div><span class="sr">Burger menu</span></label>
<hr/>
<nav>
<a href="/">home</a>
@ -30,7 +31,7 @@
<hr/>
</header>
<main>
<main id="main">
<section>
<p class="intro">Debian is a fantastic linux distrubution that works, and rarely causes issues. Due to this, it is a common canditate for a server OS, and is what this guide will walkthrough how to install on a PC.</p>
<h2>Assumptions</h2>
@ -42,8 +43,8 @@
<h2>Download and Burn the ISO</h2>
<p>First thing is to get the install media setup. If you know how to burn an ISO, go ahead and get that done, I'll wait for you in the next section. If not follow below.</p>
<p>Download the latest debian ISO from the <a>debian website</a>, at the time of writing it's <a>this release</a>, but get it from their page.</p>
<p>Download <a>Balena Etcher</a> for your device (Windows, MacOS, Linux), and install it</p>
<p>Download the latest debian ISO from the <a href="https://www.debian.org/distrib/" target="_blank" rel="noopener">debian distrubution page</a>, at the time of writing it's <a href="https://cdimage.debian.org/debian-cd/current/amd64/iso-cd/debian-12.2.0-amd64-netinst.iso" target="_blank" rel="noopener">this release</a> (assuming you're installing on a 64bit PC), but get it from their page.</p>
<p>Download <a href="https://etcher.balena.io/" target="_blank" rel="noopener">Balena Etcher</a> for your device (Windows, MacOS, Linux), and install it</p>
<p>Then open Etcher (with an empty USB plugged in), select the USB, and the downloaded ISO image, then hit run.</p>
<p>When finished remove the USB and plug it into the PC you want to install Debian to</p>
@ -55,53 +56,73 @@
<p>Like above, press the key to get into either a one-time boot menu, or the bios. From there select your USB as a boot override. This will boot from the USB just this time, and then revert to the normal boot order.</p>
<h2>Start install</h2>
<p>When you're greeted by a debian boot page, select "Install" (that's what I'll be using) but "Graphical Install" is also fine, as it's essentially the samething, but you can use a mouse.</p>
<p>When you're greeted by a debian boot page, select "Install" (that's what I'll be using) but "Graphical Install" is also fine, as it's essentially the same thing, but you can use a mouse.</p>
<h2>Localisation</h2>
<p>As if you are filling out an online form, simply ensure the boxes are correct to your language, location (sets time, and download servers), and keyboard layout.</p>
<h2>Network, and server name</h2>
<p>If you're using DHCP, this can be...</p>
TODO
<h3>Hostname</h3>
<p>What you wish to call your server, I like to give names that are quirky, but still kinda explain what they do. For example, my webserver is "spiderverse", and my NAS is "lilnas", etc.</p>
<p>What you wish to call your server, I like to give names that are quirky, but still kinda explain what they do. For example, some names I've used are "spiderverse" for a web server, and "lilnas" for a NAS, etc.</p>
<h3>Domain name</h3>
<p>Leave this as default, and hit continue.</p>
<p>Leave this as default "home", and hit continue.</p>
<h2>Create User</h2>
<h2>Set up users and password</h2>
<p>The first thing you'll see is a screen asking for a root password.</p>
<h3>Don't set a root password</h3>
<p>This will ask for a root password. Do not enter a password, and simply git the <strong>Enter</strong> key, then again when it asks for the password the second time. A root user with a password is a vulnerability, so we're avoiding this.</p>
<p>Simply hit the <strong><kbd>Enter</kbd></strong> key, then again when it asks for the password the second time. A root user with a password is a vulnerability, so we're avoiding this.</p>
<h3>Create your user (admin account)</h3>
<p>Now enter your username, and password as the installer requests. This account will be added to the sudo group, making it an admin with access to root, and root commands.</p>
<p>Now enter your username, and password as the installer requests.</p>
<p>This account will be added to the sudo group, making it an admin with that can act as the root user.</p>
<h2>Disk Partitioning</h2>
<p>For this I am assume you're using a new drive, or at least one that you don't want any of the data on it</p>
<h3>Auto-partitioning</h3>
<p>You can do this, and it's recommended if you're new to linux. Once you've got the hang of it, you can always re-install your server from scratch (I recommend this a couple of times).</p>
<p>Also select to have all files in one partition, as it's the simplest option.</p>
<p>Finish Partitioning, and done.</p>
<h3>Guided/Auto-partitioning</h3>
<p>You can do this, and it's recommended if you're new to linux. Once you've got the hang of it, you can always re-install your server from scratch (I recommend this a couple of times if it's non-integral).</p>
<p>Select <em>Guided - use entire disk</em> then select the drive you want to boot from.</p>
<p>Then select <em>All files in one partition (recommended for new users)</em>, as it's the simplest option.</p>
<h3>Manual Partitioning</h3>
<p>For a little more control over the partitioning, this is the option. If you are a beginner I'd just go with auto for now, but follow this if you desire.</p>
TODO
<h3><del>Manual Partitioning</del></h3>
<p>I've opted to leave this out, as it's a beginner guide. If you're reading this though I typically don't create a swap partition, but the guided installer does. It's no problem, but following this guide makes it redundant.</p>
<h3>Preferences</h3>
<h3>Skip Swap (for now)</h3>
<h3>(Optional) Preferences</h3>
<p>With your disk partitioned select the partion that has a <strong>/</strong> at the far right, and hit <kbd>Enter</kbd>.</p>
<p>Go to <em>Mount Options</em>, and select (using <kbd>Space</kbd>) <em>noatime</em>, and <em>nodiratime</em>. Then hit <kbd>Enter</kbd>, and select <em>Done setting up the partition</em>.</p>
<h2>Scan Additional Media</h2>
<p>Unless you've addition drivers, etc. (You probably don't) hit <strong>No</strong></p>
<h3>Finalising Partitioning</h3>
<p>Simply hit <kbd>Enter</kbd> on <em>Finish partitioning and write changes to disk</em> at the bottom of the page.</p>
<p>Another screen will appear to verify you wish to partition, hit <em>Yes</em>, and it'll begin partitioning. Give it a little time.</p>
<h2>Configure Mirror</h2>
<h3>Configure the package manager</h3>
<p>A simple one, select your country, hit enter to the top selection, hit enter again when it asks for a proxy (unless you know what you're doing), and sorted.</p>
<h2>Popularity Contest</h2>
<p>I typically select <em>No</em> here, but read what it is and select for yourself.</p>
<h2>Software Selection</h2>
<h2>Install Grub Boot Loader</h2>
<p>Now tasksel will load up, and ask if you want any software installed during setup.</p>
<p>I choose to deselect everything pre-selected (the ones with asterisks), however for a new setup keeping <em>standard system utilities</em> is a-ok.</p>
<p>If you're after a GUI experience you can select <em>Xfce</em> as it's pretty lightweight, however I'd recommend going with no GUI for a server.</p>
<p>Once you've selected what to install, hit <kbd>Enter</kbd>.</p>
<h2>Reboot, and enjoy!</h2>
<p>Reboot your server, and tada!</p>
<h2>Setup Swap</h2>
<p>I mentioned earlier I don't setup a swap partition, and that it'd be redundant if you follow this guide, so here we go.</p>
<p>Swap sizes vary per PC as different services use more RAM, etc. A decent(ish) rule of thumb is to set half your RAM size as the swap size, but to be honest 8GB will likely suffice.</p>
<h3>Create the swap file</h3>
<pre><code>sudo fallocate -l 8G /swapfile</code></pre>
<h3>Set permissions</h3>
<pre><code>sudo chmod 600 /swapfile</code></pre>
<h3>Set the file as a swap area</h3>
<pre><code>sudo mkswap /swapfile &amp;&amp; sudo swapon /swapfile</code></pre>
<h3>Set on boot</h3>
<p>Open <strong>/etc/fstab</strong> with a text editor. I'll use vi for this.</p>
<pre><code>sudo vi /etc/fstab</code></pre>
<p>Press <kbd>g<kbd><kbd>g<kbd>, followed by <kbd>Shift</kbd>+<kbd>o</kbd>, then type the following.</p>
<pre><code>/swapfile swap swap defaults 0 0</code></pre>
<p>Then press <kbd>esc</kbd>, followed by <kbd>shift</kbd>+<kbd>Z</kbd><kbd>Z</kbd>.</p>
<h2>Next steps</h2>
<p>Now that you've got a basic Debian install, you'll need to configure, and install a few things. I've written a little something, somthing like that, so check <a href="/guides/initial-server-setup.html">how to setup a new server install</a></p>

@ -15,9 +15,10 @@
<body>
<header>
<a href="#main" class="vh">Jump directly to main content</a>
<h1>How to set a static IP</h1>
<input id="burger-toggle" type="checkbox"/>
<label class="burger-container" for="burger-toggle"><div class="burger"></div></label>
<label class="burger-container" for="burger-toggle"><div class="burger"></div><span class="sr">Burger menu</span></label>
<hr/>
<nav>
<a href="/">home</a>
@ -30,7 +31,7 @@
<hr/>
</header>
<main>
<main id="main">
<section>
<p class="intro">For those that don't know a static IP is an IP address that doesn't change on reboots, etc. The opposite of a dynamic IP, which can change on reboots, and is the default mode for computers to get an IP (via DHCP).</p>

@ -14,9 +14,10 @@
<body>
<header>
<a href="#main" class="vh">Jump directly to main content</a>
<h1>Git server setup</h1>
<input id="burger-toggle" type="checkbox"/>
<label class="burger-container" for="burger-toggle"><div class="burger"></div></label>
<label class="burger-container" for="burger-toggle"><div class="burger"></div><span class="sr">Burger menu</span></label>
<hr/>
<nav>
<a href="/">home</a>
@ -29,7 +30,7 @@
<hr/>
</header>
<main>
<main id="main">
<section>
<p class="intro">Self-hosted version control is great way to not be dependant of a third party to keep your git server up, or your code secure.</p>
@ -56,7 +57,7 @@
<h2>Use the git server</h2>
<p>With all the setup out the way, the git server is now usable as a remote for any of your git repos.</p>
<p>So on another PC...</p>
<p>So on another PC, you can use git as normal. For example.</p>
<h3>Add remote to existing repo</h3>
<pre><code>git remote add origin git@&lt;your-server&gt;:/&lt;repo.git&gt;</code></pre>
<h3>Clone the repo</h3>
@ -68,7 +69,7 @@
<p>Giving you something like this</p>
<pre><code>git clone git@&lt;your-server&gt;:&lt;port&gt;/&lt;repo.git&gt;</code></pre>
<br/>
<h2>Completed</h2>
<p>From here you can use git as you would via any other provider, but with the knowledge that your remote is yours.</p>
</section>

@ -15,9 +15,10 @@
<body>
<header>
<a href="#main" class="vh">Jump directly to main content</a>
<h1>Setup a bridge network for KVM</h1>
<input id="burger-toggle" type="checkbox"/>
<label class="burger-container" for="burger-toggle"><div class="burger"></div></label>
<label class="burger-container" for="burger-toggle"><div class="burger"></div><span class="sr">Burger menu</span></label>
<hr/>
<nav>
<a href="/">home</a>
@ -30,71 +31,70 @@
<hr/>
</header>
<main>
<main id="main">
<section>
<p class="intro">A bridge network is a means to connect/bridge different networks together to act like a single network. In this case, it allows any connections to the bridge network to get their own internal IPs, as if plugged into the network directly, and work as you'd expect a completely new physical PC to work. i.e. Accessble to other clients outside of the host.</p>
<p class="intro">A bridge network is a means to connect/bridge different networks together to act as a single network. In this case, it allows any virtual connections to the bridge network to get their own internal IPs, as if plugged into the network directly.</p>
<h2>Install bridge-utils</h2>
<pre><code>sudo apt install bridge-utils</code></pre>
<h2>Find the network to bridge</h2>
<p>First we need to find the network we want to bridge to the VMs</p>
<pre><code>ip a</code></pre>
<h2>Find the network device to bridge</h2>
<p>First we need to find the network device we want to bridge to the VMs.</p>
<pre><code>ip link</code></pre>
<p>You'll likely have a device called something similar to <strong>enp1s0</strong>, or <strong>eth0</strong>.</p>
<h2>Bridge it</h2>
<h2>Create the bridge network</h2>
<p>This will be familiar to those who have <a href="/guides/set-static-ip.html">set a static ip</a> on linux, as it's essentially the same, with a few additional lines related to bridging</p>
<p>This can be done by editing <strong>/etc/network/interfaces</strong></p>
<h3>Remove interface from interfaces file</h3>
<p>First step is to remove any references to your network device from <strong>/etc/network/interfaces</strong>, if this file is untouched there will likely be two lines at the bottom.</p>
<pre><code>sudo vim /etc/network/interfaces</code></pre>
<p>And setting the following lines<p>
<h3>Change existing port to manual</h3>
<p>There will already exist some lines with your chosen network adapter, such as</p>
<pre><code>iface enp2s0 inet auto</code></pre>
<p>Change this to contain manual instead</p>
<pre><code>iface enp2s0 inet manual</code></pre>
<h3>Static Bridge</h3>
<p>If you want your server to have a static IP use this</p>
<h3>Create a new bridge interface</h3>
<p>Now create a file in the <strong>/etc/network/interfaces.d/</strong> directory, with the name of your bridge (I like <strong>br0</strong>).</p>
<h4>Static IP</h4>
<pre><code>auto br0
iface br0 inet static
bridge_ports enp2s0 # which port(s) to bridge together
address 192.168.0.100 # Static IP
netmask 255.255.255.0
network 192.168.0.1
broadcast 192.168.0.255
gateway 192.168.0.1
bridge_stp off # New
bridge_fd 0 # New
bridge_maxwait 0 # New
dns-nameservers 8.8.8.8 8.8.1.1</code></pre>
<h3>Dynamic Bridge</h3>
<p>If instead you wish your server to have a dynamic IP (not recommended). A bridged network can be set, with a dynamic DHCP set IP</p>
iface br0 inet static # Name the same as your file (br0)
address 192.168.0.100
broadcast 192.168.0.255
netmask 255.255.255.0
gateway 192.168.0.1 # Normally your router's IP
dns-nameservers 192.168.0.1 8.8.8.8 8.8.4.4 # Don't set if resolveconf is installed, comment if internet borked
bridge_ports enp1s0 # Your device name
bridge_stp off # Disable Spanning Tree Protocol
bridge_waitport 0 # No delay before a port becomes available
bridge_fd 0 # No forwarding delay (Connects to network immediately)</code></pre>
<h4>Dynamic IP</h4>
<pre><code>iface br0 inet dhcp
bridge_ports enp2s0</code></pre>
<h2>Create Virtual Network</h2>
<p>To make it easier to manage with VMs, this new bridge can be made into a Virtual Network.</p>
<p>Open up a text-editor, and create a file called <strong>bridged-network.xml</strong></p>
<pre><code>vim bridged-network.xml</code></pre>
<h2>(Optional) Create Virtual Network</h2>
<p>To make it easier to manage with VMs, this new bridge can also be made into a Virtual Network (Basically so you can select it from a dropdown).</p>
<h3>Create XML file</h3>
<p>Open up a text-editor, and create a file called <strong>br0.xml</strong>, named after the bridge itself.</p>
<pre><code>vim br0.xml</code></pre>
<p>Enter the following, then save</p>
<pre><code>&lt;network&gt;
&lt;name&gt;bridged-network&lt;/name&gt;
&lt;name&gt;br0&lt;/name&gt;
&lt;forward mode="bridge"/&gt;
&lt;bridge name="br0"/&gt;
&lt;/network&gt;</code></pre>
<p>Then pass the file to virsh net-define</p>
<pre><code>sudo virsh net-define bridged-network.xml</code></pre>
<p>Active, and auto-start the new network</p>
<pre><code>sudo virsh net-start bridged-network</code></pre>
<pre><code>sudo virsh net-autostart bridged-network</code></pre>
<h3>Create the virtual network</h3>
<pre><code>sudo virsh net-define br0.xml</code></pre>
<p>Activate, and auto-start (on boot) the new network.</p>
<pre><code>sudo virsh net-start br0</code></pre>
<pre><code>sudo virsh net-autostart br0</code></pre>
<p>You can now remove the br0.xml file.</p>
<h2>Reload the network</h2>
<pre><code>sudo systemctl restart networking</code></pre>
<p>If this creates the bridge, but claims to have failed, restart your PC</p>
<p>This may claim to have failed, but if checking with <strong>ip link</strong> shows the bridge, reboot. Essentially the bridge has been brought up, and it's trying to bring it up again (and can't), then throws an error.</p>
<pre><code>sudo reboot</code></pre>
<h3>Check it's there</h3>
<p>Run another check for networks, and you should now see br0</p>
<pre><code>ip a</code><pre>
<p>Run some checks and you should now see br0, with an IP4 address.</p>
<pre><code>ip a</code></pre>
<pre><code>ping google.co.uk</code></pre>
</section>

@ -15,9 +15,10 @@
<body>
<header>
<a href="#main" class="vh">Jump directly to main content</a>
<h1>How to setup an NGINX website</h1>
<input id="burger-toggle" type="checkbox"/>
<label class="burger-container" for="burger-toggle"><div class="burger"></div></label>
<label class="burger-container" for="burger-toggle"><div class="burger"></div><span class="sr">Burger menu</span></label>
<hr/>
<nav>
<a href="/">home</a>
@ -30,7 +31,7 @@
<hr/>
</header>
<main>
<main id="main">
<section>
<p>Nginx has the ability to host multiple websites, all at different domains/sub-domains. This guide will show you how to point a domain at the server, and display a different website than the default NGINX page.</p>
<h2>Make the domain point to the server</h2>

@ -10,14 +10,15 @@
<meta name="theme-color" content="black">
<link rel="stylesheet" type="text/css" href="/main.css">
<link rel="icon" type="image/png" href="/images/favicon.svg">
<title>Setup KVM/QEMU virtualisation</title>
<title>Setup QEMU/KVM virtualisation</title>
</head>
<body>
<header>
<h1>Setup KVM/QEMU virtualisation</h1>
<a href="#main" class="vh">Jump directly to main content</a>
<h1>Setup QEMU/KVM virtualisation</h1>
<input id="burger-toggle" type="checkbox"/>
<label class="burger-container" for="burger-toggle"><div class="burger"></div></label>
<label class="burger-container" for="burger-toggle"><div class="burger"></div><span class="sr">Burger menu</span></label>
<hr/>
<nav>
<a href="/">home</a>
@ -30,10 +31,56 @@
<hr/>
</header>
<main>
<main id="main">
<section>
<p class="intro">This is an intro, you gotta believe me</p>
<h2>Heading</h2>
<p class="intro">Virtualisation is the act of creating a virtualised computer (guest), inside another computer (the host) by sharing the hardware. This allows a single host the ability to run all your services, whilst keeping a level of <a href="/guides/vm-seperation-of-concerns">SoC</a>.</p>
<h2>Enable in the BIOS</h2>
<p>To run virtual machines, certain flags in the bios need to be set. If you don't want to bring down an existing server to check, then check the next section first.</p>
<ul>
<li>Reboot your PC</li>
<li>At the BIOS splashscreen, press your motherboard's prefered key (typically <kbd>ESC</kbd>, <kbd>F3</kbd>, or <kbd>F12</kbd>).</li>
<li>Find and enable the virtualisation setting(s).
<ul>
<li>One of VT-x, AMD-V, SVM, or Vanderpool.</li>
<li>One of Intel VT-d, or AMD IOMMU (if available)</li>
</ul>
</li>
</ul>
<h2>Check Virtualisation is enabled</h2>
<p>Double check to make sure your server can be used for virtualisation, if you've enabled it in the BIOS it should be good. Just run one of the following command</p>
<pre><code>lscpu | grep 'Virtualization'</code></pre>
<pre><code>grep -E --color '(vmx|svm)' /proc/cpuinfo</code></pre>
<h2>Install the packages</h2>
<p>The easiest part, just copy and paste the below to install the required packages.</p>
<pre><code>sudo apt install qemu-kvm libvirt-clients libvirt-daemon libvirt-daemon-system virtinst</code></pre>
<h2>Sessions</h2>
<p>There are two different session types for VMs, user, and system sessions. If you are using a desktop, and intend to virtualise other desktop OSs I recommend user sessions. If you're setting up a server hypervisor, then use System sessions.</p>
<h3>User Session</h3>
<p>A user session VM is what I recommend for personal PCs, laptops, etc. as it's the best option for desktop virtualisation (e.g. a Kali install for l33t hackers).</p>
<h4>Add user to group</h4>
<pre><code>sudo adduser $USER libvirt</code></pre>
<h4>Enable default network</h4>
<p>Check the name of your default network (typically just 'default').</p>
<pre><code>sudo virsh net-list --all</code></pre>
<p>Enable the network.</p>
<pre><code>sudo virsh net-start default</code></pre>
<p>(Optionally) Set it to turn on with system boot.</p>
<pre><code>sudo virsh net-autostart default</code></pre>
<h3>System Session</h3>
<p>For now all that's needed to know is that you run sudo before any virsh commands, and that the VMs will launch with root permissions.</p>
<h2>Extra</h2>
<p><a href="/guides/setup-kvm-bridge.html">Setup bridge adapter for KVM</a></p>
<p><a href="/guides/kvm-optimisation.html">Optimisations for KVM Virtual Machines</a></p>
</section>
</main>

@ -15,9 +15,10 @@
<body>
<header>
<a href="#main" class="vh">Jump directly to main content</a>
<h1>SQL Cheatsheet</h1>
<input id="burger-toggle" type="checkbox"/>
<label class="burger-container" for="burger-toggle"><div class="burger"></div></label>
<label class="burger-container" for="burger-toggle"><div class="burger"></div><span class="sr">Burger menu</span></label>
<hr/>
<nav>
<a href="/">home</a>
@ -30,7 +31,7 @@
<hr/>
</header>
<main>
<main id="main">
<section>
<p>SQL is a great, simple to use language to manipulate data within a database. This cheatsheet is aimed at basic SQL for MySQL/MariaDB.</p>

@ -15,9 +15,10 @@
<body>
<header>
<a href="#main" class="vh">Jump directly to main content</a>
<h1>Virsh Cheatsheet</h1>
<input id="burger-toggle" type="checkbox"/>
<label class="burger-container" for="burger-toggle"><div class="burger"></div></label>
<label class="burger-container" for="burger-toggle"><div class="burger"></div><span class="sr">Burger menu</span></label>
<hr/>
<nav>
<a href="/">home</a>
@ -30,7 +31,7 @@
<hr/>
</header>
<main>
<main id="main">
<section>
<p class="intro">Virsh is an extremely powerful tool for managing KVM/QEMU virtual machines. From restarting, to changing hardware, snapshotting, and cloning machines. I'll cover the basics of Virsh here, as it's all I personally use.</p>
<h2>List VMs</h2>
@ -76,6 +77,11 @@
<pre><code>virsh snapshot-delete --domain $vm --snapshotname $snapshot_name</code></pre>
<h2>(TODO)Drive management</h2>
<h3>Resize virtual drives</h3>
<p>Find the name of your drive.</p>
<pre><code>virsh domblklist $vm</code></pre>
<p>Resize with qemu</p>
<pre><code>sudo qemu-img resize /location/drive.qcow2 +10G</code></pre>
<h2>Change Memory</h2>
<p>In variantions of 512M, 1G, etc</p>

@ -15,9 +15,10 @@
<body>
<header>
<a href="#main" class="vh">Jump directly to main content</a>
<h1>VM/Server Seperation of Concerns</h1>
<input id="burger-toggle" type="checkbox"/>
<label class="burger-container" for="burger-toggle"><div class="burger"></div></label>
<label class="burger-container" for="burger-toggle"><div class="burger"></div><span class="sr">Burger menu</span></label>
<hr/>
<nav>
<a href="/">home</a>
@ -30,7 +31,7 @@
<hr/>
</header>
<main>
<main id="main">
<section>
<p class="intro">Seperation of Concerns is a principle used in Computer Science that helps seperate functionality, making things easier to work with, and avoiding issues that could occur with too much going on in one place</p>
<h2>Why seperate concerns for a server?</h2>
@ -39,6 +40,7 @@
<h2>How to seperate concerns</h2>
<p>Some people will seperate each service into their own VM, however I don't believe this to be efficient (in all cases).</p>
<p>What I recommend is to take your server needs, and break them down into logical blocks, adding each of these blocks to their own VMs. This will keep certain things contained alone, as you want them seperated as much as possible (NAS, etc).</p>
<div class="tblcon">
<table>
<thead><tr><th colspan="2">Concern/VM</th><th colspan="5">Services</th></tr></thead>
<tbody>
@ -73,10 +75,10 @@
</tr>
</tbody>
</table>
</div>
<h2>Why not use a dedicated server for each concern?</h2>
<p>You can! No-one's going to stop you, but unless each concern <em>requires</em> (i.e. needs the dedicated hardware/isolation) its own dedicated server, it's hugely redundant. Again NAS as an example, would be good for a dedicated machine, as it'll be safer if there's no additional chance it goes down due to failure of an unrelated service.</p>
<p>Virtual Machines are wonderful, as they allow you to make use of more powerful/high spec machines while minimising the wasted usage...</p>
</section>
</main>

@ -14,9 +14,10 @@
<body>
<header>
<a href="#main" class="vh">Jump directly to main content</a>
<h1>Web Development 101</h1>
<input id="burger-toggle" type="checkbox"/>
<label class="burger-container" for="burger-toggle"><div class="burger"></div></label>
<label class="burger-container" for="burger-toggle"><div class="burger"></div><span class="sr">Burger menu</span></label>
<hr/>
<nav>
<a href="/">home</a>
@ -29,7 +30,7 @@
<hr/>
</header>
<main>
<main id="main">
<section>
<p>Interested in web development, but don't know where to begin? Don't worry, I've got you covered.</p>

@ -14,9 +14,10 @@
<body>
<header>
<a href="#main" class="vh">Jump directly to main content</a>
<h1>Webpage to website</h1>
<input id="burger-toggle" type="checkbox"/>
<label class="burger-container" for="burger-toggle"><div class="burger"></div></label>
<label class="burger-container" for="burger-toggle"><div class="burger"></div><span class="sr">Burger menu</span></label>
<hr/>
<nav>
<a href="/">home</a>
@ -29,7 +30,7 @@
<hr/>
</header>
<main>
<main id="main">
<section>
<p>With a <a href="/guides/your-first-webpage.html">basic webpage</a> now created, the next hurdle is to add multiple pages, and get them all linked together into a website of some sort.</p>

@ -14,9 +14,10 @@
<body>
<header>
<a href="#main" class="vh">Jump directly to main content</a>
<h1>Your first webpage</h1>
<input id="burger-toggle" type="checkbox"/>
<label class="burger-container" for="burger-toggle"><div class="burger"></div></label>
<label class="burger-container" for="burger-toggle"><div class="burger"></div><span class="sr">Burger menu</span></label>
<hr/>
<nav>
<a href="/">home</a>
@ -29,7 +30,7 @@
<hr/>
</header>
<main>
<main id="main">
<section>
<p>In my opinion learning is done by doing, so where better to start than making your own basic webpage. This assumes you already have a text editor; you can use Notepad, Vim, etc. but if you're learning coding, I recommend <a href="https://code.visualstudio.com/" target="_blank" rel="noopender">Visual Studio Code</a></p>

Binary file not shown.

After

Width:  |  Height:  |  Size: 389 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 360 B

@ -14,9 +14,10 @@
<body>
<header>
<a href="#main" class="vh">Jump directly to main content</a>
<h1>Aney's Network</h1>
<input id="burger-toggle" type="checkbox"/>
<label class="burger-container" for="burger-toggle"><div class="burger"></div></label>
<label class="burger-container" for="burger-toggle"><div class="burger"></div><span class="sr">Burger menu</span></label>
<hr/>
<nav>
<a href="/">home</a>
@ -29,7 +30,7 @@
<hr/>
</header>
<main>
<main id="main">
<section>
<h2>I'm Aney</h2>
<p>Somehow you've landed on my website, welcome!</p>

@ -1,26 +1,31 @@
html,body{height:100%}
html{font-size:14px}
html{font-size:15px}
header{position:relative}
header hr{display:none}
body{
max-width:54rem;
margin:.2rem;padding:0 .62rem;
font:1.2rem/1.62 sans-serif;
max-width:768px;
margin:auto;padding:0 1.24rem;
font:1.2rem/1.62 sans-serif;color:#444;
display:-webkit-flex;display:-ms-flexbox;display:flex;
flex-direction:column}
main{flex:1 0 auto}
nav{
box-sizing:border-box;
z-index:9}
nav>a{
padding:.2rem 0;
display:block;
border-top:1px dotted #000}
border-top:1px dotted #101}
nav>a:first-child{border:none}
h1,h2,h3,h4,h5,h6{line-height:1}
header h1{margin:1.4rem 52px 1.2rem auto}
h1{color:#000}h2{color:#111}h3{color:#222}
h4,h5,h6{color:#333}
a{text-decoration:none}
a:link,a:visited{color:#087CA7}
a:hover,a:visited:hover{color:#09B2DC}
a:link,a:visited{color:#07C}
a:hover,a:visited:hover{color:#1AE}
ul{padding-left:0;margin-left:0;list-style:inside}
ul li{margin:.35rem}
@ -28,40 +33,70 @@ li>ul{margin-left:1em}
.tag{
font-size:.8rem;vertical-align:middle;
padding:.2rem;border-radius:.33rem;
background:#191919;color:#FFF}
padding:.2rem .5rem;border-radius:.33rem;
border:1px solid #CCC}
pre{
background:#191919;color:#FFF;
background:#EEE;padding:1rem;
white-space:pre-wrap;overflow-x:auto;
padding:12px;border:1px solid #FFF}
border:1px solid #DDD;border-radius:6px}
code{
background:#EEE;padding:.2rem;
border:1px solid #DDD;border-radius:6px}
pre code{border:none}
blockquote{
margin:0 .2rem;
border-left:2px solid;
padding:.4rem;padding-left:.8rem}
.page-nav{
float:right;
padding:14px;border:1px solid;
margin:1.4rem;margin-right:auto}
.sr{
position:absolute;overflow:hidden;
left:-9999px;top:auto;
width:1px;height:1px;
}
.vh{
position:absolute;
clip:rect(1px,1px,1px,1px);
height:1px;width:1px;
padding:2px 8px;overflow:hidden;
white-space:nowrap;
background:#FFF;z-index:10}
.vh:focus{
clip:auto;overflow:auto;
height:auto;width:auto}
.tblcon{overflow-x:auto}
footer p{margin:0}
table{text-align:left;width:100%;border-collapse:collapse}
td,th{border:1px solid #222;padding:9px 6px}
th{padding:12px;color:#FFF}
thead th{background:#191919}
tbody th{background:#292929}
tr:nth-child(even){background:#FEFEFE}
tr:hover{background:#DEDEDE}
table{text-align:left;width:100%;
border-collapse:collapse;
overflow-wrap:normal;
margin:24px 0}
td,th{border:1px solid #CCC;padding:9px 6px}
th{padding:12px}
thead tr{background:#FFF}
tbody tr:nth-child(odd){background:#EEE}
tbody tr:hover{background:#DDD}
.burger-container{
position:absolute;height:24px;width:30px;
cursor:pointer;top:34px;right:10px}
position:absolute;height:34px;width:36px;
cursor:pointer;top:25px;right:1.24rem;
position:fixed;background:#FFF;
border:2px solid #EEE;border-radius:6px;
z-index:9}
#burger-toggle,#burger-toggle~nav{display:none}
.burger{left:3px;top:7px}
.burger,.burger::after,.burger::before{
position:absolute;background:#000;
height:4px;width:30px;border-radius:2px;content:"";
transition:transform 300ms cubic-bezier(.4,1,.5,1)}
.burger::before{margin-top:-8px}
.burger::after{margin-top:8px}
.burger::before{margin-top:8px}
.burger::after{margin-top:16px}
#burger-toggle:checked~nav{display:block}
#burger-toggle:checked+.burger-container .burger::before{margin-top:0;transform:rotate(45deg)}
#burger-toggle:checked+.burger-container .burger::after{margin-top:0;transform:rotate(-45deg)}
#burger-toggle:checked+.burger-container .burger{background:rgba(255,255,255,0)}
#burger-toggle:checked+.burger-container .burger::before{margin-top:8px;transform:rotate(45deg)}
#burger-toggle:checked+.burger-container .burger::after{margin-top:8px;transform:rotate(-45deg)}
#burger-toggle:checked+.burger-container .burger{background:rgba(0,0,0,0)}
@media print{body{max-width:none}}
@media(min-width:720px){
@ -72,17 +107,90 @@ transition:transform 300ms cubic-bezier(.4,1,.5,1)}
.burger-container{display:none}
#burger-toggle~nav,header hr{display:block}
}
@media(min-width:320px) and (max-width:719px){
nav{height:100%;
width:50%;min-width:250px;
position:fixed;
top:0;right:1.24rem;
padding:85px 1.24rem 1.24rem;
background:#FFF;border-left:1px solid #EEE;
z-index:8}
}
@media(max-width:320px){
#burger-toggle~nav{display:block}
.burger-container{display:none}
header h1{margin-right:auto}
body{overflow-wrap:anywhere}
img{width:100%;height:auto}
}
@media(prefers-color-scheme:dark){
body{color:#FFF;background:#191919}
body{color:#CCC;background:#101}
a:link,a:visited{color:#9CF}
a:hover,a:visited:hover{color:#DA4167}
nav>a{border-color:#FFF}
.tag{background:#FFF;color:#000}
.burger,.burger::after,.burger::before{background:#FFF}
a:hover,a:visited:hover{color:#C34}
nav{background:#101;border-color:#555}
nav>a{border-color:#555}
.burger-container{border:2px solid #555;background:#555;}
.burger,.burger::after,.burger::before{background:#EEE}
h1{color:#FFF}h2{color:#EEE}
h3,h4,h5,h6{color:#DDD}
td,th{border-color:#444}
thead tr{background:#101}
tbody tr:nth-child(odd){background:#222}
tbody tr:hover{background:#333}
pre{background:#333;color:#EEE;border-color:#555}
code{background:#333}
.tag{border-color:#555}
}
/* Form stuff */
/* If I do a CSS framework, it'll need to have a reset too... */
/* e.g. https://github.com/necolas/normalize.css/blob/master/normalize.css
https://byby.dev/normalize-css#:~:text=css%23css%2Dresets-,Normalize.,experience%20for%20each%20web%20browser.
https://www.joshwcomeau.com/css/custom-css-reset/
*/
form{
border:1px solid;
padding: 1rem;
}
input,select,textarea{
font:1.2rem/1.62 sans-serif;color:#444;
border:1px solid #CCC;
}
textarea{
resize: vertical;
}
input,select,textarea{
background: #EEE;
border: 2px solid #444;
box-sizing: border-box;
color: #444;
display: block;
line-height: 1;
vertical-align: top;
transition-duration:.2s;
}
input,textarea{
width:100%;
}
input[type="checkbox"]{
display:inline-block;
}
input:focus,select:focus,textarea:focus {
border-color: #9CF;
}
@media(min-width:720px){
input,select,textarea{
display:inline-block;
max-width:50%; /* so half it can be, with margins factored in... */
max-width:346.8px;
}
input,textarea{
width:auto;
}
}
@media(prefers-color-scheme:dark){
input,select,textarea{
background:#CCC;border-color:#CCC;
}
}

@ -14,9 +14,10 @@
<body>
<header>
<a href="#main" class="vh">Jump directly to main content</a>
<h1>Aney's Projects</h1>
<input id="burger-toggle" type="checkbox"/>
<label class="burger-container" for="burger-toggle"><div class="burger"></div></label>
<label class="burger-container" for="burger-toggle"><div class="burger"></div><span class="sr">Burger menu</span></label>
<hr/>
<nav>
<a href="/">home</a>
@ -29,10 +30,9 @@
<hr/>
</header>
<main>
<main id="main">
<section id="projects">
<h2>Current Projects</h2>
<p>Here to hold me accountable, as I cannot finish my own projects</p>
<section id="website">
<h3><a href="https://aney.co.uk" target="_blank" rel="noopener">Personal Website</a></h3>
@ -45,7 +45,7 @@
<h3><a href="https://anetwork.uk" target="_blank" rel="noopener">aNetwork</a></h3>
<p>A gaming community, and public server host.</p>
<p>This consists of a website, server hosting, and community/server administration.</p>
<p>Skills: <span class="tag">HTML</span> <span class="tag">CSS</span> <span class="tag">JS</span> <span class="tag">Linux</span> <span class="tag">System Administration</span></p>
<p>Skills: <span class="tag">HTML</span> <span class="tag">CSS</span> <span class="tag">JS</span> <span class="tag">Linux</span> <span class="tag">System&nbsp;Administration</span></p>
</section>
</section>
</main>

@ -14,9 +14,10 @@
<body>
<header>
<a href="#main" class="vh">Jump directly to main content</a>
<h1>Aney's Recipes</h1>
<input id="burger-toggle" type="checkbox"/>
<label class="burger-container" for="burger-toggle"><div class="burger"></div></label>
<label class="burger-container" for="burger-toggle"><div class="burger"></div><span class="sr">Burger menu</span></label>
<hr/>
<nav>
<a href="/">home</a>
@ -29,7 +30,7 @@
<hr/>
</header>
<main>
<main id="main">
<section>
<p>A collection of recipes I use, mostly budget oriented, but always tastee.</p>
</section>

@ -14,9 +14,10 @@
<body>
<header>
<a href="#main" class="vh">Jump directly to main content</a>
<h1>Woky Beef Stew</h1>
<input id="burger-toggle" type="checkbox"/>
<label class="burger-container" for="burger-toggle"><div class="burger"></div></label>
<label class="burger-container" for="burger-toggle"><div class="burger"></div><span class="sr">Burger menu</span></label>
<hr/>
<nav>
<a href="/">home</a>
@ -29,7 +30,7 @@
<hr/>
</header>
<main>
<main id="main">
<aside class="page-nav">
<ul>
<li><a href="#requirements">Requirements</a></li>

@ -15,9 +15,10 @@
<body>
<header>
<a href="#main" class="vh">Jump directly to main content</a>
<h1>Aney's Sitemap</h1>
<input id="burger-toggle" type="checkbox"/>
<label class="burger-container" for="burger-toggle"><div class="burger"></div></label>
<label class="burger-container" for="burger-toggle"><div class="burger"></div><span class="sr">Burger menu</span></label>
<hr/>
<nav>
<a href="/">home</a>
@ -30,7 +31,7 @@
<hr/>
</header>
<main>
<main id="main">
<section>
<ul>
<li><a href="/">home</a></li>

@ -14,9 +14,10 @@
<body>
<header>
<a href="#main" class="vh">Jump directly to main content</a>
<h1>Support Me</h1>
<input id="burger-toggle" type="checkbox"/>
<label class="burger-container" for="burger-toggle"><div class="burger"></div></label>
<label class="burger-container" for="burger-toggle"><div class="burger"></div><span class="sr">Burger menu</span></label>
<hr/>
<nav>
<a href="/">home</a>
@ -29,7 +30,7 @@
<hr/>
</header>
<main>
<main id="main">
<section>
<p>If you'd like to support me, the site, or any projects I'm working on, thank you.</p>
</section>

@ -0,0 +1,360 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<meta name="description" content="A page with all HTML elements used on Aney's website. Attempted to get all elements, even those not used so it's easier to test.">
<meta name="author" content="Nathan (Aney) Steel">
<meta name="theme-color" content="white">
<meta name="theme-color" content="black">
<link rel="stylesheet" type="text/css" href="/main.css">
<link rel="icon" type="image/png" href="/images/favicon.svg">
<title>HTML element test page</title>
</head>
<body id="top">
<header>
<a href="#main" class="vh">Jump directly to main content</a>
<h1>HTML element test page (h1)</h1>
<input id="burger-toggle" type="checkbox"/>
<label class="burger-container" for="burger-toggle"><div class="burger"></div><div class="sr">Burger menu</div></label>
<hr/>
<nav>
<a href="/">home</a>
<a href="/about.html">about</a>
<a href="/projects.html">projects</a>
<a href="/blog/">blog</a>
<a href="/sitemap.html">misc</a>
<a href="/support.html">support</a>
</nav>
<hr/>
</header>
<main id="main">
<section>
<h1>HTML element test page (h1)</h1>
<p>Welcome, you've found my testing page. A page with all HTML elements I could drop in (even if not used on site), that is used for testing my CSS to ensure it's works everywhere I can get it to.</p>
<h2>heading 2 (h2)</h2>
<h3>heading 3 (h3)</h3>
<h4>heading 4 (h4)</h4>
<h5>heading 5 (h5)</h5>
<h6>heading 6 (h6)</h6>
<h2>Paragraphs</h2>
<p>A simple little paragraph.</p>
<p>Followed by another with a link <a href="/">home</a></p>
<h2>Lists</h2>
<h3>ul</h3>
<ul>
<li>List item 1</li>
<li>List item 2</li>
<li>List item 3</li>
</ul>
<h3>ol</h3>
<ol>
<li>List item 1</li>
<li>List item 2</li>
<li>List item 3</li>
</ol>
<h3>dl</h3>
<dl>
<dt>Term</dt>
<dd>Description 1</dd>
<dd>Descripton 2</dd>
</dl>
<h3>menu</h3>
<menu>
<ul>
<li>List item 1</li>
<li>List item 2</li>
<li>List item 3</li>
</ul>
</menu>
<h2>Code</h2>
<pre><code>&lt;p&gt;Example of code inside a pre.&lt;p&gt;</code></pre>
<code>Code alone.</code>
<p>And heres some <code>code inside a tag</code>, namely a paragraph.</p>
<h2>Tables</h2>
<p>Each of these are wrapped by an element with <code>.tblcon</code> class.</p>
<div class="tblcon">
<table>
<thead><tr><th scope="col">Concern/VM</th><th scope="col">Services1</th></tr></thead>
<tbody>
<tr>
<th scope="row">Production Web Server</th>
<td>Nginx</td>
</tr>
<tr>
<th scope="row">Production Web Server</th>
<td>Nginx</td>
</tr>
</tbody>
</table>
</div>
<div class="tblcon">
<table>
<thead><tr><th scope="col">Concern/VM</th><th colspan="5" scope="colgroup">Services2</th></tr></thead>
<tbody>
<tr>
<td>Production Web Server</td>
<td>Nginx</td>
<td>Nginx</td>
<td colspan="3">Nginx</td>
</tr>
<tr>
<td>Production Web Server</td>
<td>Nginx</td>
<td colspan="4">Nginx</td>
</tr>
<tr>
<td>Production Web Server</td>
<td>Nginx</td>
<td>Nginx</td>
<td>Nginx</td>
<td>Nginx</td>
<td>Nginx</td>
</tr>
</tbody>
</table>
</div>
<div class="tblcon">
<table>
<tr><th scope="col">Concern/VM</th><th scope="col">Services3</th></tr>
<tr>
<td>Production Web Server</td>
<td>Nginx</td>
</tr>
<tr>
<td>Production Web Server</td>
<td>Nginx</td>
</tr>
</table>
</div>
<p>Table with all elements</p>
<div class="tblcon">
<table>
<caption>Here's a captioned table</caption>
<colgroup><col><col span="2"></colgroup>
<thead><tr><th scope="col">Name</th><th scope="col">Earned</th><th scope="col">Profit</th></tr></thead>
<tbody>
<tr>
<td>Mr. Epic</td>
<td>£15000</td>
<td>£1000</td>
</tr>
<tr>
<td>Sludge</td>
<td>£35000</td>
<td>£19000</td>
</tr>
<tr>
<td>Smart fella</td>
<td>£69420</td>
<td>£50000</td>
</tr>
</tbody>
<tfoot>
<tr>
<td></td>
<td>£119420</td>
<td>£70000</td>
</tr>
</tfoot>
</table>
<h2>Block<wbr>quotes</h2>
<blockquote cite="https://www.w3schools.com/tags/tag_blockquote.asp">A section that is quoted from another source</blockquote>
<p>Using q tag <q>for inline (short) quotations</q>, as you see. Nifty.</p>
<h2>Form</h2>
<p>Behold, the mega-form! If you want details check <a href="https://developer.mozilla.org/en-US/docs/Web/HTML/Element#forms">mozilla's form section</a></p>
<p>datalist, fieldset, input, legend, meter, output, select, textarea</p>
<p>input todo: datetime-local, email, file, hidden, image, month, number, password, radio, range, reset, search, submit, tel, text, time, url, week</p>
<form>
<label for="name">Name</label>
<input name="name" id="name" placeholder="Name here"></input>
<label for="fruits" id="fruits">Fruits</label>
<select name="fruits">
<option value="">--Choose your fav--</option>
<option value="apple">Apple</option>
<option value="banana">Banana</option>
<option value="pear">Pear</option>
</select>
<label for="fruits-veg" id="fruits-veg">Fruits/Veg</label>
<select name="fruits-veg">
<option value="">--Choose your fav--</option>
<optgroup label="Fruits">
<option value="apple">Apple</option>
<option value="banana">Banana</option>
</optgroup>
<optgroup label="Vegetables">
<option value="potato">Potato</option>
<option value="onion">Onion</option>
</optgroup>
</select>
<fieldset>
<legend>Answer these yes/nos</legend>
<input type="checkbox" id="check-smart" name="check-smart" checked/>
<label for="check-smart">Smart</label>
<input type="checkbox" id="check-swag" name="check-swag"/>
<label for="check-swag">Swag</label>
<input type="checkbox" id="check-epic" name="check-epic"/>
<label for="check-epic">Epic</label>
</fieldset>
<label for="prog">Progress</label>
<progress id="prog" max="100" value="55">55%</progress>
<label for="colour">Favourite Colour</label>
<input type="color" id="colour" name="colour" value="#CCCCCC"/>
<label for="birth">Birthdate</label>
<input type="date" id="birth" name="birth" min="1900-01-01" max="2020-01-01"/>
<label for="details">Details</label>
<textarea name="details" id="details" rows="4" placeholder="Describe yourself"></textarea>
<button type="button">Submit form</button>
</form>
<h2>Button</h2>
<button type="button">Button!</button>
<a class="button" href="#">Anchor!</a>
<h2>Grid System</h2>
<p>Not using one (curently at least) as it's un-needed. Perhaps if I make my own reset/base CSS file I'll add one for you guys.</p>
<h2>Util<wbr>ities</h2>
<h3>Tags</h3>
<div class="tag">Tag</div>
<p>As a span within <span class="tag">w</span> another element.</p>
<p>Actual usage <span class="tag">Tag&nbsp;1</span> <span class="tag">Tag&nbsp;2</span></p>
<h3>Notecards</h3>
<h3>Alerts</h3>
<h3>Modals</h3>
<h3>Example utils I may want</h3>
<a href="https://getbootstrap.com/docs/5.2/examples/">Bootstrap utilities</a>
<h2>Headers</h2>
<h2>Menus</h2>
<p>Maybe I'll do dropdowns soonish</p>
<h2>Searchbars</h2>
<h2>Inline elements</h2>
<h2>Unplanned<wbr>/<wbr>Dumped for now</h2>
<h3>Address</h3>
<address>testing</address>
<h3>Article</h3>
<article>testing</article>
<aside class="page-nav"><p>page-nav is here</p><ul><li>list 1</li><li>list 2</li></ul></aside>
<h3>Aside</h3>
<aside>Test aside</aside>
<p>There's also the class <code>.page-nav</code></p>
<h3>Images</h3>
<p>Webp. If it doesn't load your browser doesn't support it, but the picture below will work.</p>
<img src="/images/200px.webp" alt="Placeholder image" width="200" height="200">
<h3>Picture</h3>
<picture>
<source type="image/webp" srcset="/images/200px.webp">
<source type="image/jpeg" srcset="/images/200px.png">
<img src="/images/200px.png" alt="Placeholder image" width="200" height="200">
</picture>
<h3>Figure</h3>
<figure>
<picture>
<source type="image/webp" srcset="/images/200px.webp">
<source type="image/jpeg" srcset="/images/200px.png">
<img src="/images/200px.png" alt="Placeholder image" width="200" height="200">
</picture>
</figure>
<figure>
<picture>
<source type="image/webp" srcset="/images/200px.webp">
<source type="image/jpeg" srcset="/images/200px.png">
<img src="/images/200px.png" alt="Placeholder image" width="200" height="200">
</picture>
<figcaption>figcaption</figcaption>
</figure>
<h3>hr</h3>
<hr/>
<h3>misc</h3>
<p>Here's some examples of inline elements I currently don't use (or didn't up to now).</p>
<p>The list consists of <code>abbr</code> for <abbr>abbr</abbr> abbreviations, <code>bdi</code> <bdi>for bidirectional text</bdi>, <code>bdo</code> <bdo dir="rtl">(rtl) for changing text direction</bdo><br/>Oh there was a br (line break), not a new paragraph tag.</p>
<p>If something has been removed, <del>because it's wrong</del> <ins>for any reason</ins>, the <code>del</code> and <code>ins</code> elements are here!</p>
<h3>todo</h3>
<p>cite, data, dfn, em, i, kbd, mark, s, samp, small, strong, sub, sup, time, u, var, wbr</p>
<p>rp, rt, ruby</p>
<h2>Multimedia</h2>
<p>area, audio, img(done elsehwere), map, track, video</p>
<h2>Embedded content</h2>
<p>embed, iframe, object, picture, portal, source</p>
<h2>Svg</h2>
<h2>canvas</h2>
<p>This allows for scripting, animations, games, fancier graphics, etc.</p>
<canvas width="200" height="200"></canvas>
<h2>Interactive elements</h2>
<h3>details</h3>
<details>
<summary>Gangnam style</summary>
OP OP OP OP, OPPA GANGNAM STYLE
</details>
<h3>dialog</h3>
<p>Non-suggested way</p>
<dialog open>
<p>I am a dialog box! You cannot kill me!</p>
<form method="dialog">
<button>Kill</button>
</form>
</dialog>
<p>It's recommended to use JS to toggle dialogs, but to still use <code>dialog</code> (without the open attribute) over a <code>div</code> for semantic reasoning.
<h2>Web components</h2>
<p>slot, template</p>
<p>I've never used these, so I'm not sure 100% about their application, omitting for now.</p>
</section>
<section>
<h2>Up to date</h2>
<p>If you're looking for a complete (and up-to-date) list of HTML elements, look over at the <a href="https://developer.mozilla.org/en-US/docs/Web/HTML/Element" target="_blank" rel="noopener">mdn web docs</a>.</p>
<p>I'm recommending this, as it's where I yoinked all the elements from on <time datetime="2022-12-09">Dec 9th 2022</time>, and it's maintained regularly (unlike this page).<p>
</section>
<section>
#TODO:
<h2>Trivia</h2>
<p>As of today <time datetime="2022-12-09">09/12/22</time> thiss is the largest webpage on my site, with the HTML taking up ~13KB</p>
</section>
</main>
<footer>
<hr/>
<p>Written by <a href="https://aney.co.uk" target="_blank" rel="noopener">@aney</a> with <a href="https://danluu.com/web-bloat/" target="_blank" rel="noopener">web bloat</a> in mind | <a href="https://github.com/Aney/website" target="_blank" rel="noopener">Source Code</a></p>
</footer>
</body>
</html>

@ -15,9 +15,10 @@
<body>
<header>
<a href="#main" class="vh">Jump directly to main content</a>
<h1>Aney's Favourite Sites</h1>
<input id="burger-toggle" type="checkbox"/>
<label class="burger-container" for="burger-toggle"><div class="burger"></div></label>
<label class="burger-container" for="burger-toggle"><div class="burger"></div><span class="sr">Burger menu</span></label>
<hr/>
<nav>
<a href="/">home</a>
@ -30,7 +31,7 @@
<hr/>
</header>
<main>
<main id="main">
<section>
<h2>Websites I frequent</h2>
<p>I use these, but maybe I should stop.</p>

Loading…
Cancel
Save