Browse Source

add site built using jekyll

pull/6/head
Craig Stewart 7 months ago
parent
commit
38a9ab468b
  1. 61
      404.html
  2. 2
      README.md
  3. 61
      about.html
  4. 97
      blog/2018/10/29/my-first-jekyll-post.html
  5. 126
      blog/2018/11/09/tag-cloud-in-jekyll.html
  6. 97
      blog/2019/02/19/generating-a-feed-for-tagged-posts.html
  7. 97
      blog/2019/02/27/generating-tag-cloud-by-using-javascript.html
  8. 107
      blog/2019/05/21/why-we-should-fear-the-righteous.html
  9. 101
      blog/2019/06/16/who-are-you-really.html
  10. 113
      blog/2019/08/03/arrogance-of-it-industry.html
  11. 113
      blog/2019/08/18/location-services-how-hard.html
  12. 99
      blog/2019/08/25/location-finder-first-steps.html
  13. 111
      blog/2019/08/25/location-finder-hosting.html
  14. 101
      blog/2019/08/30/location-finder-improvements.html
  15. 99
      blog/2019/09/01/comment-random-numbers.html
  16. 109
      blog/2019/09/07/slow-progress.html
  17. 99
      blog/2020/01/10/ldap-auth-working.html
  18. 103
      blog/2020/03/15/tls-settings-update.html
  19. 103
      blog/2020/04/14/science-as-a-religion.html
  20. 97
      blog/2020/05/08/azure-ad-login-working.html
  21. 95
      blog/2020/05/14/location-finder-license.html
  22. 135
      blog/2020/07/16/new-shed.html
  23. 135
      blog/2020/07/19/power-shed.html
  24. 107
      blog/2020/07/23/solar-panel-up.html
  25. 101
      blog/2020/08/02/migrating-to-wsl.html
  26. 125
      blog/2020/08/02/shed-bike-rack.html
  27. 109
      blog/2020/08/08/shed-shelves.html
  28. 99
      blog/2020/09/20/further-thoughts-on-identity.html
  29. 95
      blog/entry/3-years-on.html
  30. 106
      blog/entry/a-new-project-emails.html
  31. 99
      blog/entry/an_uneasy_feeling.html
  32. 97
      blog/entry/apache-config-ssl-and-certbot.html
  33. 95
      blog/entry/blog-migration-progress.html
  34. 97
      blog/entry/blog-theme.html
  35. 101
      blog/entry/brexit-democracy-and-liberalism.html
  36. 95
      blog/entry/brexit-democracy-and-priorities.html
  37. 96
      blog/entry/building-a-git-repository-server.html
  38. 95
      blog/entry/code-repositories.html
  39. 102
      blog/entry/controversial_topics_of_discussion.html
  40. 98
      blog/entry/coping-with-grief-as-an.html
  41. 104
      blog/entry/cycle_computer_concept.html
  42. 101
      blog/entry/debian_dist_upgrade.html
  43. 100
      blog/entry/dns-over-https-why-it.html
  44. 101
      blog/entry/elections.html
  45. 100
      blog/entry/electronics_first_steps.html
  46. 97
      blog/entry/even-further-adventures-in-ssl.html
  47. 96
      blog/entry/first-attempt-at-responsive-design.html
  48. 95
      blog/entry/free-ssl-certifcates-and-trust.html
  49. 97
      blog/entry/free-ssl-certifcates-in-a.html
  50. 96
      blog/entry/further_adventures_in_ssl.html
  51. 95
      blog/entry/getting-postfix-and-dovecot-working.html
  52. 95
      blog/entry/god-damn-it-plus-net.html
  53. 100
      blog/entry/hosted-website.html
  54. 95
      blog/entry/house-keeping-on-my-mail.html
  55. 98
      blog/entry/if-you-have-nothing-to.html
  56. 126
      blog/entry/iptables-config.html
  57. 176
      blog/entry/lets-talk-about-social-justice.html
  58. 95
      blog/entry/mail-server-update.html
  59. 127
      blog/entry/migrating-my-blog.html
  60. 97
      blog/entry/new-gtld-domain.html
  61. 106
      blog/entry/new-mail-server.html
  62. 128
      blog/entry/new_blog.html
  63. 95
      blog/entry/oh-shit-perhaps-i-should.html
  64. 97
      blog/entry/plusnet-and-email-security-whilst.html
  65. 99
      blog/entry/poodle_aka_cve_2014_4566.html
  66. 99
      blog/entry/probably-my-last-blog-post.html
  67. 98
      blog/entry/roller-weblogger-update.html
  68. 95
      blog/entry/should-have-seen-it-coming.html
  69. 96
      blog/entry/so-i-decided-to-join.html
  70. 96
      blog/entry/so-i-registered-a-domain.html
  71. 96
      blog/entry/technical-debt-laziness-and-grub.html
  72. 95
      blog/entry/the-death-of-a-smartphone.html
  73. 98
      blog/entry/the-evils-of-religion.html
  74. 100
      blog/entry/the-price-you-pay.html
  75. 96
      blog/entry/why-can-t-commuters-get.html
  76. 159
      blog/feed/entries/atom
  77. 65
      blog/feed/entries/by_tag/sysadmin.xml
  78. 260
      blog/index.html
  79. 278
      blog/page2/index.html
  80. 260
      blog/page3/index.html
  81. 250
      blog/page4/index.html
  82. 287
      blog/page5/index.html
  83. 94
      blog/tags/azure_ad/index.html
  84. 94
      blog/tags/bcs/index.html
  85. 124
      blog/tags/blog/index.html
  86. 156
      blog/tags/breaking/index.html
  87. 255
      blog/tags/comment/index.html
  88. 205
      blog/tags/comment/page2/index.html
  89. 172
      blog/tags/controversial/index.html
  90. 102
      blog/tags/cycling/index.html
  91. 110
      blog/tags/design/index.html
  92. 121
      blog/tags/electronics/index.html
  93. 229
      blog/tags/email/index.html
  94. 153
      blog/tags/embarrassing/index.html
  95. 136
      blog/tags/equality/index.html
  96. 207
      blog/tags/fail/index.html
  97. 124
      blog/tags/git/index.html
  98. 185
      blog/tags/golang/index.html
  99. 96
      blog/tags/grief/index.html
  100. 102
      blog/tags/ideas/index.html

61
404.html

