Commit 24a5c0f3 authored by Mike Jones's avatar Mike Jones

Merge branch 'hugo' into 'master'

Hugo

See merge request !1
parents 5f511a99 52e5c0a6
Pipeline #156 failed with stage
in 45 seconds
[submodule "themes/ananke"]
path = themes/ananke
url = https://github.com/budparr/gohugo-theme-ananke.git
---
layout: default
---
<style type="text/css" media="screen">
.container {
margin: 10px auto;
max-width: 600px;
text-align: center;
}
h1 {
margin: 30px 0;
font-size: 4em;
line-height: 1;
letter-spacing: -1px;
}
</style>
<div class="container">
<h1>404</h1>
<p><strong>Page not found :(</strong></p>
<p>The requested page could not be found.</p>
</div>
source "https://rubygems.org"
# Hello! This is where you manage which Jekyll version is used to run.
# When you want to use a different version, change it below, save the
# file and run `bundle install`. Run Jekyll with `bundle exec`, like so:
#
# bundle exec jekyll serve
#
# This will help ensure the proper Jekyll version is running.
# Happy Jekylling!
gem "sass"
gem "minima"
gem "jekyll", "3.6.2"
gem "jekyll-sass-converter", "1.5.2"
# If you want to use GitHub Pages, remove the "gem "jekyll"" above and
# uncomment the line below. To upgrade, run `bundle update github-pages`.
# gem "github-pages", group: :jekyll_plugins
# If you have any plugins, put them here!
group :jekyll_plugins do
gem "jekyll-feed", "~> 0.6"
end
gem "sass-listen", "~> 4.0.0"
gem 'jekyll-font-awesome-sass'
gem 'jekyll-paginate'
GEM
remote: https://rubygems.org/
specs:
addressable (2.5.2)
public_suffix (>= 2.0.2, < 4.0)
colorator (1.1.0)
ffi (1.9.23)
font-awesome-sass (4.7.0)
sass (>= 3.2)
forwardable-extended (2.6.0)
jekyll (3.6.2)
addressable (~> 2.4)
colorator (~> 1.0)
jekyll-sass-converter (~> 1.0)
jekyll-watch (~> 1.1)
kramdown (~> 1.14)
liquid (~> 4.0)
mercenary (~> 0.3.3)
pathutil (~> 0.9)
rouge (>= 1.7, < 3)
safe_yaml (~> 1.0)
jekyll-feed (0.9.3)
jekyll (~> 3.3)
jekyll-font-awesome-sass (0.1.0)
font-awesome-sass (~> 4)
jekyll (>= 2.5, < 4.0)
jekyll-paginate (1.1.0)
jekyll-sass-converter (1.5.2)
sass (>= 3.4)
jekyll-seo-tag (2.4.0)
jekyll (~> 3.3)
jekyll-watch (1.5.1)
listen (~> 3.0)
kramdown (1.16.2)
liquid (4.0.0)
listen (3.1.5)
rb-fsevent (~> 0.9, >= 0.9.4)
rb-inotify (~> 0.9, >= 0.9.7)
ruby_dep (~> 1.2)
mercenary (0.3.6)
minima (2.3.0)
jekyll (~> 3.5)
jekyll-feed (~> 0.9)
jekyll-seo-tag (~> 2.1)
pathutil (0.16.1)
forwardable-extended (>= 2.6)
public_suffix (3.0.2)
rb-fsevent (0.10.3)
rb-inotify (0.9.10)
ffi (>= 0.5.0, < 2)
rouge (2.2.1)
ruby_dep (1.5.0)
safe_yaml (1.0.4)
sass (3.5.5)
sass-listen (>= 4.0.0)
sass-listen (4.0.0)
rb-inotify (>= 0.9.7, >= 0.9)
PLATFORMS
ruby
DEPENDENCIES
jekyll (= 3.6.2)
jekyll-feed (~> 0.6)
jekyll-font-awesome-sass
jekyll-paginate
jekyll-sass-converter (= 1.5.2)
minima
sass
sass-listen (~> 4.0.0)
BUNDLED WITH
1.16.1
# netsplit.uk
Source control for my personal website built with Jekyll.
## Usage
* bundle install
* yarn install
* bundle exec jekyll serve
## TODO
* Set up CI.
# Welcome to Jekyll!
#
# This config file is meant for settings that affect your whole blog, values
# which you are expected to set up once and rarely edit after that. If you find
# yourself editing this file very often, consider using Jekyll's data files
# feature for the data you need to update frequently.
#
# For technical reasons, this file is *NOT* reloaded automatically when you use
# 'bundle exec jekyll serve'. If you change this file, please restart the server process.
# Site settings
# These are used to personalize your new site. If you look in the HTML files,
# you will see them accessed via {{ site.title }}, {{ site.email }}, and so on.
# You can create any custom variable you would like, and they will be accessible
# in the templates via {{ site.myvariable }}.
title: Netsplit.uk
email: mike@netsplit.org.uk
description: >- # this means to ignore newlines until "baseurl:"
Software development and IRC hosting including private IRC bouncer accounts.
baseurl: "" # the subpath of your site, e.g. /blog
url: "" # the base hostname & protocol for your site, e.g. http://example.com
github_username: n7st
# Should the description be displayed in the page's footer?
display_description: false
# Build settings
markdown: kramdown
theme: minima
plugins:
- jekyll-feed
- jekyll-font-awesome-sass
- jekyll-paginate
# Exclude from processing.
# The following items will not be processed, by default. Create a custom list
# to override the default setting.
# exclude:
# - Gemfile
# - Gemfile.lock
# - node_modules
# - vendor/bundle/
# - vendor/cache/
# - vendor/gems/
# - vendor/ruby/
exclude: []
sass:
load_paths:
- _sass
- node_modules
font-awesome:
assets: true
#paginate: 5
<div class="row post-row">
<div class="col-md-2 post-date">
{% assign date_format = site.minima.date_format | default: "%b %-d, %Y" %}
{{ include.post.date | date: date_format }}
</div>
<div class="col-md-10">
<h4><a href="{{ include.post.url | relative_url }}">{{ include.post.title | escape }}</a></h4>
{% if include.post.excerpt %}
<p>
{{ include.post.content | strip_html | truncatewords: 75 }}
<a class="secondary-text" href="{{ include.post.url | relative_url }}">(more)</a>
</p>
{% endif %}
</div>
</div>
---
layout: default
---
<div class="home">
{{ content }}
{% if site.posts.size > 0 %}
<h2 class="post-list-heading">{{ page.list_title | default: "Posts" }}</h2>
{% for post in site.posts %}
{% include post.html post = post %}
{% endfor %}
{% endif %}
</div>
---
layout: default
---
{% assign counter = 0 %}
{% if site.posts.size > 0 %}
{% for post in site.posts %}
{% if post.tags contains "bnc" %}
{% assign counter = counter | plus: 1 %}
{% endif %}
{% endfor %}
{% endif %}
<div class="home">
{% if page.title %}
<h1 class="page-heading">{{ page.title }}</h1>
{% endif %}
{{ content }}
{% if counter > 0 %}
<h2 class="post-list-heading">{{ page.list_title | default: "Posts" }}</h2>
{% for post in site.posts %}
{% if post.tags contains "bnc" %}
{% include post.html post = post %}
{% endif %}
{% endfor %}
{% endif %}
</div>
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1">
<meta name="description" content="{% if page.description %}{{ page.description }}{% else %}{{ site.description }}{% endif %}">
<link href="https://fonts.googleapis.com/css?family=Domine" rel="stylesheet">
<link type="text/css" rel="stylesheet" href="/assets/main.css">
<title>{% if page.title %}{{ page.title }}{% else %}{{ site.title }}{% endif %}</title>
</head>
<body>
<nav class="navbar navbar-expand-md fixed-top navbar-collapse">
<div id="header_content" class="container">
<a class="navbar-brand" href="{{ "/" | relative_url }}">{{ site.title | escape }}</a>
<button
class="navbar-toggler"
type="button"
data-toggle="collapse"
data-target="#navbarsExampleDefault"
aria-controls="navbarsExampleDefault"
aria-expanded="false"
aria-label="Toggle navigation"
>
<span class="navbar-toggler-icon"></span>
</button>
<ul class="nav navbar-nav navbar-right">
{% assign default_paths = site.pages | sort: "order" | map: "path" %}
{% assign page_paths = site.header_pages | default: default_paths %}
{% if page_paths %}
{% for path in page_paths %}
{% assign my_page = site.pages | where: "path", path | first %}
{% if my_page.title %}
<li class="nav-item">
<a class="nav-link" href="{{ my_page.url }}">{{ my_page.title }}</a>
</li>
{% endif %}
{% endfor %}
{% endif %}
</ul>
</div><!--/ #header_content.container -->
</nav>
<div class="container" id="page_content">
<div class="row">
<div class="col">{{ content }}</div>
</div>
</div><!--/ #page_content.container -->
<div id="footer_content">
<div class="container">
<div id="footer" class="row">
<div class="col-md-4">
<ul class="list-group">
{% if site.github_username%}
<li class="list-group-item justify-content-between">
<i class="fa fa-github" aria-hidden="true"></i>
<a
href="https://github.com/{{ site.github_username | escape }}"
>
{{ site.github_username | escape }}
</a>
</li>
{% endif %}
{% if site.email %}
<li class="list-group-item justify-content-between">
<i class="fa fa-envelope-open" aria-hidden="true"></i>
<a href="mailto:{{ site.email | escape }}">{{ site.email | escape }}</a>
</li>
{% endif %}
<li class="list-group-item justify-content-between">
<i class="fa fa-rss"></i>
<a href="{{ "/feed.xml" | relative_url }}">Subscribe via RSS</a>
</li>
</ul>
</div>
<div class="col-md-8">
<ul class="list-group">
{% if site.description and site.display_description %}
<li class="list-group-item justify-content-between">
{{ site.description | escape }}
</li>
{% endif %}
</ul>
</div>
</div><!--/ .row -->
</div><!--/ .container -->
</div><!--/ #footer_content.container -->
<!-- Scripts last -->
<script src="{{ '/node_modules/jquery/dist/jquery.slim.min.js' | prepend: site.baseurl }}"></script>
<script src="{{ '/node_modules/popper.js/dist/umd/popper.min.js' | prepend: site.baseurl }}"></script>
<script src="{{ '/node_modules/bootstrap/dist/js/bootstrap.min.js' | prepend: site.baseurl }}"></script>
</body>
</html>
---
layout: default
---
<h1 class="page-heading">Netsplit.uk</h1>
<p>
I am currently available for part-time development or hosting projects. Feel
free to contact me using one of the links below. At the moment I am mostly
interested in working with Perl and Golang.
</p>
---
layout: post
title: "Interglow BNC Server Launch"
date: 2018-01-01 14:47:28 +0000
categories: bnc
tags: bnc
---
In order to replace the now-defunct (shut down at the beginning of 2018)
FreeBNC.co.uk's Interglow sBNC server, I have set up a new virtual server running
[ZNC](https://znc.in). There is no formal application process and the bouncers
may be used on any network (where permitted by the IRC network itself).
In order to apply for a bouncer, send me (Mike) a private message on
[SwiftIRC](irc://irc.swiftirc.net) or [Snoonet](irc://irc.snoonet.org) with the
username you would like and an e-mail address in case of password resets.
## Key Information
* Based in London, United Kingdom.
* IPv6 capable.
* Requires a secure connection using SSL.
* Running ZNC 1.7.x-git.
* Custom hostmasks available upon request.
---
layout: post
title: "quoteDB v1.0.0 Release"
date: 2018-03-02 21:29:44
categories: projects irc
tags: quote irc golang docker
---
[quoteDB v1.0.0 is now available on GitHub](https://github.com/n7st/quoteDB/releases/tag/v1.0.0).
This release provides the first working version of quoteDB, allowing IRC users
to add quotes directly from their channel into a [Bash](http://bash.org)-like
quotes database. The program can be self-hosted and run in a [Docker](https://www.docker.com)
container. Presently, the web UI is read-only, but I'm working on moderation
features for the next release.
I recommend installation using [Docker Compose](https://docs.docker.com/compose/).
Please raise any issues or bugs on the [GitHub repository](https://github.com/n7st/quoteDB).
## Technical details
- Written in Golang
- Uses an SQLite3 database
- Basic web UI using Bootstrap v3.3.7 and jQuery
## Limitations
- Quote moderation must be done directly in the database
## Future development
- Quote moderation features
- Other input sources (Slack, Discord)
// Overwrite variables before loading Bootstrap's defaults
// Colours
$lgrey: #e6e6e6;
$lmgrey: #bbbbbb;
$dgrey: #212121;
$brand-green: #337a34;
// Layouts
$borderrad: 0;
$toppad: 20px;
$topmar: $toppad / 2;
// Load Bootstrap's defaults
@import "../node_modules/bootstrap/scss/functions";
@import "../node_modules/bootstrap/scss/variables";
---
layout: page
title: About
permalink: /about/
order: 999
---
* Built with [Jekyll](https://jekyllrb.com) and [Bootstrap](https://getbootstrap.com).
* Theme inspired by [Minima](https://github.com/jekyll/minima).
* Source available on [GitHub](https://github.com/n7st/netsplit.uk).
---
title: "{{ replace .Name "-" " " | title }}"
date: {{ .Date }}
draft: true
---
---
---
$fa-font-path: "fonts/font-awesome/";
@import "variables";
@import "bootstrap/scss/bootstrap";
@import 'font-awesome';
body {
font-family: 'Domine', serif;
}
nav {
background: white;
border-bottom: 1px solid $lgrey;
border-top: 5px solid $brand-green;
border-radius: $borderrad;
padding-bottom: 5px;
}
h1 {
font-size: 1.4em;
line-height: 1.5em;
}
h2 {
font-size: 1.3em;
line-height: 1.4em;
}
h3 {
font-size: 1.2em;
line-height: 1.3em;
}
h4 {
font-size: 1.1em;
line-height: 1.2em;
}
a, .btn-nodec {
color: $dgrey;
}
a:hover, .btn-nodec:hover {
color: $brand-green;
}
button {
cursor: pointer;
}
.btn-nodec {
display: inline;
padding: 0;
}
.secondary-text {
color: $lmgrey;
}
div#page_content {
margin-top: 80px;
}
div#footer_content {
border-radius: $borderrad;
border-top: 1px solid $lgrey;
color: $lmgrey;
margin-top: $topmar;
padding-top: $toppad;
}
.list-group {
li {
border: 0;
padding: 3px;
}
i {
width: 20px;
}
}
.post-row {
border-bottom: 1px solid $lgrey;
padding-top: 20px;
}
.post-row:first-child {
padding-top: 0;
}
.post-row:last-child {
border-bottom: 0;
}
.post-date {
text-align: right;
}
---
layout: blog
title: Blog
permalink: /blog/
order: 1
---
baseURL = "http://localhost:1313"
languageCode = "en-gb"
title = "Netsplit.uk"
theme = "netsplit"
Paginate = 5
pluralizelisttitles = false
[taxonomies]
author = "authors"
tag = "tags"
[params]
gitlab = "https://git.netsplit.uk"
source = "/mike/netsplit.uk"
irc = "https://kiwiirc.com/nextclient/irc.snoonet.org/##netsplit"
email = "mike+website@netsplit.uk"
[menu]
[[menu.main]]
identifier = "about"
name = "About"
pre = ""
url = "/about/"
weight = -120
[[menu.main]]
identifier = "projects"
name = "Projects"
pre = ""
url = "/project/"
weight = -115
---
title: "About"
date: 2019-01-06T19:40:38Z
draft: false
#description: |
# We build reliable, consistent web applications. Please contact us using the
# links in the footer about any green or brownfield software projects you have
# in mind.
type: about
---
## This site
* Static site built with [Hugo](https://gohugo.io/).
* Themed with [Bootstrap](https://getbootstrap.com).
* Source available on [Gitlab](https://git.netsplit.uk/mike/netsplit.uk).
---
title: "Containerised applications"
date: 2019-01-06T19:40:38Z
draft: true
type: about
weight: 2
---
Dockerised cloud-native applications written in Golang.
---
title: "Perl 5"
date: 2019-01-06T19:40:38Z
draft: true
type: about
weight: 1
---
Modernisation, maintenance, and rescue of existing Perl 5 projects is our
speciality.
---
title: "Static website conversions"
date: 2019-01-06T19:40:38Z
draft: true
type: about
weight: 3
---
Have you got an insecure content management system? We can convert it into
a simple, secure static site.
---
title: "Mike Jones"
job_title: "Software Engineer"
gitlab: "https://git.netsplit.uk/mike"
github: "https://github.com/n7st"
website: "https://netsplit.uk"
---
---
title: "Building a Mattermost Chatbot in Perl"
date: 2019-01-09T17:53:11Z
draft: false
type: post
authors: [ 'Mike Jones' ]
tags: [ 'Perl 5', 'Chatops', 'Bot', 'WebService::Mattermost', 'Tutorial' ]
description: |
This article provides a brief overview of how to set up a Mattermost chatbot
in Perl 5.
---
## Introduction
[WebService::Mattermost](https://metacpan.org/pod/WebService::Mattermost) is an
alternative [Mattermost](https://mattermost.com/) chatbot library written in
Perl. It provides two interfaces to the Mattermost API and WebSocket gateway:
from a script, and as a base for [Moo](https://metacpan.org/pod/Moo) and
[Moose](https://metacpan.org/pod/Moose) classes. In this article, I will cover
how to use it in a basic script, and demonstrate with a bot which greets users.
## Requirements
Installable from [CPAN](https://www.cpan.org/):
* [`WebService::Mattermost`](https://metacpan.org/pod/WebService::Mattermost)
([source](https://git.netsplit.uk/mike/webservice-mattermost))
## Final code
For anyone who doesn't want to read, here is the final product. You will need to
change the authentication values in the constructor for
[`WebService::Mattermost::V4::Client`](https://metacpan.org/pod/WebService::Mattermost::V4::Client)
to your own Mattermost server and bot user.
{{< gist n7st d73a03a0aa17b731fd31e2b4fa219e6c "greeter.pl" >}}