@ -0,0 +1,61 @@
<!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="viewport" content="width=device-width, initial-scale=1.0" />
<link rel="stylesheet" href="/styles/default.css">
<link rel="stylesheet" href="/styles/blog.css">
<title></title><link type="application/atom+xml" rel="alternate" href="/blog/feed/entries/atom" title="My Blog" /></head>
<body><div id="wrapper">
<div id="header">
<h1>
</h1>
</div>
<div id="layout">
<div id="navigation">
<p class="link">
<a href="/index.html">
Home
</a>
</p>
<p class="link">
<a href="/about.html">
About Me
</a>
</p>
<p class="link">
<a href="/contact.html">
Contact Me
</a>
</p>
<p class="link">
<a href="/guides/">
Guides
</a>
</p>
<p class="link">
<a href="/blog/">
My Blog
</a>
</p>
</div>
<div id="content">
<main class="page-content" aria-label="Content">
<div class="wrapper">
<div class="container">
<h1>404</h1>
<p><strong>Page not found :(</strong></p>
<p>The requested page could not be found.</p>
</div>
</div>
</main></div>
</div>
</div>
</body>
</html>

2
README.md

@ -0,0 +1,2 @@
# website_rebuild_jekyll
rebuild my site and blog in jekyll

61
about.html

@ -1,17 +1,17 @@
<!DOCTYPE html>
<html lang="en">
<head>
<link href="/styles/default.css" rel="stylesheet" type="text/css" />
<title>
About Me
</title>
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
</head>
<body>
<div id="wrapper">
<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="viewport" content="width=device-width, initial-scale=1.0" />
<link rel="stylesheet" href="/styles/default.css">
<link rel="stylesheet" href="/styles/blog.css">
<title>My Website</title><link type="application/atom+xml" rel="alternate" href="/blog/feed/entries/atom" title="My Blog" /></head>
<body><div id="wrapper">
<div id="header">
<h1>
About Me
My Website
</h1>
</div>
<div id="layout">
@ -31,40 +31,35 @@ About Me
Contact Me
</a>
</p>
<!--<p class="link">
<a href="/cv.html">
My CV
</a>
</p>-->
<p class="link">
<a href="/guides/">
Guides
</a>
</p>
<p class="link">
<a href="https://www.craig-james-stewart.co.uk/blog/">
<a href="/blog/">
My Blog
</a>
</p>
</div>
<div id="content">
<p>
My name is Craig, I am an experienced Systems Administrator. I enjoy swimming, and cycling, although I don't do enough of either, and food, which I do too much of. My interests also include reading fantasy and sci-fi, particularly if it has a funny side.
</p>
<p>
I have set this site up largely because I can, and also as a precursor to migrating my existing site over to the hosts this site lives on. The design I am aware isn't great, but is going to be a work in progress for some time. The site lives on two virtual hosts and the content is kept in sync by being uploaded through a workflow based on git, although more details can be found on my blog, or by asking me.
</p>
<p>
One of the interests I have is debate, and also knowledge for knowledge sake. This interest I tend to expect other people to share, which can annoy those that don't share it, so I try to keep it to myself with people I don't know. One upshot of this is that I have a wide range of knowledge on quite diverse topics, not very deep knowledge in many of them mind, but deep enough to hold my own in a debate about many subjects with most people.
</p>
<p>
I am quite proud of the fact that I am a member of Mensa, having a quite high IQ, I also like to consider myself generally quite intelligent, even accepting the fact that IQ is a very narrow measure of intelligence. That said I am also aware that on occasion I can be quite stupid.
</p>
<p>
I like to think I am a reasonably moral person, but I do have failings, and I can sometimes be quite pragmatic. This, combined with quite strongly held views in some areas, can make me quite difficult to get along with at times, but I have learnt to not judge others by my beliefs. Unless of course they try to force their beliefs onto me, but that is not a topic for here.
</p>
</div>
<main class="page-content" aria-label="Content">
<div class="wrapper">
<p>My name is Craig, I am an experienced Systems Administrator. I enjoy swimming, and cycling, although I don’t do enough of either, and food, which I do too much of. My interests also include reading fantasy and sci-fi, particularly if it has a funny side.</p>
<p>I have set this site up largely because I can, and also as a precursor to migrating my existing site over to the hosts this site lives on. The design I am aware isn’t great, but is going to be a work in progress for some time. The site lives on two virtual hosts and the content is kept in sync by being uploaded through a workflow based on git, although more details can be found on my blog, or by asking me.</p>
<p>One of the interests I have is debate, and also knowledge for knowledge sake. This interest I tend to expect other people to share, which can annoy those that don’t share it, so I try to keep it to myself with people I don’t know. One upshot of this is that I have a wide range of knowledge on quite diverse topics, not very deep knowledge in many of them mind, but deep enough to hold my own in a debate about many subjects with most people.</p>
<p>I am quite proud of the fact that I am a member of Mensa, having a quite high IQ, I also like to consider myself generally quite intelligent, even accepting the fact that IQ is a very narrow measure of intelligence. That said I am also aware that on occasion I can be quite stupid.</p>
<p>I like to think I am a reasonably moral person, but I do have failings, and I can sometimes be quite pragmatic. This, combined with quite strongly held views in some areas, can make me quite difficult to get along with at times, but I have learnt to not judge others by my beliefs. Unless of course they try to force their beliefs onto me, but that is not a topic for here.</p>
</div>
</main></div>
</div>
</div>
</body>
</html>

97
blog/2018/10/29/my-first-jekyll-post.html

@ -0,0 +1,97 @@
<!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="viewport" content="width=device-width, initial-scale=1.0" />
<link rel="stylesheet" href="/styles/default.css">
<link rel="stylesheet" href="/styles/blog.css">
<script src="/scripts/tag_cloud.js"></script>
<title>My First Post Powered By Jekyll</title><link type="application/atom+xml" rel="alternate" href="/blog/feed/entries/atom" title="My Blog" /></head>
<body><div id="wrapper">
<div id="header">
<h1>
My First Post Powered By Jekyll
</h1>
</div>
<div id="layout">
<div id="navigation">
<p class="link">
<a href="/index.html">
Home
</a>
</p>
<p class="link">
<a href="/about.html">
About Me
</a>
</p>
<p class="link">
<a href="/contact.html">
Contact Me
</a>
</p>
<p class="link">
<a href="/guides/">
Guides
</a>
</p>
<p class="link">
<a href="/blog/">
My Blog
</a>
</p>
</div>
<div id="content">
<main class="page-content" aria-label="Content">
<div class="wrapper">
<div id="blogcontent">
<div class="next-previous">
<a href="/blog/entry/probably-my-last-blog-post">Probably my last blog post powered by Roller</a> |
<a href="/blog/">Main</a>
| <a href="/blog/2018/11/09/tag-cloud-in-jekyll.html">How I configured a tag cloud in Jekyll</a>
</div>
<div class="post">
<div class="postentry">
<p>As I mentioned in <a href="/blog/entry/probably-my-last-blog-post">my last post</a> I have been working on the migration of my blog, well it is now completed. This is my first post powered by <a href="https://jekyllrb.com/">Jekyll</a>. So far everything appears to be working as expected, but I’m sure I’ll find niggles that need fixing as time goes on.</p>
<p>As before the design is a work in progress too.</p>
</div>
<p class="meta">posted at 7:00 pm on 29 Oct 2018 by Craig Stewart<br /><br /></p><p class="tags">
Tags:<a class="tagLink" href="/blog/tags/web">web</a>&nbsp;<a class="tagLink" href="/blog/tags/project">project</a>&nbsp;<a class="tagLink" href="/blog/tags/not-a-designer">not-a-designer</a>&nbsp;</p>
<p class="postfeedback">
</p></div>
</div>
<div id="sidebar">
<div class="well">
<h3 class="tag">Hot tags</h3>
<div id="tagcloud">
</div>
</div>
<ul>
<li>
<h2>Newsfeeds</h2>
<ul class="rFeeds">
<li><a href="/blog/feed/entries/atom">All</a></li>
<li><a href="/blog/feed/entries/by_tag/sysadmin.xml">Posts tagged sysadmin</a></li>
</ul>
</li>
</ul>
</div>
</div>
</main></div>
</div>
</div>
</body>
</html>

126
blog/2018/11/09/tag-cloud-in-jekyll.html

@ -0,0 +1,126 @@
<!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="viewport" content="width=device-width, initial-scale=1.0" />
<link rel="stylesheet" href="/styles/default.css">
<link rel="stylesheet" href="/styles/blog.css">
<script src="/scripts/tag_cloud.js"></script>
<title>How I configured a tag cloud in Jekyll</title><link type="application/atom+xml" rel="alternate" href="/blog/feed/entries/atom" title="My Blog" /></head>
<body><div id="wrapper">
<div id="header">
<h1>
How I configured a tag cloud in Jekyll
</h1>
</div>
<div id="layout">
<div id="navigation">
<p class="link">
<a href="/index.html">
Home
</a>
</p>
<p class="link">
<a href="/about.html">
About Me
</a>
</p>
<p class="link">
<a href="/contact.html">
Contact Me
</a>
</p>
<p class="link">
<a href="/guides/">
Guides
</a>
</p>
<p class="link">
<a href="/blog/">
My Blog
</a>
</p>
</div>
<div id="content">
<main class="page-content" aria-label="Content">
<div class="wrapper">
<div id="blogcontent">
<div class="next-previous">
<a href="/blog/2018/10/29/my-first-jekyll-post.html">My First Post Powered By Jekyll</a> |
<a href="/blog/">Main</a>
| <a href="/blog/2019/02/19/generating-a-feed-for-tagged-posts.html">Generating a feed for posts with a given tag</a>
</div>
<div class="post">
<div class="postentry">
<p>So the migration of my blog is now complete, and for the most part it was pretty easy. One of the things I did find tricky was getting the tag cloud to work. This post isn’t meant as a guide for how to do so yourself, but as a breakdown of the process I went through, and why I made some of the choices that I made. I doubt I have the best solution, but it’s close to what I wanted.</p>
<p>The first thing I did was google “tag cloud jekyll” and this came up with lots of different guides on how to build a tag cloud in jekyll, but following them didn’t get me a satisfactory result, they either didn’t output anything, or their output was meaningless. I’m willing to accept I was doing something wrong, but I wanted a tag cloud, so I decided to break down what I wanted. Previously the tag cloud on my blog took the most commonly used tags, and sorted them into one of 5 classes which gave them a different fontsize dependent on how much they’re used. I wanted something similar. Rather than going to the effort of sorting them into 5 groups though I decided to just pick the font size based on the tags usage. So I needed someway of determining how much the tags were used.</p>
<p>So the first thing I wanted to do is determine the average amount a tag is used, mathmatically this is simply the total number of tags divided by the number of unique tags, however when I started this I only knew how to get the number of unique tags, {{ site.tags.size }} where “site.tags” is an array of the unique site tags.</p>
<p>As I had an array of the unique tags I knew I could itterate over them with something like the following</p>
<pre>
{% for tag in site.tags %}
{% do something with tag here %}
{% endfor %}
</pre>
<p>I ended up using two of these for loops, one to determine the total number of tags, and the other to output the tag cloud. The first thing I tried was outputing {{ tag.size }} but found that this was always 2. It turned out that each tag in “site.tags” was itself an array, that always contained 2 items. It didn’t take long to find out that “tag[0]” was the title of the tag. What took me longer to work out was that “tag[1]” was another array, this time of all the posts using that tag. This proved to be useful, I could count how many posts each tag was used in, and add them up for the total number of tags used. This gave me</p>
<pre>
{% assign total_tags = 0 %}
{% for tag in site.tags %}
{% assign total_tags = total_tags | plus: tag[1].size %}
{% endfor %}
</pre>
<p>So now I just had to make use of this variable. I wanted a tag that matched the average to have a font size of 100%, and a more heavily used tag to be bigger, and a lesser used tag to be smaller, the maths of this should be simple “amount the tag is used”/”average tag usage”x”100”, using the variables we have this would be “tag[1].size”/(“total_tags”/”site.tags.size”)x”100”. I wanted to rearrange this so that I didn’t need the brackets. Fortunately dividing by a fraction, we can multiply by the denominator, giving us “tag[1].size”x”site.tags.size”/”total_tags”x”100”. The maths function in jekyll unfortunately only appeared to work with whole numbers, so I needed to move the division to as late in the equation as possible. This gave me</p>
<pre>
{% for tag in site.tags %}
{{ tag[1].size | times: site.tags.size | times: 100 | divided_by: total_tags }}
{% endfor %}
</pre>
<p>This gave me a number, to represent the font size, which needed wrapping in the relevant html code</p>
<pre>
{% for tag in site.tags %}
&lt;a href="/blog/tags/{{ tag[0] }}" style="font-size:{{ tag[1].size | times: site.tags.size | times: 100 | divided_by: total_tags }}%"&gt;{{ tag[0] }}&lt;/a&gt;
{% endfor %}
</pre>
<p>Alas this resulted in the lesser used tags were far too small, and the more used tags were far too big, after playing with some different numbers I settled on multiplying by 25 instead of 100, and then adding 50 to make the smallest tags more legible, meaning the font size became “{{ tag[1].size | times: site.tags.size | times: 25 | divided_by: total_tags | plus: 50 }}”. I also chose to exclude tags used just once from the tag cloud.</p>
</div>
<p class="meta">posted at 4:24 pm on 9 Nov 2018 by Craig Stewart<br /><br /></p><p class="tags">
Tags:<a class="tagLink" href="/blog/tags/web">web</a>&nbsp;<a class="tagLink" href="/blog/tags/not-a-designer">not-a-designer</a>&nbsp;</p>
<p class="postfeedback">
</p></div>
</div>
<div id="sidebar">
<div class="well">
<h3 class="tag">Hot tags</h3>
<div id="tagcloud">
</div>
</div>
<ul>
<li>
<h2>Newsfeeds</h2>
<ul class="rFeeds">
<li><a href="/blog/feed/entries/atom">All</a></li>
<li><a href="/blog/feed/entries/by_tag/sysadmin.xml">Posts tagged sysadmin</a></li>
</ul>
</li>
</ul>
</div>
</div>
</main></div>
</div>
</div>
</body>
</html>

97
blog/2019/02/19/generating-a-feed-for-tagged-posts.html

@ -0,0 +1,97 @@
<!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="viewport" content="width=device-width, initial-scale=1.0" />
<link rel="stylesheet" href="/styles/default.css">
<link rel="stylesheet" href="/styles/blog.css">
<script src="/scripts/tag_cloud.js"></script>
<title>Generating a feed for posts with a given tag</title><link type="application/atom+xml" rel="alternate" href="/blog/feed/entries/atom" title="My Blog" /></head>
<body><div id="wrapper">
<div id="header">
<h1>
Generating a feed for posts with a given tag
</h1>
</div>
<div id="layout">
<div id="navigation">
<p class="link">
<a href="/index.html">
Home
</a>
</p>
<p class="link">
<a href="/about.html">
About Me
</a>
</p>
<p class="link">
<a href="/contact.html">
Contact Me
</a>
</p>
<p class="link">
<a href="/guides/">
Guides
</a>
</p>
<p class="link">
<a href="/blog/">
My Blog
</a>
</p>
</div>
<div id="content">
<main class="page-content" aria-label="Content">
<div class="wrapper">
<div id="blogcontent">
<div class="next-previous">
<a href="/blog/2018/11/09/tag-cloud-in-jekyll.html">How I configured a tag cloud in Jekyll</a> |
<a href="/blog/">Main</a>
| <a href="/blog/2019/02/27/generating-tag-cloud-by-using-javascript.html">Generating the tag cloud using java script</a>
</div>
<div class="post">
<div class="postentry">
<p>A colleague of mine started to work on a planet feed of blogs from people we both work with. The planet feed takes an rss or atom feed from each blog and sorts the posts from all of these together. My issue with that for my blog is that not all the posts I make are applicable to the work that I do. So I wanted to generate a feed that is more work related. I already use the <a href="https://github.com/jekyll/jekyll-feed" title="A Jekyll plugin to generate an Atom (RSS-like) feed of your Jekyll posts">jekyll-feed plugin</a> to generate the feed for my blog so it shouldn’t be too hard right?</p>
<p>So the first thing I needed to do was work out how to generate a feed based upon a tag. Unfortunately the jekyll-feed plugin doesn’t appear to support feeds by tag. And when <a href="https://github.com/jekyll/jekyll-feed/issues/70" title="Option to have feeds by tags/categories #70">it was asked for</a> the people maintaining that plugin didn’t have the time to develop that feature. Now this is not a dig at them, they have developed, and maintain, code that I get to use for free. But it does irritate me that the platform I use does not have a feature that is common to most of the popular blog platforms out there. Now the discussion in that feature request included a solution that fits with my requirements, a feed for one tag. Create a template for the feed, and set it to pull in the tag I want a feed for. However not being able to use the plugin that already generates the feed for my site annoyed me, and never underestimate the motivation of an annoyed sysadmin. Now the beauty of open-source software is that if you don’t like it you can change it. So I pulled down the code, and started working on making it do what I want. Alas I’m not very good with Ruby, so it took me some time, but I did eventually manage to cobble something together. It did what I wanted, and I also built to be able to generate feeds for a subset of tags or all tags if you wanted. So now I had code, not very good code mind, that did what I wanted and that at least some others wanted, the nice thing to do would be to share, so I opened a <a href="https://github.com/jekyll/jekyll-feed/pull/264" title="Feed by tag #264">pull request</a> both to share my efforts, and in the hope that I may be able to get help improving my code.</p>
</div>
<p class="meta">posted at 8:56 pm on 19 Feb 2019 by Craig Stewart<br /><br /></p><p class="tags">
Tags:<a class="tagLink" href="/blog/tags/jekyll">jekyll</a>&nbsp;<a class="tagLink" href="/blog/tags/sysadmin">sysadmin</a>&nbsp;<a class="tagLink" href="/blog/tags/blog">blog</a>&nbsp;<a class="tagLink" href="/blog/tags/open-source">open-source</a>&nbsp;</p>
<p class="postfeedback">
</p></div>
</div>
<div id="sidebar">
<div class="well">
<h3 class="tag">Hot tags</h3>
<div id="tagcloud">
</div>
</div>
<ul>
<li>
<h2>Newsfeeds</h2>
<ul class="rFeeds">
<li><a href="/blog/feed/entries/atom">All</a></li>
<li><a href="/blog/feed/entries/by_tag/sysadmin.xml">Posts tagged sysadmin</a></li>
</ul>
</li>
</ul>
</div>
</div>
</main></div>
</div>
</div>
</body>
</html>

97
blog/2019/02/27/generating-tag-cloud-by-using-javascript.html

@ -0,0 +1,97 @@
<!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="viewport" content="width=device-width, initial-scale=1.0" />
<link rel="stylesheet" href="/styles/default.css">
<link rel="stylesheet" href="/styles/blog.css">
<script src="/scripts/tag_cloud.js"></script>
<title>Generating the tag cloud using java script</title><link type="application/atom+xml" rel="alternate" href="/blog/feed/entries/atom" title="My Blog" /></head>
<body><div id="wrapper">
<div id="header">
<h1>
Generating the tag cloud using java script
</h1>
</div>
<div id="layout">
<div id="navigation">
<p class="link">
<a href="/index.html">
Home
</a>
</p>
<p class="link">
<a href="/about.html">
About Me
</a>
</p>
<p class="link">
<a href="/contact.html">
Contact Me
</a>
</p>
<p class="link">
<a href="/guides/">
Guides
</a>
</p>
<p class="link">
<a href="/blog/">
My Blog
</a>
</p>
</div>
<div id="content">
<main class="page-content" aria-label="Content">
<div class="wrapper">
<div id="blogcontent">
<div class="next-previous">
<a href="/blog/2019/02/19/generating-a-feed-for-tagged-posts.html">Generating a feed for posts with a given tag</a> |
<a href="/blog/">Main</a>
| <a href="/blog/2019/05/21/why-we-should-fear-the-righteous.html">Why we should fear the righteous</a>
</div>
<div class="post">
<div class="postentry">
<p>So I have an unusual workflow for my blog. There are a number of instructions on the web for deploying a jekyll based site template to a server from a git repo, and having the content auto built into the web root. Although I do store my jekyll blog in a git repo, and have my webhosts set up to receive files automatically from git, I do not do this.</p>
<p>The reasons I don’t do the sensible thing I describe above are that I simply don’t want much active code running on those servers beyond what is needed to do their main functions, so they don’t have ruby installed, and consequently couldn’t run jekyll. It doesn’t help that currently <a href="/blog/2019/02/19/generating-a-feed-for-tagged-posts.html" title="Generating a feed for posts with a given tag">I am using a forked version of jekyll feed</a>. So what I currently do is generate the site content locally and put that into a separate git repo. I then commit the changes, and raise a pull request on the <a href="https://gitea.io/" title="Gitea - Git with a cup of tea">Gitea</a> server <a href="https://craig.stewart.zone/guides/building-a-git-repo/" title="Building A git Repository Server">I set up</a>. The issue here is with the <a href="/blog/2018/11/09/tag-cloud-in-jekyll.html" title="How I configured a tag cloud in Jekyll">tag cloud</a> being on most of my blog posts and other assorted pages these pull requests are getting somewhat unwieldy. They can include changes to over 100 files. So I needed a way to split the tag cloud into it’s own file and include that in each page without doing any server side work. I tried using the object tag as that can apparently include external html content, but I couldn’t get it to look like I wanted. So I tried to use JavaScript, and it turns out it’s pretty easy. I stripped out the content of the template I was using to create the tag cloud, and created a template for the java script file. This then takes all the tags for my blog, and generates the links for the tag cloud and inserts them into what would otherwise be an empty div tag where the tag cloud used to be. It has decreased the time it takes Jekyll to generate my site considerably, and also reduced the number of files modified with each new blog post. So I’m counting this one as a success.</p>
</div>
<p class="meta">posted at 6:26 pm on 27 Feb 2019 by Craig Stewart<br /><br /></p><p class="tags">
Tags:<a class="tagLink" href="/blog/tags/javascript">javascript</a>&nbsp;<a class="tagLink" href="/blog/tags/sysadmin">sysadmin</a>&nbsp;<a class="tagLink" href="/blog/tags/blog">blog</a>&nbsp;<a class="tagLink" href="/blog/tags/open-source">open-source</a>&nbsp;<a class="tagLink" href="/blog/tags/git">git</a>&nbsp;<a class="tagLink" href="/blog/tags/workflows">workflows</a>&nbsp;</p>
<p class="postfeedback">
</p></div>
</div>
<div id="sidebar">
<div class="well">
<h3 class="tag">Hot tags</h3>
<div id="tagcloud">
</div>
</div>
<ul>
<li>
<h2>Newsfeeds</h2>
<ul class="rFeeds">
<li><a href="/blog/feed/entries/atom">All</a></li>
<li><a href="/blog/feed/entries/by_tag/sysadmin.xml">Posts tagged sysadmin</a></li>
</ul>
</li>
</ul>
</div>
</div>
</main></div>
</div>
</div>
</body>
</html>

107
blog/2019/05/21/why-we-should-fear-the-righteous.html

@ -0,0 +1,107 @@
<!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="viewport" content="width=device-width, initial-scale=1.0" />
<link rel="stylesheet" href="/styles/default.css">
<link rel="stylesheet" href="/styles/blog.css">
<script src="/scripts/tag_cloud.js"></script>
<title>Why we should fear the righteous</title><link type="application/atom+xml" rel="alternate" href="/blog/feed/entries/atom" title="My Blog" /></head>
<body><div id="wrapper">
<div id="header">
<h1>
Why we should fear the righteous
</h1>
</div>
<div id="layout">
<div id="navigation">
<p class="link">
<a href="/index.html">
Home
</a>
</p>
<p class="link">
<a href="/about.html">
About Me
</a>
</p>
<p class="link">
<a href="/contact.html">
Contact Me
</a>
</p>
<p class="link">
<a href="/guides/">
Guides
</a>
</p>
<p class="link">
<a href="/blog/">
My Blog
</a>
</p>
</div>
<div id="content">
<main class="page-content" aria-label="Content">
<div class="wrapper">
<div id="blogcontent">
<div class="next-previous">
<a href="/blog/2019/02/27/generating-tag-cloud-by-using-javascript.html">Generating the tag cloud using java script</a> |
<a href="/blog/">Main</a>
| <a href="/blog/2019/06/16/who-are-you-really.html">Who are you really?</a>
</div>
<div class="post">
<div class="postentry">
<p>I’m not a religious man, that much should be obvious to those that know me. I also have a tendency to rant against religion, this is not one of those rants. The basic premise I have is that we should fear anyone who is outwardly righteous, at least until we can accurately judge their true ambitions. Particularly those in politics.</p>
<p>So what do I mean by my premise? What can be so scary about those who are doing the right thing? First of all who decided it was “the right thing” in the first place? And why?</p>
<p>First any one can claim righteousness whilst manipulating those around them for their own gain. These people can be scary, but if you can get their interests to align with yours you may be able to disarm them somewhat. But that would need to be an ongoing process, and not everyone has that option.</p>
<p>The truly scary ones are the believers, the ones that “know” they are in the right. There is no disarming these people, they should scare us all.</p>
<p>So why should this scare us? Well some truly horrific things have been done in the name of “what is right”, and it’s always hard to argue that you shouldn’t do the right thing. This leaves you the option trying to argue about what is “right”, and it is not in the interests of the righteous to engage in that debate, either as a manipulator who isn’t served by the objective truth, or a believer who simply doesn’t accept your version of the truth. So that is rarely, if ever, a realistic option. Therefore when someone believes that “the right thing” is something that is harmful to others the only realistic option is to do something that is ordinarily wrong, which is to say make use of force. But by using force you make yourself the baddie, people rightly rail against the use of force. So against the righteous, particularly the true believer, your choices are bad or worse, fight it or allow the harm to continue, and it can be hard to know which is which.</p>
<p>Not all harms are obvious, no the scariest harms are more insidious than that. The righteous preacher, telling his flock to shun the sinful. What did “the sinful” do to deserve that exclusion? Was it violence, theft, or other obviously bad acts? What if it was as simple as praying to the wrong God? Or even the right God, but in the wrong way? What if, as seems to be the current hot topic, it was coming from somewhere else whilst committing the crime of being poor? What if, even worse, it was being born the wrong race? Or loving the wrong sex?</p>
<p>Something needs to be done, but I’m not sure I have the stomach to do it. Hopefully the future will not judge me too harshly, but I admit that right now, in the UK, I am scared, and it’s the righteous politicians who scare me the most!</p>
</div>
<p class="meta">posted at 6:42 pm on 21 May 2019 by Craig Stewart<br /><br /></p><p class="tags">
Tags:<a class="tagLink" href="/blog/tags/politics">politics</a>&nbsp;<a class="tagLink" href="/blog/tags/opinion">opinion</a>&nbsp;<a class="tagLink" href="/blog/tags/rant">rant</a>&nbsp;</p>
<p class="postfeedback">
</p></div>
</div>
<div id="sidebar">
<div class="well">
<h3 class="tag">Hot tags</h3>
<div id="tagcloud">
</div>
</div>
<ul>
<li>
<h2>Newsfeeds</h2>
<ul class="rFeeds">
<li><a href="/blog/feed/entries/atom">All</a></li>
<li><a href="/blog/feed/entries/by_tag/sysadmin.xml">Posts tagged sysadmin</a></li>
</ul>
</li>
</ul>
</div>
</div>
</main></div>
</div>
</div>
</body>
</html>

101
blog/2019/06/16/who-are-you-really.html

@ -0,0 +1,101 @@
<!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="viewport" content="width=device-width, initial-scale=1.0" />
<link rel="stylesheet" href="/styles/default.css">
<link rel="stylesheet" href="/styles/blog.css">
<script src="/scripts/tag_cloud.js"></script>
<title>Who are you really?</title><link type="application/atom+xml" rel="alternate" href="/blog/feed/entries/atom" title="My Blog" /></head>
<body><div id="wrapper">
<div id="header">
<h1>
Who are you really?
</h1>
</div>
<div id="layout">
<div id="navigation">
<p class="link">
<a href="/index.html">
Home
</a>
</p>
<p class="link">
<a href="/about.html">
About Me
</a>
</p>
<p class="link">
<a href="/contact.html">
Contact Me
</a>
</p>
<p class="link">
<a href="/guides/">
Guides
</a>
</p>
<p class="link">
<a href="/blog/">
My Blog
</a>
</p>
</div>
<div id="content">
<main class="page-content" aria-label="Content">
<div class="wrapper">
<div id="blogcontent">
<div class="next-previous">
<a href="/blog/2019/05/21/why-we-should-fear-the-righteous.html">Why we should fear the righteous</a> |
<a href="/blog/">Main</a>
| <a href="/blog/2019/08/03/arrogance-of-it-industry.html">The Arrogance of the IT Industry</a>
</div>
<div class="post">
<div class="postentry">
<p>Recently I’ve been thinking about identity and what that actually means, and more importantly what I feel it <em>should</em> mean. Everything that deals with the identity of people appears to default to the assumption that we all have one, single, canonical, identity, that all things we use to identify ourselves should be slaved too. In fiction we know someone is suspicious, a spy, or criminal, when they have multiple passports. In IT we base trust on this <em>who</em> of the identity that issues instructions is linked too. When talking to people online we tell each other not to trust them unless we also know them in the real world, and can be sure that they are that person.</p>
<p>This has never been something I’m entirely comfortable with. I used to compartmentalise my life quite badly, I would behave very differently with different groups of people. At it’s height I would feel physically unwell if these groups ever overlapped. I have managed to reduce this behaviour, but it has never fully gone away, and it still takes mental effort at times to stop myself falling back into this behaviour. Sometimes compartmentalising can be useful, ie to separate work and private life activities.</p>
<p>More recently I have read <a href="https://www.aclu.org/report/dawn-robot-surveillance" title="The Dawn of Robot Surveillance">a report</a> that scares me. If all our identities are linked, and we can be watched in real time, everywhere we go in the real world there is no room for anyone to dissent anymore. This has had me thinking. Why do our online identities need to be linked together, or to our real world identities?</p>
<p>I work in IT, so lets use that as an analogy, it’s not great, but hopefully it will help illustrate some of what I’m thinking. The current fashion in IT is for containerised work loads. Each container is an identity (in our analogy) we don’t really care which physical server (our real world person in our analogy) it runs on, or how many other containers are running on that server. All we care about is if the container is doing the work we want it too. If it stops doing that we discard it and create a new one. Now there are obviously flaws here, we can’t really abide an identity that switches between people, except, in the case of business support contract to a small business, the who doesn’t actually matter, just that the support is available, so maybe we can? Also why would we want to have multiple identities? Well as I mentioned, work and private life could be separated more completely that way. So it still needs more thought, but maybe it’s time that we separate our online identities from our offline identities.</p>
</div>
<p class="meta">posted at 8:14 pm on 16 Jun 2019 by Craig Stewart<br /><br /></p><p class="tags">
Tags:<a class="tagLink" href="/blog/tags/opinion">opinion</a>&nbsp;<a class="tagLink" href="/blog/tags/thinking">thinking</a>&nbsp;<a class="tagLink" href="/blog/tags/comment">comment</a>&nbsp;</p>
<p class="postfeedback">
</p></div>
</div>
<div id="sidebar">
<div class="well">
<h3 class="tag">Hot tags</h3>
<div id="tagcloud">
</div>
</div>
<ul>
<li>
<h2>Newsfeeds</h2>
<ul class="rFeeds">
<li><a href="/blog/feed/entries/atom">All</a></li>
<li><a href="/blog/feed/entries/by_tag/sysadmin.xml">Posts tagged sysadmin</a></li>
</ul>
</li>
</ul>
</div>
</div>
</main></div>
</div>
</div>
</body>
</html>

113
blog/2019/08/03/arrogance-of-it-industry.html

@ -0,0 +1,113 @@
<!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="viewport" content="width=device-width, initial-scale=1.0" />
<link rel="stylesheet" href="/styles/default.css">
<link rel="stylesheet" href="/styles/blog.css">
<script src="/scripts/tag_cloud.js"></script>
<title>The Arrogance of the IT Industry</title><link type="application/atom+xml" rel="alternate" href="/blog/feed/entries/atom" title="My Blog" /></head>
<body><div id="wrapper">
<div id="header">
<h1>
The Arrogance of the IT Industry
</h1>
</div>
<div id="layout">
<div id="navigation">
<p class="link">
<a href="/index.html">
Home
</a>
</p>
<p class="link">
<a href="/about.html">
About Me
</a>
</p>
<p class="link">
<a href="/contact.html">
Contact Me
</a>
</p>
<p class="link">
<a href="/guides/">
Guides
</a>
</p>
<p class="link">
<a href="/blog/">
My Blog
</a>
</p>
</div>
<div id="content">
<main class="page-content" aria-label="Content">
<div class="wrapper">
<div id="blogcontent">
<div class="next-previous">
<a href="/blog/2019/06/16/who-are-you-really.html">Who are you really?</a> |
<a href="/blog/">Main</a>
| <a href="/blog/2019/08/18/location-services-how-hard.html">Location Services in an Emergency, How Hard Can it be?</a>
</div>
<div class="post">
<div class="postentry">
<p>This past week I was going to write a blog post about my latest fail, and what I learnt from it. But in the mean time something has come up that has annoyed me, so much so that I’ve decided to rant about that instead.</p>
<p>So the thing that got me annoyed this time is that the Google Chrome team <a href="https://www.theregister.co.uk/2019/07/31/chrome_omnibox_subdomain_chop/" title="Omni(box)shambles? Google takes aim at worldwide web yet again">are at it again</a>, and have decided to hide information they have decided most user don’t need to see, and isn’t relevant to them. Except the information they are hiding <strong><em>is</em></strong> technically relevant. I tweeted about it,</p>
<blockquote class="twitter-tweet"><p lang="en" dir="ltr">But <a href="https://t.co/qc4kk1nwry">https://t.co/qc4kk1nwry</a> is not the same website as <a href="https://t.co/ZdKMBYBk0J">https://t.co/ZdKMBYBk0J</a> or even necessarily on the same server. And then they&#39;re planning to hide the &quot;m.&quot; as well, which is yet another host. The next step will be to hide the &quot;amp.&quot; which is a google controlled host.</p>&mdash; Craig Stewart (@pmb00cs) <a href="https://twitter.com/pmb00cs/status/1156845033720602624?ref_src=twsrc%5Etfw">August 1, 2019</a></blockquote>
<script async="" src="https://platform.twitter.com/widgets.js" charset="utf-8"></script>
<p>and in their infinite wisdom twitter chose to hide that same information, despite the fact that I didn’t want them too, I was not impressed when that was pointed out to me</p>
<blockquote class="twitter-tweet"><p lang="en" dir="ltr">For fucks sake! Bloody techies messing with user&#39;s intentions!</p>&mdash; Craig Stewart (@pmb00cs) <a href="https://twitter.com/pmb00cs/status/1156882609567424512?ref_src=twsrc%5Etfw">August 1, 2019</a></blockquote>
<script async="" src="https://platform.twitter.com/widgets.js" charset="utf-8"></script>
<p>In both cases it shows that the developers think they know better, than the user in Twitter’s case, and than every browser developer that has come before them in Google Chrome’s case. This is massively arrogant in both cases. Now I’m sure the Devs in both cases think they have good reasons for doing this. And I’m sure they honestly believe this is the right thing to do. But they are ignoring the needs and intentions of their users. So when the user wants to convey some specific information, hiding part of that information looks silly, and when a user does understand the difference between domains, and how the web works, the change makes life harder. The argument from the chrome team “but users don’t need to know this detail” ignores the fact that those users who don’t need to know won’t much care if the information is there or not, and those users who do need to know, <em>need</em> to know.</p>
<p>As I see it these are both symptoms of a wider problem in the IT industry. An industry I have worked in for more than 15 years, and throughout that time there has been a pervasive idea that IT is a young man’s game (not a young person’s game, women are massively under represented in IT). This seems to be based on the idea that IT moves fast because it’s such a young industry, and that only those that grew up with this technology could ever understand it, and work with it. Those who are older simply wouldn’t understand, or be able to keep up with the developments. Yes IT is a relatively young industry, but it is not <em>that</em> young. My father is well into his 70s, and he spent most of his working life working as a Programmer. IT has been an industry for long enough now that no one below state pension age in the UK has lived in a world without an IT industry. And yet the myth persists that the older people cannot cope with working in IT, only the young can. And with them the young bring an arrogance that can only come from never having known what it’s like to be wrong when it matters. Because of this much of the IT industry reinvents things that don’t need to be reinvented. Now there have been great advances in IT, but often these have come thanks more to technological advances that have enabled ever more powerful computers to run ever more complex code ever faster.</p>
<p>And what does this arrogance prove? My father when he retired was contacted by an old employer because no one available in the industry had the skills he did. Far from proving that IT is a young man’s game this sort of thing proves the IT industry is discarding skills the world needs of it because the young don’t know them, and have no one to learn them from.</p>
<p>I have never agreed with the idea that IT is a young man’s game, it doesn’t follow from any of the history of the industry. At one time what became the IT industry, programming, and data entry, were considered women’s work, with the men doing serious engineering on the hardware (computers were big back then), but at some point men got involved, and decided it was too complicated for women, and the industry doesn’t appear to have grown up from there. It probably helps me to see IT as not being a young man’s game that my father worked in IT, and also that I like to understand how and why things are the way they are, so the history of IT is fascinating to me. And when you look past the last couple of decades the contribution of women is undeniable.</p>
<p>The IT industry needs to grow the fuck up, and it won’t do that until it starts listening to people with different experiences to the majority of the people currently working in it. Which is all well and good coming from me, a white, straight, middle class, male. Not exactly divergent from the norm I complain about, but if even I can see this surely it’s obvious that it needs fixing?</p>
</div>
<p class="meta">posted at 7:09 pm on 3 Aug 2019 by Craig Stewart<br /><br /></p><p class="tags">
Tags:<a class="tagLink" href="/blog/tags/opinion">opinion</a>&nbsp;<a class="tagLink" href="/blog/tags/rant">rant</a>&nbsp;</p>
<p class="postfeedback">
</p></div>
</div>
<div id="sidebar">
<div class="well">
<h3 class="tag">Hot tags</h3>
<div id="tagcloud">
</div>
</div>
<ul>
<li>
<h2>Newsfeeds</h2>
<ul class="rFeeds">
<li><a href="/blog/feed/entries/atom">All</a></li>
<li><a href="/blog/feed/entries/by_tag/sysadmin.xml">Posts tagged sysadmin</a></li>
</ul>
</li>
</ul>
</div>
</div>
</main></div>
</div>
</div>
</body>
</html>

113
blog/2019/08/18/location-services-how-hard.html

@ -0,0 +1,113 @@
<!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="viewport" content="width=device-width, initial-scale=1.0" />
<link rel="stylesheet" href="/styles/default.css">
<link rel="stylesheet" href="/styles/blog.css">
<script src="/scripts/tag_cloud.js"></script>
<title>Location Services in an Emergency, How Hard Can it be?</title><link type="application/atom+xml" rel="alternate" href="/blog/feed/entries/atom" title="My Blog" /></head>
<body><div id="wrapper">
<div id="header">
<h1>
Location Services in an Emergency, How Hard Can it be?
</h1>
</div>
<div id="layout">
<div id="navigation">
<p class="link">
<a href="/index.html">
Home
</a>
</p>
<p class="link">
<a href="/about.html">
About Me
</a>
</p>
<p class="link">
<a href="/contact.html">
Contact Me
</a>
</p>
<p class="link">
<a href="/guides/">
Guides
</a>
</p>
<p class="link">
<a href="/blog/">
My Blog
</a>
</p>
</div>
<div id="content">
<main class="page-content" aria-label="Content">
<div class="wrapper">
<div id="blogcontent">
<div class="next-previous">
<a href="/blog/2019/08/03/arrogance-of-it-industry.html">The Arrogance of the IT Industry</a> |
<a href="/blog/">Main</a>
| <a href="/blog/2019/08/25/location-finder-first-steps.html">The first steps in creating a location finding app</a>
</div>
<div class="post">
<div class="postentry">
<p>So I have been hearing lately about <a href="https://what3words.com/" title="What3Words">What3Words</a> and how the emergency services in the UK are using it to locate people. This, and other information I have read about recently has got me thinking. What3Words is a proprietary service, that the emergency services will be paying to use. Now a number of mountain rescue teams in the UK use a service developed by one of their volunteers called <a href="https://www.ukclimbing.com/articles/skills/using_sarloc_for_rescue_on_your_smartphone-10917" title="SKILLS: Using SARLOC for Rescue on your Smartphone">SARLOC</a> which appears to have a similar set of requirements, but from what I have read appears much more useful for the mountain rescue teams that use it. Now what I have been thinking, these services both rely on the person that needs to be located to have a smartphone, with location services, and an internet connection. They both require the person to receive a link, and allow the opened web page to see their location. So with these assumptions, how hard is it to build a service that allows an operator to send a personalised link to someone, have that use the smartphone’s location services to get a current location for the user, and share that automatically with the operator?</p>
<p>What I’m going to try and do is build just such a service, share my progress as I go, and share the code on <a href="/blog/entry/building-a-git-repository-server">the code repository I built some time ago</a> as I really do need to find a productive use for it.</p>
<p>What are the requirements of such a service?</p>
<ul>
<li>We need to allow the operator to login to show they’re more privileged than normal users</li>
<li>The operator needs to be able to generate a unique link to send out to normal users</li>
<li>The link sent out needs to query location services to get the location of the phone</li>
<li>The link needs to update the service with that location</li>
<li>The operator needs to be shown that location automatically</li>
<li>The operator needs to be able to see multiple such locations at once</li>
<li>The normal users need to be able to only update their own location</li>
<li>The normal users need to not be able to see any other location</li>
</ul>
<p>With those in mind, we need a reasonably simple API, with a login, and some form of state store. Despite the title of this post I don’t actually expect this to be easy. My next steps will be to choose a framework and/or language to build this in, and put together some thing to deploy what I write and host it.</p>
<p>My intent for this project isn’t to build a full commercial service, but to build a proof of concept, and hopefully learn something along the way.</p>
</div>
<p class="meta">posted at 8:19 pm on 18 Aug 2019 by Craig Stewart<br /><br /></p><p class="tags">
Tags:<a class="tagLink" href="/blog/tags/project">project</a>&nbsp;<a class="tagLink" href="/blog/tags/open-source">open-source</a>&nbsp;<a class="tagLink" href="/blog/tags/sysadmin">sysadmin</a>&nbsp;<a class="tagLink" href="/blog/tags/location-finder">location-finder</a>&nbsp;</p>
<p class="postfeedback">
</p></div>
</div>
<div id="sidebar">
<div class="well">
<h3 class="tag">Hot tags</h3>
<div id="tagcloud">
</div>
</div>
<ul>
<li>
<h2>Newsfeeds</h2>
<ul class="rFeeds">
<li><a href="/blog/feed/entries/atom">All</a></li>
<li><a href="/blog/feed/entries/by_tag/sysadmin.xml">Posts tagged sysadmin</a></li>
</ul>
</li>
</ul>
</div>
</div>
</main></div>
</div>
</div>
</body>
</html>

99
blog/2019/08/25/location-finder-first-steps.html

@ -0,0 +1,99 @@
<!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="viewport" content="width=device-width, initial-scale=1.0" />
<link rel="stylesheet" href="/styles/default.css">
<link rel="stylesheet" href="/styles/blog.css">
<script src="/scripts/tag_cloud.js"></script>
<title>The first steps in creating a location finding app</title><link type="application/atom+xml" rel="alternate" href="/blog/feed/entries/atom" title="My Blog" /></head>
<body><div id="wrapper">
<div id="header">
<h1>
The first steps in creating a location finding app
</h1>
</div>
<div id="layout">
<div id="navigation">
<p class="link">
<a href="/index.html">
Home
</a>
</p>
<p class="link">
<a href="/about.html">
About Me
</a>
</p>
<p class="link">
<a href="/contact.html">
Contact Me
</a>
</p>
<p class="link">
<a href="/guides/">
Guides
</a>
</p>
<p class="link">
<a href="/blog/">
My Blog
</a>
</p>
</div>
<div id="content">
<main class="page-content" aria-label="Content">
<div class="wrapper">
<div id="blogcontent">
<div class="next-previous">
<a href="/blog/2019/08/18/location-services-how-hard.html">Location Services in an Emergency, How Hard Can it be?</a> |
<a href="/blog/">Main</a>
| <a href="/blog/2019/08/25/location-finder-hosting.html">Setting up hosting for the location app</a>
</div>
<div class="post">
<div class="postentry">
<p>So in my previous blog post I said I was going to try and build a web app to find someone’s location using their smartphone’s location services. The first step in this is choosing a language and/or framework to build it in. I’ve decided to use <a href="https://golang.org/" title="The Go Programming Language">Go</a>, which a former collegue of mine tells me makes me a hipster.</p>
<p>So the first thing I need is a simple app that listens for an http connection and responds with some basic javascript that requests the location of the device that runs it. With this in mind I have started <a href="https://code.craig-james-stewart.co.uk/pmb00cs/location-finder" title="An app written in GoLang to find people using location services on smartphones.">a new project</a>. So far it’s not great, and not well tested. But I have an app, that listens on port 8080, and serves up a basic web page that uses javascript to display the location of the device it’s on.</p>
<p>The next step will be to host this app, use a reverse proxy to enable TLS, and run the app as an unprivileged user.</p>
</div>
<p class="meta">posted at 3:33 pm on 25 Aug 2019 by Craig Stewart<br /><br /></p><p class="tags">
Tags:<a class="tagLink" href="/blog/tags/project">project</a>&nbsp;<a class="tagLink" href="/blog/tags/open-source">open-source</a>&nbsp;<a class="tagLink" href="/blog/tags/sysadmin">sysadmin</a>&nbsp;<a class="tagLink" href="/blog/tags/location-finder">location-finder</a>&nbsp;<a class="tagLink" href="/blog/tags/golang">golang</a>&nbsp;<a class="tagLink" href="/blog/tags/javascript">javascript</a>&nbsp;</p>
<p class="postfeedback">
</p></div>
</div>
<div id="sidebar">
<div class="well">
<h3 class="tag">Hot tags</h3>
<div id="tagcloud">
</div>
</div>
<ul>
<li>
<h2>Newsfeeds</h2>
<ul class="rFeeds">
<li><a href="/blog/feed/entries/atom">All</a></li>
<li><a href="/blog/feed/entries/by_tag/sysadmin.xml">Posts tagged sysadmin</a></li>
</ul>
</li>
</ul>
</div>
</div>
</main></div>
</div>
</div>
</body>
</html>

111
blog/2019/08/25/location-finder-hosting.html

@ -0,0 +1,111 @@
<!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="viewport" content="width=device-width, initial-scale=1.0" />
<link rel="stylesheet" href="/styles/default.css">
<link rel="stylesheet" href="/styles/blog.css">
<script src="/scripts/tag_cloud.js"></script>
<title>Setting up hosting for the location app</title><link type="application/atom+xml" rel="alternate" href="/blog/feed/entries/atom" title="My Blog" /></head>
<body><div id="wrapper">
<div id="header">
<h1>
Setting up hosting for the location app
</h1>
</div>
<div id="layout">
<div id="navigation">
<p class="link">
<a href="/index.html">
Home
</a>
</p>
<p class="link">
<a href="/about.html">
About Me
</a>
</p>
<p class="link">
<a href="/contact.html">
Contact Me
</a>
</p>
<p class="link">
<a href="/guides/">
Guides
</a>
</p>
<p class="link">
<a href="/blog/">
My Blog
</a>
</p>
</div>
<div id="content">
<main class="page-content" aria-label="Content">
<div class="wrapper">
<div id="blogcontent">
<div class="next-previous">
<a href="/blog/2019/08/25/location-finder-first-steps.html">The first steps in creating a location finding app</a> |
<a href="/blog/">Main</a>
| <a href="/blog/2019/08/30/location-finder-improvements.html">Making the app do something</a>
</div>
<div class="post">
<div class="postentry">
<p>I have a basic app, as per my last blog post. Now I need to host it somewhere. I have changed the app to only listen on local host, I have iptables on my servers to hopefully prevent me exposing ports I don’t want to expose, but better to not push my luck. I’m using a server running apache and using systemd as the init system. So for SSL termination we’ll use apache as the revers proxy. For this we need a vhost with mod_proxy enabled and the following config in a vhost</p>
<pre>
ProxyPass / http://localhost:8080/
ProxyPassReverse / http://localhost:8080/
</pre>
<p>We then need to create a user to run the app, we want an unprivileged user</p>
<pre>
sudo adduser --system\
--shell /bin/false\
--gecos 'Location Finder App'\
--group\
--disabled-password\
--home /opt/location location
</pre>
<p>With that we need to create a systemd system file (I’ve added an example systemd file to the app repo) and to move a built copy of the binary onto the system, along with the HTML template file. <a href="https://location.craig-james-stewart.co.uk">And that is what I have done.</a></p>
<p>The next steps will be more complicated. I need to turn this into something useful, and for that I’m going to need some server side storage, an API that takes the location and stores it, and an API that reads it.</p>
</div>
<p class="meta">posted at 9:26 pm on 25 Aug 2019 by Craig Stewart<br /><br /></p><p class="tags">
Tags:<a class="tagLink" href="/blog/tags/project">project</a>&nbsp;<a class="tagLink" href="/blog/tags/sysadmin">sysadmin</a>&nbsp;<a class="tagLink" href="/blog/tags/location-finder">location-finder</a>&nbsp;</p>
<p class="postfeedback">
</p></div>
</div>
<div id="sidebar">
<div class="well">
<h3 class="tag">Hot tags</h3>
<div id="tagcloud">
</div>
</div>
<ul>
<li>
<h2>Newsfeeds</h2>
<ul class="rFeeds">
<li><a href="/blog/feed/entries/atom">All</a></li>
<li><a href="/blog/feed/entries/by_tag/sysadmin.xml">Posts tagged sysadmin</a></li>
</ul>
</li>
</ul>
</div>
</div>
</main></div>
</div>
</div>
</body>
</html>

101
blog/2019/08/30/location-finder-improvements.html

@ -0,0 +1,101 @@
<!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="viewport" content="width=device-width, initial-scale=1.0" />
<link rel="stylesheet" href="/styles/default.css">
<link rel="stylesheet" href="/styles/blog.css">
<script src="/scripts/tag_cloud.js"></script>
<title>Making the app do something</title><link type="application/atom+xml" rel="alternate" href="/blog/feed/entries/atom" title="My Blog" /></head>
<body><div id="wrapper">
<div id="header">
<h1>
Making the app do something
</h1>
</div>
<div id="layout">
<div id="navigation">
<p class="link">
<a href="/index.html">
Home
</a>
</p>
<p class="link">
<a href="/about.html">
About Me
</a>
</p>
<p class="link">
<a href="/contact.html">
Contact Me
</a>
</p>
<p class="link">
<a href="/guides/">
Guides
</a>
</p>
<p class="link">
<a href="/blog/">
My Blog
</a>
</p>
</div>
<div id="content">
<main class="page-content" aria-label="Content">
<div class="wrapper">
<div id="blogcontent">
<div class="next-previous">
<a href="/blog/2019/08/25/location-finder-hosting.html">Setting up hosting for the location app</a> |
<a href="/blog/">Main</a>
| <a href="/blog/2019/09/01/comment-random-numbers.html">A Comment on Random Numbers</a>
</div>
<div class="post">
<div class="postentry">
<p>So I have been making improvements to the location app I blogged about recently. The first cut of the app wasn’t really all that much of an achievement as I could have done the same with a file and a webserver, without needing an app written in go. Now in my last blog post I stated that I would build an API, and I have done so. I have also moved the default page, and created a new one. If you choose to look at <a href="https://code.craig-james-stewart.co.uk/pmb00cs/location-finder" title="An app written in GoLang to find people using location services on smartphones.">the code</a> you will notice a function for checking an id and key (which are both currently hard coded to “test”) this is to allow multiple locations to be shared (via a randomly generated ID) and also make it harder to enumerate the location ID’s that the system knows about by pairing that with a randomly generated key. The creation of these ID’s and keys is going to be what I work on next, as well as some optimisations to the code.</p>
<p>So the current app allows someone to look at the currently shared location by visiting <a href="https://location.craig-james-stewart.co.uk/getlocation.html?id=test&amp;key=test" title="fetch a location">this link</a> now if that location is empty the page will try again every 5 seconds. To set that location for 30 seconds (I’ll make that longer when the ID and key aren’t hard coded to be test) by visiting <a href="https://location.craig-james-stewart.co.uk/setlocation.html?id=test&amp;key=test" title="set the location on the server">this link</a>. Do be aware though that there is currently no protection from anyone seeing that location. The location is stored in redis, with a separate key for latitude and longitude. There are a number of different ways I could have done this, but this one was simple. I chose redis because it can store simple key value pairs well, and for what I am doing nothing more complicated is needed.</p>
<p>Next steps are, as I already said, creating the random ID’s, and setting a random key to validate them. But I will also need a way to limit who can do so, and find a way to make it easy to share the link for setting the location, while also opening a page to see that location when it is set.</p>
<p>One of things I had to do before putting this code on the internet was to ensure I didn’t pass any user generated data to functions outside the app in an unsafe manor. Fortunately because go is typed the latitude and longitude will generate an error if you try to set them as anything that isn’t a number, so the scope for abusing them isn’t great, but the ID and key are strings, and strings that I need to pass through to the redis instance in the background, so these need to be sanitized. I’m relying on the function that checks the id is valid to do that, as that will fail in a way that prevents further use of the strings if they are not valid, now obviously that checks they both match the string “test” exactly, but as that section of the function is temporary I have included a regex before it to check they’re not massively long, or contain any funky characters. Those checks are currently overly restrictive, and will be loosened up eventually, but better to start overly restrictive, and allow more as you find it safe than to start overly permissive and let someone hack you. Especially as the source code is readily available.</p>
</div>
<p class="meta">posted at 7:29 pm on 30 Aug 2019 by Craig Stewart<br /><br /></p><p class="tags">
Tags:<a class="tagLink" href="/blog/tags/project">project</a>&nbsp;<a class="tagLink" href="/blog/tags/sysadmin">sysadmin</a>&nbsp;<a class="tagLink" href="/blog/tags/golang">golang</a>&nbsp;<a class="tagLink" href="/blog/tags/javascript">javascript</a>&nbsp;<a class="tagLink" href="/blog/tags/location-finder">location-finder</a>&nbsp;</p>
<p class="postfeedback">
</p></div>
</div>
<div id="sidebar">
<div class="well">
<h3 class="tag">Hot tags</h3>
<div id="tagcloud">
</div>
</div>
<ul>
<li>
<h2>Newsfeeds</h2>
<ul class="rFeeds">
<li><a href="/blog/feed/entries/atom">All</a></li>
<li><a href="/blog/feed/entries/by_tag/sysadmin.xml">Posts tagged sysadmin</a></li>
</ul>
</li>
</ul>
</div>
</div>
</main></div>
</div>
</div>
</body>
</html>

99
blog/2019/09/01/comment-random-numbers.html

@ -0,0 +1,99 @@
<!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="viewport" content="width=device-width, initial-scale=1.0" />
<link rel="stylesheet" href="/styles/default.css">
<link rel="stylesheet" href="/styles/blog.css">
<script src="/scripts/tag_cloud.js"></script>
<title>A Comment on Random Numbers</title><link type="application/atom+xml" rel="alternate" href="/blog/feed/entries/atom" title="My Blog" /></head>
<body><div id="wrapper">
<div id="header">
<h1>
A Comment on Random Numbers
</h1>
</div>
<div id="layout">
<div id="navigation">
<p class="link">
<a href="/index.html">
Home
</a>
</p>
<p class="link">
<a href="/about.html">
About Me
</a>
</p>
<p class="link">
<a href="/contact.html">
Contact Me
</a>
</p>
<p class="link">
<a href="/guides/">
Guides
</a>
</p>
<p class="link">
<a href="/blog/">
My Blog
</a>
</p>
</div>
<div id="content">
<main class="page-content" aria-label="Content">
<div class="wrapper">
<div id="blogcontent">
<div class="next-previous">
<a href="/blog/2019/08/30/location-finder-improvements.html">Making the app do something</a> |
<a href="/blog/">Main</a>
| <a href="/blog/2019/09/07/slow-progress.html">I've not made much progress this week</a>
</div>
<div class="post">
<div class="postentry">
<p>I have nothing to show on the location app I’ve been building, but I’ve hit a hurdle that I felt warrants some discussion. I want to use two random strings that are unrelated to each other in order to make the app more secure. An ID for each location shared, and a key to prevent someone simply trying to enumerate all the ID’s. Because the key is a security device it is important that it is not derived from the ID, or from the same deterministic source as the ID. With this in mind I have been reading about the random number generator available in Go.</p>
<p>It shouldn’t come as a huge surprise that it is a deterministic pseudo random number generator, and you are required to provide a variable seed to get different results. Computers are pretty bad at randomness generally. Now most of the advice I have found suggests using the current time (to nano second precision) as the seed, and most of that advice comes with the caveat that it works but isn’t suitable for cryptographic functions. So I have faith that the people giving the advice are giving advice that is good for most use cases a Go novice is likely to need, unless that use case is more nuanced, or related to security. Unfortunately for me, as a complete novice to Go, my use case is somewhat more nuanced, and is related to security.</p>
<p>My issue is that I need two sets of random numbers (to generate random strings) that need to be unrelated. The current time could be suitable for the ID, it being predictable isn’t the end of the world, but the key needs to be more secure, and needs to be generated at close enough to the same time as the ID to make using the current time for both of them unworkable. Now I intend to host this app on Linux, and Linux keeps a good source of what we can consider essentially random data that can be read from /dev/random on most distributions. But reads from /dev/random block when the pool of randomness is empty and on a server the sources of random data that can fill that pool can be limited. Now there is a solution, /dev/urandom takes some of the randomness from the pool as a seed to a pseudo random number generator, that keeps generating random looking numbers for as long as you need. So while the random pool has data /dev/urandom is also pretty good as a randomness source, but when it’s empty it’s less good. So I have a choice, do I make my app slow when there isn’t enough random data, or do I allow it to be less secure? I’m probably going to go with less secure, as the data isn’t designed to be long lived enough to allow unlimited time to attack it, and because the data is only useful with context that should be external to the app (I hope). But this is a trade off that needs to be thought about whenever you rely on randomness in computer programs.</p>