Kristof Vandam 4 years ago
parent
commit
a81c619b3f
  1. 1
      .direnv/flake-inputs/2kk6k544kgd4qig5rx812qn2qcwjx5qh-source
  2. 1
      .direnv/flake-inputs/p1ranb8qkpgcwh3lag39jjmcajk7rsjx-source
  3. 1
      .direnv/flake-inputs/pnwyi8fcq1v0b9i4905b3yxkaw29dmly-source
  4. 1
      .direnv/flake-profile-a5d5b61aa8a61b7d9d765e1daf971a9a578f1cfa
  5. 1630
      .direnv/flake-profile-a5d5b61aa8a61b7d9d765e1daf971a9a578f1cfa.rc
  6. 1
      .envrc
  7. 0
      .hugo_build.lock
  8. 4
      config.toml
  9. 43
      flake.lock
  10. 15
      flake.nix
  11. 395
      public/administration/autofs/index.html
  12. 463
      public/administration/bash/index.html
  13. 372
      public/administration/boot-targets/index.html
  14. 409
      public/administration/index.html
  15. 515
      public/administration/index.xml
  16. 307
      public/administration/letsencrypt/index.html
  17. 352
      public/administration/luks-encryption/index.html
  18. 301
      public/administration/mysql_tuner/index.html
  19. 354
      public/administration/toubles-with-interfaces-after-clone/index.html
  20. 353
      public/administration/windows_troubleshooting/index.html
  21. 478
      public/administration/yet-another-arch-guide/index.html
  22. 551
      public/categories/administration/index.html
  23. 83
      public/categories/administration/index.xml
  24. 320
      public/categories/development/index.html
  25. 30
      public/categories/development/index.xml
  26. 319
      public/categories/index.html
  27. 38
      public/categories/index.xml
  28. 321
      public/categories/tools/index.html
  29. 29
      public/categories/tools/index.xml
  30. 259
      public/css/prism.css
  31. 222
      public/css/redlounge.css
  32. 210
      public/development/index.html
  33. 24
      public/development/index.xml
  34. 564
      public/development/live-search-with-hugo/index.html
  35. 295
      public/index.html
  36. 1
      public/index.json
  37. 558
      public/index.xml
  38. 46
      public/js/prism.js
  39. 199
      public/sitemap.xml
  40. 279
      public/tags/arch/index.html
  41. 20
      public/tags/arch/index.xml
  42. 281
      public/tags/bash/index.html
  43. 20
      public/tags/bash/index.xml
  44. 279
      public/tags/boot/index.html
  45. 20
      public/tags/boot/index.xml
  46. 279
      public/tags/data/index.html
  47. 20
      public/tags/data/index.xml
  48. 321
      public/tags/directory/index.html
  49. 29
      public/tags/directory/index.xml
  50. 279
      public/tags/disk/index.html
  51. 20
      public/tags/disk/index.xml
  52. 281
      public/tags/du/index.html
  53. 20
      public/tags/du/index.xml
  54. 279
      public/tags/encryption/index.html
  55. 20
      public/tags/encryption/index.xml
  56. 280
      public/tags/hugo/index.html
  57. 21
      public/tags/hugo/index.xml
  58. 279
      public/tags/ifconfig/index.html
  59. 20
      public/tags/ifconfig/index.xml
  60. 995
      public/tags/index.html
  61. 272
      public/tags/index.xml
  62. 279
      public/tags/interfaces/index.html
  63. 20
      public/tags/interfaces/index.xml
  64. 321
      public/tags/inventory/index.html
  65. 29
      public/tags/inventory/index.xml
  66. 280
      public/tags/javascript/index.html
  67. 21
      public/tags/javascript/index.xml
  68. 280
      public/tags/js/index.html
  69. 21
      public/tags/js/index.xml
  70. 280
      public/tags/json/index.html
  71. 21
      public/tags/json/index.xml
  72. 317
      public/tags/linux/index.html
  73. 29
      public/tags/linux/index.xml
  74. 279
      public/tags/mount/index.html
  75. 20
      public/tags/mount/index.xml
  76. 281
      public/tags/ncdu/index.html
  77. 20
      public/tags/ncdu/index.xml
  78. 279
      public/tags/network/index.html
  79. 20
      public/tags/network/index.xml
  80. 279
      public/tags/networking/index.html
  81. 20
      public/tags/networking/index.xml
  82. 279
      public/tags/partition/index.html
  83. 20
      public/tags/partition/index.xml
  84. 280
      public/tags/prism/index.html
  85. 21
      public/tags/prism/index.xml
  86. 280
      public/tags/prismjs/index.html
  87. 21
      public/tags/prismjs/index.xml
  88. 281
      public/tags/script/index.html
  89. 20
      public/tags/script/index.xml
  90. 317
      public/tags/security/index.html
  91. 29
      public/tags/security/index.xml
  92. 279
      public/tags/shares/index.html
  93. 20
      public/tags/shares/index.xml
  94. 321
      public/tags/size/index.html
  95. 29
      public/tags/size/index.xml
  96. 280
      public/tags/vue/index.html
  97. 21
      public/tags/vue/index.xml
  98. 280
      public/tags/vuejs/index.html
  99. 21
      public/tags/vuejs/index.xml
  100. 439
      public/tools/fatrace/index.html
  101. Some files were not shown because too many files have changed in this diff Show More

1
.direnv/flake-inputs/2kk6k544kgd4qig5rx812qn2qcwjx5qh-source vendored

@ -0,0 +1 @@
/nix/store/2kk6k544kgd4qig5rx812qn2qcwjx5qh-source

1
.direnv/flake-inputs/p1ranb8qkpgcwh3lag39jjmcajk7rsjx-source vendored

@ -0,0 +1 @@
/nix/store/p1ranb8qkpgcwh3lag39jjmcajk7rsjx-source

1
.direnv/flake-inputs/pnwyi8fcq1v0b9i4905b3yxkaw29dmly-source vendored

@ -0,0 +1 @@
/nix/store/pnwyi8fcq1v0b9i4905b3yxkaw29dmly-source

1
.direnv/flake-profile-a5d5b61aa8a61b7d9d765e1daf971a9a578f1cfa vendored

@ -0,0 +1 @@
/nix/store/h22lwjkqqckazfmbpj95i36zzwwkvq1z-nix-shell-env

1630
.direnv/flake-profile-a5d5b61aa8a61b7d9d765e1daf971a9a578f1cfa.rc vendored

File diff suppressed because it is too large Load Diff

1
.envrc

@ -0,0 +1 @@
use flake

0
.hugo_build.lock

4
config.toml

@ -1,5 +1,5 @@
title = "Hagfi.sh"
baseURL = "https://hagfi.sh/"
baseURL = "https://blog.hagfi.sh/"
languageCode = "en-us"
theme = "redlounge"
metaDataFormat = "yaml"
@ -27,4 +27,4 @@ disqusShortname = "hagfish"
#[[menu.main]]
# name = "Tools"
# url = "/categories/tools"
# url = "/categories/tools"

43
flake.lock

@ -0,0 +1,43 @@
{
"nodes": {
"flake-utils": {
"locked": {
"lastModified": 1642700792,
"narHash": "sha256-XqHrk7hFb+zBvRg6Ghl+AZDq03ov6OshJLiSWOoX5es=",
"owner": "numtide",
"repo": "flake-utils",
"rev": "846b2ae0fc4cc943637d3d1def4454213e203cba",
"type": "github"
},
"original": {
"owner": "numtide",
"repo": "flake-utils",
"type": "github"
}
},
"nixpkgs": {
"locked": {
"lastModified": 1643000262,
"narHash": "sha256-8hrbufiCcZgicU8UvHaRkruYuzM8z3lJvQkSh9ezMEg=",
"owner": "NixOS",
"repo": "nixpkgs",
"rev": "cc68710784ffe0ee035ee7b726656c44566cac94",
"type": "github"
},
"original": {
"owner": "NixOS",
"ref": "nixpkgs-unstable",
"repo": "nixpkgs",
"type": "github"
}
},
"root": {
"inputs": {
"flake-utils": "flake-utils",
"nixpkgs": "nixpkgs"
}
}
},
"root": "root",
"version": 7
}

15
flake.nix

@ -0,0 +1,15 @@
{
description = "A basic flake with a shell";
inputs.nixpkgs.url = "github:NixOS/nixpkgs/nixpkgs-unstable";
inputs.flake-utils.url = "github:numtide/flake-utils";
outputs = { self, nixpkgs, flake-utils }:
flake-utils.lib.eachDefaultSystem (system: let
pkgs = nixpkgs.legacyPackages.${system};
in {
devShell = pkgs.mkShell {
nativeBuildInputs = with pkgs; [ hugo ];
buildInputs = [ ];
};
});
}

395
public/administration/autofs/index.html

@ -0,0 +1,395 @@
<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en-us">
<head>
<title>
Mount with automount (autofs) // Hagfi.sh
</title>
<link href="http://gmpg.org/xfn/11" rel="profile">
<meta http-equiv="content-type" content="text/html; charset=utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1">
<meta name="description" content="">
<meta name="keywords" content="">
<meta name="author" content="Kristof Vandam">
<meta name="generator" content="Hugo 0.92.0" />
<meta property="og:title" content="Mount with automount (autofs)" />
<meta property="og:description" content="" />
<meta property="og:type" content="website" />
<meta property="og:locale" content="en_US" />
<meta property="og:url" content="https://blog.hagfi.sh/administration/autofs/" />
<link rel="stylesheet" href="//cdnjs.cloudflare.com/ajax/libs/pure/0.5.0/base-min.css">
<link rel="stylesheet" href="//cdnjs.cloudflare.com/ajax/libs/pure/0.5.0/pure-min.css">
<link rel="stylesheet" href="//cdnjs.cloudflare.com/ajax/libs/pure/0.5.0/grids-responsive-min.css">
<link rel="stylesheet" href="https://blog.hagfi.sh//css/redlounge.css">
<link rel="stylesheet" href="https://blog.hagfi.sh//css/prism.css">
<link href="//maxcdn.bootstrapcdn.com/font-awesome/4.5.0/css/font-awesome.min.css" rel="stylesheet">
<link href='//fonts.googleapis.com/css?family=Raleway:400,200,100,700,300,500,600,800' rel='stylesheet' type='text/css'>
<link href='//fonts.googleapis.com/css?family=Libre+Baskerville:400,700,400italic' rel='stylesheet' type='text/css'>
<link rel="apple-touch-icon-precomposed" sizes="144x144" href="/touch-icon-144-precomposed.png">
<link rel="shortcut icon" type="image/x-icon" href="/img/favicon.png">
<link href="" rel="alternate" type="application/rss+xml" title="Hagfi.sh" />
<script src="//cdnjs.cloudflare.com/ajax/libs/moment.js/2.18.1/moment.js"></script>
<script src="//cdnjs.cloudflare.com/ajax/libs/vue/2.5.17/vue.min.js"></script>
<script src="//cdnjs.cloudflare.com/ajax/libs/axios/0.18.0/axios.min.js"></script>
<script src="//cdnjs.cloudflare.com/ajax/libs/fuse.js/3.2.1/fuse.min.js"></script>
<script src="//cdn.jsdelivr.net/npm/vuewordcloud@18.7.11/VueWordCloud.js"></script>
<script src="https://blog.hagfi.sh//js/prism.js"></script>
<script type="application/javascript">
var doNotTrack = false;
if (!doNotTrack) {
(function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){
(i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o),
m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m)
})(window,document,'script','https://www.google-analytics.com/analytics.js','ga');
ga('create', 'UA-124890410-1', 'auto');
ga('send', 'pageview');
}
</script>
</head>
<body>
<div id="layout" class="pure-g">
<div class="sidebar pure-u-1 pure-u-md-1-4" id="app">
<div class="header">
<h1 class="brand-title"><a href="/">Hagfi.sh</a></h1>
<h2 class="brand-tagline">A devops guide to the galaxy</h2>
<div class="counters">
<a class="counter" href="/">13
<div class="counter-sub">Documents</div>
</a>
<a class="counter" href="/tags">29
<div class="counter-sub">Tags</div>
</a>
<a class="counter" href="/categories">3
<div class="counter-sub">Categories</div>
</a>
</div>
<nav class="nav">
</nav>
<div class="search-wrapper">
<input
type="text"
placeholder="Search ..."
v-model="search"
@keydown.down.prevent="navigate(1)"
@keydown.up.prevent="navigate(-1)"
@keyup.enter.prevent="navigate(result[selected].href)"
ref="searchInput"
class="search"
/>
<svg height="100" width="100" ref="resultPoint" class="result-point">
<circle cx="5" cy="5" r="5" fill="#FFF" />
</svg>
<ul class="result-items">
<li v-for="r, i of result" class="result-item" ref="resultItem">
<div class="result-item-wrapper" :class="{ 'result-item-selected': selected === i }">
<div class="result-item-left">
<span class="post-date">
<span class="post-date-day"><sup v-text="moment(r.date).format('D')"></sup></span><span class="post-date-separator" v-text="'/'"></span><span class="post-date-month" v-text="moment(r.date).format('MMM')"></span> <span class="post-date-year" v-text="moment(r.date).format('YYYY')"></span>
</span>
<template v-if="r.author">By <a class="post-author" v-text="r.author"></a></template>
</div>
<div class="result-item-left">
<span class="result-item-separator nav-item-separator" v-text="'//'"></span><a :href="r.href" v-text="r.title" class="result-item-link"></a>
</div>
</div>
</li>
</ul>
</div>
</div>
</div>
<div class="content pure-u-1 pure-u-md-3-4">
<a name="top"></a>
<div id="toc" class="pure-u-1 pure-u-md-1-4">
<small class="toc-label">Contents</small>
<nav id="TableOfContents">
<ul>
<li><a href="#install-the-required-pakages">Install the required pakages</a></li>
<li><a href="#create-the-entry-file">Create the entry file</a></li>
<li><a href="#create-the-mapper-file">Create the mapper file</a></li>
<li><a href="#enable-and-start-the-service">Enable and start the service</a></li>
<li><a href="#wrapping-up">Wrapping up</a></li>
</ul>
</nav>
</div>
<section class="post">
<h1 class="post-title">
<a href="/administration/autofs/">Mount with automount (autofs)</a>
</h1>
<h3 class="post-subtitle">
</h3>
<span class="post-date">
<span class="post-date-day"><sup>9</sup></span><span class="post-date-separator">/</span><span class="post-date-month">Nov</span> <span class="post-date-year">2018</span>
</span>
<span class="post-author-single">By <a class="post-author" target="">Kristof Vandam</a></span>
<div class="post-categories">
<a class="post-category post-category-administration" href="https://blog.hagfi.sh//categories/administration">administration</a>
</div>
<p>Automagically mount remote directories on login.</p>
<h2 id="install-the-required-pakages">Install the required pakages</h2>
<pre tabindex="0"><code class="language-.language-command" data-lang=".language-command">sudo yum -y install autofs
</code></pre><h2 id="create-the-entry-file">Create the entry file</h2>
<p>the mapper file is a file where we specify the directory where all our mounts should be placed.</p>
<p>This file should be stored in <em>/etc/auto.master.d</em>, note that the extension is required to be <em>.autofs</em></p>
<p>for example: <em>/etc/auto.master.d/home.autofs</em></p>
<pre tabindex="0"><code class="language-.language-command" data-lang=".language-command">/home/guests /etc/auto.home
</code></pre><p>The value for <em>/home/guests</em> is the file where we specify our mount options.</p>
<p><strong>Note</strong>: Make sure the <em>/home/guests</em> directory exists, if not create it with:</p>
<pre tabindex="0"><code class="language-.language-command" data-lang=".language-command">mkdir /home/guests
</code></pre><h2 id="create-the-mapper-file">Create the mapper file</h2>
<p>We earlier specified where our map file should be stored (<em>/etc/auto.home</em>), create this file.</p>
<p>Say we want to auto mount the home directories stored on <strong>serverA</strong> on /home/guests/[<em>USER</em>] when [<em>USER</em>] logs in.</p>
<pre tabindex="0"><code class="language-.language-command" data-lang=".language-command">* -rw,sync serverA:/home/guests/&amp;
</code></pre><ul>
<li>The wildcards task is to create the directory based on the users homedirectory on serverA (specified with <strong>&amp;</strong>)</li>
<li>We give option like: read/write and sync</li>
<li>As last param we have to say where we want to mount to, again, the <strong>&amp;</strong> is dynamic and maps to the logged in user.</li>
</ul>
<h2 id="enable-and-start-the-service">Enable and start the service</h2>
<pre tabindex="0"><code class="language-.language-command" data-lang=".language-command">sudo systemctl enable autofs
sudo systemctl start autofs
</code></pre><h2 id="wrapping-up">Wrapping up</h2>
<p>Log in as a user, and check if the mount is present as expected.</p>
<pre tabindex="0"><code class="language-.language-command" data-lang=".language-command">df -h
</code></pre><p>Should output something like:</p>
<pre tabindex="0"><code class="language-.language-command" data-lang=".language-command">Filesystem Size Used Avail Use% Mounted on
/dev/xvda1 8.0G 5.6G 2.5G 70% /
devtmpfs 224M 0 224M 0% /dev
tmpfs 244M 0 244M 0% /dev/shm
tmpfs 244M 41M 204M 17% /run
tmpfs 244M 0 244M 0% /sys/fs/cgroup
tmpfs 49M 0 49M 0% /run/user/1000
tmpfs 49M 0 49M 0% /run/user/0
/serverA:/home/guests/user1 200M 0 200M 0% /home/guests/user1
</code></pre><p>Note the last line where we see that the mount is present</p>
<div class="tags-list">
<span class="dark-red">Tags</span><span class="decorative-marker">//</span>
<a class="post-tag post-tag-linux" href="https://blog.hagfi.sh//tags/linux">linux</a>,
<a class="post-tag post-tag-data" href="https://blog.hagfi.sh//tags/data">data</a>,
<a class="post-tag post-tag-mount" href="https://blog.hagfi.sh//tags/mount">mount</a>,
<a class="post-tag post-tag-shares" href="https://blog.hagfi.sh//tags/shares">shares</a>,
</div>
<div class="paging">
<span class="paging-label">More Reading</span>
<div class="paging-newer">
<span class="dark-red">Newer</span><span class="decorative-marker">//</span>
<a class="paging-link" href="/tools/fatrace/">Fatrace: Report system wide file access events</a>
</div>
<div class="paging-older">
<span class="dark-red">Older</span><span class="decorative-marker">//</span>
<a class="paging-link" href="/administration/boot-targets/">Changing boot targets</a>
</div>
</div>
</section>
<div id="disqus_thread"></div>
<script type="application/javascript">
var disqus_config = function () {
};
(function() {
if (["localhost", "127.0.0.1"].indexOf(window.location.hostname) != -1) {
document.getElementById('disqus_thread').innerHTML = 'Disqus comments not available by default when the website is previewed locally.';
return;
}
var d = document, s = d.createElement('script'); s.async = true;
s.src = '//' + "hagfish" + '.disqus.com/embed.js';
s.setAttribute('data-timestamp', +new Date());
(d.head || d.body).appendChild(s);
})();
</script>
<noscript>Please enable JavaScript to view the <a href="https://disqus.com/?ref_noscript">comments powered by Disqus.</a></noscript>
<a href="https://disqus.com" class="dsq-brlink">comments powered by <span class="logo-disqus">Disqus</span></a>
<div class="footer">
<hr class="thin" />
<div class="pure-menu pure-menu-horizontal pure-menu-open">
<ul class="footer-menu">
</ul>
</div>
<p>&copy; 2022. All rights reserved.</p>
</div>
</div>
</div>
<script>
var app = new Vue({
el: '#app',
data: {
fuse: null,
search: "",
result: [],
index: [],
selected: 0
},
mounted() {
let self = this
window.addEventListener("keypress", function(e) {
self.$refs.searchInput.focus()
})
let options = {
shouldSort: true,
threshold: 0.6,
location: 0,
distance: 100,
maxPatternLength: 32,
minMatchCharLength: 1,
keys: [
"title",
"author",
"date",
"content"
]
}
axios.get('/index.json')
.then(function (response) {
self.index = response.data
self.fuse = new Fuse(response.data, options)
})
.catch(function (error) {
})
},
watch: {
result(nval, oval) {
nval.length > 0 ? this.pointer(0) : this.pointer(-1)
},
search(nval, oval) {
this.result = this.fuse.search(nval)
}
},
methods: {
navigate(val) {
switch (val) {
case 1: if (this.selected < this.result.length - 1) { this.selected++ }; break;
case -1: if (this.selected > 0 ) { this.selected-- }; break;
default: window.location.href = val; break;
}
this.pointer(this.selected)
},
pointer(selected) {
let self = this
if (selected >= 0) {
Vue.nextTick().then(function() {
let height = self.$refs.resultItem[selected].clientHeight
let top = self.$refs.resultItem[selected].getBoundingClientRect().top
let left = self.$refs.resultItem[selected].getBoundingClientRect().left
self.$refs.resultPoint.style.top = (top+height/2)+'px'
self.$refs.resultPoint.style.left = (left-20)+'px'
})
} else {
this.$refs.resultPoint.style.left = '-50px'
return
}
}
}
})
</script>
</body>
</html>

463
public/administration/bash/index.html

@ -0,0 +1,463 @@
<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en-us">
<head>
<title>
Bash Tips &amp; Tricks // Hagfi.sh
</title>
<link href="http://gmpg.org/xfn/11" rel="profile">
<meta http-equiv="content-type" content="text/html; charset=utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1">
<meta name="description" content="">
<meta name="keywords" content="">
<meta name="author" content="Olivier De Ram">
<meta name="generator" content="Hugo 0.92.0" />
<meta property="og:title" content="Bash Tips &amp; Tricks" />
<meta property="og:description" content="" />
<meta property="og:type" content="website" />
<meta property="og:locale" content="en_US" />
<meta property="og:url" content="https://blog.hagfi.sh/administration/bash/" />
<link rel="stylesheet" href="//cdnjs.cloudflare.com/ajax/libs/pure/0.5.0/base-min.css">
<link rel="stylesheet" href="//cdnjs.cloudflare.com/ajax/libs/pure/0.5.0/pure-min.css">
<link rel="stylesheet" href="//cdnjs.cloudflare.com/ajax/libs/pure/0.5.0/grids-responsive-min.css">
<link rel="stylesheet" href="https://blog.hagfi.sh//css/redlounge.css">
<link rel="stylesheet" href="https://blog.hagfi.sh//css/prism.css">
<link href="//maxcdn.bootstrapcdn.com/font-awesome/4.5.0/css/font-awesome.min.css" rel="stylesheet">
<link href='//fonts.googleapis.com/css?family=Raleway:400,200,100,700,300,500,600,800' rel='stylesheet' type='text/css'>
<link href='//fonts.googleapis.com/css?family=Libre+Baskerville:400,700,400italic' rel='stylesheet' type='text/css'>
<link rel="apple-touch-icon-precomposed" sizes="144x144" href="/touch-icon-144-precomposed.png">
<link rel="shortcut icon" type="image/x-icon" href="/img/favicon.png">
<link href="" rel="alternate" type="application/rss+xml" title="Hagfi.sh" />
<script src="//cdnjs.cloudflare.com/ajax/libs/moment.js/2.18.1/moment.js"></script>
<script src="//cdnjs.cloudflare.com/ajax/libs/vue/2.5.17/vue.min.js"></script>
<script src="//cdnjs.cloudflare.com/ajax/libs/axios/0.18.0/axios.min.js"></script>
<script src="//cdnjs.cloudflare.com/ajax/libs/fuse.js/3.2.1/fuse.min.js"></script>
<script src="//cdn.jsdelivr.net/npm/vuewordcloud@18.7.11/VueWordCloud.js"></script>
<script src="https://blog.hagfi.sh//js/prism.js"></script>
<script type="application/javascript">
var doNotTrack = false;
if (!doNotTrack) {
(function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){
(i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o),
m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m)
})(window,document,'script','https://www.google-analytics.com/analytics.js','ga');
ga('create', 'UA-124890410-1', 'auto');
ga('send', 'pageview');
}
</script>
</head>
<body>
<div id="layout" class="pure-g">
<div class="sidebar pure-u-1 pure-u-md-1-4" id="app">
<div class="header">
<h1 class="brand-title"><a href="/">Hagfi.sh</a></h1>
<h2 class="brand-tagline">A devops guide to the galaxy</h2>
<div class="counters">
<a class="counter" href="/">13
<div class="counter-sub">Documents</div>
</a>
<a class="counter" href="/tags">29
<div class="counter-sub">Tags</div>
</a>
<a class="counter" href="/categories">3
<div class="counter-sub">Categories</div>
</a>
</div>
<nav class="nav">
</nav>
<div class="search-wrapper">
<input
type="text"
placeholder="Search ..."
v-model="search"
@keydown.down.prevent="navigate(1)"
@keydown.up.prevent="navigate(-1)"
@keyup.enter.prevent="navigate(result[selected].href)"
ref="searchInput"
class="search"
/>
<svg height="100" width="100" ref="resultPoint" class="result-point">
<circle cx="5" cy="5" r="5" fill="#FFF" />
</svg>
<ul class="result-items">
<li v-for="r, i of result" class="result-item" ref="resultItem">
<div class="result-item-wrapper" :class="{ 'result-item-selected': selected === i }">
<div class="result-item-left">
<span class="post-date">
<span class="post-date-day"><sup v-text="moment(r.date).format('D')"></sup></span><span class="post-date-separator" v-text="'/'"></span><span class="post-date-month" v-text="moment(r.date).format('MMM')"></span> <span class="post-date-year" v-text="moment(r.date).format('YYYY')"></span>
</span>
<template v-if="r.author">By <a class="post-author" v-text="r.author"></a></template>
</div>
<div class="result-item-left">
<span class="result-item-separator nav-item-separator" v-text="'//'"></span><a :href="r.href" v-text="r.title" class="result-item-link"></a>
</div>
</div>
</li>
</ul>
</div>
</div>
</div>
<div class="content pure-u-1 pure-u-md-3-4">
<a name="top"></a>
<div id="toc" class="pure-u-1 pure-u-md-1-4">
<small class="toc-label">Contents</small>
<nav id="TableOfContents">
<ul>
<li>
<ul>
<li><a href="#usefull-cli-shortcuts">Usefull CLI shortcuts:</a></li>
<li><a href="#redirect-output">Redirect output:</a></li>
<li><a href="#create-a-function">Create a function:</a></li>
<li><a href="#short-scripts">Short scripts:</a></li>
</ul>
</li>
</ul>
</nav>
</div>
<section class="post">
<h1 class="post-title">
<a href="/administration/bash/">Bash Tips &amp; Tricks</a>
</h1>
<h3 class="post-subtitle">
</h3>
<span class="post-date">
<span class="post-date-day"><sup>11</sup></span><span class="post-date-separator">/</span><span class="post-date-month">Nov</span> <span class="post-date-year">2018</span>
</span>
<span class="post-author-single">By <a class="post-author" target="">Olivier De Ram</a></span>
<div class="post-categories">
<a class="post-category post-category-administration" href="https://blog.hagfi.sh//categories/administration">administration</a>
<a class="post-category post-category-development" href="https://blog.hagfi.sh//categories/development">development</a>
</div>
<p>Usefull bash tips &amp; tricks</p>
<h3 id="usefull-cli-shortcuts">Usefull CLI shortcuts:</h3>
<table>
<thead>
<tr>
<th>Shortcut</th>
<th>Description</th>
</tr>
</thead>
<tbody>
<tr>
<td>Ctrl+a</td>
<td>Jump to the beginning of the command line.</td>
</tr>
<tr>
<td>Ctrl+e</td>
<td>Jump to the end of the command line.</td>
</tr>
<tr>
<td>Ctrl+u</td>
<td>Clear from the cursor to the beginning of the command line.</td>
</tr>
<tr>
<td>Ctrl+k</td>
<td>Clear from the cursor to the end of the command line.</td>
</tr>
<tr>
<td>Ctrl+Left Arrow</td>
<td>Jump to the beginning of the previous word on the command line.</td>
</tr>
<tr>
<td>Ctrl+Right Arrow</td>
<td>Jump to the end of the next word on the command line.</td>
</tr>
<tr>
<td>Ctrl+r</td>
<td>Search the history list of commands for a pattern.</td>
</tr>
<tr>
<td>Esc + .</td>
<td>Copy the last word of the previous command on the current command line where the cursor is</td>
</tr>
</tbody>
</table>
<h3 id="redirect-output">Redirect output:</h3>
<table>
<thead>
<tr>
<th>Command</th>
<th>result</th>
</tr>
</thead>
<tbody>
<tr>
<td><code>&gt; file</code></td>
<td>redirect stdout to overwrite a file</td>
</tr>
<tr>
<td><code>&gt;&gt; file</code></td>
<td>redirect stdout to append to a file</td>
</tr>
<tr>
<td><code>2&gt; file</code></td>
<td>redirect stderr to overwrite a file</td>
</tr>
<tr>
<td><code>2&gt; /dev/null</code></td>
<td>discard stderr error messages by redirecting to /dev/null</td>
</tr>
<tr>
<td><code>&amp;&gt; file</code> <em>(OR <code>&gt; file 2&gt;&amp;1</code>)</em></td>
<td>redirect stdout and stderr to overwrite the same file</td>
</tr>
<tr>
<td><code>&amp;&gt;&gt;</code> <em>(OR <code>&gt;&gt; file 2&gt;&amp;1</code>)</em></td>
<td>redirect stdout and stderr to append to the same file</td>
</tr>
</tbody>
</table>
<h3 id="create-a-function">Create a function:</h3>
<p>It&rsquo;s straightforward, use function to create a function, give it a usefull short name and put the statemants between curly brackets.<br>
Use $1 for the first argument, $2 for the second argument and so on&hellip;</p>
<div class="highlight"><pre tabindex="0" style="color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4"><code class="language-bash" data-lang="bash"><span style="color:#66d9ef">function</span> &lt;name&gt; <span style="color:#f92672">{</span>
&lt;bashcommands&gt;
<span style="color:#f92672">}</span>
</code></pre></div><p>For example the function logsearch which searches for the given string whitin all logfiles in the current directory:</p>
<div class="highlight"><pre tabindex="0" style="color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4"><code class="language-bash" data-lang="bash"><span style="color:#66d9ef">function</span> logsearch <span style="color:#f92672">{</span>
zgrep $1 ./*log
<span style="color:#f92672">}</span>
</code></pre></div><h3 id="short-scripts">Short scripts:</h3>
<ul>
<li>Loop every file in path:</li>
</ul>
<div class="highlight"><pre tabindex="0" style="color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4"><code class="language-bash" data-lang="bash"><span style="color:#66d9ef">for</span> F in /path/to/files/*;
<span style="color:#66d9ef">do</span>
echo <span style="color:#e6db74">&#34;Files </span>$F<span style="color:#e6db74">&#34;</span>;
<span style="color:#66d9ef">done</span>
</code></pre></div><ul>
<li>Loop file line per line:</li>
</ul>
<div class="highlight"><pre tabindex="0" style="color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4"><code class="language-bash" data-lang="bash"><span style="color:#66d9ef">while</span> read LINE;
<span style="color:#66d9ef">do</span>
echo $LINE;
<span style="color:#66d9ef">done</span> &lt; file.txt
</code></pre></div>
<div class="tags-list">
<span class="dark-red">Tags</span><span class="decorative-marker">//</span>
<a class="post-tag post-tag-bash" href="https://blog.hagfi.sh//tags/bash">bash</a>,
<a class="post-tag post-tag-script" href="https://blog.hagfi.sh//tags/script">script</a>,
</div>
<div class="paging">
<span class="paging-label">More Reading</span>
<div class="paging-newer">
<span class="dark-red">Newer</span><span class="decorative-marker">//</span>
<a class="paging-link" href="/administration/boot-targets/">Changing boot targets</a>
</div>
<div class="paging-older">
<span class="dark-red">Older</span><span class="decorative-marker">//</span>
<a class="paging-link" href="/administration/yet-another-arch-guide/">Yet Another Arch Guide</a>
</div>
</div>
</section>
<div id="disqus_thread"></div>
<script type="application/javascript">
var disqus_config = function () {
};
(function() {
if (["localhost", "127.0.0.1"].indexOf(window.location.hostname) != -1) {
document.getElementById('disqus_thread').innerHTML = 'Disqus comments not available by default when the website is previewed locally.';
return;
}
var d = document, s = d.createElement('script'); s.async = true;
s.src = '//' + "hagfish" + '.disqus.com/embed.js';
s.setAttribute('data-timestamp', +new Date());
(d.head || d.body).appendChild(s);
})();
</script>
<noscript>Please enable JavaScript to view the <a href="https://disqus.com/?ref_noscript">comments powered by Disqus.</a></noscript>
<a href="https://disqus.com" class="dsq-brlink">comments powered by <span class="logo-disqus">Disqus</span></a>
<div class="footer">
<hr class="thin" />
<div class="pure-menu pure-menu-horizontal pure-menu-open">
<ul class="footer-menu">
</ul>
</div>
<p>&copy; 2022. All rights reserved.</p>
</div>
</div>
</div>
<script>
var app = new Vue({
el: '#app',
data: {
fuse: null,
search: "",
result: [],
index: [],
selected: 0
},
mounted() {
let self = this
window.addEventListener("keypress", function(e) {
self.$refs.searchInput.focus()
})
let options = {
shouldSort: true,
threshold: 0.6,
location: 0,
distance: 100,
maxPatternLength: 32,
minMatchCharLength: 1,
keys: [
"title",
"author",
"date",
"content"
]
}
axios.get('/index.json')
.then(function (response) {
self.index = response.data
self.fuse = new Fuse(response.data, options)
})
.catch(function (error) {
})
},
watch: {
result(nval, oval) {
nval.length > 0 ? this.pointer(0) : this.pointer(-1)
},
search(nval, oval) {
this.result = this.fuse.search(nval)
}
},
methods: {
navigate(val) {
switch (val) {
case 1: if (this.selected < this.result.length - 1) { this.selected++ }; break;
case -1: if (this.selected > 0 ) { this.selected-- }; break;
default: window.location.href = val; break;
}
this.pointer(this.selected)
},
pointer(selected) {
let self = this
if (selected >= 0) {
Vue.nextTick().then(function() {
let height = self.$refs.resultItem[selected].clientHeight
let top = self.$refs.resultItem[selected].getBoundingClientRect().top
let left = self.$refs.resultItem[selected].getBoundingClientRect().left
self.$refs.resultPoint.style.top = (top+height/2)+'px'
self.$refs.resultPoint.style.left = (left-20)+'px'
})
} else {
this.$refs.resultPoint.style.left = '-50px'
return
}
}
}
})
</script>
</body>
</html>

372
public/administration/boot-targets/index.html

@ -0,0 +1,372 @@
<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en-us">
<head>
<title>
Changing boot targets // Hagfi.sh
</title>
<link href="http://gmpg.org/xfn/11" rel="profile">
<meta http-equiv="content-type" content="text/html; charset=utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1">
<meta name="description" content="">
<meta name="keywords" content="">
<meta name="author" content="Kristof Vandam">
<meta name="generator" content="Hugo 0.92.0" />
<meta property="og:title" content="Changing boot targets" />
<meta property="og:description" content="" />
<meta property="og:type" content="website" />
<meta property="og:locale" content="en_US" />
<meta property="og:url" content="https://blog.hagfi.sh/administration/boot-targets/" />
<link rel="stylesheet" href="//cdnjs.cloudflare.com/ajax/libs/pure/0.5.0/base-min.css">
<link rel="stylesheet" href="//cdnjs.cloudflare.com/ajax/libs/pure/0.5.0/pure-min.css">
<link rel="stylesheet" href="//cdnjs.cloudflare.com/ajax/libs/pure/0.5.0/grids-responsive-min.css">
<link rel="stylesheet" href="https://blog.hagfi.sh//css/redlounge.css">
<link rel="stylesheet" href="https://blog.hagfi.sh//css/prism.css">
<link href="//maxcdn.bootstrapcdn.com/font-awesome/4.5.0/css/font-awesome.min.css" rel="stylesheet">
<link href='//fonts.googleapis.com/css?family=Raleway:400,200,100,700,300,500,600,800' rel='stylesheet' type='text/css'>
<link href='//fonts.googleapis.com/css?family=Libre+Baskerville:400,700,400italic' rel='stylesheet' type='text/css'>
<link rel="apple-touch-icon-precomposed" sizes="144x144" href="/touch-icon-144-precomposed.png">
<link rel="shortcut icon" type="image/x-icon" href="/img/favicon.png">
<link href="" rel="alternate" type="application/rss+xml" title="Hagfi.sh" />
<script src="//cdnjs.cloudflare.com/ajax/libs/moment.js/2.18.1/moment.js"></script>
<script src="//cdnjs.cloudflare.com/ajax/libs/vue/2.5.17/vue.min.js"></script>
<script src="//cdnjs.cloudflare.com/ajax/libs/axios/0.18.0/axios.min.js"></script>
<script src="//cdnjs.cloudflare.com/ajax/libs/fuse.js/3.2.1/fuse.min.js"></script>
<script src="//cdn.jsdelivr.net/npm/vuewordcloud@18.7.11/VueWordCloud.js"></script>
<script src="https://blog.hagfi.sh//js/prism.js"></script>
<script type="application/javascript">
var doNotTrack = false;
if (!doNotTrack) {
(function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){
(i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o),
m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m)
})(window,document,'script','https://www.google-analytics.com/analytics.js','ga');
ga('create', 'UA-124890410-1', 'auto');
ga('send', 'pageview');
}
</script>
</head>
<body>
<div id="layout" class="pure-g">
<div class="sidebar pure-u-1 pure-u-md-1-4" id="app">
<div class="header">
<h1 class="brand-title"><a href="/">Hagfi.sh</a></h1>
<h2 class="brand-tagline">A devops guide to the galaxy</h2>
<div class="counters">
<a class="counter" href="/">13
<div class="counter-sub">Documents</div>
</a>
<a class="counter" href="/tags">29
<div class="counter-sub">Tags</div>
</a>
<a class="counter" href="/categories">3
<div class="counter-sub">Categories</div>
</a>
</div>
<nav class="nav">
</nav>
<div class="search-wrapper">
<input
type="text"
placeholder="Search ..."
v-model="search"
@keydown.down.prevent="navigate(1)"
@keydown.up.prevent="navigate(-1)"
@keyup.enter.prevent="navigate(result[selected].href)"
ref="searchInput"
class="search"
/>
<svg height="100" width="100" ref="resultPoint" class="result-point">
<circle cx="5" cy="5" r="5" fill="#FFF" />
</svg>
<ul class="result-items">
<li v-for="r, i of result" class="result-item" ref="resultItem">
<div class="result-item-wrapper" :class="{ 'result-item-selected': selected === i }">
<div class="result-item-left">
<span class="post-date">
<span class="post-date-day"><sup v-text="moment(r.date).format('D')"></sup></span><span class="post-date-separator" v-text="'/'"></span><span class="post-date-month" v-text="moment(r.date).format('MMM')"></span> <span class="post-date-year" v-text="moment(r.date).format('YYYY')"></span>
</span>
<template v-if="r.author">By <a class="post-author" v-text="r.author"></a></template>
</div>
<div class="result-item-left">
<span class="result-item-separator nav-item-separator" v-text="'//'"></span><a :href="r.href" v-text="r.title" class="result-item-link"></a>
</div>
</div>
</li>
</ul>
</div>
</div>
</div>
<div class="content pure-u-1 pure-u-md-3-4">
<a name="top"></a>
<div id="toc" class="pure-u-1 pure-u-md-1-4">
<small class="toc-label">Contents</small>
<nav id="TableOfContents">
<ul>
<li><a href="#on-the-fly">On the fly</a></li>
<li><a href="#permanently-change-environments">Permanently change environments</a></li>
<li><a href="#set-target-on-boot">Set target on boot</a></li>
</ul>
</nav>
</div>
<section class="post">
<h1 class="post-title">
<a href="/administration/boot-targets/">Changing boot targets</a>
</h1>
<h3 class="post-subtitle">
</h3>
<span class="post-date">
<span class="post-date-day"><sup>9</sup></span><span class="post-date-separator">/</span><span class="post-date-month">Nov</span> <span class="post-date-year">2018</span>
</span>
<span class="post-author-single">By <a class="post-author" target="">Kristof Vandam</a></span>
<div class="post-categories">
<a class="post-category post-category-administration" href="https://blog.hagfi.sh//categories/administration">administration</a>
</div>
<p>Switch between run levels / environments.</p>
<h1 id="changing-boot-targets">Changing boot targets</h1>
<h2 id="on-the-fly">On the fly</h2>
<p>Goto a graphical environment</p>
<pre tabindex="0"><code class="language-.language-command" data-lang=".language-command">systemctl isolate graphical.target
</code></pre><p>Goto a text based environment</p>
<pre tabindex="0"><code class="language-.language-command" data-lang=".language-command">systemctl isolate multi-user.target
</code></pre><h2 id="permanently-change-environments">Permanently change environments</h2>
<p>Graphical environment</p>
<pre tabindex="0"><code class="language-.language-command" data-lang=".language-command">systemctl set-default graphical.target
</code></pre><p>Text based environment</p>
<pre tabindex="0"><code class="language-.language-command" data-lang=".language-command">systemctl set-default multi-user.target
</code></pre><h2 id="set-target-on-boot">Set target on boot</h2>
<ol>
<li>Interrupt the bootloader (GRUB) and edit the kernel entry before booting. Press <em>e</em> to edit the entry</li>
<li>Goto the line that starts with <em>linux16</em> suffix the line with your desired target as followed:</li>
</ol>
<pre tabindex="0"><code class="language-.language-command" data-lang=".language-command">systemd.unit=rescue.target
</code></pre>
<div class="tags-list">
<span class="dark-red">Tags</span><span class="decorative-marker">//</span>
<a class="post-tag post-tag-linux" href="https://blog.hagfi.sh//tags/linux">linux</a>,
<a class="post-tag post-tag-security" href="https://blog.hagfi.sh//tags/security">security</a>,
<a class="post-tag post-tag-boot" href="https://blog.hagfi.sh//tags/boot">boot</a>,
</div>
<div class="paging">
<span class="paging-label">More Reading</span>
<div class="paging-newer">
<span class="dark-red">Newer</span><span class="decorative-marker">//</span>
<a class="paging-link" href="/administration/autofs/">Mount with automount (autofs)</a>
</div>
<div class="paging-older">
<span class="dark-red">Older</span><span class="decorative-marker">//</span>
<a class="paging-link" href="/administration/bash/">Bash Tips &amp; Tricks</a>
</div>
</div>
</section>
<div id="disqus_thread"></div>
<script type="application/javascript">
var disqus_config = function () {
};
(function() {
if (["localhost", "127.0.0.1"].indexOf(window.location.hostname) != -1) {
document.getElementById('disqus_thread').innerHTML = 'Disqus comments not available by default when the website is previewed locally.';
return;
}
var d = document, s = d.createElement('script'); s.async = true;
s.src = '//' + "hagfish" + '.disqus.com/embed.js';
s.setAttribute('data-timestamp', +new Date());
(d.head || d.body).appendChild(s);
})();
</script>
<noscript>Please enable JavaScript to view the <a href="https://disqus.com/?ref_noscript">comments powered by Disqus.</a></noscript>
<a href="https://disqus.com" class="dsq-brlink">comments powered by <span class="logo-disqus">Disqus</span></a>
<div class="footer">
<hr class="thin" />
<div class="pure-menu pure-menu-horizontal pure-menu-open">
<ul class="footer-menu">
</ul>
</div>
<p>&copy; 2022. All rights reserved.</p>
</div>
</div>
</div>
<script>
var app = new Vue({
el: '#app',
data: {
fuse: null,
search: "",
result: [],
index: [],
selected: 0
},
mounted() {
let self = this
window.addEventListener("keypress", function(e) {
self.$refs.searchInput.focus()
})
let options = {
shouldSort: true,
threshold: 0.6,
location: 0,
distance: 100,
maxPatternLength: 32,
minMatchCharLength: 1,
keys: [
"title",
"author",
"date",
"content"
]
}
axios.get('/index.json')
.then(function (response) {
self.index = response.data
self.fuse = new Fuse(response.data, options)
})
.catch(function (error) {
})
},
watch: {
result(nval, oval) {
nval.length > 0 ? this.pointer(0) : this.pointer(-1)
},
search(nval, oval) {
this.result = this.fuse.search(nval)
}
},
methods: {
navigate(val) {
switch (val) {
case 1: if (this.selected < this.result.length - 1) { this.selected++ }; break;
case -1: if (this.selected > 0 ) { this.selected-- }; break;
default: window.location.href = val; break;
}
this.pointer(this.selected)
},
pointer(selected) {
let self = this
if (selected >= 0) {
Vue.nextTick().then(function() {
let height = self.$refs.resultItem[selected].clientHeight
let top = self.$refs.resultItem[selected].getBoundingClientRect().top
let left = self.$refs.resultItem[selected].getBoundingClientRect().left
self.$refs.resultPoint.style.top = (top+height/2)+'px'
self.$refs.resultPoint.style.left = (left-20)+'px'
})
} else {
this.$refs.resultPoint.style.left = '-50px'
return
}
}
}
})
</script>
</body>
</html>

409
public/administration/index.html

@ -14,13 +14,13 @@
<meta name="description" content="">
<meta name="keywords" content="">
<meta name="author" content="">
<meta name="generator" content="Hugo 0.18.1" />
<meta name="generator" content="Hugo 0.92.0" />
<meta property="og:title" content="Administrations" />
<meta property="og:description" content="" />
<meta property="og:type" content="website" />
<meta property="og:locale" content="en_US" />
<meta property="og:url" content="https://hagfi.sh/administration/" />
<meta property="og:url" content="https://blog.hagfi.sh/administration/" />
@ -32,7 +32,8 @@
<link rel="stylesheet" href="https://hagfi.sh//css/redlounge.css">
<link rel="stylesheet" href="https://blog.hagfi.sh//css/redlounge.css">
<link rel="stylesheet" href="https://blog.hagfi.sh//css/prism.css">
<link href="//maxcdn.bootstrapcdn.com/font-awesome/4.5.0/css/font-awesome.min.css" rel="stylesheet">
<link href='//fonts.googleapis.com/css?family=Raleway:400,200,100,700,300,500,600,800' rel='stylesheet' type='text/css'>
<link href='//fonts.googleapis.com/css?family=Libre+Baskerville:400,700,400italic' rel='stylesheet' type='text/css'>
@ -42,49 +43,97 @@
<link rel="shortcut icon" type="image/x-icon" href="/img/favicon.png">
<link href="https://hagfi.sh/administration/index.xml" rel="alternate" type="application/rss+xml" title="Hagfi.sh" />
<link href="https://blog.hagfi.sh/administration/index.xml" rel="alternate" type="application/rss+xml" title="Hagfi.sh" />
<link rel="stylesheet" href="//cdnjs.cloudflare.com/ajax/libs/highlight.js/8.7/styles/tomorrow-night-bright.min.css">
<script src="//cdnjs.cloudflare.com/ajax/libs/moment.js/2.18.1/moment.js"></script>
<script src="//cdnjs.cloudflare.com/ajax/libs/vue/2.5.17/vue.min.js"></script>
<script src="//cdnjs.cloudflare.com/ajax/libs/axios/0.18.0/axios.min.js"></script>
<script src="//cdnjs.cloudflare.com/ajax/libs/fuse.js/3.2.1/fuse.min.js"></script>
<script src="//cdn.jsdelivr.net/npm/vuewordcloud@18.7.11/VueWordCloud.js"></script>
<script src="https://blog.hagfi.sh//js/prism.js"></script>
<script src="//cdnjs.cloudflare.com/ajax/libs/highlight.js/8.7/highlight.min.js"></script>
<script>hljs.initHighlightingOnLoad();</script>
<script type="application/javascript">
var doNotTrack = false;
if (!doNotTrack) {
(function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){
(i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o),
m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m)
})(window,document,'script','https://www.google-analytics.com/analytics.js','ga');
ga('create', 'UA-124890410-1', 'auto');
ga('send', 'pageview');
}
</script>
</head>
<body>
<div id="layout" class="pure-g">
<div class="sidebar pure-u-1 pure-u-md-1-4">
<div class="sidebar pure-u-1 pure-u-md-1-4" id="app">
<div class="header">
<h1 class="brand-title">Hagfi.sh</h1>
<h2 class="brand-tagline">Documentation</h2>
<h1 class="brand-title"><a href="/">Hagfi.sh</a></h1>
<h2 class="brand-tagline">A devops guide to the galaxy</h2>
<div class="counters">
<a class="counter" href="/">13
<div class="counter-sub">Documents</div>
</a>
<a class="counter" href="/tags">29
<div class="counter-sub">Tags</div>
</a>
<a class="counter" href="/categories">3
<div class="counter-sub">Categories</div>
</a>
</div>
<nav class="nav">
<ul class="nav-list">
<li class="nav-item"><span class="nav-item-separator">//</span><a href="https://hagfi.sh/">Home</a></li>
<li class="nav-item"><span class="nav-item-separator">//</span><a href="/administration">Administration</a></li>
<li class="nav-item"><span class="nav-item-separator">//</span><a href="/development">Development</a></li>
<li class="nav-item"><span class="nav-item-separator">//</span><a href="/tools">Tools</a></li>
</ul>
</nav>
<div class="search-wrapper">
<input
type="text"
placeholder="Search ..."
v-model="search"
@keydown.down.prevent="navigate(1)"
@keydown.up.prevent="navigate(-1)"
@keyup.enter.prevent="navigate(result[selected].href)"
ref="searchInput"
class="search"
/>
<svg height="100" width="100" ref="resultPoint" class="result-point">
<circle cx="5" cy="5" r="5" fill="#FFF" />
</svg>
<ul class="result-items">
<li v-for="r, i of result" class="result-item" ref="resultItem">
<div class="result-item-wrapper" :class="{ 'result-item-selected': selected === i }">
<div class="result-item-left">
<span class="post-date">
<span class="post-date-day"><sup v-text="moment(r.date).format('D')"></sup></span><span class="post-date-separator" v-text="'/'"></span><span class="post-date-month" v-text="moment(r.date).format('MMM')"></span> <span class="post-date-year" v-text="moment(r.date).format('YYYY')"></span>
</span>
<template v-if="r.author">By <a class="post-author" v-text="r.author"></a></template>
</div>
<div class="result-item-left">
<span class="result-item-separator nav-item-separator" v-text="'//'"></span><a :href="r.href" v-text="r.title" class="result-item-link"></a>
</div>
</div>
</li>
</ul>
</div>
</div>
@ -101,30 +150,76 @@
<header class="post-header">
<h1 class="post-title">
<a href="/administration/letsencrypt/">Let&#39;s Encrypt</a>
<a href="/administration/yet-another-arch-guide/">Yet Another Arch Guide</a>
</h1>
</header>
<p class="post-meta">
<span class="post-date">
<span class="post-date-day"><sup>25</sup></span><span class="post-date-separator">/</span><span class="post-date-month">Aug</span> <span class="post-date-year">2018</span>
<span class="post-date-day"><sup>30</sup></span><span class="post-date-separator">/</span><span class="post-date-month">Nov</span> <span class="post-date-year">2018</span>
</span>
By <a class="post-author" >Kristof Vandam - Adam Verbeeck</a>
<span class="post-reading-time"><i class="fa fa-clock-o"></i> <em>2 min. read</em></span>
<div class="post-categories">
<a class="post-category post-category-administration" href="https://blog.hagfi.sh//categories/administration">administration</a>
</div>
</p>
<article class="post-summary">
<p>Setting up Arch with other bells and whistles.</p>
</article>
<div class="read-more-link">
<a href="/administration/yet-another-arch-guide/"><span class="read-more-slashes">//</span>Read More...</a>
</div>
</section>
<section class="post">
<header class="post-header">
<h1 class="post-title">
<a href="/administration/bash/">Bash Tips &amp; Tricks</a>
</h1>
</header>
<p class="post-meta">
<span class="post-date">
<span class="post-date-day"><sup>11</sup></span><span class="post-date-separator">/</span><span class="post-date-month">Nov</span> <span class="post-date-year">2018</span>
</span>
By <a class="post-author" >Olivier De Ram</a>
<span class="post-reading-time"><i class="fa fa-clock-o"></i> <em>2 min. read</em></span>
<div class="post-categories">
<a class="post-category post-category-administration" href="https://blog.hagfi.sh//categories/administration">administration</a>
<a class="post-category post-category-development" href="https://blog.hagfi.sh//categories/development">development</a>
</div>
</p>
<article class="post-summary">
Let&rsquo;s Encrypt: Aanmaken / vernieuwen certificaat: /opt/letsencrypt/letsencrypt-auto certonly --expand ---email support@nucleus.be --agree-tos --webroot -w /var/www/vhosts/WEB/ROOT -d domain.tld -d domainalias.tld --dry-run /bin/certbot --text --agree-tos --non-interactive certonly -a webroot --webroot-path /var/www/vhosts/WEB/ROOT -d domain.tld -d domainalias.tld --dry-run --dry-run om het aanmaken te testen.
Apache / httpd (1) Voeg volgende regels toe aan de apache config: Alias /.well-known /var/www/vhosts/letsencrypt/.well-known &lt;Directory /var/www/vhosts/letsencrypt/.well-known&gt; order allow,deny allow from all satisfy any &lt;/Directory&gt; Of (2) voeg volgende regels toe aan .
<p>Usefull bash tips &amp; tricks</p>
</article>
<div class="read-more-link">
<a href="/administration/letsencrypt/"><span class="read-more-slashes">//</span>Read More...</a>
<a href="/administration/bash/"><span class="read-more-slashes">//</span>Read More...</a>
</div>
</section>
@ -133,29 +228,74 @@ Apache / httpd (1) Voeg volgende regels toe aan de apache config: Alias /.well
<header class="post-header">
<h1 class="post-title">
<a href="/administration/mysql_tuner/">MySQL Tuner</a>
<a href="/administration/boot-targets/">Changing boot targets</a>
</h1>
</header>
<p class="post-meta">
<span class="post-date">
<span class="post-date-day"><sup>25</sup></span><span class="post-date-separator">/</span><span class="post-date-month">Aug</span> <span class="post-date-year">2018</span>
<span class="post-date-day"><sup>9</sup></span><span class="post-date-separator">/</span><span class="post-date-month">Nov</span> <span class="post-date-year">2018</span>
</span>
By <a class="post-author" >Kristof Vandam</a>
<span class="post-reading-time"><i class="fa fa-clock-o"></i> <em>1 min. read</em></span>
<div class="post-categories">
<a class="post-category post-category-administration" href="https://blog.hagfi.sh//categories/administration">administration</a>
</div>
</p>
<article class="post-summary">
<p>Switch between run levels / environments.</p>
</article>
<div class="read-more-link">
<a href="/administration/boot-targets/"><span class="read-more-slashes">//</span>Read More...</a>
</div>
</section>
<section class="post">
<header class="post-header">
<h1 class="post-title">
<a href="/administration/autofs/">Mount with automount (autofs)</a>
</h1>
</header>
<p class="post-meta">
<span class="post-date">
<span class="post-date-day"><sup>9</sup></span><span class="post-date-separator">/</span><span class="post-date-month">Nov</span> <span class="post-date-year">2018</span>
</span>
By <a class="post-author" >Kristof Vandam</a>
<span class="post-reading-time"><i class="fa fa-clock-o"></i> <em>3 min. read</em></span>
<span class="post-reading-time"><i class="fa fa-clock-o"></i> <em>2 min. read</em></span>
<div class="post-categories">
<a class="post-category post-category-administration" href="https://blog.hagfi.sh//categories/administration">administration</a>
</div>
</p>
<article class="post-summary">
MySQL Tuner WAARDE ACTIE query_cache_size AFBLIJVEN table_cache AFBLIJVEN (maximumwaarde = 64) table_open_cache AFBLIJVEN join_buffer_size Verhogen indien Joins performed without indexes++ tmp_table_size Verhogen = max_heap_table_size max_heap_table_size Verhogen = tmp_table_size query_cache_type =1 indien =0 mysql tuning improvements table_cache NOOIT hoger dan 64 Sudo vim /etc/my.cnf query_cache_size&rsquo; =&gt; &lsquo;256M’, It caches the select query along with the result set, which enables the identical selects to execute faster as the data fetches from the in memory.
<p>Automagically mount remote directories on login.</p>
</article>
<div class="read-more-link">
<a href="/administration/mysql_tuner/"><span class="read-more-slashes">//</span>Read More...</a>
<a href="/administration/autofs/"><span class="read-more-slashes">//</span>Read More...</a>
</div>
</section>
@ -164,17 +304,55 @@ Apache / httpd (1) Voeg volgende regels toe aan de apache config: Alias /.well
<header class="post-header">
<h1 class="post-title">
<a href="/administration/windows_troubleshooting/">Windows troubleshooting</a>
<a href="/administration/toubles-with-interfaces-after-clone/">Troubles with interfaces after a VM clone</a>
</h1>
</header>
<p class="post-meta">
<span class="post-date">
<span class="post-date-day"><sup>25</sup></span><span class="post-date-separator">/</span><span class="post-date-month">Aug</span> <span class="post-date-year">2018</span>
<span class="post-date-day"><sup>5</sup></span><span class="post-date-separator">/</span><span class="post-date-month">Nov</span> <span class="post-date-year">2018</span>
</span>
By <a class="post-author" >Kristof Vandam</a>
<span class="post-reading-time"><i class="fa fa-clock-o"></i> <em>1 min. read</em></span>
<div class="post-categories">
<a class="post-category post-category-administration" href="https://blog.hagfi.sh//categories/administration">administration</a>
</div>
</p>
<article class="post-summary">
<p>Remapping interfaces and their MAC address.</p>
</article>
<div class="read-more-link">
<a href="/administration/toubles-with-interfaces-after-clone/"><span class="read-more-slashes">//</span>Read More...</a>
</div>
</section>
<section class="post">
<header class="post-header">
<h1 class="post-title">
<a href="/administration/letsencrypt/">Let&#39;s Encrypt</a>
</h1>
</header>
<p class="post-meta">
<span class="post-date">
<span class="post-date-day"><sup>25</sup></span><span class="post-date-separator">/</span><span class="post-date-month">Aug</span> <span class="post-date-year">2018</span>
</span>
By <a class="post-author" >Olivier De Ram</a>
<span class="post-reading-time"><i class="fa fa-clock-o"></i> <em>2 min. read</em></span>
@ -183,16 +361,11 @@ Apache / httpd (1) Voeg volgende regels toe aan de apache config: Alias /.well
</p>
<article class="post-summary">
Windows troubleshooting VRAGEN: + openen vanuit ticketing, wachtwoord en gebruiker + custom even viewer view? + test server?
EventViewer run: eventvwr
custom views windows application (non windows standard, puppet, vmware, mssql, &hellip;) security, aan en afmelden set-up: updates en installatie verwijderen programma&rsquo;s system: OS meldingen application and services: diep graven &ndash;&gt; Filter Log:
logged (date range)
event level
event source
event ID: 99,-1024,-4634
Let&rsquo;s Encrypt: Aanmaken / vernieuwen certificaat: /opt/letsencrypt/letsencrypt-auto certonly --expand ---email support@domain.tld --agree-tos --webroot -w /var/www/vhosts/WEB/ROOT -d domain.tld -d domainalias.tld --dry-run /bin/certbot --text --agree-tos --non-interactive certonly -a webroot --webroot-path /var/www/vhosts/WEB/ROOT -d domain.tld -d domainalias.tld --dry-run --dry-run om het aanmaken te testen.
Apache / httpd (1) Voeg volgende regels toe aan de apache config: Alias /.well-known /var/www/vhosts/letsencrypt/.well-known &lt;Directory /var/www/vhosts/letsencrypt/.well-known&gt; order allow,deny allow from all satisfy any &lt;/Directory&gt; Of (2) voeg volgende regels toe aan .
</article>
<div class="read-more-link">
<a href="/administration/windows_troubleshooting/"><span class="read-more-slashes">//</span>Read More...</a>
<a href="/administration/letsencrypt/"><span class="read-more-slashes">//</span>Read More...</a>
</div>
</section>
@ -201,28 +374,64 @@ EventViewer run: eventvwr
<header class="post-header">
<h1 class="post-title">
<a href="/administration/dont-let-your-application-interfere-with-letsencrypt/">Dont Let Your Application Interfere With Letsencrypt</a>
<a href="/administration/mysql_tuner/">MySQL Tuner</a>
</h1>
</header>
<p class="post-meta">
<span class="post-date">
<span class="post-date-day"><sup>23</sup></span><span class="post-date-separator">/</span><span class="post-date-month">Aug</span> <span class="post-date-year">2018</span>
<span class="post-date-day"><sup>25</sup></span><span class="post-date-separator">/</span><span class="post-date-month">Aug</span> <span class="post-date-year">2018</span>
</span>
By <a class="post-author" >Olivier De Ram</a>
<span class="post-reading-time"><i class="fa fa-clock-o"></i> <em>1 min. read</em></span>
<span class="post-reading-time"><i class="fa fa-clock-o"></i> <em>3 min. read</em></span>
</p>
<article class="post-summary">
MySQL Tuner WAARDE ACTIE query_cache_size AFBLIJVEN table_cache AFBLIJVEN (maximumwaarde = 64) table_open_cache AFBLIJVEN join_buffer_size Verhogen indien Joins performed without indexes++ tmp_table_size Verhogen = max_heap_table_size max_heap_table_size Verhogen = tmp_table_size query_cache_type =1 indien =0 mysql tuning improvements table_cache NOOIT hoger dan 64 Sudo vim /etc/my.cnf query_cache_size' =&gt; &lsquo;256M’, It caches the select query along with the result set, which enables the identical selects to execute faster as the data fetches from the in memory.
</article>
<div class="read-more-link">
<a href="/administration/mysql_tuner/"><span class="read-more-slashes">//</span>Read More...</a>
</div>
</section>
<section class="post">
<header class="post-header">
<h1 class="post-title">
<a href="/administration/windows_troubleshooting/">Windows troubleshooting</a>
</h1>
</header>
<p class="post-meta">
<span class="post-date">
<span class="post-date-day"><sup>25</sup></span><span class="post-date-separator">/</span><span class="post-date-month">Aug</span> <span class="post-date-year">2018</span>
</span>
By <a class="post-author" >Olivier De Ram</a>
<h2 id="tips-and-tricks-to-keep-letsencrypt-working">Tips and tricks to keep letsencrypt working</h2>
<span class="post-reading-time"><i class="fa fa-clock-o"></i> <em>2 min. read</em></span>
</p>
<article class="post-summary">
Windows troubleshooting VRAGEN:
openen vanuit ticketing, wachtwoord en gebruiker custom even viewer view? test server? EventViewer run: eventvwr
custom views windows application (non windows standard, puppet, vmware, mssql, &hellip;) security, aan en afmelden set-up: updates en installatie verwijderen programma&rsquo;s system: OS meldingen application and services: diep graven &ndash;&gt; Filter Log:
logged (date range) event level event source event ID: 99,-1024,-4634 rechtsonderaan &gt; event copy &gt; copy as text
</article>
<div class="read-more-link">
<a href="/administration/windows_troubleshooting/"><span class="read-more-slashes">//</span>Read More...</a>
</div>
</section>
@ -243,13 +452,20 @@ EventViewer run: eventvwr
By <a class="post-author" >Kristof Vandam</a>
<span class="post-reading-time"><i class="fa fa-clock-o"></i> <em>1 min. read</em></span>
<span class="post-reading-time"><i class="fa fa-clock-o"></i> <em>4 min. read</em></span>
<div class="post-categories">
<a class="post-category post-category-administration" href="https://blog.hagfi.sh//categories/administration">administration</a>
</div>
</p>
<article class="post-summary">
Add a new disk (LVM) root@server:/dev/centos # for i in /sys/class/scsi_host/host*; do echo &quot;- - -&quot; &gt; $i/scan; done root@server:/dev/centos # NEWDISK=$(dmesg|tail|grep 'Attached'|awk '{print $4}'|tail -n1|cut -d &quot;[&quot; -f2|cut -d &quot;]&quot; -f1) root@server:/dev/centos # VGROUP=$(vgdisplay|grep Name|head -n1|awk '{print $3}') root@server:/dev/centos # echo ${NEWDISK} sdd root@server:/dev/centos # echo ${VGROUP} centos root@server:/dev/centos # pvcreate /dev/${NEWDISK} Physical volume &quot;/dev/sdd&quot; successfully created. root@server:/dev/centos # vgextend ${VGROUP} /dev/${NEWDISK} Volume group &quot;centos&quot; successfully extended Create a logical volume (LVM) root@server:/dev/centos # lvcreate -L 15G -n encrypted centos Logical volume &quot;encrypted&quot; created.
<p>Create an encrypted partition that will automatically mount at boot.</p>
</article>
<div class="read-more-link">
<a href="/administration/luks-encryption/"><span class="read-more-slashes">//</span>Read More...</a>
@ -259,9 +475,94 @@ EventViewer run: eventvwr
</div>
<div class="footer">
<hr class="thin" />
<div class="pure-menu pure-menu-horizontal pure-menu-open">
<ul class="footer-menu">
</ul>
</div>
<p>&copy; 2022. All rights reserved.</p>
</div>
</div>
</div>
<script>
var app = new Vue({
el: '#app',
data: {
fuse: null,
search: "",
result: [],
index: [],
selected: 0
},
mounted() {
let self = this
window.addEventListener("keypress", function(e) {
self.$refs.searchInput.focus()
})
let options = {
shouldSort: true,
threshold: 0.6,
location: 0,
distance: 100,
maxPatternLength: 32,
minMatchCharLength: 1,
keys: [
"title",
"author",
"date",
"content"
]
}
axios.get('/index.json')
.then(function (response) {
self.index = response.data
self.fuse = new Fuse(response.data, options)
})
.catch(function (error) {
})
},
watch: {
result(nval, oval) {
nval.length > 0 ? this.pointer(0) : this.pointer(-1)
},
search(nval, oval) {
this.result = this.fuse.search(nval)
}
},
methods: {
navigate(val) {
switch (val) {
case 1: if (this.selected < this.result.length - 1) { this.selected++ }; break;
case -1: if (this.selected > 0 ) { this.selected-- }; break;
default: window.location.href = val; break;
}
this.pointer(this.selected)
},
pointer(selected) {
let self = this
if (selected >= 0) {
Vue.nextTick().then(function() {
let height = self.$refs.resultItem[selected].clientHeight
let top = self.$refs.resultItem[selected].getBoundingClientRect().top
let left = self.$refs.resultItem[selected].getBoundingClientRect().left
self.$refs.resultPoint.style.top = (top+height/2)+'px'
self.$refs.resultPoint.style.left = (left-20)+'px'
})
} else {
this.$refs.resultPoint.style.left = '-50px'
return
}
}
}
})
</script>
</body>
</html>

515
public/administration/index.xml

@ -1,483 +1,96 @@
<?xml version="1.0" encoding="utf-8" standalone="yes" ?>
<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom">
<channel>
<title>Administrations on Hagfi.sh</title>
<link>https://hagfi.sh/administration/index.xml</link>
<link>https://blog.hagfi.sh/administration/</link>
<description>Recent content in Administrations on Hagfi.sh</description>
<generator>Hugo -- gohugo.io</generator>
<language>en-us</language>
<lastBuildDate>Sat, 25 Aug 2018 22:08:15 +0200</lastBuildDate>
<atom:link href="https://hagfi.sh/administration/index.xml" rel="self" type="application/rss+xml" />
<lastBuildDate>Fri, 30 Nov 2018 10:08:22 +0200</lastBuildDate><atom:link href="https://blog.hagfi.sh/administration/index.xml" rel="self" type="application/rss+xml" />
<item>
<title>Yet Another Arch Guide</title>
<link>https://blog.hagfi.sh/administration/yet-another-arch-guide/</link>
<pubDate>Fri, 30 Nov 2018 10:08:22 +0200</pubDate>
<guid>https://blog.hagfi.sh/administration/yet-another-arch-guide/</guid>
<description>&lt;p&gt;Setting up Arch with other bells and whistles.&lt;/p&gt;</description>
</item>
<item>
<title>Let&#39;s Encrypt</title>
<link>https://hagfi.sh/administration/letsencrypt/</link>
<pubDate>Sat, 25 Aug 2018 22:08:15 +0200</pubDate>
<title>Bash Tips &amp; Tricks</title>
<link>https://blog.hagfi.sh/administration/bash/</link>
<pubDate>Sun, 11 Nov 2018 16:01:15 +0100</pubDate>
<guid>https://hagfi.sh/administration/letsencrypt/</guid>
<description>
&lt;h2 id=&#34;let-s-encrypt&#34;&gt;Let&amp;rsquo;s Encrypt:&lt;/h2&gt;
&lt;ul&gt;
&lt;li&gt;Aanmaken / vernieuwen certificaat:&lt;/li&gt;
&lt;/ul&gt;
&lt;pre&gt;&lt;code&gt;/opt/letsencrypt/letsencrypt-auto certonly
--expand
---email support@nucleus.be
--agree-tos
--webroot
-w /var/www/vhosts/WEB/ROOT
-d domain.tld
-d domainalias.tld
--dry-run
&lt;/code&gt;&lt;/pre&gt;
&lt;pre&gt;&lt;code&gt;/bin/certbot
--text
--agree-tos
--non-interactive
certonly
-a webroot
--webroot-path /var/www/vhosts/WEB/ROOT
-d domain.tld
-d domainalias.tld
--dry-run
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;&lt;code&gt;--dry-run&lt;/code&gt; om het aanmaken te testen.&lt;/p&gt;
&lt;h3 id=&#34;apache-httpd&#34;&gt;Apache / httpd&lt;/h3&gt;
&lt;ul&gt;
&lt;li&gt;(1) Voeg volgende regels toe aan de apache config:&lt;/li&gt;
&lt;/ul&gt;
&lt;pre&gt;&lt;code&gt;Alias /.well-known /var/www/vhosts/letsencrypt/.well-known
&amp;lt;Directory /var/www/vhosts/letsencrypt/.well-known&amp;gt;
order allow,deny
allow from all
satisfy any
&amp;lt;/Directory&amp;gt;
&lt;/code&gt;&lt;/pre&gt;
&lt;ul&gt;
&lt;li&gt;Of (2) voeg volgende regels toe aan .htaccess:&lt;/li&gt;
&lt;/ul&gt;
&lt;pre&gt;&lt;code&gt;&amp;lt;IfModule mod_rewrite.c&amp;gt;
RewriteEngine on
#Allow Let&#39;s Encrypt SSL renewal
RewriteRule ^.well-known/ - [L,NC]
RewriteCond %{REQUEST_URI} !^/.well-known/acme-challenge/
RewriteRule ^/?(.*) https://%{SERVER_NAME}/$1 [R=301,L]
&lt;/code&gt;&lt;/pre&gt;
&lt;ul&gt;
&lt;li&gt;Combineer Basic Auth met Let&amp;rsquo;s Encrypt:&lt;br /&gt;
&lt;em&gt;Dit moet je bekijken ale een if/else. (Ofwel valid-user ofwel REQUEST_URI)&lt;/em&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;pre&gt;&lt;code&gt; &amp;lt;Directory /var/www/vhosts/WEB/ROOT&amp;gt;
AuthType Basic
AuthName protected
AuthUserFile /etc/httpd/passwd/phpmyadmin.htpasswd
require valid-user
Require expr %{REQUEST_URI} =~ m#^/.well-known/acme-challenge/.*#
&amp;lt;/Directory&amp;gt;
&lt;/code&gt;&lt;/pre&gt;
&lt;h3 id=&#34;nginx&#34;&gt;Nginx&lt;/h3&gt;
&lt;ul&gt;
&lt;li&gt;Voeg volgende regels toe aan Nginx&lt;/li&gt;
&lt;/ul&gt;
&lt;pre&gt;&lt;code&gt; location /.well-known {
root /var/www/vhosts/WEB/ROOT;
index index.html index.htm index.php;
}
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;-&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Controleer DNS lijst domeinen:&lt;/li&gt;
&lt;/ul&gt;
&lt;pre&gt;&lt;code&gt;while read LINE;
do
echo $LINE &amp;gt;&amp;gt; list_processed.txt &amp;amp;&amp;amp; dig +short @9.9.9.9 $LINE &amp;gt;&amp;gt; list_processed.txt;
done &amp;lt; list.txt
&lt;/code&gt;&lt;/pre&gt;
&lt;ul&gt;
&lt;li&gt;(WIP)
&lt;br /&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;pre&gt;&lt;code&gt;#!/bin/bash
#IP=&amp;lt;%= @default_ipadress %&amp;gt;
IP=$(dig +short @9.9.9.9 $(hostname))
FILE=$1
while read LINE
do
CHK=$(dig +short @9.9.9.9 $LINE)
if $IP -eq $CHK
echo &amp;quot;$LINE|$CHK&amp;quot; &amp;gt;&amp;gt; /tmp/le-ok
elif
echo &amp;quot;$LINE|$CHK&amp;quot; &amp;gt;&amp;gt; /tmp/le-nok
fi
done &amp;lt; $FILE
echo &amp;quot;Domains OK:&amp;quot;
echo /tmp/le-ok | column
echo &amp;quot;-------------------------------&amp;quot;
echo &amp;quot;Domains NOT OK:&amp;quot;
echo /tmp/le-nok | column
rm -rf /tmp/le-ok
rm -rf /tmp/le-nok
&lt;/code&gt;&lt;/pre&gt;
</description>
<guid>https://blog.hagfi.sh/administration/bash/</guid>
<description>&lt;p&gt;Usefull bash tips &amp;amp; tricks&lt;/p&gt;</description>
</item>
<item>
<title>MySQL Tuner</title>
<link>https://hagfi.sh/administration/mysql_tuner/</link>
<title>Changing boot targets</title>
<link>https://blog.hagfi.sh/administration/boot-targets/</link>
<pubDate>Fri, 09 Nov 2018 10:08:15 +0200</pubDate>
<guid>https://blog.hagfi.sh/administration/boot-targets/</guid>
<description>&lt;p&gt;Switch between run levels / environments.&lt;/p&gt;</description>
</item>
<item>
<title>Mount with automount (autofs)</title>
<link>https://blog.hagfi.sh/administration/autofs/</link>
<pubDate>Fri, 09 Nov 2018 10:08:15 +0200</pubDate>
<guid>https://blog.hagfi.sh/administration/autofs/</guid>
<description>&lt;p&gt;Automagically mount remote directories on login.&lt;/p&gt;</description>
</item>
<item>
<title>Troubles with interfaces after a VM clone</title>
<link>https://blog.hagfi.sh/administration/toubles-with-interfaces-after-clone/</link>
<pubDate>Mon, 05 Nov 2018 22:13:49 +0200</pubDate>
<guid>https://blog.hagfi.sh/administration/toubles-with-interfaces-after-clone/</guid>
<description>&lt;p&gt;Remapping interfaces and their MAC address.&lt;/p&gt;</description>
</item>
<item>
<title>Let&#39;s Encrypt</title>
<link>https://blog.hagfi.sh/administration/letsencrypt/</link>
<pubDate>Sat, 25 Aug 2018 22:08:15 +0200</pubDate>
<guid>https://hagfi.sh/administration/mysql_tuner/</guid>
<description>
&lt;h2 id=&#34;mysql-tuner&#34;&gt;MySQL Tuner&lt;/h2&gt;
&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;WAARDE&lt;/th&gt;
&lt;th&gt;ACTIE&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;&lt;code&gt;query_cache_size&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;AFBLIJVEN&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;code&gt;table_cache&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;AFBLIJVEN &lt;em&gt;(maximumwaarde = 64)&lt;/em&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;code&gt;table_open_cache&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;AFBLIJVEN&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;code&gt;join_buffer_size&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;Verhogen indien &lt;code&gt;Joins performed without indexes++&lt;/code&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;code&gt;tmp_table_size&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;Verhogen = &lt;code&gt;max_heap_table_size&lt;/code&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;code&gt;max_heap_table_size&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;Verhogen &lt;code&gt;= tmp_table_size&lt;/code&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;code&gt;query_cache_type&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;&lt;code&gt;=1&lt;/code&gt; indien &lt;code&gt;=0&lt;/code&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;
&lt;blockquote&gt;
&lt;p&gt;mysql tuning improvements
&lt;code&gt;table_cache&lt;/code&gt; NOOIT hoger dan 64
Sudo vim /etc/my.cnf
query_cache_size&amp;rsquo; =&amp;gt; &amp;lsquo;256M’,
It caches the select query along with the result set, which enables the identical selects to execute faster as the data fetches from the in memory.
Caching voor select queries en bijhorende result sets, wat het mogelijk maakt om identieke selects sneller op te vragen uit memory.
&amp;lsquo;open_files_limit&amp;rsquo; =&amp;gt; &amp;lsquo;4096&amp;rsquo;,
Changes the number of file descriptors available to mysqld. You should try increasing the value of this option if mysqld gives you the error Too many open files.
&amp;lsquo;join_buffer_size&amp;rsquo; =&amp;gt; &amp;lsquo;256K’,
The minimum size of the buffer that is used for plain index scans, range index scans, and joins that do not use indexes and thus perform full table scans. Normally, the best way to get fast joins is to add indexes. Increase the value of join_buffer_size to get a faster full join when adding indexes is not possible.
Minimumgrootte van buffer voor index en table scans.&lt;/p&gt;
&lt;/blockquote&gt;
&lt;hr /&gt;
&lt;blockquote&gt;
&lt;p&gt;&amp;lsquo;max_heap_table_size&amp;rsquo; =&amp;gt; &amp;lsquo;32M’,
This variable sets the maximum size to which user-created MEMORY tables are permitted to grow.
Max grootte van user-created memory tables
These 2 need to be the same size!!!
&amp;lsquo;tmp_table_size&amp;rsquo; =&amp;gt; &amp;lsquo;32M’,
The maximum size of internal in-memory temporary tables.
Max grootte van interne in-memory tijdelijke tabellen&lt;/p&gt;
&lt;/blockquote&gt;
&lt;hr /&gt;
&lt;blockquote&gt;
&lt;p&gt;table_cache=64 (maximumwaarde!!)
Table_Cache should always - well mostly anyway - be significantly bigger than the total number of tables in the server. Otherwise it&amp;rsquo;ll keep opening and closing tables.
Maximumwaarde voor caching van geopende tabellen.
thread_cache_size=4
How many threads the server should cache for reuse.
Aantal threads dat de server kan cachen voor hergebruik.
&amp;lsquo;innodb_buffer_pool_size&amp;rsquo; =&amp;gt; &amp;lsquo;1G&amp;rsquo;,
The size in bytes of the buffer pool, the memory area where InnoDB caches table and index data. The default value is 128MB.&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;Sudo service mysql/mariadb reload (restart enkel onder toezicht)&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;code&gt;query_cache_*&lt;/code&gt;:&lt;/li&gt;
&lt;/ul&gt;
&lt;blockquote&gt;
&lt;p&gt;&lt;code&gt;query_cache_type&lt;/code&gt;&lt;br /&gt;
Needs to be set to 1 to enable caching.&lt;br /&gt;
&lt;code&gt;query_cache_size&lt;/code&gt;&lt;br /&gt;
Is the size of the cache. This can be in bytes, or you can use a M suffix to specify the amount of megabytes.&lt;br /&gt;
&lt;code&gt;query_cache_limit&lt;/code&gt;&lt;br /&gt;
Is the maximum size of an individually cached query. Queries over this size won’t go into the cache. This is also in bytes, or megabytes with the M suffix. 1MB is a safe bet.&lt;br /&gt;
Maximumgrootte voor elke individuele gecachte query. Queries groter dan dit zullen niet gecacht worden.&lt;br /&gt;
&lt;code&gt;table_open_cache&lt;/code&gt;&lt;br /&gt;
Indicates the maximum number of tables the server keeps open&lt;/p&gt;
&lt;/blockquote&gt;
&lt;hr /&gt;
&lt;p&gt;&lt;code&gt;innodb_buffer_pool_instances=2&lt;/code&gt;&lt;br /&gt;
&lt;em&gt;Enables the use of multiple threads for innodb.&lt;/em&gt;&lt;/p&gt;
&lt;p&gt;&lt;code&gt;query_cache_type=1&lt;/code&gt;&lt;br /&gt;
&lt;em&gt;Enables query caching.&lt;/em&gt;&lt;/p&gt;
&lt;p&gt;&lt;code&gt;join_buffer_size=1024K&lt;/code&gt;&lt;br /&gt;
&lt;em&gt;Increased the buffer size for non-indexed joins.&lt;/em&gt;&lt;/p&gt;
&lt;p&gt;&lt;code&gt;tmp_table_size=64M &amp;amp;&amp;amp; max_heap_table_size=64M&lt;/code&gt;&lt;br /&gt;
&lt;em&gt;Increased the size for temporary tables.&lt;/em&gt;&lt;/p&gt;
&lt;p&gt;&lt;code&gt;join_buffer_size&lt;/code&gt;&lt;br /&gt;
&lt;em&gt;Omwille van het aantal JOIN queries uitgevoerd zonder indexes, werd de minimumgrootte van de buffer voor index en table scans verhoogd.&lt;/em&gt;&lt;/p&gt;
&lt;p&gt;&lt;code&gt;max_heap_table_size &amp;amp; tmp_table_size&lt;/code&gt;&lt;br /&gt;
&lt;em&gt;De maximale grootte van user-created memory tables en van interne in-memory tijdelijke tabellen werd verhoogd.&lt;/em&gt;&lt;/p&gt;
&lt;p&gt;&lt;code&gt;thread_cache_size&lt;/code&gt;&lt;br /&gt;
&lt;em&gt;Het maximale aantal threads dat de server kan cachen voor hergebruik werd verhoogd.&lt;/em&gt;&lt;/p&gt;
</description>
<guid>https://blog.hagfi.sh/administration/letsencrypt/</guid>
<description>Let&amp;rsquo;s Encrypt: Aanmaken / vernieuwen certificaat: /opt/letsencrypt/letsencrypt-auto certonly --expand ---email support@domain.tld --agree-tos --webroot -w /var/www/vhosts/WEB/ROOT -d domain.tld -d domainalias.tld --dry-run /bin/certbot --text --agree-tos --non-interactive certonly -a webroot --webroot-path /var/www/vhosts/WEB/ROOT -d domain.tld -d domainalias.tld --dry-run --dry-run om het aanmaken te testen.
Apache / httpd (1) Voeg volgende regels toe aan de apache config: Alias /.well-known /var/www/vhosts/letsencrypt/.well-known &amp;lt;Directory /var/www/vhosts/letsencrypt/.well-known&amp;gt; order allow,deny allow from all satisfy any &amp;lt;/Directory&amp;gt; Of (2) voeg volgende regels toe aan .</description>
</item>
<item>
<title>Windows troubleshooting</title>
<link>https://hagfi.sh/administration/windows_troubleshooting/</link>
<title>MySQL Tuner</title>
<link>https://blog.hagfi.sh/administration/mysql_tuner/</link>
<pubDate>Sat, 25 Aug 2018 22:08:15 +0200</pubDate>
<guid>https://hagfi.sh/administration/windows_troubleshooting/</guid>
<description>
&lt;h2 id=&#34;windows-troubleshooting&#34;&gt;Windows troubleshooting&lt;/h2&gt;
&lt;p&gt;VRAGEN:
+ openen vanuit ticketing, wachtwoord en gebruiker
+ custom even viewer view?
+ test server?&lt;/p&gt;
&lt;h3 id=&#34;eventviewer&#34;&gt;&lt;em&gt;EventViewer&lt;/em&gt;&lt;/h3&gt;
&lt;p&gt;run: eventvwr&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;custom views&lt;/li&gt;
&lt;li&gt;windows
&lt;ul&gt;
&lt;li&gt;application (non windows standard, puppet, vmware, mssql, &amp;hellip;)&lt;/li&gt;
&lt;li&gt;security, aan en afmelden&lt;/li&gt;
&lt;li&gt;set-up: updates en installatie verwijderen programma&amp;rsquo;s&lt;/li&gt;
&lt;li&gt;system: OS meldingen&lt;/li&gt;
&lt;/ul&gt;&lt;/li&gt;
&lt;li&gt;application and services: diep graven
&lt;br /&gt;
&lt;br /&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;&amp;ndash;&amp;gt; Filter Log:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;logged (date range)&lt;br /&gt;&lt;/li&gt;
&lt;li&gt;event level&lt;br /&gt;&lt;/li&gt;
&lt;li&gt;event source&lt;br /&gt;&lt;/li&gt;
&lt;li&gt;event ID: 99,-1024,-4634&lt;br /&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;rechtsonderaan &amp;gt; event copy &amp;gt; copy as text&lt;/p&gt;
&lt;h3 id=&#34;powershell&#34;&gt;&lt;em&gt;PowerShell&lt;/em&gt;&lt;/h3&gt;
&lt;pre&gt;&lt;code class=&#34;language-PowerShell&#34;&gt;$first =
$last =
get-eventlog -Logname system -
&lt;/code&gt;&lt;/pre&gt;
&lt;pre&gt;&lt;code class=&#34;language-PowerShell&#34;&gt; `get-winevent -LogName &#39;Microsoft-Windows-TaskScheduler/Operational&#39; | Where-Object { $_.Message -like ‘*insta* }`
&lt;/code&gt;&lt;/pre&gt;
&lt;h3 id=&#34;task-viewer&#34;&gt;&lt;em&gt;Task Viewer&lt;/em&gt;&lt;/h3&gt;
&lt;ul&gt;
&lt;li&gt;tasks&lt;/li&gt;
&lt;li&gt;users&lt;/li&gt;
&lt;li&gt;performance (indien gecrasht, bevestigen anders is het netwerk)&lt;/li&gt;
&lt;/ul&gt;
&lt;h3 id=&#34;resource-monitor&#34;&gt;&lt;em&gt;Resource monitor&lt;/em&gt;&lt;/h3&gt;
&lt;p&gt;(task manager &amp;gt; performance &amp;gt; open resouce monitor)&lt;/p&gt;
&lt;p&gt;Overview &amp;gt; CPU (ovenste tab) app aanvinken &amp;ndash;&amp;gt; filtert alles&lt;/p&gt;
&lt;h3 id=&#34;netstat&#34;&gt;&lt;em&gt;Netstat&lt;/em&gt;&lt;/h3&gt;
&lt;p&gt;&lt;code&gt;netstat -abo &amp;gt; C:\temp\log.txt&lt;/code&gt;&lt;/p&gt;
&lt;h3 id=&#34;chocolate&#34;&gt;&lt;em&gt;Chocolate&lt;/em&gt;&lt;/h3&gt;
&lt;p&gt;C:\ProgramData\chocolatey\bin\Procmon.exe
&amp;ndash;&amp;gt; selecteer lijn+kolom &amp;gt; exclude &amp;lsquo;name&amp;rsquo; (=grep -v) / include &amp;lsquo;name&amp;rsquo; (=grep)&lt;/p&gt;
&lt;h3 id=&#34;usefull-programs&#34;&gt;&lt;em&gt;Usefull programs&lt;/em&gt;&lt;/h3&gt;
&lt;ul&gt;
&lt;li&gt;TreeView&lt;/li&gt;
&lt;li&gt;VBluescreenviewer&lt;/li&gt;
&lt;li&gt;Sysinternals&lt;/li&gt;
&lt;li&gt;Zabbix&lt;/li&gt;
&lt;li&gt;VMware events&lt;/li&gt;
&lt;li&gt;BareTail&lt;/li&gt;
&lt;li&gt;choco install&lt;/li&gt;
&lt;li&gt;choco list -lo (view choco installed programs)&lt;/li&gt;
&lt;li&gt;telnet 12.34.56.78 900&lt;/li&gt;
&lt;li&gt;powershell: &lt;code&gt;stop service &#39;name&#39;&lt;/code&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;h3 id=&#34;eventid-s&#34;&gt;&lt;em&gt;EventID&amp;rsquo;s&lt;/em&gt;&lt;/h3&gt;
&lt;ul&gt;
&lt;li&gt;Event ID 6005: “The event log service was started.” This is synonymous to system startup.&lt;/li&gt;
&lt;li&gt;Event ID 6006: “The event log service was stopped.” This is synonymous to system shutdown.&lt;/li&gt;
&lt;li&gt;Event ID 6008: &amp;ldquo;The previous system shutdown was unexpected.&amp;rdquo; Records that the system started after it was not shut down properly.&lt;/li&gt;
&lt;li&gt;Event ID 6009: Indicates the Windows product name, version, build number, service pack number, and operating system type detected at boot time.&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Event ID 6013: Displays the uptime of the computer. There is no TechNet page for this id.
Add to that a couple more from the Server Fault answers listed in my OP:&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Event ID 1074: &amp;ldquo;The process X has initiated the restart / shutdown of computer on behalf of user Y for the following reason: Z.&amp;rdquo; Indicates that an application or a user initiated a restart or shutdown.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Event ID 1076: &amp;ldquo;The reason supplied by user X for the last unexpected shutdown of this computer is: Y.&amp;rdquo; Records when the first user with shutdown privileges logs on to the computer after an unexpected restart or shutdown and supplies a reason for the occurrence.&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;h3 id=&#34;powershell-1&#34;&gt;&lt;em&gt;PowerShell&lt;/em&gt;&lt;/h3&gt;
&lt;pre&gt;&lt;code class=&#34;language-PowerShell&#34;&gt;$filter = &amp;quot;*abbix*&amp;quot;
get-winevent -logname &#39;Application&#39; | Where-Object { $_.Message -like $filter }
&lt;/code&gt;&lt;/pre&gt;
</description>
<guid>https://blog.hagfi.sh/administration/mysql_tuner/</guid>
<description>MySQL Tuner WAARDE ACTIE query_cache_size AFBLIJVEN table_cache AFBLIJVEN (maximumwaarde = 64) table_open_cache AFBLIJVEN join_buffer_size Verhogen indien Joins performed without indexes++ tmp_table_size Verhogen = max_heap_table_size max_heap_table_size Verhogen = tmp_table_size query_cache_type =1 indien =0 mysql tuning improvements table_cache NOOIT hoger dan 64 Sudo vim /etc/my.cnf query_cache_size&#39; =&amp;gt; &amp;lsquo;256M’, It caches the select query along with the result set, which enables the identical selects to execute faster as the data fetches from the in memory.</description>
</item>
<item>
<title>Dont Let Your Application Interfere With Letsencrypt</title>
<link>https://hagfi.sh/administration/dont-let-your-application-interfere-with-letsencrypt/</link>
<pubDate>Thu, 23 Aug 2018 22:46:41 +0200</pubDate>
<title>Windows troubleshooting</title>
<link>https://blog.hagfi.sh/administration/windows_troubleshooting/</link>
<pubDate>Sat, 25 Aug 2018 22:08:15 +0200</pubDate>
<guid>https://hagfi.sh/administration/dont-let-your-application-interfere-with-letsencrypt/</guid>
<description>
&lt;h2 id=&#34;tips-and-tricks-to-keep-letsencrypt-working&#34;&gt;Tips and tricks to keep letsencrypt working&lt;/h2&gt;
</description>
<guid>https://blog.hagfi.sh/administration/windows_troubleshooting/</guid>
<description>Windows troubleshooting VRAGEN:
openen vanuit ticketing, wachtwoord en gebruiker custom even viewer view? test server? EventViewer run: eventvwr
custom views windows application (non windows standard, puppet, vmware, mssql, &amp;hellip;) security, aan en afmelden set-up: updates en installatie verwijderen programma&amp;rsquo;s system: OS meldingen application and services: diep graven &amp;ndash;&amp;gt; Filter Log:
logged (date range) event level event source event ID: 99,-1024,-4634 rechtsonderaan &amp;gt; event copy &amp;gt; copy as text</description>
</item>
<item>
<title>Luks Encryption</title>
<link>https://hagfi.sh/administration/luks-encryption/</link>
<link>https://blog.hagfi.sh/administration/luks-encryption/</link>
<pubDate>Thu, 23 Aug 2018 22:08:15 +0200</pubDate>
<guid>https://hagfi.sh/administration/luks-encryption/</guid>
<description>
&lt;h2 id=&#34;add-a-new-disk-lvm&#34;&gt;Add a new disk (LVM)&lt;/h2&gt;
&lt;pre&gt;&lt;code&gt;root@server:/dev/centos # for i in /sys/class/scsi_host/host*; do echo &amp;quot;- - -&amp;quot; &amp;gt; $i/scan; done
root@server:/dev/centos # NEWDISK=$(dmesg|tail|grep &#39;Attached&#39;|awk &#39;{print $4}&#39;|tail -n1|cut -d &amp;quot;[&amp;quot; -f2|cut -d &amp;quot;]&amp;quot; -f1)
root@server:/dev/centos # VGROUP=$(vgdisplay|grep Name|head -n1|awk &#39;{print $3}&#39;)
root@server:/dev/centos # echo ${NEWDISK}
sdd
root@server:/dev/centos # echo ${VGROUP}
centos
root@server:/dev/centos # pvcreate /dev/${NEWDISK}
Physical volume &amp;quot;/dev/sdd&amp;quot; successfully created.
root@server:/dev/centos # vgextend ${VGROUP} /dev/${NEWDISK}
Volume group &amp;quot;centos&amp;quot; successfully extended
&lt;/code&gt;&lt;/pre&gt;
&lt;h2 id=&#34;create-a-logical-volume-lvm&#34;&gt;Create a logical volume (LVM)&lt;/h2&gt;
&lt;pre&gt;&lt;code&gt;root@server:/dev/centos # lvcreate -L 15G -n encrypted centos
Logical volume &amp;quot;encrypted&amp;quot; created.
&lt;/code&gt;&lt;/pre&gt;
&lt;h2 id=&#34;encrypt-the-partition&#34;&gt;Encrypt the partition&lt;/h2&gt;
&lt;pre&gt;&lt;code&gt;root@server:/dev/centos # cryptsetup -v --verify-passphrase luksFormat /dev/centos/encrypted
root@server:/dev/mapper # cryptsetup luksOpen /dev/centos/encrypted luks-encrypted
&lt;/code&gt;&lt;/pre&gt;
&lt;h2 id=&#34;create-a-mountpoint&#34;&gt;Create a mountpoint&lt;/h2&gt;
&lt;pre&gt;&lt;code&gt;root@server:/dev/mapper # mkdir /encrypted
root@server:/dev/mapper # mount /dev/mapper/luks-encrypted /encrypted
&lt;/code&gt;&lt;/pre&gt;
&lt;h2 id=&#34;create-a-key-to-auto-mount-the-encrypted-disk&#34;&gt;Create a key (to auto-mount the encrypted disk)&lt;/h2&gt;
&lt;pre&gt;&lt;code&gt;root@server:/dev/mapper # dd if=/dev/urandom of=/root/lukskey bs=1024 count=4
root@server:/dev/mapper # chmod 0400 /root/lukskey
&lt;/code&gt;&lt;/pre&gt;
&lt;h2 id=&#34;unmount-and-add-the-key&#34;&gt;Unmount and add the key&lt;/h2&gt;
&lt;pre&gt;&lt;code&gt;root@server:/ # umount /encrypted
root@server:/ # cryptsetup luksClose luks-encrypted
root@server:/ # cryptsetup luksAddKey /dev/mapper/centos-encrypted /root/lukskey
&lt;/code&gt;&lt;/pre&gt;
&lt;h2 id=&#34;get-uuid&#34;&gt;Get UUID&lt;/h2&gt;
&lt;pre&gt;&lt;code&gt;root@server:/ # blkid /dev/mapper/centos-encrypted
/dev/mapper/centos-encrypted: UUID=&amp;quot;0dab9a5c-1870-478d-8d74-226eeb512f78&amp;quot; TYPE=&amp;quot;crypto_LUKS&amp;quot;
&lt;/code&gt;&lt;/pre&gt;
&lt;h2 id=&#34;auto-mount-luks-edit-etc-cypttab&#34;&gt;Auto-mount LUKS (edit /etc/cypttab)&lt;/h2&gt;
&lt;pre&gt;&lt;code&gt;luks-encrypted /dev/disk/by-uuid/0dab9a5c-1870-478d-8d74-226eeb512f78 /root/lukskey luks
&lt;/code&gt;&lt;/pre&gt;
</description>
<guid>https://blog.hagfi.sh/administration/luks-encryption/</guid>
<description>&lt;p&gt;Create an encrypted partition that will automatically mount at boot.&lt;/p&gt;</description>
</item>
</channel>
</rss>
</rss>

307
public/administration/letsencrypt/index.html

@ -13,14 +13,14 @@
<meta name="description" content="">
<meta name="keywords" content="">
<meta name="author" content="">
<meta name="generator" content="Hugo 0.18.1" />
<meta name="author" content="Olivier De Ram">
<meta name="generator" content="Hugo 0.92.0" />
<meta property="og:title" content="Let&#39;s Encrypt" />
<meta property="og:description" content="" />
<meta property="og:type" content="website" />
<meta property="og:locale" content="en_US" />
<meta property="og:url" content="https://hagfi.sh/administration/letsencrypt/" />
<meta property="og:url" content="https://blog.hagfi.sh/administration/letsencrypt/" />
@ -32,7 +32,8 @@
<link rel="stylesheet" href="https://hagfi.sh//css/redlounge.css">
<link rel="stylesheet" href="https://blog.hagfi.sh//css/redlounge.css">
<link rel="stylesheet" href="https://blog.hagfi.sh//css/prism.css">
<link href="//maxcdn.bootstrapcdn.com/font-awesome/4.5.0/css/font-awesome.min.css" rel="stylesheet">
<link href='//fonts.googleapis.com/css?family=Raleway:400,200,100,700,300,500,600,800' rel='stylesheet' type='text/css'>
<link href='//fonts.googleapis.com/css?family=Libre+Baskerville:400,700,400italic' rel='stylesheet' type='text/css'>
@ -44,19 +45,31 @@
<link href="" rel="alternate" type="application/rss+xml" title="Hagfi.sh" />
<link rel="stylesheet" href="//cdnjs.cloudflare.com/ajax/libs/highlight.js/8.7/styles/tomorrow-night-bright.min.css">
<script src="//cdnjs.cloudflare.com/ajax/libs/moment.js/2.18.1/moment.js"></script>
<script src="//cdnjs.cloudflare.com/ajax/libs/vue/2.5.17/vue.min.js"></script>
<script src="//cdnjs.cloudflare.com/ajax/libs/axios/0.18.0/axios.min.js"></script>
<script src="//cdnjs.cloudflare.com/ajax/libs/fuse.js/3.2.1/fuse.min.js"></script>
<script src="//cdn.jsdelivr.net/npm/vuewordcloud@18.7.11/VueWordCloud.js"></script>
<script src="https://blog.hagfi.sh//js/prism.js"></script>
<script src="//cdnjs.cloudflare.com/ajax/libs/highlight.js/8.7/highlight.min.js"></script>
<script>hljs.initHighlightingOnLoad();</script>
<script type="application/javascript">
var doNotTrack = false;
if (!doNotTrack) {
(function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){
(i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o),
m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m)
})(window,document,'script','https://www.google-analytics.com/analytics.js','ga');
ga('create', 'UA-124890410-1', 'auto');
ga('send', 'pageview');
}
</script>
</head>
@ -65,28 +78,64 @@
<div id="layout" class="pure-g">
<div class="sidebar pure-u-1 pure-u-md-1-4">
<div class="sidebar pure-u-1 pure-u-md-1-4" id="app">
<div class="header">
<h1 class="brand-title">Hagfi.sh</h1>
<h2 class="brand-tagline">Documentation</h2>
<h1 class="brand-title"><a href="/">Hagfi.sh</a></h1>
<h2 class="brand-tagline">A devops guide to the galaxy</h2>
<div class="counters">
<a class="counter" href="/">13
<div class="counter-sub">Documents</div>
</a>
<a class="counter" href="/tags">29
<div class="counter-sub">Tags</div>
</a>
<a class="counter" href="/categories">3
<div class="counter-sub">Categories</div>
</a>
</div>
<nav class="nav">
<ul class="nav-list">
<li class="nav-item"><span class="nav-item-separator">//</span><a href="https://hagfi.sh/">Home</a></li>
<li class="nav-item"><span class="nav-item-separator">//</span><a href="/administration">Administration</a></li>
<li class="nav-item"><span class="nav-item-separator">//</span><a href="/development">Development</a></li>
<li class="nav-item"><span class="nav-item-separator">//</span><a href="/tools">Tools</a></li>
</ul>
</nav>
<div class="search-wrapper">
<input
type="text"
placeholder="Search ..."
v-model="search"
@keydown.down.prevent="navigate(1)"
@keydown.up.prevent="navigate(-1)"
@keyup.enter.prevent="navigate(result[selected].href)"
ref="searchInput"
class="search"
/>
<svg height="100" width="100" ref="resultPoint" class="result-point">
<circle cx="5" cy="5" r="5" fill="#FFF" />
</svg>
<ul class="result-items">
<li v-for="r, i of result" class="result-item" ref="resultItem">
<div class="result-item-wrapper" :class="{ 'result-item-selected': selected === i }">
<div class="result-item-left">
<span class="post-date">
<span class="post-date-day"><sup v-text="moment(r.date).format('D')"></sup></span><span class="post-date-separator" v-text="'/'"></span><span class="post-date-month" v-text="moment(r.date).format('MMM')"></span> <span class="post-date-year" v-text="moment(r.date).format('YYYY')"></span>
</span>
<template v-if="r.author">By <a class="post-author" v-text="r.author"></a></template>
</div>
<div class="result-item-left">
<span class="result-item-separator nav-item-separator" v-text="'//'"></span><a :href="r.href" v-text="r.title" class="result-item-link"></a>
</div>
</div>
</li>
</ul>
</div>
</div>
@ -104,16 +153,14 @@
<div id="toc" class="pure-u-1 pure-u-md-1-4">
<small class="toc-label">Contents</small>
<nav id="TableOfContents">
<ul>
<li>
<ul>
<li><a href="#let-s-encrypt">Let&rsquo;s Encrypt:</a>
<ul>
<li><a href="#apache-httpd">Apache / httpd</a></li>
<li><a href="#nginx">Nginx</a></li>
</ul></li>
</ul></li>
</ul>
<ul>
<li><a href="#lets-encrypt">Let&rsquo;s Encrypt:</a>
<ul>
<li><a href="#apache--httpd">Apache / httpd</a></li>
<li><a href="#nginx">Nginx</a></li>
</ul>
</li>
</ul>
</nav>
</div>
@ -132,6 +179,13 @@
<span class="post-author-single">By <a class="post-author" target="">Olivier De Ram</a></span>
@ -141,26 +195,20 @@
<h2 id="let-s-encrypt">Let&rsquo;s Encrypt:</h2>
<h2 id="lets-encrypt">Let&rsquo;s Encrypt:</h2>
<ul>
<li>Aanmaken / vernieuwen certificaat:</li>
</ul>
<pre><code>/opt/letsencrypt/letsencrypt-auto certonly
<pre tabindex="0"><code>/opt/letsencrypt/letsencrypt-auto certonly
--expand
---email support@nucleus.be
---email support@domain.tld
--agree-tos
--webroot
-w /var/www/vhosts/WEB/ROOT
-d domain.tld
-d domainalias.tld
--dry-run
</code></pre>
<pre><code>/bin/certbot
</code></pre><pre tabindex="0"><code>/bin/certbot
--text
--agree-tos
--non-interactive
@ -170,80 +218,59 @@
-d domain.tld
-d domainalias.tld
--dry-run
</code></pre>
<p><code>--dry-run</code> om het aanmaken te testen.</p>
<h3 id="apache-httpd">Apache / httpd</h3>
</code></pre><p><code>--dry-run</code> om het aanmaken te testen.</p>
<h3 id="apache--httpd">Apache / httpd</h3>
<ul>
<li>(1) Voeg volgende regels toe aan de apache config:</li>
</ul>
<pre><code>Alias /.well-known /var/www/vhosts/letsencrypt/.well-known
<pre tabindex="0"><code>Alias /.well-known /var/www/vhosts/letsencrypt/.well-known
&lt;Directory /var/www/vhosts/letsencrypt/.well-known&gt;
order allow,deny
allow from all
satisfy any
&lt;/Directory&gt;
</code></pre>
<ul>
</code></pre><ul>
<li>Of (2) voeg volgende regels toe aan .htaccess:</li>
</ul>
<pre><code>&lt;IfModule mod_rewrite.c&gt;
<pre tabindex="0"><code>&lt;IfModule mod_rewrite.c&gt;
RewriteEngine on
#Allow Let's Encrypt SSL renewal
RewriteRule ^.well-known/ - [L,NC]
RewriteCond %{REQUEST_URI} !^/.well-known/acme-challenge/
RewriteRule ^/?(.*) https://%{SERVER_NAME}/$1 [R=301,L]
</code></pre>
<ul>
<li>Combineer Basic Auth met Let&rsquo;s Encrypt:<br />
</code></pre><ul>
<li>Combineer Basic Auth met Let&rsquo;s Encrypt:<br>
<em>Dit moet je bekijken ale een if/else. (Ofwel valid-user ofwel REQUEST_URI)</em></li>
</ul>
<pre><code> &lt;Directory /var/www/vhosts/WEB/ROOT&gt;
<pre tabindex="0"><code> &lt;Directory /var/www/vhosts/WEB/ROOT&gt;
AuthType Basic
AuthName protected
AuthUserFile /etc/httpd/passwd/phpmyadmin.htpasswd
require valid-user
Require expr %{REQUEST_URI} =~ m#^/.well-known/acme-challenge/.*#
&lt;/Directory&gt;
</code></pre>
<h3 id="nginx">Nginx</h3>
</code></pre><h3 id="nginx">Nginx</h3>
<ul>
<li>Voeg volgende regels toe aan Nginx</li>
</ul>
<pre><code> location /.well-known {
<pre tabindex="0"><code> location /.well-known {
root /var/www/vhosts/WEB/ROOT;
index index.html index.htm index.php;
}
</code></pre>
<p>-</p>
</code></pre><ul>
<li></li>
</ul>
<ul>
<li>Controleer DNS lijst domeinen:</li>
</ul>
<pre><code>while read LINE;
<pre tabindex="0"><code>while read LINE;
do
echo $LINE &gt;&gt; list_processed.txt &amp;&amp; dig +short @9.9.9.9 $LINE &gt;&gt; list_processed.txt;
done &lt; list.txt
</code></pre>
<ul>
<li>(WIP)
<br /></li>
</code></pre><ul>
<li>(WIP)</li>
</ul>
<pre><code>#!/bin/bash
<pre tabindex="0"><code>#!/bin/bash
#IP=&lt;%= @default_ipadress %&gt;
IP=$(dig +short @9.9.9.9 $(hostname))
@ -268,7 +295,6 @@ echo /tmp/le-nok | column
rm -rf /tmp/le-ok
rm -rf /tmp/le-nok
</code></pre>
@ -278,27 +304,136 @@ rm -rf /tmp/le-nok
<div class="paging">
<span class="paging-label">More Reading</span>
<div class="paging-newer">
<span class="dark-red">Newer</span><span class="decorative-marker">//</span>
<a class="paging-link" href="/administration/mysql_tuner/">MySQL Tuner</a>
</div>
<div class="paging-older">
<span class="dark-red">Older</span><span class="decorative-marker">//</span>
<a class="paging-link" href="/administration/mysql_tuner/">MySQL Tuner</a>
<a class="paging-link" href="/development/live-search-with-hugo/">Live Search With HUGO</a>
</div>
</div>
</section>
<div id="disqus_thread"></div>
<script type="application/javascript">
var disqus_config = function () {
};
(function() {
if (["localhost", "127.0.0.1"].indexOf(window.location.hostname) != -1) {
document.getElementById('disqus_thread').innerHTML = 'Disqus comments not available by default when the website is previewed locally.';
return;
}
var d = document, s = d.createElement('script'); s.async = true;
s.src = '//' + "hagfish" + '.disqus.com/embed.js';
s.setAttribute('data-timestamp', +new Date());
(d.head || d.body).appendChild(s);
})();
</script>
<noscript>Please enable JavaScript to view the <a href="https://disqus.com/?ref_noscript">comments powered by Disqus.</a></noscript>
<a href="https://disqus.com" class="dsq-brlink">comments powered by <span class="logo-disqus">Disqus</span></a>
<div class="footer">
<hr class="thin" />
<div class="pure-menu pure-menu-horizontal pure-menu-open">
<ul class="footer-menu">
</ul>
</div>
<p>&copy; 2022. All rights reserved.</p>
</div>
</div>
</div>
<script>
var app = new Vue({
el: '#app',
data: {
fuse: null,
search: "",
result: [],
index: [],
selected: 0
},
mounted() {
let self = this
window.addEventListener("keypress", function(e) {
self.$refs.searchInput.focus()
})
let options = {
shouldSort: true,
threshold: 0.6,
location: 0,
distance: 100,
maxPatternLength: 32,
minMatchCharLength: 1,
keys: [
"title",
"author",
"date",
"content"
]
}
axios.get('/index.json')
.then(function (response) {
self.index = response.data
self.fuse = new Fuse(response.data, options)
})
.catch(function (error) {
})
},
watch: {
result(nval, oval) {
nval.length > 0 ? this.pointer(0) : this.pointer(-1)
},
search(nval, oval) {
this.result = this.fuse.search(nval)
}
},
methods: {
navigate(val) {
switch (val) {
case 1: if (this.selected < this.result.length - 1) { this.selected++ }; break;
case -1: if (this.selected > 0 ) { this.selected-- }; break;
default: window.location.href = val; break;
}
this.pointer(this.selected)
},
pointer(selected) {
let self = this
if (selected >= 0) {
Vue.nextTick().then(function() {
let height = self.$refs.resultItem[selected].clientHeight
let top = self.$refs.resultItem[selected].getBoundingClientRect().top
let left = self.$refs.resultItem[selected].getBoundingClientRect().left
self.$refs.resultPoint.style.top = (top+height/2)+'px'
self.$refs.resultPoint.style.left = (left-20)+'px'
})
} else {
this.$refs.resultPoint.style.left = '-50px'
return
}
}
}
})
</script>
</body>
</html>

352
public/administration/luks-encryption/index.html

@ -14,13 +14,13 @@
<meta name="description" content="">
<meta name="keywords" content="">
<meta name="author" content="Kristof Vandam">
<meta name="generator" content="Hugo 0.18.1" />
<meta name="generator" content="Hugo 0.92.0" />
<meta property="og:title" content="Luks Encryption" />
<meta property="og:description" content="" />
<meta property="og:type" content="website" />
<meta property="og:locale" content="en_US" />
<meta property="og:url" content="https://hagfi.sh/administration/luks-encryption/" />
<meta property="og:url" content="https://blog.hagfi.sh/administration/luks-encryption/" />
@ -32,7 +32,8 @@
<link rel="stylesheet" href="https://hagfi.sh//css/redlounge.css">
<link rel="stylesheet" href="https://blog.hagfi.sh//css/redlounge.css">
<link rel="stylesheet" href="https://blog.hagfi.sh//css/prism.css">
<link href="//maxcdn.bootstrapcdn.com/font-awesome/4.5.0/css/font-awesome.min.css" rel="stylesheet">
<link href='//fonts.googleapis.com/css?family=Raleway:400,200,100,700,300,500,600,800' rel='stylesheet' type='text/css'>
<link href='//fonts.googleapis.com/css?family=Libre+Baskerville:400,700,400italic' rel='stylesheet' type='text/css'>
@ -44,19 +45,31 @@
<link href="" rel="alternate" type="application/rss+xml" title="Hagfi.sh" />
<link rel="stylesheet" href="//cdnjs.cloudflare.com/ajax/libs/highlight.js/8.7/styles/tomorrow-night-bright.min.css">
<script src="//cdnjs.cloudflare.com/ajax/libs/moment.js/2.18.1/moment.js"></script>
<script src="//cdnjs.cloudflare.com/ajax/libs/vue/2.5.17/vue.min.js"></script>
<script src="//cdnjs.cloudflare.com/ajax/libs/axios/0.18.0/axios.min.js"></script>
<script src="//cdnjs.cloudflare.com/ajax/libs/fuse.js/3.2.1/fuse.min.js"></script>
<script src="//cdn.jsdelivr.net/npm/vuewordcloud@18.7.11/VueWordCloud.js"></script>
<script src="https://blog.hagfi.sh//js/prism.js"></script>
<script src="//cdnjs.cloudflare.com/ajax/libs/highlight.js/8.7/highlight.min.js"></script>
<script>hljs.initHighlightingOnLoad();</script>
<script type="application/javascript">
var doNotTrack = false;
if (!doNotTrack) {
(function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){
(i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o),
m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m)
})(window,document,'script','https://www.google-analytics.com/analytics.js','ga');
ga('create', 'UA-124890410-1', 'auto');
ga('send', 'pageview');
}
</script>
</head>
@ -65,28 +78,64 @@
<div id="layout" class="pure-g">
<div class="sidebar pure-u-1 pure-u-md-1-4">
<div class="sidebar pure-u-1 pure-u-md-1-4" id="app">
<div class="header">
<h1 class="brand-title">Hagfi.sh</h1>
<h2 class="brand-tagline">Documentation</h2>
<h1 class="brand-title"><a href="/">Hagfi.sh</a></h1>
<h2 class="brand-tagline">A devops guide to the galaxy</h2>
<div class="counters">
<a class="counter" href="/">13
<div class="counter-sub">Documents</div>
</a>
<a class="counter" href="/tags">29
<div class="counter-sub">Tags</div>
</a>
<a class="counter" href="/categories">3
<div class="counter-sub">Categories</div>
</a>
</div>
<nav class="nav">
<ul class="nav-list">
<li class="nav-item"><span class="nav-item-separator">//</span><a href="https://hagfi.sh/">Home</a></li>
<li class="nav-item"><span class="nav-item-separator">//</span><a href="/administration">Administration</a></li>
<li class="nav-item"><span class="nav-item-separator">//</span><a href="/development">Development</a></li>
<li class="nav-item"><span class="nav-item-separator">//</span><a href="/tools">Tools</a></li>
</ul>
</nav>
<div class="search-wrapper">
<input
type="text"
placeholder="Search ..."
v-model="search"
@keydown.down.prevent="navigate(1)"
@keydown.up.prevent="navigate(-1)"
@keyup.enter.prevent="navigate(result[selected].href)"
ref="searchInput"
class="search"
/>
<svg height="100" width="100" ref="resultPoint" class="result-point">
<circle cx="5" cy="5" r="5" fill="#FFF" />
</svg>
<ul class="result-items">
<li v-for="r, i of result" class="result-item" ref="resultItem">
<div class="result-item-wrapper" :class="{ 'result-item-selected': selected === i }">
<div class="result-item-left">
<span class="post-date">
<span class="post-date-day"><sup v-text="moment(r.date).format('D')"></sup></span><span class="post-date-separator" v-text="'/'"></span><span class="post-date-month" v-text="moment(r.date).format('MMM')"></span> <span class="post-date-year" v-text="moment(r.date).format('YYYY')"></span>
</span>
<template v-if="r.author">By <a class="post-author" v-text="r.author"></a></template>
</div>
<div class="result-item-left">
<span class="result-item-separator nav-item-separator" v-text="'//'"></span><a :href="r.href" v-text="r.title" class="result-item-link"></a>
</div>
</div>
</li>
</ul>
</div>
</div>
@ -104,19 +153,18 @@
<div id="toc" class="pure-u-1 pure-u-md-1-4">
<small class="toc-label">Contents</small>
<nav id="TableOfContents">
<ul>
<li>
<ul>
<li><a href="#add-a-new-disk-lvm">Add a new disk (LVM)</a></li>
<li><a href="#create-a-logical-volume-lvm">Create a logical volume (LVM)</a></li>
<li><a href="#encrypt-the-partition">Encrypt the partition</a></li>
<li><a href="#create-a-mountpoint">Create a mountpoint</a></li>
<li><a href="#create-a-key-to-auto-mount-the-encrypted-disk">Create a key (to auto-mount the encrypted disk)</a></li>
<li><a href="#unmount-and-add-the-key">Unmount and add the key</a></li>
<li><a href="#get-uuid">Get UUID</a></li>
<li><a href="#auto-mount-luks-edit-etc-cypttab">Auto-mount LUKS (edit /etc/cypttab)</a></li>
</ul></li>
</ul>
<ul>
<li><a href="#add-a-new-disk-lvm">Add a new disk (LVM)</a></li>
<li><a href="#create-a-logical-volume-lvm">Create a logical volume (LVM)</a></li>
<li><a href="#encrypt-the-partition">Encrypt the partition</a></li>
<li><a href="#create-a-mountpoint">Create a mountpoint</a></li>
<li><a href="#create-a-key-to-auto-mount-the-encrypted-disk">Create a key (to auto-mount the encrypted disk)</a></li>
<li><a href="#unmount-and-add-the-key">Unmount and add the key</a></li>
<li><a href="#get-uuid">Get UUID</a></li>
<li><a href="#auto-mount-luks-edit-etccrypttab">Auto-mount LUKS (edit /etc/crypttab)</a></li>
<li><a href="#auto-mount-luks-edit-etccypttab">Auto-mount LUKS (edit /etc/cypttab)</a></li>
<li><a href="#check-your-work">Check your work</a></li>
</ul>
</nav>
</div>
@ -146,16 +194,48 @@
<div class="post-categories">
<a class="post-category post-category-administration" href="https://blog.hagfi.sh//categories/administration">administration</a>
</div>
<p>Create an encrypted partition that will automatically mount at boot.</p>
<p>Sometimes it&rsquo;s nice to have encryption, sometimes it&rsquo;s mandatory, either way, there are a couple of thing you should take
in mind. Most solutions you find are at disk level but these have some pro&rsquo;s and con&rsquo;s.</p>
<table>
<thead>
<tr>
<th>PRO&rsquo;s</th>
<th>CON&rsquo;s</th>
</tr>
</thead>
<tbody>
<tr>
<td>Every application can work with it</td>
<td>Data is only secured from physical theft</td>
</tr>
<tr>
<td>No extra development required</td>
<td>Can cause some overhead, as everything goes through encryption/decryption, everything</td>
</tr>
</tbody>
</table>
<p>There are also a couple of choisen you can make implementing LUKS, you could create a LVM layer on top of a LUKS partition or, what
we are doing in this guide, add a LUKS encrypted mount on top of a LVM stack. The latter allows you to automatically mount
the encrypted disk after or at boot time.</p>
<h2 id="add-a-new-disk-lvm">Add a new disk (LVM)</h2>
<pre><code>root@server:/dev/centos # for i in /sys/class/scsi_host/host*; do echo &quot;- - -&quot; &gt; $i/scan; done
<p>This is unrelated to encrypting the disk, but in our setup we started by adding a new disk to the server.</p>
<p>The commands below are just some I often use as a group. From lines 1 to 3 you can just copy/paste. Line 1 makes sure a rescan
is triggered to detect the newly added disk. 2 &amp; 3 create some variables, which can be checked and used later. Make sure the output
of these are what you expected. You can echo them as shown on 4 &amp; 5.</p>
<p>Create a Physical Volume and extend the Volume Group &lsquo;centos&rsquo;</p>
<pre tabindex="0"><code class="language-.language-command.line-numbers" data-lang=".language-command.line-numbers">root@server:/dev/centos # for i in /sys/class/scsi_host/host*; do echo &quot;- - -&quot; &gt; $i/scan; done
root@server:/dev/centos # NEWDISK=$(dmesg|tail|grep 'Attached'|awk '{print $4}'|tail -n1|cut -d &quot;[&quot; -f2|cut -d &quot;]&quot; -f1)
root@server:/dev/centos # VGROUP=$(vgdisplay|grep Name|head -n1|awk '{print $3}')
root@server:/dev/centos # echo ${NEWDISK}
@ -166,54 +246,62 @@ root@server:/dev/centos # pvcreate /dev/${NEWDISK}
Physical volume &quot;/dev/sdd&quot; successfully created.
root@server:/dev/centos # vgextend ${VGROUP} /dev/${NEWDISK}
Volume group &quot;centos&quot; successfully extended
</code></pre>
<h2 id="create-a-logical-volume-lvm">Create a logical volume (LVM)</h2>
<pre><code>root@server:/dev/centos # lvcreate -L 15G -n encrypted centos
</code></pre><h2 id="create-a-logical-volume-lvm">Create a logical volume (LVM)</h2>
<p>Add a Logical Volume named &lsquo;encrypted&rsquo; to the Volume Group &lsquo;centos&rsquo;.</p>
<pre tabindex="0"><code class="language-.language-command" data-lang=".language-command">root@server:/dev/centos # lvcreate -L 15G -n encrypted centos
Logical volume &quot;encrypted&quot; created.
</code></pre>
<h2 id="encrypt-the-partition">Encrypt the partition</h2>
<pre><code>root@server:/dev/centos # cryptsetup -v --verify-passphrase luksFormat /dev/centos/encrypted
</code></pre><h2 id="encrypt-the-partition">Encrypt the partition</h2>
<p>Ok, the fun parts starts here (<strong>CAUTION</strong> before continueing make sure there is no important data on <em>/dev/centos/encrypted</em>, this will be wiped). We encrypt the Logical Volume with the first command. A passphrase is required (see it as a backup)
LUKS can contain up to 5 different passwords. In a future section we add a second, more complex, password to use as key on boot.
Hold tight.</p>
<p>After the first command (the actual formatting of the partition) we need to &lsquo;open&rsquo; the partition. By opening we mean creating a new disk, but you
should notice there is a password required to do so. Use the password you just created.</p>
<pre tabindex="0"><code class="language-.language-command" data-lang=".language-command">root@server:/dev/centos # cryptsetup -v --verify-passphrase luksFormat /dev/centos/encrypted
root@server:/dev/mapper # cryptsetup luksOpen /dev/centos/encrypted luks-encrypted
</code></pre>
<h2 id="create-a-mountpoint">Create a mountpoint</h2>
<pre><code>root@server:/dev/mapper # mkdir /encrypted
</code></pre><h2 id="create-a-mountpoint">Create a mountpoint</h2>
<p>Before you can use the encrypted partition you should mount it. Do it like you always do it. Create a directory to mount to and mount <em>/dev/mapper/luks-encrypted</em> with <em>mount</em>.</p>
<pre tabindex="0"><code class="language-.language-command" data-lang=".language-command">root@server:/dev/mapper # mkdir /encrypted
root@server:/dev/mapper # mount /dev/mapper/luks-encrypted /encrypted
</code></pre>
</code></pre><p>From here on you are actually done, if you want to type password manually on every boot. I highly doubt you want that so lets go on.
(It is ofourse more safe to do so).</p>
<h2 id="create-a-key-to-auto-mount-the-encrypted-disk">Create a key (to auto-mount the encrypted disk)</h2>
<pre><code>root@server:/dev/mapper # dd if=/dev/urandom of=/root/lukskey bs=1024 count=4
<p>Create a key-file we can add to <em>/etc/crypttab</em>, any random string will do, but we create it with <em>/dev/urandom</em>. Make sure to set some strict permissions.</p>
<pre tabindex="0"><code class="language-.language-command" data-lang=".language-command">root@server:/dev/mapper # dd if=/dev/urandom of=/root/lukskey bs=1024 count=4
root@server:/dev/mapper # chmod 0400 /root/lukskey
</code></pre>
<h2 id="unmount-and-add-the-key">Unmount and add the key</h2>
<pre><code>root@server:/ # umount /encrypted
</code></pre><h2 id="unmount-and-add-the-key">Unmount and add the key</h2>
<p>Add the key you just created to make it valid for LUKS, but first unmount the mount and close the vault.</p>
<pre tabindex="0"><code class="language-.language-command" data-lang=".language-command">root@server:/ # umount /encrypted
root@server:/ # cryptsetup luksClose luks-encrypted
root@server:/ # cryptsetup luksAddKey /dev/mapper/centos-encrypted /root/lukskey
</code></pre>
<h2 id="get-uuid">Get UUID</h2>
<pre><code>root@server:/ # blkid /dev/mapper/centos-encrypted
</code></pre><h2 id="get-uuid">Get UUID</h2>
<p>Get the UUID of the disk, using the UUID to mount disk is a more solid solution than using the disknames (/dev/sd*). These disknames <strong>CAN</strong> change, the UUID cannot.</p>
<pre tabindex="0"><code class="language-.lang-command" data-lang=".lang-command">root@server:/ # blkid /dev/mapper/centos-encrypted
/dev/mapper/centos-encrypted: UUID=&quot;0dab9a5c-1870-478d-8d74-226eeb512f78&quot; TYPE=&quot;crypto_LUKS&quot;
</code></pre>
<h2 id="auto-mount-luks-edit-etc-cypttab">Auto-mount LUKS (edit /etc/cypttab)</h2>
<pre><code>luks-encrypted /dev/disk/by-uuid/0dab9a5c-1870-478d-8d74-226eeb512f78 /root/lukskey luks
</code></pre>
</code></pre><h2 id="auto-mount-luks-edit-etccrypttab">Auto-mount LUKS (edit /etc/crypttab)</h2>
<p>Add a entry to the <em>/etc/crypttab</em>, see it as the <em>/etc/fstab</em> file. Just as fstab crypttab will automount the defined entries.</p>
<pre tabindex="0"><code class="language-.language-command" data-lang=".language-command">root@server:/ # blkid /dev/mapper/centos-encrypted
/dev/mapper/centos-encrypted: UUID=&quot;0dab9a5c-1870-478d-8d74-226eeb512f78&quot; TYPE=&quot;crypto_LUKS&quot;
</code></pre><h2 id="auto-mount-luks-edit-etccypttab">Auto-mount LUKS (edit /etc/cypttab)</h2>
<pre tabindex="0"><code class="language-.language-bash" data-lang=".language-bash">luks-encrypted /dev/disk/by-uuid/0dab9a5c-1870-478d-8d74-226eeb512f78 /root/lukskey luks
</code></pre><h2 id="check-your-work">Check your work</h2>
<p>Congrats, this should be it, reboot and make sure the disk is mounted automatically.</p>
<div class="tags-list">
<span class="dark-red">Tags</span><span class="decorative-marker">//</span>
<a class="post-tag post-tag-encryption" href="https://blog.hagfi.sh//tags/encryption">encryption</a>,
<a class="post-tag post-tag-security" href="https://blog.hagfi.sh//tags/security">security</a>,
<a class="post-tag post-tag-disk" href="https://blog.hagfi.sh//tags/disk">disk</a>,
<a class="post-tag post-tag-partition" href="https://blog.hagfi.sh//tags/partition">partition</a>,
</div>
<div class="paging">
@ -221,30 +309,134 @@ root@server:/ # cryptsetup luksAddKey /dev/mapper/centos-encrypted /root/lukskey
<div class="paging-newer">
<span class="dark-red">Newer</span><span class="decorative-marker">//</span>
<a class="paging-link" href="/development/vue-js/">Vue Js</a>
<a class="paging-link" href="/index.json"></a>
</div>
<div class="paging-older">
<span class="dark-red">Older</span><span class="decorative-marker">//</span>
<a class="paging-link" href="/administration/">Administrations</a>
<a class="paging-link" href="/administration/windows_troubleshooting/">Windows troubleshooting</a>
</div>
</div>
</section>
<div id="disqus_thread"></div>
<script type="application/javascript">
var disqus_config = function () {
};
(function() {
if (["localhost", "127.0.0.1"].indexOf(window.location.hostname) != -1) {
document.getElementById('disqus_thread').innerHTML = 'Disqus comments not available by default when the website is previewed locally.';
return;
}
var d = document, s = d.createElement('script'); s.async = true;
s.src = '//' + "hagfish" + '.disqus.com/embed.js';
s.setAttribute('data-timestamp', +new Date());
(d.head || d.body).appendChild(s);
})();
</script>
<noscript>Please enable JavaScript to view the <a href="https://disqus.com/?ref_noscript">comments powered by Disqus.</a></noscript>
<a href="https://disqus.com" class="dsq-brlink">comments powered by <span class="logo-disqus">Disqus</span></a>
<div class="footer">
<hr class="thin" />
<div class="pure-menu pure-menu-horizontal pure-menu-open">
<ul class="footer-menu">
</ul>
</div>
<p>&copy; 2022. All rights reserved.</p>
</div>
</div>
</div>
<script>
var app = new Vue({
el: '#app',
data: {
fuse: null,
search: "",
result: [],
index: [],
selected: 0
},
mounted() {
let self = this
window.addEventListener("keypress", function(e) {
self.$refs.searchInput.focus()
})
let options = {
shouldSort: true,
threshold: 0.6,
location: 0,
distance: 100,
maxPatternLength: 32,
minMatchCharLength: 1,
keys: [
"title",
"author",
"date",
"content"
]
}
axios.get('/index.json')
.then(function (response) {
self.index = response.data
self.fuse = new Fuse(response.data, options)
})
.catch(function (error) {
})
},
watch: {
result(nval, oval) {
nval.length > 0 ? this.pointer(0) : this.pointer(-1)
},
search(nval, oval) {
this.result = this.fuse.search(nval)
}
},
methods: {
navigate(val) {
switch (val) {
case 1: if (this.selected < this.result.length - 1) { this.selected++ }; break;
case -1: if (this.selected > 0 ) { this.selected-- }; break;
default: window.location.href = val; break;
}
this.pointer(this.selected)
},
pointer(selected) {
let self = this
if (selected >= 0) {
Vue.nextTick().then(function() {
let height = self.$refs.resultItem[selected].clientHeight
let top = self.$refs.resultItem[selected].getBoundingClientRect().top
let left = self.$refs.resultItem[selected].getBoundingClientRect().left
self.$refs.resultPoint.style.top = (top+height/2)+'px'
self.$refs.resultPoint.style.left = (left-20)+'px'
})
} else {
this.$refs.resultPoint.style.left = '-50px'
return
}
}
}
})
</script>
</body>
</html>

301
public/administration/mysql_tuner/index.html

@ -13,14 +13,14 @@
<meta name="description" content="">
<meta name="keywords" content="">
<meta name="author" content="">
<meta name="generator" content="Hugo 0.18.1" />
<meta name="author" content="Olivier De Ram">
<meta name="generator" content="Hugo 0.92.0" />
<meta property="og:title" content="MySQL Tuner" />
<meta property="og:description" content="" />
<meta property="og:type" content="website" />
<meta property="og:locale" content="en_US" />
<meta property="og:url" content="https://hagfi.sh/administration/mysql_tuner/" />
<meta property="og:url" content="https://blog.hagfi.sh/administration/mysql_tuner/" />
@ -32,7 +32,8 @@
<link rel="stylesheet" href="https://hagfi.sh//css/redlounge.css">
<link rel="stylesheet" href="https://blog.hagfi.sh//css/redlounge.css">
<link rel="stylesheet" href="https://blog.hagfi.sh//css/prism.css">
<link href="//maxcdn.bootstrapcdn.com/font-awesome/4.5.0/css/font-awesome.min.css" rel="stylesheet">
<link href='//fonts.googleapis.com/css?family=Raleway:400,200,100,700,300,500,600,800' rel='stylesheet' type='text/css'>
<link href='//fonts.googleapis.com/css?family=Libre+Baskerville:400,700,400italic' rel='stylesheet' type='text/css'>
@ -44,19 +45,31 @@
<link href="" rel="alternate" type="application/rss+xml" title="Hagfi.sh" />
<link rel="stylesheet" href="//cdnjs.cloudflare.com/ajax/libs/highlight.js/8.7/styles/tomorrow-night-bright.min.css">
<script src="//cdnjs.cloudflare.com/ajax/libs/moment.js/2.18.1/moment.js"></script>
<script src="//cdnjs.cloudflare.com/ajax/libs/vue/2.5.17/vue.min.js"></script>
<script src="//cdnjs.cloudflare.com/ajax/libs/axios/0.18.0/axios.min.js"></script>
<script src="//cdnjs.cloudflare.com/ajax/libs/fuse.js/3.2.1/fuse.min.js"></script>
<script src="//cdn.jsdelivr.net/npm/vuewordcloud@18.7.11/VueWordCloud.js"></script>
<script src="https://blog.hagfi.sh//js/prism.js"></script>
<script src="//cdnjs.cloudflare.com/ajax/libs/highlight.js/8.7/highlight.min.js"></script>
<script>hljs.initHighlightingOnLoad();</script>
<script type="application/javascript">
var doNotTrack = false;
if (!doNotTrack) {
(function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){
(i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o),
m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m)
})(window,document,'script','https://www.google-analytics.com/analytics.js','ga');
ga('create', 'UA-124890410-1', 'auto');
ga('send', 'pageview');
}
</script>
</head>
@ -65,28 +78,64 @@
<div id="layout" class="pure-g">
<div class="sidebar pure-u-1 pure-u-md-1-4">
<div class="sidebar pure-u-1 pure-u-md-1-4" id="app">
<div class="header">
<h1 class="brand-title">Hagfi.sh</h1>
<h2 class="brand-tagline">Documentation</h2>
<h1 class="brand-title"><a href="/">Hagfi.sh</a></h1>
<h2 class="brand-tagline">A devops guide to the galaxy</h2>
<div class="counters">
<a class="counter" href="/">13
<div class="counter-sub">Documents</div>
</a>
<a class="counter" href="/tags">29
<div class="counter-sub">Tags</div>
</a>
<a class="counter" href="/categories">3
<div class="counter-sub">Categories</div>
</a>
</div>
<nav class="nav">
<ul class="nav-list">
<li class="nav-item"><span class="nav-item-separator">//</span><a href="https://hagfi.sh/">Home</a></li>
<li class="nav-item"><span class="nav-item-separator">//</span><a href="/administration">Administration</a></li>
<li class="nav-item"><span class="nav-item-separator">//</span><a href="/development">Development</a></li>
<li class="nav-item"><span class="nav-item-separator">//</span><a href="/tools">Tools</a></li>
</ul>
</nav>
<div class="search-wrapper">
<input
type="text"
placeholder="Search ..."
v-model="search"
@keydown.down.prevent="navigate(1)"
@keydown.up.prevent="navigate(-1)"
@keyup.enter.prevent="navigate(result[selected].href)"
ref="searchInput"
class="search"
/>
<svg height="100" width="100" ref="resultPoint" class="result-point">
<circle cx="5" cy="5" r="5" fill="#FFF" />
</svg>
<ul class="result-items">
<li v-for="r, i of result" class="result-item" ref="resultItem">
<div class="result-item-wrapper" :class="{ 'result-item-selected': selected === i }">
<div class="result-item-left">
<span class="post-date">
<span class="post-date-day"><sup v-text="moment(r.date).format('D')"></sup></span><span class="post-date-separator" v-text="'/'"></span><span class="post-date-month" v-text="moment(r.date).format('MMM')"></span> <span class="post-date-year" v-text="moment(r.date).format('YYYY')"></span>
</span>
<template v-if="r.author">By <a class="post-author" v-text="r.author"></a></template>
</div>
<div class="result-item-left">
<span class="result-item-separator nav-item-separator" v-text="'//'"></span><a :href="r.href" v-text="r.title" class="result-item-link"></a>
</div>
</div>
</li>
</ul>
</div>
</div>
@ -104,12 +153,9 @@
<div id="toc" class="pure-u-1 pure-u-md-1-4">
<small class="toc-label">Contents</small>
<nav id="TableOfContents">
<ul>
<li>
<ul>
<li><a href="#mysql-tuner">MySQL Tuner</a></li>
</ul></li>
</ul>
<ul>
<li><a href="#mysql-tuner">MySQL Tuner</a></li>
</ul>
</nav>
</div>
@ -128,6 +174,13 @@
<span class="post-author-single">By <a class="post-author" target="">Olivier De Ram</a></span>
@ -137,10 +190,7 @@
<h2 id="mysql-tuner">MySQL Tuner</h2>
<h2 id="mysql-tuner">MySQL Tuner</h2>
<table>
<thead>
<tr>
@ -148,50 +198,41 @@
<th>ACTIE</th>
</tr>
</thead>
<tbody>
<tr>
<td><code>query_cache_size</code></td>
<td>AFBLIJVEN</td>
</tr>
<tr>
<td><code>table_cache</code></td>
<td><code>table_cache </code></td>
<td>AFBLIJVEN <em>(maximumwaarde = 64)</em></td>
</tr>
<tr>
<td><code>table_open_cache</code></td>
<td>AFBLIJVEN</td>
</tr>
<tr>
<td><code>join_buffer_size</code></td>
<td>Verhogen indien <code>Joins performed without indexes++</code></td>
</tr>
<tr>
<td><code>tmp_table_size</code></td>
<td>Verhogen = <code>max_heap_table_size</code></td>
</tr>
<tr>
<td><code>max_heap_table_size</code></td>
<td>Verhogen <code>= tmp_table_size</code></td>
</tr>
<tr>
<td><code>query_cache_type</code></td>
<td><code>=1</code> indien <code>=0</code></td>
</tr>
</tbody>
</table>
<blockquote>
<p>mysql tuning improvements
<code>table_cache</code> NOOIT hoger dan 64
Sudo vim /etc/my.cnf
query_cache_size&rsquo; =&gt; &lsquo;256M’,
query_cache_size' =&gt; &lsquo;256M’,
It caches the select query along with the result set, which enables the identical selects to execute faster as the data fetches from the in memory.
Caching voor select queries en bijhorende result sets, wat het mogelijk maakt om identieke selects sneller op te vragen uit memory.
&lsquo;open_files_limit&rsquo; =&gt; &lsquo;4096&rsquo;,
@ -199,11 +240,7 @@ Changes the number of file descriptors available to mysqld. You should try incre
&lsquo;join_buffer_size&rsquo; =&gt; &lsquo;256K’,
The minimum size of the buffer that is used for plain index scans, range index scans, and joins that do not use indexes and thus perform full table scans. Normally, the best way to get fast joins is to add indexes. Increase the value of join_buffer_size to get a faster full join when adding indexes is not possible.
Minimumgrootte van buffer voor index en table scans.</p>
</blockquote>
<hr />
<blockquote>
<hr>
<p>&lsquo;max_heap_table_size&rsquo; =&gt; &lsquo;32M’,
This variable sets the maximum size to which user-created MEMORY tables are permitted to grow.
Max grootte van user-created memory tables
@ -211,11 +248,7 @@ These 2 need to be the same size!!!
&lsquo;tmp_table_size&rsquo; =&gt; &lsquo;32M’,
The maximum size of internal in-memory temporary tables.
Max grootte van interne in-memory tijdelijke tabellen</p>
</blockquote>
<hr />
<blockquote>
<hr>
<p>table_cache=64 (maximumwaarde!!)
Table_Cache should always - well mostly anyway - be significantly bigger than the total number of tables in the server. Otherwise it&rsquo;ll keep opening and closing tables.
Maximumwaarde voor caching van geopende tabellen.
@ -224,47 +257,33 @@ How many threads the server should cache for reuse.
Aantal threads dat de server kan cachen voor hergebruik.
&lsquo;innodb_buffer_pool_size&rsquo; =&gt; &lsquo;1G&rsquo;,
The size in bytes of the buffer pool, the memory area where InnoDB caches table and index data. The default value is 128MB.</p>
</blockquote>
<p>Sudo service mysql/mariadb reload (restart enkel onder toezicht)</p>
<ul>
<li><code>query_cache_*</code>:</li>
</ul>
<blockquote>
<p><code>query_cache_type</code><br />
Needs to be set to 1 to enable caching.<br />
<code>query_cache_size</code><br />
Is the size of the cache. This can be in bytes, or you can use a M suffix to specify the amount of megabytes.<br />
<code>query_cache_limit</code><br />
Is the maximum size of an individually cached query. Queries over this size won’t go into the cache. This is also in bytes, or megabytes with the M suffix. 1MB is a safe bet.<br />
Maximumgrootte voor elke individuele gecachte query. Queries groter dan dit zullen niet gecacht worden.<br />
<code>table_open_cache</code><br />
<p><code>query_cache_type</code><br>
Needs to be set to 1 to enable caching.<br>
<code>query_cache_size</code><br>
Is the size of the cache. This can be in bytes, or you can use a M suffix to specify the amount of megabytes.<br>
<code>query_cache_limit</code><br>
Is the maximum size of an individually cached query. Queries over this size won’t go into the cache. This is also in bytes, or megabytes with the M suffix. 1MB is a safe bet.<br>
Maximumgrootte voor elke individuele gecachte query. Queries groter dan dit zullen niet gecacht worden.<br>
<code>table_open_cache</code><br>
Indicates the maximum number of tables the server keeps open</p>
</blockquote>
<hr />
<p><code>innodb_buffer_pool_instances=2</code><br />
<hr>
<p><code>innodb_buffer_pool_instances=2</code><br>
<em>Enables the use of multiple threads for innodb.</em></p>
<p><code>query_cache_type=1</code><br />
<p><code>query_cache_type=1</code><br>
<em>Enables query caching.</em></p>
<p><code>join_buffer_size=1024K</code><br />
<p><code>join_buffer_size=1024K</code><br>
<em>Increased the buffer size for non-indexed joins.</em></p>
<p><code>tmp_table_size=64M &amp;&amp; max_heap_table_size=64M</code><br />
<p><code>tmp_table_size=64M &amp;&amp; max_heap_table_size=64M</code><br>
<em>Increased the size for temporary tables.</em></p>
<p><code>join_buffer_size</code><br />
<p><code>join_buffer_size</code><br>
<em>Omwille van het aantal JOIN queries uitgevoerd zonder indexes, werd de minimumgrootte van de buffer voor index en table scans verhoogd.</em></p>
<p><code>max_heap_table_size &amp; tmp_table_size</code><br />
<p><code>max_heap_table_size &amp; tmp_table_size</code><br>
<em>De maximale grootte van user-created memory tables en van interne in-memory tijdelijke tabellen werd verhoogd.</em></p>
<p><code>thread_cache_size</code><br />
<p><code>thread_cache_size</code><br>
<em>Het maximale aantal threads dat de server kan cachen voor hergebruik werd verhoogd.</em></p>
@ -278,30 +297,134 @@ Indicates the maximum number of tables the server keeps open</p>
<div class="paging-newer">
<span class="dark-red">Newer</span><span class="decorative-marker">//</span>
<a class="paging-link" href="/administration/letsencrypt/">Let&#39;s Encrypt</a>
<a class="paging-link" href="/administration/windows_troubleshooting/">Windows troubleshooting</a>
</div>
<div class="paging-older">
<span class="dark-red">Older</span><span class="decorative-marker">//</span>
<a class="paging-link" href="/administration/windows_troubleshooting/">Windows troubleshooting</a>
<a class="paging-link" href="/administration/letsencrypt/">Let&#39;s Encrypt</a>
</div>
</div>
</section>
<div id="disqus_thread"></div>
<script type="application/javascript">
var disqus_config = function () {
};
(function() {
if (["localhost", "127.0.0.1"].indexOf(window.location.hostname) != -1) {
document.getElementById('disqus_thread').innerHTML = 'Disqus comments not available by default when the website is previewed locally.';
return;
}
var d = document, s = d.createElement('script'); s.async = true;
s.src = '//' + "hagfish" + '.disqus.com/embed.js';
s.setAttribute('data-timestamp', +new Date());
(d.head || d.body).appendChild(s);
})();
</script>
<noscript>Please enable JavaScript to view the <a href="https://disqus.com/?ref_noscript">comments powered by Disqus.</a></noscript>
<a href="https://disqus.com" class="dsq-brlink">comments powered by <span class="logo-disqus">Disqus</span></a>
<div class="footer">
<hr class="thin" />
<div class="pure-menu pure-menu-horizontal pure-menu-open">
<ul class="footer-menu">
</ul>
</div>
<p>&copy; 2022. All rights reserved.</p>
</div>
</div>
</div>
<script>
var app = new Vue({
el: '#app',
data: {
fuse: null,
search: "",
result: [],
index: [],
selected: 0
},
mounted() {
let self = this
window.addEventListener("keypress", function(e) {
self.$refs.searchInput.focus()
})
let options = {
shouldSort: true,
threshold: 0.6,
location: 0,
distance: 100,
maxPatternLength: 32,
minMatchCharLength: 1,
keys: [
"title",
"author",
"date",
"content"
]
}
axios.get('/index.json')
.then(function (response) {
self.index = response.data
self.fuse = new Fuse(response.data, options)
})
.catch(function (error) {
})
},
watch: {
result(nval, oval) {
nval.length > 0 ? this.pointer(0) : this.pointer(-1)
},
search(nval, oval) {
this.result = this.fuse.search(nval)
}
},
methods: {
navigate(val) {
switch (val) {
case 1: if (this.selected < this.result.length - 1) { this.selected++ }; break;
case -1: if (this.selected > 0 ) { this.selected-- }; break;
default: window.location.href = val; break;
}
this.pointer(this.selected)
},
pointer(selected) {
let self = this
if (selected >= 0) {
Vue.nextTick().then(function() {
let height = self.$refs.resultItem[selected].clientHeight
let top = self.$refs.resultItem[selected].getBoundingClientRect().top
let left = self.$refs.resultItem[selected].getBoundingClientRect().left
self.$refs.resultPoint.style.top = (top+height/2)+'px'
self.$refs.resultPoint.style.left = (left-20)+'px'
})
} else {
this.$refs.resultPoint.style.left = '-50px'
return
}
}
}
})
</script>
</body>
</html>

354
public/administration/toubles-with-interfaces-after-clone/index.html

@ -0,0 +1,354 @@
<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en-us">
<head>
<title>
Troubles with interfaces after a VM clone // Hagfi.sh
</title>
<link href="http://gmpg.org/xfn/11" rel="profile">
<meta http-equiv="content-type" content="text/html; charset=utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1">
<meta name="description" content="">
<meta name="keywords" content="">
<meta name="author" content="Kristof Vandam">
<meta name="generator" content="Hugo 0.92.0" />
<meta property="og:title" content="Troubles with interfaces after a VM clone" />
<meta property="og:description" content="" />
<meta property="og:type" content="website" />
<meta property="og:locale" content="en_US" />
<meta property="og:url" content="https://blog.hagfi.sh/administration/toubles-with-interfaces-after-clone/" />
<link rel="stylesheet" href="//cdnjs.cloudflare.com/ajax/libs/pure/0.5.0/base-min.css">
<link rel="stylesheet" href="//cdnjs.cloudflare.com/ajax/libs/pure/0.5.0/pure-min.css">
<link rel="stylesheet" href="//cdnjs.cloudflare.com/ajax/libs/pure/0.5.0/grids-responsive-min.css">
<link rel="stylesheet" href="https://blog.hagfi.sh//css/redlounge.css">
<link rel="stylesheet" href="https://blog.hagfi.sh//css/prism.css">
<link href="//maxcdn.bootstrapcdn.com/font-awesome/4.5.0/css/font-awesome.min.css" rel="stylesheet">
<link href='//fonts.googleapis.com/css?family=Raleway:400,200,100,700,300,500,600,800' rel='stylesheet' type='text/css'>
<link href='//fonts.googleapis.com/css?family=Libre+Baskerville:400,700,400italic' rel='stylesheet' type='text/css'>
<link rel="apple-touch-icon-precomposed" sizes="144x144" href="/touch-icon-144-precomposed.png">
<link rel="shortcut icon" type="image/x-icon" href="/img/favicon.png">
<link href="" rel="alternate" type="application/rss+xml" title="Hagfi.sh" />
<script src="//cdnjs.cloudflare.com/ajax/libs/moment.js/2.18.1/moment.js"></script>
<script src="//cdnjs.cloudflare.com/ajax/libs/vue/2.5.17/vue.min.js"></script>
<script src="//cdnjs.cloudflare.com/ajax/libs/axios/0.18.0/axios.min.js"></script>
<script src="//cdnjs.cloudflare.com/ajax/libs/fuse.js/3.2.1/fuse.min.js"></script>
<script src="//cdn.jsdelivr.net/npm/vuewordcloud@18.7.11/VueWordCloud.js"></script>
<script src="https://blog.hagfi.sh//js/prism.js"></script>
<script type="application/javascript">
var doNotTrack = false;
if (!doNotTrack) {
(function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){
(i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o),
m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m)
})(window,document,'script','https://www.google-analytics.com/analytics.js','ga');
ga('create', 'UA-124890410-1', 'auto');
ga('send', 'pageview');
}
</script>
</head>
<body>
<div id="layout" class="pure-g">
<div class="sidebar pure-u-1 pure-u-md-1-4" id="app">
<div class="header">
<h1 class="brand-title"><a href="/">Hagfi.sh</a></h1>
<h2 class="brand-tagline">A devops guide to the galaxy</h2>
<div class="counters">
<a class="counter" href="/">13
<div class="counter-sub">Documents</div>
</a>
<a class="counter" href="/tags">29
<div class="counter-sub">Tags</div>
</a>
<a class="counter" href="/categories">3
<div class="counter-sub">Categories</div>
</a>
</div>
<nav class="nav">
</nav>
<div class="search-wrapper">
<input
type="text"
placeholder="Search ..."
v-model="search"
@keydown.down.prevent="navigate(1)"
@keydown.up.prevent="navigate(-1)"
@keyup.enter.prevent="navigate(result[selected].href)"
ref="searchInput"
class="search"
/>
<svg height="100" width="100" ref="resultPoint" class="result-point">
<circle cx="5" cy="5" r="5" fill="#FFF" />
</svg>
<ul class="result-items">
<li v-for="r, i of result" class="result-item" ref="resultItem">
<div class="result-item-wrapper" :class="{ 'result-item-selected': selected === i }">
<div class="result-item-left">
<span class="post-date">
<span class="post-date-day"><sup v-text="moment(r.date).format('D')"></sup></span><span class="post-date-separator" v-text="'/'"></span><span class="post-date-month" v-text="moment(r.date).format('MMM')"></span> <span class="post-date-year" v-text="moment(r.date).format('YYYY')"></span>
</span>
<template v-if="r.author">By <a class="post-author" v-text="r.author"></a></template>
</div>
<div class="result-item-left">
<span class="result-item-separator nav-item-separator" v-text="'//'"></span><a :href="r.href" v-text="r.title" class="result-item-link"></a>
</div>
</div>
</li>
</ul>
</div>
</div>
</div>
<div class="content pure-u-1 pure-u-md-3-4">
<a name="top"></a>
<div id="toc" class="pure-u-1 pure-u-md-1-4">
<small class="toc-label">Contents</small>
<nav id="TableOfContents"></nav>
</div>
<section class="post">
<h1 class="post-title">
<a href="/administration/toubles-with-interfaces-after-clone/">Troubles with interfaces after a VM clone</a>
</h1>
<h3 class="post-subtitle">
</h3>
<span class="post-date">
<span class="post-date-day"><sup>5</sup></span><span class="post-date-separator">/</span><span class="post-date-month">Nov</span> <span class="post-date-year">2018</span>
</span>
<span class="post-author-single">By <a class="post-author" target="">Kristof Vandam</a></span>
<div class="post-categories">
<a class="post-category post-category-administration" href="https://blog.hagfi.sh//categories/administration">administration</a>
</div>
<p>Remapping interfaces and their MAC address.</p>
<p>Often, when you clone a VM you could stumble against errors like:</p>
<pre tabindex="0"><code class="language-.language-command.line-numbers" data-lang=".language-command.line-numbers">[FAILED] Device eth0 does not seem to be present, delaying initialization
</code></pre><p>You could change your network configuration to match the correct interface or let Linux reread the available interfaces</p>
<p><em>/etc/udev/rules.d/70-persistent-net.rules</em> holds the configuration of available devices. Make sure that the MAC address is correct and that the name maches your configuration</p>
<div class="tags-list">
<span class="dark-red">Tags</span><span class="decorative-marker">//</span>
<a class="post-tag post-tag-network" href="https://blog.hagfi.sh//tags/network">network</a>,
<a class="post-tag post-tag-networking" href="https://blog.hagfi.sh//tags/networking">networking</a>,
<a class="post-tag post-tag-interfaces" href="https://blog.hagfi.sh//tags/interfaces">interfaces</a>,
<a class="post-tag post-tag-ifconfig" href="https://blog.hagfi.sh//tags/ifconfig">ifconfig</a>,
</div>
<div class="paging">
<span class="paging-label">More Reading</span>
<div class="paging-newer">
<span class="dark-red">Newer</span><span class="decorative-marker">//</span>
<a class="paging-link" href="/tools/ncdu/">NCDU: NCurses Disk Usage</a>
</div>
<div class="paging-older">
<span class="dark-red">Older</span><span class="decorative-marker">//</span>
<a class="paging-link" href="/tools/fatrace/">Fatrace: Report system wide file access events</a>
</div>
</div>
</section>
<div id="disqus_thread"></div>
<script type="application/javascript">
var disqus_config = function () {
};
(function() {
if (["localhost", "127.0.0.1"].indexOf(window.location.hostname) != -1) {
document.getElementById('disqus_thread').innerHTML = 'Disqus comments not available by default when the website is previewed locally.';
return;
}
var d = document, s = d.createElement('script'); s.async = true;
s.src = '//' + "hagfish" + '.disqus.com/embed.js';
s.setAttribute('data-timestamp', +new Date());
(d.head || d.body).appendChild(s);
})();
</script>
<noscript>Please enable JavaScript to view the <a href="https://disqus.com/?ref_noscript">comments powered by Disqus.</a></noscript>
<a href="https://disqus.com" class="dsq-brlink">comments powered by <span class="logo-disqus">Disqus</span></a>
<div class="footer">
<hr class="thin" />
<div class="pure-menu pure-menu-horizontal pure-menu-open">
<ul class="footer-menu">
</ul>
</div>
<p>&copy; 2022. All rights reserved.</p>
</div>
</div>
</div>
<script>
var app = new Vue({
el: '#app',
data: {
fuse: null,
search: "",
result: [],
index: [],
selected: 0
},
mounted() {
let self = this
window.addEventListener("keypress", function(e) {
self.$refs.searchInput.focus()
})
let options = {
shouldSort: true,
threshold: 0.6,
location: 0,
distance: 100,
maxPatternLength: 32,
minMatchCharLength: 1,
keys: [
"title",
"author",
"date",
"content"
]
}
axios.get('/index.json')
.then(function (response) {
self.index = response.data
self.fuse = new Fuse(response.data, options)
})
.catch(function (error) {
})
},
watch: {
result(nval, oval) {
nval.length > 0 ? this.pointer(0) : this.pointer(-1)
},
search(nval, oval) {
this.result = this.fuse.search(nval)
}
},
methods: {
navigate(val) {
switch (val) {
case 1: if (this.selected < this.result.length - 1) { this.selected++ }; break;
case -1: if (this.selected > 0 ) { this.selected-- }; break;
default: window.location.href = val; break;
}
this.pointer(this.selected)
},
pointer(selected) {
let self = this
if (selected >= 0) {
Vue.nextTick().then(function() {
let height = self.$refs.resultItem[selected].clientHeight
let top = self.$refs.resultItem[selected].getBoundingClientRect().top
let left = self.$refs.resultItem[selected].getBoundingClientRect().left
self.$refs.resultPoint.style.top = (top+height/2)+'px'
self.$refs.resultPoint.style.left = (left-20)+'px'
})
} else {
this.$refs.resultPoint.style.left = '-50px'
return
}
}
}
})
</script>
</body>
</html>

353
public/administration/windows_troubleshooting/index.html

@ -13,14 +13,14 @@
<meta name="description" content="">
<meta name="keywords" content="">
<meta name="author" content="">
<meta name="generator" content="Hugo 0.18.1" />
<meta name="author" content="Olivier De Ram">
<meta name="generator" content="Hugo 0.92.0" />
<meta property="og:title" content="Windows troubleshooting" />
<meta property="og:description" content="" />
<meta property="og:type" content="website" />
<meta property="og:locale" content="en_US" />
<meta property="og:url" content="https://hagfi.sh/administration/windows_troubleshooting/" />
<meta property="og:url" content="https://blog.hagfi.sh/administration/windows_troubleshooting/" />
@ -32,7 +32,8 @@
<link rel="stylesheet" href="https://hagfi.sh//css/redlounge.css">
<link rel="stylesheet" href="https://blog.hagfi.sh//css/redlounge.css">
<link rel="stylesheet" href="https://blog.hagfi.sh//css/prism.css">
<link href="//maxcdn.bootstrapcdn.com/font-awesome/4.5.0/css/font-awesome.min.css" rel="stylesheet">
<link href='//fonts.googleapis.com/css?family=Raleway:400,200,100,700,300,500,600,800' rel='stylesheet' type='text/css'>
<link href='//fonts.googleapis.com/css?family=Libre+Baskerville:400,700,400italic' rel='stylesheet' type='text/css'>
@ -44,19 +45,31 @@
<link href="" rel="alternate" type="application/rss+xml" title="Hagfi.sh" />
<link rel="stylesheet" href="//cdnjs.cloudflare.com/ajax/libs/highlight.js/8.7/styles/tomorrow-night-bright.min.css">
<script src="//cdnjs.cloudflare.com/ajax/libs/moment.js/2.18.1/moment.js"></script>
<script src="//cdnjs.cloudflare.com/ajax/libs/vue/2.5.17/vue.min.js"></script>
<script src="//cdnjs.cloudflare.com/ajax/libs/axios/0.18.0/axios.min.js"></script>
<script src="//cdnjs.cloudflare.com/ajax/libs/fuse.js/3.2.1/fuse.min.js"></script>
<script src="//cdn.jsdelivr.net/npm/vuewordcloud@18.7.11/VueWordCloud.js"></script>
<script src="https://blog.hagfi.sh//js/prism.js"></script>
<script src="//cdnjs.cloudflare.com/ajax/libs/highlight.js/8.7/highlight.min.js"></script>
<script>hljs.initHighlightingOnLoad();</script>
<script type="application/javascript">
var doNotTrack = false;
if (!doNotTrack) {
(function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){
(i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o),
m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m)
})(window,document,'script','https://www.google-analytics.com/analytics.js','ga');
ga('create', 'UA-124890410-1', 'auto');
ga('send', 'pageview');
}
</script>
</head>
@ -65,28 +78,64 @@
<div id="layout" class="pure-g">
<div class="sidebar pure-u-1 pure-u-md-1-4">
<div class="sidebar pure-u-1 pure-u-md-1-4" id="app">
<div class="header">
<h1 class="brand-title">Hagfi.sh</h1>
<h2 class="brand-tagline">Documentation</h2>
<h1 class="brand-title"><a href="/">Hagfi.sh</a></h1>
<h2 class="brand-tagline">A devops guide to the galaxy</h2>
<div class="counters">
<a class="counter" href="/">13
<div class="counter-sub">Documents</div>
</a>
<a class="counter" href="/tags">29
<div class="counter-sub">Tags</div>
</a>
<a class="counter" href="/categories">3
<div class="counter-sub">Categories</div>
</a>
</div>
<nav class="nav">
<ul class="nav-list">
<li class="nav-item"><span class="nav-item-separator">//</span><a href="https://hagfi.sh/">Home</a></li>
<li class="nav-item"><span class="nav-item-separator">//</span><a href="/administration">Administration</a></li>
<li class="nav-item"><span class="nav-item-separator">//</span><a href="/development">Development</a></li>
<li class="nav-item"><span class="nav-item-separator">//</span><a href="/tools">Tools</a></li>
</ul>
</nav>
<div class="search-wrapper">
<input
type="text"
placeholder="Search ..."
v-model="search"
@keydown.down.prevent="navigate(1)"
@keydown.up.prevent="navigate(-1)"
@keyup.enter.prevent="navigate(result[selected].href)"
ref="searchInput"
class="search"
/>
<svg height="100" width="100" ref="resultPoint" class="result-point">
<circle cx="5" cy="5" r="5" fill="#FFF" />
</svg>
<ul class="result-items">
<li v-for="r, i of result" class="result-item" ref="resultItem">
<div class="result-item-wrapper" :class="{ 'result-item-selected': selected === i }">
<div class="result-item-left">
<span class="post-date">
<span class="post-date-day"><sup v-text="moment(r.date).format('D')"></sup></span><span class="post-date-separator" v-text="'/'"></span><span class="post-date-month" v-text="moment(r.date).format('MMM')"></span> <span class="post-date-year" v-text="moment(r.date).format('YYYY')"></span>
</span>
<template v-if="r.author">By <a class="post-author" v-text="r.author"></a></template>
</div>
<div class="result-item-left">
<span class="result-item-separator nav-item-separator" v-text="'//'"></span><a :href="r.href" v-text="r.title" class="result-item-link"></a>
</div>
</div>
</li>
</ul>
</div>
</div>
@ -104,23 +153,21 @@
<div id="toc" class="pure-u-1 pure-u-md-1-4">
<small class="toc-label">Contents</small>
<nav id="TableOfContents">
<ul>
<li>
<ul>
<li><a href="#windows-troubleshooting">Windows troubleshooting</a>
<ul>
<li><a href="#eventviewer"><em>EventViewer</em></a></li>
<li><a href="#powershell"><em>PowerShell</em></a></li>
<li><a href="#task-viewer"><em>Task Viewer</em></a></li>
<li><a href="#resource-monitor"><em>Resource monitor</em></a></li>
<li><a href="#netstat"><em>Netstat</em></a></li>
<li><a href="#chocolate"><em>Chocolate</em></a></li>
<li><a href="#usefull-programs"><em>Usefull programs</em></a></li>
<li><a href="#eventid-s"><em>EventID&rsquo;s</em></a></li>
<li><a href="#powershell-1"><em>PowerShell</em></a></li>
</ul></li>
</ul></li>
</ul>
<ul>
<li><a href="#windows-troubleshooting">Windows troubleshooting</a>
<ul>
<li><a href="#eventviewer"><em>EventViewer</em></a></li>
<li><a href="#powershell"><em>PowerShell</em></a></li>
<li><a href="#task-viewer"><em>Task Viewer</em></a></li>
<li><a href="#resource-monitor"><em>Resource monitor</em></a></li>
<li><a href="#netstat"><em>Netstat</em></a></li>
<li><a href="#chocolate"><em>Chocolate</em></a></li>
<li><a href="#usefull-programs"><em>Usefull programs</em></a></li>
<li><a href="#eventids"><em>EventID&rsquo;s</em></a></li>
<li><a href="#powershell-1"><em>PowerShell</em></a></li>
</ul>
</li>
</ul>
</nav>
</div>
@ -139,6 +186,13 @@
<span class="post-author-single">By <a class="post-author" target="">Olivier De Ram</a></span>
@ -148,80 +202,55 @@
<h2 id="windows-troubleshooting">Windows troubleshooting</h2>
<p>VRAGEN:
+ openen vanuit ticketing, wachtwoord en gebruiker
+ custom even viewer view?
+ test server?</p>
<h2 id="windows-troubleshooting">Windows troubleshooting</h2>
<p>VRAGEN:</p>
<ul>
<li>openen vanuit ticketing, wachtwoord en gebruiker</li>
<li>custom even viewer view?</li>
<li>test server?</li>
</ul>
<h3 id="eventviewer"><em>EventViewer</em></h3>
<p>run: eventvwr</p>
<ul>
<li>custom views</li>
<li>windows
<ul>
<li>application (non windows standard, puppet, vmware, mssql, &hellip;)</li>
<li>security, aan en afmelden</li>
<li>set-up: updates en installatie verwijderen programma&rsquo;s</li>
<li>system: OS meldingen</li>
</ul></li>
<li>application and services: diep graven
<br />
<br /></li>
</ul>
</li>
<li>application and services: diep graven</li>
</ul>
<p>&ndash;&gt; Filter Log:</p>
<ul>
<li>logged (date range)<br /></li>
<li>event level<br /></li>
<li>event source<br /></li>
<li>event ID: 99,-1024,-4634<br /></li>
<li>logged (date range)</li>
<li>event level</li>
<li>event source</li>
<li>event ID: 99,-1024,-4634</li>
</ul>
<p>rechtsonderaan &gt; event copy &gt; copy as text</p>
<h3 id="powershell"><em>PowerShell</em></h3>
<pre><code class="language-PowerShell">$first =
<div class="highlight"><pre tabindex="0" style="color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4"><code class="language-PowerShell" data-lang="PowerShell">$first =
$last =
get-eventlog -Logname system -
</code></pre>
<pre><code class="language-PowerShell"> `get-winevent -LogName 'Microsoft-Windows-TaskScheduler/Operational' | Where-Object { $_.Message -like ‘*insta* }`
</code></pre>
<h3 id="task-viewer"><em>Task Viewer</em></h3>
</code></pre></div><div class="highlight"><pre tabindex="0" style="color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4"><code class="language-PowerShell" data-lang="PowerShell"> `get-winevent -LogName <span style="color:#e6db74">&#39;Microsoft-Windows-TaskScheduler/Operational&#39;</span> | Where-Object { $_.Message <span style="color:#f92672">-like</span> <span style="color:#960050;background-color:#1e0010"></span>*insta* }`
</code></pre></div><h3 id="task-viewer"><em>Task Viewer</em></h3>
<ul>
<li>tasks</li>
<li>users</li>
<li>performance (indien gecrasht, bevestigen anders is het netwerk)</li>
</ul>
<h3 id="resource-monitor"><em>Resource monitor</em></h3>
<p>(task manager &gt; performance &gt; open resouce monitor)</p>
<p>Overview &gt; CPU (ovenste tab) app aanvinken &ndash;&gt; filtert alles</p>
<h3 id="netstat"><em>Netstat</em></h3>
<p><code>netstat -abo &gt; C:\temp\log.txt</code></p>
<h3 id="chocolate"><em>Chocolate</em></h3>
<p>C:\ProgramData\chocolatey\bin\Procmon.exe
&ndash;&gt; selecteer lijn+kolom &gt; exclude &lsquo;name&rsquo; (=grep -v) / include &lsquo;name&rsquo; (=grep)</p>
<h3 id="usefull-programs"><em>Usefull programs</em></h3>
<ul>
<li>TreeView</li>
<li>VBluescreenviewer</li>
@ -234,29 +263,35 @@ get-eventlog -Logname system -
<li>telnet 12.34.56.78 900</li>
<li>powershell: <code>stop service 'name'</code></li>
</ul>
<h3 id="eventid-s"><em>EventID&rsquo;s</em></h3>
<h3 id="eventids"><em>EventID&rsquo;s</em></h3>
<ul>
<li>Event ID 6005: “The event log service was started.” This is synonymous to system startup.</li>
<li>Event ID 6006: “The event log service was stopped.” This is synonymous to system shutdown.</li>
<li>Event ID 6008: &ldquo;The previous system shutdown was unexpected.&rdquo; Records that the system started after it was not shut down properly.</li>
<li>Event ID 6009: Indicates the Windows product name, version, build number, service pack number, and operating system type detected at boot time.</li>
<li><p>Event ID 6013: Displays the uptime of the computer. There is no TechNet page for this id.
Add to that a couple more from the Server Fault answers listed in my OP:</p></li>
<li><p>Event ID 1074: &ldquo;The process X has initiated the restart / shutdown of computer on behalf of user Y for the following reason: Z.&rdquo; Indicates that an application or a user initiated a restart or shutdown.</p></li>
<li><p>Event ID 1076: &ldquo;The reason supplied by user X for the last unexpected shutdown of this computer is: Y.&rdquo; Records when the first user with shutdown privileges logs on to the computer after an unexpected restart or shutdown and supplies a reason for the occurrence.</p></li>
<li>
<p>Event ID 6005: “The event log service was started.” This is synonymous to system startup.</p>
</li>
<li>
<p>Event ID 6006: “The event log service was stopped.” This is synonymous to system shutdown.</p>
</li>
<li>
<p>Event ID 6008: &ldquo;The previous system shutdown was unexpected.&rdquo; Records that the system started after it was not shut down properly.</p>
</li>
<li>
<p>Event ID 6009: Indicates the Windows product name, version, build number, service pack number, and operating system type detected at boot time.</p>
</li>
<li>
<p>Event ID 6013: Displays the uptime of the computer. There is no TechNet page for this id.
Add to that a couple more from the Server Fault answers listed in my OP:</p>
</li>
<li>
<p>Event ID 1074: &ldquo;The process X has initiated the restart / shutdown of computer on behalf of user Y for the following reason: Z.&rdquo; Indicates that an application or a user initiated a restart or shutdown.</p>
</li>
<li>
<p>Event ID 1076: &ldquo;The reason supplied by user X for the last unexpected shutdown of this computer is: Y.&rdquo; Records when the first user with shutdown privileges logs on to the computer after an unexpected restart or shutdown and supplies a reason for the occurrence.</p>
</li>
</ul>
<h3 id="powershell-1"><em>PowerShell</em></h3>
<pre><code class="language-PowerShell">$filter = &quot;*abbix*&quot;
get-winevent -logname 'Application' | Where-Object { $_.Message -like $filter }
</code></pre>
<div class="highlight"><pre tabindex="0" style="color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4"><code class="language-PowerShell" data-lang="PowerShell">$filter = <span style="color:#e6db74">&#34;*abbix*&#34;</span>
get-winevent -logname <span style="color:#e6db74">&#39;Application&#39;</span> | Where-Object { $_.Message <span style="color:#f92672">-like</span> $filter }
</code></pre></div>
@ -268,30 +303,134 @@ get-winevent -logname 'Application' | Where-Object { $_.Message -like $filter }
<div class="paging-newer">
<span class="dark-red">Newer</span><span class="decorative-marker">//</span>
<a class="paging-link" href="/administration/mysql_tuner/">MySQL Tuner</a>
<a class="paging-link" href="/administration/luks-encryption/">Luks Encryption</a>
</div>
<div class="paging-older">
<span class="dark-red">Older</span><span class="decorative-marker">//</span>
<a class="paging-link" href="/administration/dont-let-your-application-interfere-with-letsencrypt/">Dont Let Your Application Interfere With Letsencrypt</a>
<a class="paging-link" href="/administration/mysql_tuner/">MySQL Tuner</a>
</div>
</div>
</section>
<div id="disqus_thread"></div>
<script type="application/javascript">
var disqus_config = function () {
};
(function() {
if (["localhost", "127.0.0.1"].indexOf(window.location.hostname) != -1) {
document.getElementById('disqus_thread').innerHTML = 'Disqus comments not available by default when the website is previewed locally.';
return;
}
var d = document, s = d.createElement('script'); s.async = true;
s.src = '//' + "hagfish" + '.disqus.com/embed.js';
s.setAttribute('data-timestamp', +new Date());
(d.head || d.body).appendChild(s);
})();
</script>
<noscript>Please enable JavaScript to view the <a href="https://disqus.com/?ref_noscript">comments powered by Disqus.</a></noscript>
<a href="https://disqus.com" class="dsq-brlink">comments powered by <span class="logo-disqus">Disqus</span></a>
<div class="footer">
<hr class="thin" />
<div class="pure-menu pure-menu-horizontal pure-menu-open">
<ul class="footer-menu">
</ul>
</div>
<p>&copy; 2022. All rights reserved.</p>
</div>
</div>
</div>
<script>
var app = new Vue({
el: '#app',
data: {
fuse: null,
search: "",
result: [],
index: [],
selected: 0
},
mounted() {
let self = this
window.addEventListener("keypress", function(e) {
self.$refs.searchInput.focus()
})
let options = {
shouldSort: true,
threshold: 0.6,
location: 0,
distance: 100,
maxPatternLength: 32,
minMatchCharLength: 1,
keys: [
"title",
"author",
"date",
"content"
]
}
axios.get('/index.json')
.then(function (response) {
self.index = response.data
self.fuse = new Fuse(response.data, options)
})
.catch(function (error) {
})
},
watch: {
result(nval, oval) {
nval.length > 0 ? this.pointer(0) : this.pointer(-1)
},
search(nval, oval) {
this.result = this.fuse.search(nval)
}
},
methods: {
navigate(val) {
switch (val) {
case 1: if (this.selected < this.result.length - 1) { this.selected++ }; break;
case -1: if (this.selected > 0 ) { this.selected-- }; break;
default: window.location.href = val; break;
}
this.pointer(this.selected)
},
pointer(selected) {
let self = this
if (selected >= 0) {
Vue.nextTick().then(function() {
let height = self.$refs.resultItem[selected].clientHeight
let top = self.$refs.resultItem[selected].getBoundingClientRect().top
let left = self.$refs.resultItem[selected].getBoundingClientRect().left
self.$refs.resultPoint.style.top = (top+height/2)+'px'
self.$refs.resultPoint.style.left = (left-20)+'px'
})
} else {
this.$refs.resultPoint.style.left = '-50px'
return
}
}
}
})
</script>
</body>
</html>

478
public/administration/yet-another-arch-guide/index.html

@ -0,0 +1,478 @@
<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en-us">
<head>
<title>
Yet Another Arch Guide // Hagfi.sh
</title>
<link href="http://gmpg.org/xfn/11" rel="profile">
<meta http-equiv="content-type" content="text/html; charset=utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1">
<meta name="description" content="">
<meta name="keywords" content="">
<meta name="author" content="Kristof Vandam - Adam Verbeeck">
<meta name="generator" content="Hugo 0.92.0" />
<meta property="og:title" content="Yet Another Arch Guide" />
<meta property="og:description" content="" />
<meta property="og:type" content="website" />
<meta property="og:locale" content="en_US" />
<meta property="og:url" content="https://blog.hagfi.sh/administration/yet-another-arch-guide/" />
<link rel="stylesheet" href="//cdnjs.cloudflare.com/ajax/libs/pure/0.5.0/base-min.css">
<link rel="stylesheet" href="//cdnjs.cloudflare.com/ajax/libs/pure/0.5.0/pure-min.css">
<link rel="stylesheet" href="//cdnjs.cloudflare.com/ajax/libs/pure/0.5.0/grids-responsive-min.css">
<link rel="stylesheet" href="https://blog.hagfi.sh//css/redlounge.css">
<link rel="stylesheet" href="https://blog.hagfi.sh//css/prism.css">
<link href="//maxcdn.bootstrapcdn.com/font-awesome/4.5.0/css/font-awesome.min.css" rel="stylesheet">
<link href='//fonts.googleapis.com/css?family=Raleway:400,200,100,700,300,500,600,800' rel='stylesheet' type='text/css'>
<link href='//fonts.googleapis.com/css?family=Libre+Baskerville:400,700,400italic' rel='stylesheet' type='text/css'>
<link rel="apple-touch-icon-precomposed" sizes="144x144" href="/touch-icon-144-precomposed.png">
<link rel="shortcut icon" type="image/x-icon" href="/img/favicon.png">
<link href="" rel="alternate" type="application/rss+xml" title="Hagfi.sh" />
<script src="//cdnjs.cloudflare.com/ajax/libs/moment.js/2.18.1/moment.js"></script>
<script src="//cdnjs.cloudflare.com/ajax/libs/vue/2.5.17/vue.min.js"></script>
<script src="//cdnjs.cloudflare.com/ajax/libs/axios/0.18.0/axios.min.js"></script>
<script src="//cdnjs.cloudflare.com/ajax/libs/fuse.js/3.2.1/fuse.min.js"></script>
<script src="//cdn.jsdelivr.net/npm/vuewordcloud@18.7.11/VueWordCloud.js"></script>
<script src="https://blog.hagfi.sh//js/prism.js"></script>
<script type="application/javascript">
var doNotTrack = false;
if (!doNotTrack) {
(function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){
(i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o),
m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m)
})(window,document,'script','https://www.google-analytics.com/analytics.js','ga');
ga('create', 'UA-124890410-1', 'auto');
ga('send', 'pageview');
}
</script>
</head>
<body>
<div id="layout" class="pure-g">
<div class="sidebar pure-u-1 pure-u-md-1-4" id="app">
<div class="header">
<h1 class="brand-title"><a href="/">Hagfi.sh</a></h1>
<h2 class="brand-tagline">A devops guide to the galaxy</h2>
<div class="counters">
<a class="counter" href="/">13
<div class="counter-sub">Documents</div>
</a>
<a class="counter" href="/tags">29
<div class="counter-sub">Tags</div>
</a>
<a class="counter" href="/categories">3
<div class="counter-sub">Categories</div>
</a>
</div>
<nav class="nav">
</nav>
<div class="search-wrapper">
<input
type="text"
placeholder="Search ..."
v-model="search"
@keydown.down.prevent="navigate(1)"
@keydown.up.prevent="navigate(-1)"
@keyup.enter.prevent="navigate(result[selected].href)"
ref="searchInput"
class="search"
/>
<svg height="100" width="100" ref="resultPoint" class="result-point">
<circle cx="5" cy="5" r="5" fill="#FFF" />
</svg>
<ul class="result-items">
<li v-for="r, i of result" class="result-item" ref="resultItem">
<div class="result-item-wrapper" :class="{ 'result-item-selected': selected === i }">
<div class="result-item-left">
<span class="post-date">
<span class="post-date-day"><sup v-text="moment(r.date).format('D')"></sup></span><span class="post-date-separator" v-text="'/'"></span><span class="post-date-month" v-text="moment(r.date).format('MMM')"></span> <span class="post-date-year" v-text="moment(r.date).format('YYYY')"></span>
</span>
<template v-if="r.author">By <a class="post-author" v-text="r.author"></a></template>
</div>
<div class="result-item-left">
<span class="result-item-separator nav-item-separator" v-text="'//'"></span><a :href="r.href" v-text="r.title" class="result-item-link"></a>
</div>
</div>
</li>
</ul>
</div>
</div>
</div>
<div class="content pure-u-1 pure-u-md-3-4">
<a name="top"></a>
<div id="toc" class="pure-u-1 pure-u-md-1-4">
<small class="toc-label">Contents</small>
<nav id="TableOfContents">
<ul>
<li><a href="#target">Target</a></li>
<li><a href="#pre-requirements">Pre-requirements</a></li>
<li><a href="#first-things-first">First things first</a>
<ul>
<li><a href="#keyboard-layout">Keyboard layout</a></li>
<li><a href="#check-your-internet-connection">Check your internet connection</a></li>
<li><a href="#set-timezone">Set timezone</a></li>
</ul>
</li>
<li><a href="#prepairing-your-disks">Prepairing your disks</a>
<ul>
<li><a href="#check-which-disks-you-have-available">Check which disks you have available</a></li>
<li><a href="#partitioning">Partitioning</a></li>
<li><a href="#lvm">LVM</a></li>
<li><a href="#filesystems">Filesystems</a></li>
<li><a href="#mount-your-disks-and-strap-your-seatbelt-we-gonna-pacstrap">Mount your disks and strap your seatbelt, we gonna pacstrap</a></li>
<li><a href="#make-sure-it-boots">Make sure it boots!</a></li>
<li><a href="#making-it-yours">making it yours</a></li>
<li><a href="#grub">Grub</a></li>
<li><a href="#fstab">fstab</a></li>
<li><a href="#lvm-cant-bot">LVM can&rsquo;t bot</a></li>
<li><a href="#cross-fingers---reboot">Cross fingers - reboot</a></li>
<li><a href="#enable-services">Enable services</a></li>
</ul>
</li>
</ul>
</nav>
</div>
<section class="post">
<h1 class="post-title">
<a href="/administration/yet-another-arch-guide/">Yet Another Arch Guide</a>
</h1>
<h3 class="post-subtitle">
</h3>
<span class="post-date">
<span class="post-date-day"><sup>30</sup></span><span class="post-date-separator">/</span><span class="post-date-month">Nov</span> <span class="post-date-year">2018</span>
</span>
<span class="post-author-single">By <a class="post-author" target="">Kristof Vandam - Adam Verbeeck</a></span>
<div class="post-categories">
<a class="post-category post-category-administration" href="https://blog.hagfi.sh//categories/administration">administration</a>
</div>
<p>Setting up Arch with other bells and whistles.</p>
<h2 id="target">Target</h2>
<p>Lenovo X240
i5-4300U
8GB DDR3 RAM
500GB SSD</p>
<h2 id="pre-requirements">Pre-requirements</h2>
<ul>
<li>Bootable USB with Arch installer installed</li>
<li>Cabled connection</li>
<li>Device connected to a power supply</li>
</ul>
<h2 id="first-things-first">First things first</h2>
<h3 id="keyboard-layout">Keyboard layout</h3>
<pre tabindex="0"><code class="language-.language-command" data-lang=".language-command">loadkeys [keyboard-identifier]
</code></pre><h3 id="check-your-internet-connection">Check your internet connection</h3>
<pre tabindex="0"><code class="language-.language-command" data-lang=".language-command">ping archlinux.org
</code></pre><h3 id="set-timezone">Set timezone</h3>
<pre tabindex="0"><code class="language-.language-command" data-lang=".language-command">timedatectl set-timezone Europe/Brussels
</code></pre><h2 id="prepairing-your-disks">Prepairing your disks</h2>
<h3 id="check-which-disks-you-have-available">Check which disks you have available</h3>
<pre tabindex="0"><code class="language-.language-command" data-lang=".language-command">fdisk -l
</code></pre><h3 id="partitioning">Partitioning</h3>
<p>Device your disk into individual partitions:</p>
<ol>
<li>boot</li>
<li>arch</li>
<li>windows</li>
</ol>
<h4 id="some-letters-we-gonna-use">Some letters we gonna use</h4>
<ul>
<li><strong>p</strong> show your partition</li>
<li><strong>n</strong> new partition</li>
<li><strong>a</strong> set the bootflag</li>
<li><strong>t</strong> set the type</li>
<li><strong>L</strong> show available types</li>
<li><strong>w</strong> write the changes</li>
</ul>
<h4 id="the-actual-work">The actual work</h4>
<pre tabindex="0"><code class="language-.language-command" data-lang=".language-command">fdisk [your-disk]
</code></pre><p>press <strong>n</strong> to create a new partition, the first prompt asks the type of partition, use <strong>p</strong> for Primary
Partition number, enter.
first sector, enter.
goto &lsquo;Specify your sizes&rsquo;.</p>
<h4 id="specify-your-sizes">Specify your sizes</h4>
<p>+[SIZE][TGMK]</p>
<h4 id="set-the-bootflag">Set the bootflag</h4>
<p>A partition needs a bootflag for the MBR know which partition use at startup</p>
<h4 id="set-the-types">Set the types</h4>
<p>Use <strong>t</strong> to set the type:</p>
<p><strong>83</strong> for boot <em>(linux)</em>
<strong>8e</strong> for arch <em>(lvm)</em>
<strong>7</strong> for windows <em>(HPFS/NTFS/exFAT)</em></p>
<h3 id="lvm">LVM</h3>
<pre tabindex="0"><code class="language-.language-command" data-lang=".language-command">pvcreate /dev/sda2
vgcreate vg0 /dev/sda2
lvcreate -L +2G -n swap vg0
lvcreate -l 100%FREE -n swap vg0
</code></pre><h3 id="filesystems">Filesystems</h3>
<pre tabindex="0"><code class="language-.language-command" data-lang=".language-command">mkswap /dev/mapper/vg0-swap
mkfs.ext4 /dev/sda1
mkfs.xfs /dev/mapper/vg0-root
</code></pre><h3 id="mount-your-disks-and-strap-your-seatbelt-we-gonna-pacstrap">Mount your disks and strap your seatbelt, we gonna pacstrap</h3>
<pre tabindex="0"><code class="language-.language-command" data-lang=".language-command">mount /dev/mapper/vg0-root /mnt
mkdir /mnt/boot
mount /dev/sda1 /mnt/boot
</code></pre><pre tabindex="0"><code class="language-.language-command" data-lang=".language-command">pacstrap /mnt base base-devel vim bash-completion networkmanager
</code></pre><h3 id="make-sure-it-boots">Make sure it boots!</h3>
<p>genfstab -U /mnt &raquo; /mnt/etc/fstab</p>
<h3 id="making-it-yours">making it yours</h3>
<p>arch-chroot /mnt</p>
<h4 id="time-date-region">Time, Date, Region</h4>
<pre tabindex="0"><code class="language-.language-command" data-lang=".language-command">ln -sf /usr/share/zoneinfo/Europe/Brussels /etc/localtime
hwclock --systohc
locale-gen
</code></pre><p>/etc/locale.conf</p>
<pre tabindex="0"><code class="language-.language-command" data-lang=".language-command">LANG=en_US.UTF-8 UTF-8
</code></pre><p>/etc/vconsole.conf</p>
<pre tabindex="0"><code class="language-.language-command" data-lang=".language-command">KEYMAP=be-latin1
</code></pre><p>/etc/hostname</p>
<pre tabindex="0"><code class="language-.language-command" data-lang=".language-command">myhostname
</code></pre><p>/etc/hosts</p>
<pre tabindex="0"><code class="language-.language-command" data-lang=".language-command">127.0.0.1 localhost
::1 localhost
127.0.0.1 myhostname.localdomain myhostname
</code></pre><pre tabindex="0"><code class="language-.language-command" data-lang=".language-command">passwd
</code></pre><h3 id="grub">Grub</h3>
<pre tabindex="0"><code class="language-.language-command" data-lang=".language-command">pacman -S grub
grub-install /dev/sda
grub-mkconfig &gt; /boot/grub/grub.cfg
</code></pre><p><em>Ignore warnings</em></p>
<h3 id="fstab">fstab</h3>
<p>Add swap to fstab</p>
<pre tabindex="0"><code class="language-.language-command" data-lang=".language-command">/dev/mapper/vg0-swap swap swap default 0 0
</code></pre><p>Check your work by swapping the swap</p>
<pre tabindex="0"><code class="language-.language-command" data-lang=".language-command">swapoff -a
mount -a
swapon -a
free
</code></pre><p>does your swap have bytes?</p>
<h3 id="lvm-cant-bot">LVM can&rsquo;t bot</h3>
<p>Add the LVM module to the mkinitcpio config file at /etc/mkinitcpio.conf</p>
<p>add <em>lvm2</em> to the HOOKS Array before filestystems</p>
<pre tabindex="0"><code class="language-.language-command" data-lang=".language-command">...
HOOKS=(base udev autodetect modconf block lvm2 filestystems keyboard fsck)
...
</code></pre><pre tabindex="0"><code class="language-.language-command" data-lang=".language-command">mkinitcpio -p linux
</code></pre><h3 id="cross-fingers---reboot">Cross fingers - reboot</h3>
<h3 id="enable-services">Enable services</h3>
<pre tabindex="0"><code class="language-.language-command" data-lang=".language-command">systemctl enable NetworkManager
systemctl start NetworkManager
</code></pre>
<div class="tags-list">
<span class="dark-red">Tags</span><span class="decorative-marker">//</span>
<a class="post-tag post-tag-arch" href="https://blog.hagfi.sh//tags/arch">arch</a>,
</div>
<div class="paging">
<span class="paging-label">More Reading</span>
<div class="paging-newer">
<span class="dark-red">Newer</span><span class="decorative-marker">//</span>
<a class="paging-link" href="/administration/bash/">Bash Tips &amp; Tricks</a>
</div>
</div>
</section>
<div id="disqus_thread"></div>
<script type="application/javascript">
var disqus_config = function () {
};
(function() {
if (["localhost", "127.0.0.1"].indexOf(window.location.hostname) != -1) {
document.getElementById('disqus_thread').innerHTML = 'Disqus comments not available by default when the website is previewed locally.';
return;
}
var d = document, s = d.createElement('script'); s.async = true;
s.src = '//' + "hagfish" + '.disqus.com/embed.js';
s.setAttribute('data-timestamp', +new Date());
(d.head || d.body).appendChild(s);
})();
</script>
<noscript>Please enable JavaScript to view the <a href="https://disqus.com/?ref_noscript">comments powered by Disqus.</a></noscript>
<a href="https://disqus.com" class="dsq-brlink">comments powered by <span class="logo-disqus">Disqus</span></a>
<div class="footer">
<hr class="thin" />
<div class="pure-menu pure-menu-horizontal pure-menu-open">
<ul class="footer-menu">
</ul>
</div>
<p>&copy; 2022. All rights reserved.</p>
</div>
</div>
</div>
<script>
var app = new Vue({
el: '#app',
data: {
fuse: null,
search: "",
result: [],
index: [],
selected: 0
},
mounted() {
let self = this
window.addEventListener("keypress", function(e) {
self.$refs.searchInput.focus()
})
let options = {
shouldSort: true,
threshold: 0.6,
location: 0,
distance: 100,
maxPatternLength: 32,
minMatchCharLength: 1,
keys: [
"title",
"author",
"date",
"content"
]
}
axios.get('/index.json')
.then(function (response) {
self.index = response.data
self.fuse = new Fuse(response.data, options)
})
.catch(function (error) {
})
},
watch: {
result(nval, oval) {
nval.length > 0 ? this.pointer(0) : this.pointer(-1)
},
search(nval, oval) {
this.result = this.fuse.search(nval)
}
},
methods: {
navigate(val) {
switch (val) {
case 1: if (this.selected < this.result.length - 1) { this.selected++ }; break;
case -1: if (this.selected > 0 ) { this.selected-- }; break;
default: window.location.href = val; break;
}
this.pointer(this.selected)
},
pointer(selected) {
let self = this
if (selected >= 0) {
Vue.nextTick().then(function() {
let height = self.$refs.resultItem[selected].clientHeight
let top = self.$refs.resultItem[selected].getBoundingClientRect().top
let left = self.$refs.resultItem[selected].getBoundingClientRect().left
self.$refs.resultPoint.style.top = (top+height/2)+'px'
self.$refs.resultPoint.style.left = (left-20)+'px'
})
} else {
this.$refs.resultPoint.style.left = '-50px'
return
}
}
}
})
</script>
</body>
</html>

551
public/categories/administration/index.html

@ -0,0 +1,551 @@
<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en-us">
<head>
<title>
administration // Hagfi.sh
</title>
<link href="http://gmpg.org/xfn/11" rel="profile">
<meta http-equiv="content-type" content="text/html; charset=utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1">
<meta name="description" content="">
<meta name="keywords" content="">
<meta name="author" content="">
<meta name="generator" content="Hugo 0.92.0" />
<meta property="og:title" content="administration" />
<meta property="og:description" content="" />
<meta property="og:type" content="website" />
<meta property="og:locale" content="en_US" />
<meta property="og:url" content="https://blog.hagfi.sh/categories/administration/" />
<link rel="stylesheet" href="//cdnjs.cloudflare.com/ajax/libs/pure/0.5.0/base-min.css">
<link rel="stylesheet" href="//cdnjs.cloudflare.com/ajax/libs/pure/0.5.0/pure-min.css">
<link rel="stylesheet" href="//cdnjs.cloudflare.com/ajax/libs/pure/0.5.0/grids-responsive-min.css">
<link rel="stylesheet" href="https://blog.hagfi.sh//css/redlounge.css">
<link rel="stylesheet" href="https://blog.hagfi.sh//css/prism.css">
<link href="//maxcdn.bootstrapcdn.com/font-awesome/4.5.0/css/font-awesome.min.css" rel="stylesheet">
<link href='//fonts.googleapis.com/css?family=Raleway:400,200,100,700,300,500,600,800' rel='stylesheet' type='text/css'>
<link href='//fonts.googleapis.com/css?family=Libre+Baskerville:400,700,400italic' rel='stylesheet' type='text/css'>
<link rel="apple-touch-icon-precomposed" sizes="144x144" href="/touch-icon-144-precomposed.png">
<link rel="shortcut icon" type="image/x-icon" href="/img/favicon.png">
<link href="https://blog.hagfi.sh/categories/administration/index.xml" rel="alternate" type="application/rss+xml" title="Hagfi.sh" />
<script src="//cdnjs.cloudflare.com/ajax/libs/moment.js/2.18.1/moment.js"></script>
<script src="//cdnjs.cloudflare.com/ajax/libs/vue/2.5.17/vue.min.js"></script>
<script src="//cdnjs.cloudflare.com/ajax/libs/axios/0.18.0/axios.min.js"></script>
<script src="//cdnjs.cloudflare.com/ajax/libs/fuse.js/3.2.1/fuse.min.js"></script>
<script src="//cdn.jsdelivr.net/npm/vuewordcloud@18.7.11/VueWordCloud.js"></script>
<script src="https://blog.hagfi.sh//js/prism.js"></script>
<script type="application/javascript">
var doNotTrack = false;
if (!doNotTrack) {
(function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){
(i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o),
m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m)
})(window,document,'script','https://www.google-analytics.com/analytics.js','ga');
ga('create', 'UA-124890410-1', 'auto');
ga('send', 'pageview');
}
</script>
</head>
<body>
<div id="layout" class="pure-g">
<div class="sidebar pure-u-1 pure-u-md-1-4" id="app">
<div class="header">
<h1 class="brand-title"><a href="/">Hagfi.sh</a></h1>
<h2 class="brand-tagline">A devops guide to the galaxy</h2>
<div class="counters">
<a class="counter" href="/">13
<div class="counter-sub">Documents</div>
</a>
<a class="counter" href="/tags">29
<div class="counter-sub">Tags</div>
</a>
<a class="counter" href="/categories">3
<div class="counter-sub">Categories</div>
</a>
</div>
<nav class="nav">
</nav>
<div class="search-wrapper">
<input
type="text"
placeholder="Search ..."
v-model="search"
@keydown.down.prevent="navigate(1)"
@keydown.up.prevent="navigate(-1)"
@keyup.enter.prevent="navigate(result[selected].href)"
ref="searchInput"
class="search"
/>
<svg height="100" width="100" ref="resultPoint" class="result-point">
<circle cx="5" cy="5" r="5" fill="#FFF" />
</svg>
<ul class="result-items">
<li v-for="r, i of result" class="result-item" ref="resultItem">
<div class="result-item-wrapper" :class="{ 'result-item-selected': selected === i }">
<div class="result-item-left">
<span class="post-date">
<span class="post-date-day"><sup v-text="moment(r.date).format('D')"></sup></span><span class="post-date-separator" v-text="'/'"></span><span class="post-date-month" v-text="moment(r.date).format('MMM')"></span> <span class="post-date-year" v-text="moment(r.date).format('YYYY')"></span>
</span>
<template v-if="r.author">By <a class="post-author" v-text="r.author"></a></template>
</div>
<div class="result-item-left">
<span class="result-item-separator nav-item-separator" v-text="'//'"></span><a :href="r.href" v-text="r.title" class="result-item-link"></a>
</div>
</div>
</li>
</ul>
</div>
</div>
</div>
<div class="content pure-u-1 pure-u-md-3-4">
<a name="top"></a>
<div class="posts">
<section class="post">
<header class="post-header">
<h1 class="post-title">
<a href="/administration/yet-another-arch-guide/">Yet Another Arch Guide</a>
</h1>
</header>
<p class="post-meta">
<span class="post-date">
<span class="post-date-day"><sup>30</sup></span><span class="post-date-separator">/</span><span class="post-date-month">Nov</span> <span class="post-date-year">2018</span>
</span>
By <a class="post-author" >Kristof Vandam - Adam Verbeeck</a>
<span class="post-reading-time"><i class="fa fa-clock-o"></i> <em>2 min. read</em></span>
<div class="post-categories">
<a class="post-category post-category-administration" href="https://blog.hagfi.sh//categories/administration">administration</a>
</div>
</p>
<article class="post-summary">
<p>Setting up Arch with other bells and whistles.</p>
</article>
<div class="read-more-link">
<a href="/administration/yet-another-arch-guide/"><span class="read-more-slashes">//</span>Read More...</a>
</div>
</section>
<section class="post">
<header class="post-header">
<h1 class="post-title">
<a href="/administration/bash/">Bash Tips &amp; Tricks</a>
</h1>
</header>
<p class="post-meta">
<span class="post-date">
<span class="post-date-day"><sup>11</sup></span><span class="post-date-separator">/</span><span class="post-date-month">Nov</span> <span class="post-date-year">2018</span>
</span>
By <a class="post-author" >Olivier De Ram</a>
<span class="post-reading-time"><i class="fa fa-clock-o"></i> <em>2 min. read</em></span>
<div class="post-categories">
<a class="post-category post-category-administration" href="https://blog.hagfi.sh//categories/administration">administration</a>
<a class="post-category post-category-development" href="https://blog.hagfi.sh//categories/development">development</a>
</div>
</p>
<article class="post-summary">
<p>Usefull bash tips &amp; tricks</p>
</article>
<div class="read-more-link">
<a href="/administration/bash/"><span class="read-more-slashes">//</span>Read More...</a>
</div>
</section>
<section class="post">
<header class="post-header">
<h1 class="post-title">
<a href="/administration/boot-targets/">Changing boot targets</a>
</h1>
</header>
<p class="post-meta">
<span class="post-date">
<span class="post-date-day"><sup>9</sup></span><span class="post-date-separator">/</span><span class="post-date-month">Nov</span> <span class="post-date-year">2018</span>
</span>
By <a class="post-author" >Kristof Vandam</a>
<span class="post-reading-time"><i class="fa fa-clock-o"></i> <em>1 min. read</em></span>
<div class="post-categories">
<a class="post-category post-category-administration" href="https://blog.hagfi.sh//categories/administration">administration</a>
</div>
</p>
<article class="post-summary">
<p>Switch between run levels / environments.</p>
</article>
<div class="read-more-link">
<a href="/administration/boot-targets/"><span class="read-more-slashes">//</span>Read More...</a>
</div>
</section>
<section class="post">
<header class="post-header">
<h1 class="post-title">
<a href="/administration/autofs/">Mount with automount (autofs)</a>
</h1>
</header>
<p class="post-meta">
<span class="post-date">
<span class="post-date-day"><sup>9</sup></span><span class="post-date-separator">/</span><span class="post-date-month">Nov</span> <span class="post-date-year">2018</span>
</span>
By <a class="post-author" >Kristof Vandam</a>
<span class="post-reading-time"><i class="fa fa-clock-o"></i> <em>2 min. read</em></span>
<div class="post-categories">
<a class="post-category post-category-administration" href="https://blog.hagfi.sh//categories/administration">administration</a>
</div>
</p>
<article class="post-summary">
<p>Automagically mount remote directories on login.</p>
</article>
<div class="read-more-link">
<a href="/administration/autofs/"><span class="read-more-slashes">//</span>Read More...</a>
</div>
</section>
<section class="post">
<header class="post-header">
<h1 class="post-title">
<a href="/tools/fatrace/">Fatrace: Report system wide file access events</a>
</h1>
</header>
<p class="post-meta">
<span class="post-date">
<span class="post-date-day"><sup>5</sup></span><span class="post-date-separator">/</span><span class="post-date-month">Nov</span> <span class="post-date-year">2018</span>
</span>
By <a class="post-author" >Kristof Vandam</a>
<span class="post-reading-time"><i class="fa fa-clock-o"></i> <em>1 min. read</em></span>
<div class="post-categories">
<a class="post-category post-category-tools" href="https://blog.hagfi.sh//categories/tools">tools</a>
<a class="post-category post-category-administration" href="https://blog.hagfi.sh//categories/administration">administration</a>
</div>
</p>
<article class="post-summary">
<p>fatrace watches every file on server (except from itself and other kernel file systems).</p>
</article>
<div class="read-more-link">
<a href="/tools/fatrace/"><span class="read-more-slashes">//</span>Read More...</a>
</div>
</section>
<section class="post">
<header class="post-header">
<h1 class="post-title">
<a href="/administration/toubles-with-interfaces-after-clone/">Troubles with interfaces after a VM clone</a>
</h1>
</header>
<p class="post-meta">
<span class="post-date">
<span class="post-date-day"><sup>5</sup></span><span class="post-date-separator">/</span><span class="post-date-month">Nov</span> <span class="post-date-year">2018</span>
</span>
By <a class="post-author" >Kristof Vandam</a>
<span class="post-reading-time"><i class="fa fa-clock-o"></i> <em>1 min. read</em></span>
<div class="post-categories">
<a class="post-category post-category-administration" href="https://blog.hagfi.sh//categories/administration">administration</a>
</div>
</p>
<article class="post-summary">
<p>Remapping interfaces and their MAC address.</p>
</article>
<div class="read-more-link">
<a href="/administration/toubles-with-interfaces-after-clone/"><span class="read-more-slashes">//</span>Read More...</a>
</div>
</section>
<section class="post">
<header class="post-header">
<h1 class="post-title">
<a href="/tools/ncdu/">NCDU: NCurses Disk Usage</a>
</h1>
</header>
<p class="post-meta">
<span class="post-date">
<span class="post-date-day"><sup>17</sup></span><span class="post-date-separator">/</span><span class="post-date-month">Sep</span> <span class="post-date-year">2018</span>
</span>
By <a class="post-author" >Kristof Vandam</a>
<span class="post-reading-time"><i class="fa fa-clock-o"></i> <em>2 min. read</em></span>
<div class="post-categories">
<a class="post-category post-category-tools" href="https://blog.hagfi.sh//categories/tools">tools</a>
<a class="post-category post-category-administration" href="https://blog.hagfi.sh//categories/administration">administration</a>
</div>
</p>
<article class="post-summary">
<p>ncdu is a command line tool to scan and calculate directory and file sizes.</p>
</article>
<div class="read-more-link">
<a href="/tools/ncdu/"><span class="read-more-slashes">//</span>Read More...</a>
</div>
</section>
<section class="post">
<header class="post-header">
<h1 class="post-title">
<a href="/administration/luks-encryption/">Luks Encryption</a>
</h1>
</header>
<p class="post-meta">
<span class="post-date">
<span class="post-date-day"><sup>23</sup></span><span class="post-date-separator">/</span><span class="post-date-month">Aug</span> <span class="post-date-year">2018</span>
</span>
By <a class="post-author" >Kristof Vandam</a>
<span class="post-reading-time"><i class="fa fa-clock-o"></i> <em>4 min. read</em></span>
<div class="post-categories">
<a class="post-category post-category-administration" href="https://blog.hagfi.sh//categories/administration">administration</a>
</div>
</p>
<article class="post-summary">
<p>Create an encrypted partition that will automatically mount at boot.</p>
</article>
<div class="read-more-link">
<a href="/administration/luks-encryption/"><span class="read-more-slashes">//</span>Read More...</a>
</div>
</section>
</div>
<div class="footer">
<hr class="thin" />
<div class="pure-menu pure-menu-horizontal pure-menu-open">
<ul class="footer-menu">
</ul>
</div>
<p>&copy; 2022. All rights reserved.</p>
</div>
</div>
</div>
<script>
var app = new Vue({
el: '#app',
data: {
fuse: null,
search: "",
result: [],
index: [],
selected: 0
},
mounted() {
let self = this
window.addEventListener("keypress", function(e) {
self.$refs.searchInput.focus()
})
let options = {
shouldSort: true,
threshold: 0.6,
location: 0,
distance: 100,
maxPatternLength: 32,
minMatchCharLength: 1,
keys: [
"title",
"author",
"date",
"content"
]
}
axios.get('/index.json')
.then(function (response) {
self.index = response.data
self.fuse = new Fuse(response.data, options)
})
.catch(function (error) {
})
},
watch: {
result(nval, oval) {
nval.length > 0 ? this.pointer(0) : this.pointer(-1)
},
search(nval, oval) {
this.result = this.fuse.search(nval)
}
},
methods: {
navigate(val) {
switch (val) {
case 1: if (this.selected < this.result.length - 1) { this.selected++ }; break;
case -1: if (this.selected > 0 ) { this.selected-- }; break;
default: window.location.href = val; break;
}
this.pointer(this.selected)
},
pointer(selected) {
let self = this
if (selected >= 0) {
Vue.nextTick().then(function() {
let height = self.$refs.resultItem[selected].clientHeight
let top = self.$refs.resultItem[selected].getBoundingClientRect().top
let left = self.$refs.resultItem[selected].getBoundingClientRect().left
self.$refs.resultPoint.style.top = (top+height/2)+'px'
self.$refs.resultPoint.style.left = (left-20)+'px'
})
} else {
this.$refs.resultPoint.style.left = '-50px'
return
}
}
}
})
</script>
</body>
</html>

83
public/categories/administration/index.xml

@ -0,0 +1,83 @@
<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom">
<channel>
<title>administration on Hagfi.sh</title>
<link>https://blog.hagfi.sh/categories/administration/</link>
<description>Recent content in administration on Hagfi.sh</description>
<generator>Hugo -- gohugo.io</generator>
<language>en-us</language>
<lastBuildDate>Fri, 30 Nov 2018 10:08:22 +0200</lastBuildDate><atom:link href="https://blog.hagfi.sh/categories/administration/index.xml" rel="self" type="application/rss+xml" />
<item>
<title>Yet Another Arch Guide</title>
<link>https://blog.hagfi.sh/administration/yet-another-arch-guide/</link>
<pubDate>Fri, 30 Nov 2018 10:08:22 +0200</pubDate>
<guid>https://blog.hagfi.sh/administration/yet-another-arch-guide/</guid>
<description>&lt;p&gt;Setting up Arch with other bells and whistles.&lt;/p&gt;</description>
</item>
<item>
<title>Bash Tips &amp; Tricks</title>
<link>https://blog.hagfi.sh/administration/bash/</link>
<pubDate>Sun, 11 Nov 2018 16:01:15 +0100</pubDate>
<guid>https://blog.hagfi.sh/administration/bash/</guid>
<description>&lt;p&gt;Usefull bash tips &amp;amp; tricks&lt;/p&gt;</description>
</item>
<item>
<title>Changing boot targets</title>
<link>https://blog.hagfi.sh/administration/boot-targets/</link>
<pubDate>Fri, 09 Nov 2018 10:08:15 +0200</pubDate>
<guid>https://blog.hagfi.sh/administration/boot-targets/</guid>
<description>&lt;p&gt;Switch between run levels / environments.&lt;/p&gt;</description>
</item>
<item>
<title>Mount with automount (autofs)</title>
<link>https://blog.hagfi.sh/administration/autofs/</link>
<pubDate>Fri, 09 Nov 2018 10:08:15 +0200</pubDate>
<guid>https://blog.hagfi.sh/administration/autofs/</guid>
<description>&lt;p&gt;Automagically mount remote directories on login.&lt;/p&gt;</description>
</item>
<item>
<title>Fatrace: Report system wide file access events</title>
<link>https://blog.hagfi.sh/tools/fatrace/</link>
<pubDate>Mon, 05 Nov 2018 22:13:49 +0200</pubDate>
<guid>https://blog.hagfi.sh/tools/fatrace/</guid>
<description>&lt;p&gt;fatrace watches every file on server (except from itself and other kernel file systems).&lt;/p&gt;</description>
</item>
<item>
<title>Troubles with interfaces after a VM clone</title>
<link>https://blog.hagfi.sh/administration/toubles-with-interfaces-after-clone/</link>
<pubDate>Mon, 05 Nov 2018 22:13:49 +0200</pubDate>
<guid>https://blog.hagfi.sh/administration/toubles-with-interfaces-after-clone/</guid>
<description>&lt;p&gt;Remapping interfaces and their MAC address.&lt;/p&gt;</description>
</item>
<item>
<title>NCDU: NCurses Disk Usage</title>
<link>https://blog.hagfi.sh/tools/ncdu/</link>
<pubDate>Mon, 17 Sep 2018 22:18:38 +0200</pubDate>
<guid>https://blog.hagfi.sh/tools/ncdu/</guid>
<description>&lt;p&gt;ncdu is a command line tool to scan and calculate directory and file sizes.&lt;/p&gt;</description>
</item>
<item>
<title>Luks Encryption</title>
<link>https://blog.hagfi.sh/administration/luks-encryption/</link>
<pubDate>Thu, 23 Aug 2018 22:08:15 +0200</pubDate>
<guid>https://blog.hagfi.sh/administration/luks-encryption/</guid>
<description>&lt;p&gt;Create an encrypted partition that will automatically mount at boot.&lt;/p&gt;</description>
</item>
</channel>
</rss>

320
public/categories/development/index.html

@ -0,0 +1,320 @@
<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en-us">
<head>
<title>
development // Hagfi.sh
</title>
<link href="http://gmpg.org/xfn/11" rel="profile">
<meta http-equiv="content-type" content="text/html; charset=utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1">
<meta name="description" content="">
<meta name="keywords" content="">
<meta name="author" content="">
<meta name="generator" content="Hugo 0.92.0" />
<meta property="og:title" content="development" />
<meta property="og:description" content="" />
<meta property="og:type" content="website" />
<meta property="og:locale" content="en_US" />
<meta property="og:url" content="https://blog.hagfi.sh/categories/development/" />
<link rel="stylesheet" href="//cdnjs.cloudflare.com/ajax/libs/pure/0.5.0/base-min.css">
<link rel="stylesheet" href="//cdnjs.cloudflare.com/ajax/libs/pure/0.5.0/pure-min.css">
<link rel="stylesheet" href="//cdnjs.cloudflare.com/ajax/libs/pure/0.5.0/grids-responsive-min.css">
<link rel="stylesheet" href="https://blog.hagfi.sh//css/redlounge.css">
<link rel="stylesheet" href="https://blog.hagfi.sh//css/prism.css">
<link href="//maxcdn.bootstrapcdn.com/font-awesome/4.5.0/css/font-awesome.min.css" rel="stylesheet">
<link href='//fonts.googleapis.com/css?family=Raleway:400,200,100,700,300,500,600,800' rel='stylesheet' type='text/css'>
<link href='//fonts.googleapis.com/css?family=Libre+Baskerville:400,700,400italic' rel='stylesheet' type='text/css'>
<link rel="apple-touch-icon-precomposed" sizes="144x144" href="/touch-icon-144-precomposed.png">
<link rel="shortcut icon" type="image/x-icon" href="/img/favicon.png">
<link href="https://blog.hagfi.sh/categories/development/index.xml" rel="alternate" type="application/rss+xml" title="Hagfi.sh" />
<script src="//cdnjs.cloudflare.com/ajax/libs/moment.js/2.18.1/moment.js"></script>
<script src="//cdnjs.cloudflare.com/ajax/libs/vue/2.5.17/vue.min.js"></script>
<script src="//cdnjs.cloudflare.com/ajax/libs/axios/0.18.0/axios.min.js"></script>
<script src="//cdnjs.cloudflare.com/ajax/libs/fuse.js/3.2.1/fuse.min.js"></script>
<script src="//cdn.jsdelivr.net/npm/vuewordcloud@18.7.11/VueWordCloud.js"></script>
<script src="https://blog.hagfi.sh//js/prism.js"></script>
<script type="application/javascript">
var doNotTrack = false;
if (!doNotTrack) {
(function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){
(i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o),
m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m)
})(window,document,'script','https://www.google-analytics.com/analytics.js','ga');
ga('create', 'UA-124890410-1', 'auto');
ga('send', 'pageview');
}
</script>
</head>
<body>
<div id="layout" class="pure-g">
<div class="sidebar pure-u-1 pure-u-md-1-4" id="app">
<div class="header">
<h1 class="brand-title"><a href="/">Hagfi.sh</a></h1>
<h2 class="brand-tagline">A devops guide to the galaxy</h2>
<div class="counters">
<a class="counter" href="/">13
<div class="counter-sub">Documents</div>
</a>
<a class="counter" href="/tags">29
<div class="counter-sub">Tags</div>
</a>
<a class="counter" href="/categories">3
<div class="counter-sub">Categories</div>
</a>
</div>
<nav class="nav">
</nav>
<div class="search-wrapper">
<input
type="text"
placeholder="Search ..."
v-model="search"
@keydown.down.prevent="navigate(1)"
@keydown.up.prevent="navigate(-1)"
@keyup.enter.prevent="navigate(result[selected].href)"
ref="searchInput"
class="search"
/>
<svg height="100" width="100" ref="resultPoint" class="result-point">
<circle cx="5" cy="5" r="5" fill="#FFF" />
</svg>
<ul class="result-items">
<li v-for="r, i of result" class="result-item" ref="resultItem">
<div class="result-item-wrapper" :class="{ 'result-item-selected': selected === i }">
<div class="result-item-left">
<span class="post-date">
<span class="post-date-day"><sup v-text="moment(r.date).format('D')"></sup></span><span class="post-date-separator" v-text="'/'"></span><span class="post-date-month" v-text="moment(r.date).format('MMM')"></span> <span class="post-date-year" v-text="moment(r.date).format('YYYY')"></span>
</span>
<template v-if="r.author">By <a class="post-author" v-text="r.author"></a></template>
</div>
<div class="result-item-left">
<span class="result-item-separator nav-item-separator" v-text="'//'"></span><a :href="r.href" v-text="r.title" class="result-item-link"></a>
</div>
</div>
</li>
</ul>
</div>
</div>
</div>
<div class="content pure-u-1 pure-u-md-3-4">
<a name="top"></a>
<div class="posts">
<section class="post">
<header class="post-header">
<h1 class="post-title">
<a href="/administration/bash/">Bash Tips &amp; Tricks</a>
</h1>
</header>
<p class="post-meta">
<span class="post-date">
<span class="post-date-day"><sup>11</sup></span><span class="post-date-separator">/</span><span class="post-date-month">Nov</span> <span class="post-date-year">2018</span>
</span>
By <a class="post-author" >Olivier De Ram</a>
<span class="post-reading-time"><i class="fa fa-clock-o"></i> <em>2 min. read</em></span>
<div class="post-categories">
<a class="post-category post-category-administration" href="https://blog.hagfi.sh//categories/administration">administration</a>
<a class="post-category post-category-development" href="https://blog.hagfi.sh//categories/development">development</a>
</div>
</p>
<article class="post-summary">
<p>Usefull bash tips &amp; tricks</p>
</article>
<div class="read-more-link">
<a href="/administration/bash/"><span class="read-more-slashes">//</span>Read More...</a>
</div>
</section>
<section class="post">
<header class="post-header">
<h1 class="post-title">
<a href="/development/live-search-with-hugo/">Live Search With HUGO</a>
</h1>
</header>
<p class="post-meta">
<span class="post-date">
<span class="post-date-day"><sup>29</sup></span><span class="post-date-separator">/</span><span class="post-date-month">Aug</span> <span class="post-date-year">2018</span>
</span>
By <a class="post-author" >Kristof Vandam</a>
<span class="post-reading-time"><i class="fa fa-clock-o"></i> <em>5 min. read</em></span>
<div class="post-categories">
<a class="post-category post-category-development" href="https://blog.hagfi.sh//categories/development">development</a>
</div>
</p>
<article class="post-summary">
<p>HUGO is static, that&rsquo;s a fact. How can I implement a live search? Searching the internet provided me only solutions
that require a page refresh, this time of age performance is key, so that&rsquo;s why I wanted a fast and fuzzy search implementation.</p>
</article>
<div class="read-more-link">
<a href="/development/live-search-with-hugo/"><span class="read-more-slashes">//</span>Read More...</a>
</div>
</section>
</div>
<div class="footer">
<hr class="thin" />
<div class="pure-menu pure-menu-horizontal pure-menu-open">
<ul class="footer-menu">
</ul>
</div>
<p>&copy; 2022. All rights reserved.</p>
</div>
</div>
</div>
<script>
var app = new Vue({
el: '#app',
data: {
fuse: null,
search: "",
result: [],
index: [],
selected: 0
},
mounted() {
let self = this
window.addEventListener("keypress", function(e) {
self.$refs.searchInput.focus()
})
let options = {
shouldSort: true,
threshold: 0.6,
location: 0,
distance: 100,
maxPatternLength: 32,
minMatchCharLength: 1,
keys: [
"title",
"author",
"date",
"content"
]
}
axios.get('/index.json')
.then(function (response) {
self.index = response.data
self.fuse = new Fuse(response.data, options)
})
.catch(function (error) {
})
},
watch: {
result(nval, oval) {
nval.length > 0 ? this.pointer(0) : this.pointer(-1)
},
search(nval, oval) {
this.result = this.fuse.search(nval)
}
},
methods: {
navigate(val) {
switch (val) {
case 1: if (this.selected < this.result.length - 1) { this.selected++ }; break;
case -1: if (this.selected > 0 ) { this.selected-- }; break;
default: window.location.href = val; break;
}
this.pointer(this.selected)
},
pointer(selected) {
let self = this
if (selected >= 0) {
Vue.nextTick().then(function() {
let height = self.$refs.resultItem[selected].clientHeight
let top = self.$refs.resultItem[selected].getBoundingClientRect().top
let left = self.$refs.resultItem[selected].getBoundingClientRect().left
self.$refs.resultPoint.style.top = (top+height/2)+'px'
self.$refs.resultPoint.style.left = (left-20)+'px'
})
} else {
this.$refs.resultPoint.style.left = '-50px'
return
}
}
}
})
</script>
</body>
</html>

30
public/categories/development/index.xml

@ -0,0 +1,30 @@
<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom">
<channel>
<title>development on Hagfi.sh</title>
<link>https://blog.hagfi.sh/categories/development/</link>
<description>Recent content in development on Hagfi.sh</description>
<generator>Hugo -- gohugo.io</generator>
<language>en-us</language>
<lastBuildDate>Sun, 11 Nov 2018 16:01:15 +0100</lastBuildDate><atom:link href="https://blog.hagfi.sh/categories/development/index.xml" rel="self" type="application/rss+xml" />
<item>
<title>Bash Tips &amp; Tricks</title>
<link>https://blog.hagfi.sh/administration/bash/</link>
<pubDate>Sun, 11 Nov 2018 16:01:15 +0100</pubDate>
<guid>https://blog.hagfi.sh/administration/bash/</guid>
<description>&lt;p&gt;Usefull bash tips &amp;amp; tricks&lt;/p&gt;</description>
</item>
<item>
<title>Live Search With HUGO</title>
<link>https://blog.hagfi.sh/development/live-search-with-hugo/</link>
<pubDate>Wed, 29 Aug 2018 22:44:46 +0200</pubDate>
<guid>https://blog.hagfi.sh/development/live-search-with-hugo/</guid>
<description>&lt;p&gt;HUGO is static, that&amp;rsquo;s a fact. How can I implement a live search? Searching the internet provided me only solutions
that require a page refresh, this time of age performance is key, so that&amp;rsquo;s why I wanted a fast and fuzzy search implementation.&lt;/p&gt;</description>
</item>
</channel>
</rss>

319
public/categories/index.html

@ -0,0 +1,319 @@
<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en-us">
<head>
<title>
Categories // Hagfi.sh
</title>
<link href="http://gmpg.org/xfn/11" rel="profile">
<meta http-equiv="content-type" content="text/html; charset=utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1">
<meta name="description" content="">
<meta name="keywords" content="">
<meta name="author" content="">
<meta name="generator" content="Hugo 0.92.0" />
<meta property="og:title" content="Categories" />
<meta property="og:description" content="" />
<meta property="og:type" content="website" />
<meta property="og:locale" content="en_US" />
<meta property="og:url" content="https://blog.hagfi.sh/categories/" />
<link rel="stylesheet" href="//cdnjs.cloudflare.com/ajax/libs/pure/0.5.0/base-min.css">
<link rel="stylesheet" href="//cdnjs.cloudflare.com/ajax/libs/pure/0.5.0/pure-min.css">
<link rel="stylesheet" href="//cdnjs.cloudflare.com/ajax/libs/pure/0.5.0/grids-responsive-min.css">
<link rel="stylesheet" href="https://blog.hagfi.sh//css/redlounge.css">
<link rel="stylesheet" href="https://blog.hagfi.sh//css/prism.css">
<link href="//maxcdn.bootstrapcdn.com/font-awesome/4.5.0/css/font-awesome.min.css" rel="stylesheet">
<link href='//fonts.googleapis.com/css?family=Raleway:400,200,100,700,300,500,600,800' rel='stylesheet' type='text/css'>
<link href='//fonts.googleapis.com/css?family=Libre+Baskerville:400,700,400italic' rel='stylesheet' type='text/css'>
<link rel="apple-touch-icon-precomposed" sizes="144x144" href="/touch-icon-144-precomposed.png">
<link rel="shortcut icon" type="image/x-icon" href="/img/favicon.png">
<link href="https://blog.hagfi.sh/categories/index.xml" rel="alternate" type="application/rss+xml" title="Hagfi.sh" />
<script src="//cdnjs.cloudflare.com/ajax/libs/moment.js/2.18.1/moment.js"></script>
<script src="//cdnjs.cloudflare.com/ajax/libs/vue/2.5.17/vue.min.js"></script>
<script src="//cdnjs.cloudflare.com/ajax/libs/axios/0.18.0/axios.min.js"></script>
<script src="//cdnjs.cloudflare.com/ajax/libs/fuse.js/3.2.1/fuse.min.js"></script>
<script src="//cdn.jsdelivr.net/npm/vuewordcloud@18.7.11/VueWordCloud.js"></script>
<script src="https://blog.hagfi.sh//js/prism.js"></script>
<script type="application/javascript">
var doNotTrack = false;
if (!doNotTrack) {
(function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){
(i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o),
m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m)
})(window,document,'script','https://www.google-analytics.com/analytics.js','ga');
ga('create', 'UA-124890410-1', 'auto');
ga('send', 'pageview');
}
</script>
</head>
<body>
<div id="layout" class="pure-g">
<div class="sidebar pure-u-1 pure-u-md-1-4" id="app">
<div class="header">
<h1 class="brand-title"><a href="/">Hagfi.sh</a></h1>
<h2 class="brand-tagline">A devops guide to the galaxy</h2>
<div class="counters">
<a class="counter" href="/">13
<div class="counter-sub">Documents</div>
</a>
<a class="counter" href="/tags">29
<div class="counter-sub">Tags</div>
</a>
<a class="counter" href="/categories">3
<div class="counter-sub">Categories</div>
</a>
</div>
<nav class="nav">
</nav>
<div class="search-wrapper">
<input
type="text"
placeholder="Search ..."
v-model="search"
@keydown.down.prevent="navigate(1)"
@keydown.up.prevent="navigate(-1)"
@keyup.enter.prevent="navigate(result[selected].href)"
ref="searchInput"
class="search"
/>
<svg height="100" width="100" ref="resultPoint" class="result-point">
<circle cx="5" cy="5" r="5" fill="#FFF" />
</svg>
<ul class="result-items">
<li v-for="r, i of result" class="result-item" ref="resultItem">
<div class="result-item-wrapper" :class="{ 'result-item-selected': selected === i }">
<div class="result-item-left">
<span class="post-date">
<span class="post-date-day"><sup v-text="moment(r.date).format('D')"></sup></span><span class="post-date-separator" v-text="'/'"></span><span class="post-date-month" v-text="moment(r.date).format('MMM')"></span> <span class="post-date-year" v-text="moment(r.date).format('YYYY')"></span>
</span>
<template v-if="r.author">By <a class="post-author" v-text="r.author"></a></template>
</div>
<div class="result-item-left">
<span class="result-item-separator nav-item-separator" v-text="'//'"></span><a :href="r.href" v-text="r.title" class="result-item-link"></a>
</div>
</div>
</li>
</ul>
</div>
</div>
</div>
<div class="content pure-u-1 pure-u-md-3-4">
<a name="top"></a>
<div class="posts">
<section class="post">
<header class="post-header">
<h1 class="post-title">
<a href="/categories/administration/">administration</a>
</h1>
</header>
<p class="post-meta">
<span class="post-date">
<span class="post-date-day"><sup>30</sup></span><span class="post-date-separator">/</span><span class="post-date-month">Nov</span> <span class="post-date-year">2018</span>
</span>
<span class="post-reading-time"><i class="fa fa-clock-o"></i> <em>0 min. read</em></span>
</p>
</section>
<section class="post">
<header class="post-header">
<h1 class="post-title">
<a href="/categories/development/">development</a>
</h1>
</header>
<p class="post-meta">
<span class="post-date">
<span class="post-date-day"><sup>11</sup></span><span class="post-date-separator">/</span><span class="post-date-month">Nov</span> <span class="post-date-year">2018</span>
</span>
<span class="post-reading-time"><i class="fa fa-clock-o"></i> <em>0 min. read</em></span>
</p>
</section>
<section class="post">
<header class="post-header">
<h1 class="post-title">
<a href="/categories/tools/">tools</a>
</h1>
</header>
<p class="post-meta">
<span class="post-date">
<span class="post-date-day"><sup>5</sup></span><span class="post-date-separator">/</span><span class="post-date-month">Nov</span> <span class="post-date-year">2018</span>
</span>
<span class="post-reading-time"><i class="fa fa-clock-o"></i> <em>0 min. read</em></span>
</p>
</section>
</div>
<div class="footer">
<hr class="thin" />
<div class="pure-menu pure-menu-horizontal pure-menu-open">
<ul class="footer-menu">
</ul>
</div>
<p>&copy; 2022. All rights reserved.</p>
</div>
</div>
</div>
<script>
var app = new Vue({
el: '#app',
data: {
fuse: null,
search: "",
result: [],
index: [],
selected: 0
},
mounted() {
let self = this
window.addEventListener("keypress", function(e) {
self.$refs.searchInput.focus()
})
let options = {
shouldSort: true,
threshold: 0.6,
location: 0,
distance: 100,
maxPatternLength: 32,
minMatchCharLength: 1,
keys: [
"title",
"author",
"date",
"content"
]
}
axios.get('/index.json')
.then(function (response) {
self.index = response.data
self.fuse = new Fuse(response.data, options)
})
.catch(function (error) {
})
},
watch: {
result(nval, oval) {
nval.length > 0 ? this.pointer(0) : this.pointer(-1)
},
search(nval, oval) {
this.result = this.fuse.search(nval)
}
},
methods: {
navigate(val) {
switch (val) {
case 1: if (this.selected < this.result.length - 1) { this.selected++ }; break;
case -1: if (this.selected > 0 ) { this.selected-- }; break;
default: window.location.href = val; break;
}
this.pointer(this.selected)
},
pointer(selected) {
let self = this
if (selected >= 0) {
Vue.nextTick().then(function() {
let height = self.$refs.resultItem[selected].clientHeight
let top = self.$refs.resultItem[selected].getBoundingClientRect().top
let left = self.$refs.resultItem[selected].getBoundingClientRect().left
self.$refs.resultPoint.style.top = (top+height/2)+'px'
self.$refs.resultPoint.style.left = (left-20)+'px'
})
} else {
this.$refs.resultPoint.style.left = '-50px'
return
}
}
}
})
</script>
</body>
</html>

38
public/categories/index.xml

@ -0,0 +1,38 @@
<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom">
<channel>
<title>Categories on Hagfi.sh</title>
<link>https://blog.hagfi.sh/categories/</link>
<description>Recent content in Categories on Hagfi.sh</description>
<generator>Hugo -- gohugo.io</generator>
<language>en-us</language>
<lastBuildDate>Fri, 30 Nov 2018 10:08:22 +0200</lastBuildDate><atom:link href="https://blog.hagfi.sh/categories/index.xml" rel="self" type="application/rss+xml" />
<item>
<title>administration</title>
<link>https://blog.hagfi.sh/categories/administration/</link>
<pubDate>Fri, 30 Nov 2018 10:08:22 +0200</pubDate>
<guid>https://blog.hagfi.sh/categories/administration/</guid>
<description></description>
</item>
<item>
<title>development</title>
<link>https://blog.hagfi.sh/categories/development/</link>
<pubDate>Sun, 11 Nov 2018 16:01:15 +0100</pubDate>
<guid>https://blog.hagfi.sh/categories/development/</guid>
<description></description>
</item>
<item>
<title>tools</title>
<link>https://blog.hagfi.sh/categories/tools/</link>
<pubDate>Mon, 05 Nov 2018 22:13:49 +0200</pubDate>
<guid>https://blog.hagfi.sh/categories/tools/</guid>
<description></description>
</item>
</channel>
</rss>

321
public/categories/tools/index.html

@ -0,0 +1,321 @@
<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en-us">
<head>
<title>
tools // Hagfi.sh
</title>
<link href="http://gmpg.org/xfn/11" rel="profile">
<meta http-equiv="content-type" content="text/html; charset=utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1">
<meta name="description" content="">
<meta name="keywords" content="">
<meta name="author" content="">
<meta name="generator" content="Hugo 0.92.0" />
<meta property="og:title" content="tools" />
<meta property="og:description" content="" />
<meta property="og:type" content="website" />
<meta property="og:locale" content="en_US" />
<meta property="og:url" content="https://blog.hagfi.sh/categories/tools/" />
<link rel="stylesheet" href="//cdnjs.cloudflare.com/ajax/libs/pure/0.5.0/base-min.css">
<link rel="stylesheet" href="//cdnjs.cloudflare.com/ajax/libs/pure/0.5.0/pure-min.css">
<link rel="stylesheet" href="//cdnjs.cloudflare.com/ajax/libs/pure/0.5.0/grids-responsive-min.css">
<link rel="stylesheet" href="https://blog.hagfi.sh//css/redlounge.css">
<link rel="stylesheet" href="https://blog.hagfi.sh//css/prism.css">
<link href="//maxcdn.bootstrapcdn.com/font-awesome/4.5.0/css/font-awesome.min.css" rel="stylesheet">
<link href='//fonts.googleapis.com/css?family=Raleway:400,200,100,700,300,500,600,800' rel='stylesheet' type='text/css'>
<link href='//fonts.googleapis.com/css?family=Libre+Baskerville:400,700,400italic' rel='stylesheet' type='text/css'>
<link rel="apple-touch-icon-precomposed" sizes="144x144" href="/touch-icon-144-precomposed.png">
<link rel="shortcut icon" type="image/x-icon" href="/img/favicon.png">
<link href="https://blog.hagfi.sh/categories/tools/index.xml" rel="alternate" type="application/rss+xml" title="Hagfi.sh" />
<script src="//cdnjs.cloudflare.com/ajax/libs/moment.js/2.18.1/moment.js"></script>
<script src="//cdnjs.cloudflare.com/ajax/libs/vue/2.5.17/vue.min.js"></script>
<script src="//cdnjs.cloudflare.com/ajax/libs/axios/0.18.0/axios.min.js"></script>
<script src="//cdnjs.cloudflare.com/ajax/libs/fuse.js/3.2.1/fuse.min.js"></script>
<script src="//cdn.jsdelivr.net/npm/vuewordcloud@18.7.11/VueWordCloud.js"></script>
<script src="https://blog.hagfi.sh//js/prism.js"></script>
<script type="application/javascript">
var doNotTrack = false;
if (!doNotTrack) {
(function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){
(i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o),
m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m)
})(window,document,'script','https://www.google-analytics.com/analytics.js','ga');
ga('create', 'UA-124890410-1', 'auto');
ga('send', 'pageview');
}
</script>
</head>
<body>
<div id="layout" class="pure-g">
<div class="sidebar pure-u-1 pure-u-md-1-4" id="app">
<div class="header">
<h1 class="brand-title"><a href="/">Hagfi.sh</a></h1>
<h2 class="brand-tagline">A devops guide to the galaxy</h2>
<div class="counters">
<a class="counter" href="/">13
<div class="counter-sub">Documents</div>
</a>
<a class="counter" href="/tags">29
<div class="counter-sub">Tags</div>
</a>
<a class="counter" href="/categories">3
<div class="counter-sub">Categories</div>
</a>
</div>
<nav class="nav">
</nav>
<div class="search-wrapper">
<input
type="text"
placeholder="Search ..."
v-model="search"
@keydown.down.prevent="navigate(1)"
@keydown.up.prevent="navigate(-1)"
@keyup.enter.prevent="navigate(result[selected].href)"
ref="searchInput"
class="search"
/>
<svg height="100" width="100" ref="resultPoint" class="result-point">
<circle cx="5" cy="5" r="5" fill="#FFF" />
</svg>
<ul class="result-items">
<li v-for="r, i of result" class="result-item" ref="resultItem">
<div class="result-item-wrapper" :class="{ 'result-item-selected': selected === i }">
<div class="result-item-left">
<span class="post-date">
<span class="post-date-day"><sup v-text="moment(r.date).format('D')"></sup></span><span class="post-date-separator" v-text="'/'"></span><span class="post-date-month" v-text="moment(r.date).format('MMM')"></span> <span class="post-date-year" v-text="moment(r.date).format('YYYY')"></span>
</span>
<template v-if="r.author">By <a class="post-author" v-text="r.author"></a></template>
</div>
<div class="result-item-left">
<span class="result-item-separator nav-item-separator" v-text="'//'"></span><a :href="r.href" v-text="r.title" class="result-item-link"></a>
</div>
</div>
</li>
</ul>
</div>
</div>
</div>
<div class="content pure-u-1 pure-u-md-3-4">
<a name="top"></a>
<div class="posts">
<section class="post">
<header class="post-header">
<h1 class="post-title">
<a href="/tools/fatrace/">Fatrace: Report system wide file access events</a>
</h1>
</header>
<p class="post-meta">
<span class="post-date">
<span class="post-date-day"><sup>5</sup></span><span class="post-date-separator">/</span><span class="post-date-month">Nov</span> <span class="post-date-year">2018</span>
</span>
By <a class="post-author" >Kristof Vandam</a>
<span class="post-reading-time"><i class="fa fa-clock-o"></i> <em>1 min. read</em></span>
<div class="post-categories">
<a class="post-category post-category-tools" href="https://blog.hagfi.sh//categories/tools">tools</a>
<a class="post-category post-category-administration" href="https://blog.hagfi.sh//categories/administration">administration</a>
</div>
</p>
<article class="post-summary">
<p>fatrace watches every file on server (except from itself and other kernel file systems).</p>
</article>
<div class="read-more-link">
<a href="/tools/fatrace/"><span class="read-more-slashes">//</span>Read More...</a>
</div>
</section>
<section class="post">
<header class="post-header">
<h1 class="post-title">
<a href="/tools/ncdu/">NCDU: NCurses Disk Usage</a>
</h1>
</header>
<p class="post-meta">
<span class="post-date">
<span class="post-date-day"><sup>17</sup></span><span class="post-date-separator">/</span><span class="post-date-month">Sep</span> <span class="post-date-year">2018</span>
</span>
By <a class="post-author" >Kristof Vandam</a>
<span class="post-reading-time"><i class="fa fa-clock-o"></i> <em>2 min. read</em></span>
<div class="post-categories">
<a class="post-category post-category-tools" href="https://blog.hagfi.sh//categories/tools">tools</a>
<a class="post-category post-category-administration" href="https://blog.hagfi.sh//categories/administration">administration</a>
</div>
</p>
<article class="post-summary">
<p>ncdu is a command line tool to scan and calculate directory and file sizes.</p>
</article>
<div class="read-more-link">
<a href="/tools/ncdu/"><span class="read-more-slashes">//</span>Read More...</a>
</div>
</section>
</div>
<div class="footer">
<hr class="thin" />
<div class="pure-menu pure-menu-horizontal pure-menu-open">
<ul class="footer-menu">
</ul>
</div>
<p>&copy; 2022. All rights reserved.</p>
</div>
</div>
</div>
<script>
var app = new Vue({
el: '#app',
data: {
fuse: null,
search: "",
result: [],
index: [],
selected: 0
},
mounted() {
let self = this
window.addEventListener("keypress", function(e) {
self.$refs.searchInput.focus()
})
let options = {
shouldSort: true,
threshold: 0.6,
location: 0,
distance: 100,
maxPatternLength: 32,
minMatchCharLength: 1,
keys: [
"title",
"author",
"date",
"content"
]
}
axios.get('/index.json')
.then(function (response) {
self.index = response.data
self.fuse = new Fuse(response.data, options)
})
.catch(function (error) {
})
},
watch: {
result(nval, oval) {
nval.length > 0 ? this.pointer(0) : this.pointer(-1)
},
search(nval, oval) {
this.result = this.fuse.search(nval)
}
},
methods: {
navigate(val) {
switch (val) {
case 1: if (this.selected < this.result.length - 1) { this.selected++ }; break;
case -1: if (this.selected > 0 ) { this.selected-- }; break;
default: window.location.href = val; break;
}
this.pointer(this.selected)
},
pointer(selected) {
let self = this
if (selected >= 0) {
Vue.nextTick().then(function() {
let height = self.$refs.resultItem[selected].clientHeight
let top = self.$refs.resultItem[selected].getBoundingClientRect().top
let left = self.$refs.resultItem[selected].getBoundingClientRect().left
self.$refs.resultPoint.style.top = (top+height/2)+'px'
self.$refs.resultPoint.style.left = (left-20)+'px'
})
} else {
this.$refs.resultPoint.style.left = '-50px'
return
}
}
}
})
</script>
</body>
</html>

29
public/categories/tools/index.xml

@ -0,0 +1,29 @@
<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom">
<channel>
<title>tools on Hagfi.sh</title>
<link>https://blog.hagfi.sh/categories/tools/</link>
<description>Recent content in tools on Hagfi.sh</description>
<generator>Hugo -- gohugo.io</generator>
<language>en-us</language>
<lastBuildDate>Mon, 05 Nov 2018 22:13:49 +0200</lastBuildDate><atom:link href="https://blog.hagfi.sh/categories/tools/index.xml" rel="self" type="application/rss+xml" />
<item>
<title>Fatrace: Report system wide file access events</title>
<link>https://blog.hagfi.sh/tools/fatrace/</link>
<pubDate>Mon, 05 Nov 2018 22:13:49 +0200</pubDate>
<guid>https://blog.hagfi.sh/tools/fatrace/</guid>
<description>&lt;p&gt;fatrace watches every file on server (except from itself and other kernel file systems).&lt;/p&gt;</description>
</item>
<item>
<title>NCDU: NCurses Disk Usage</title>
<link>https://blog.hagfi.sh/tools/ncdu/</link>
<pubDate>Mon, 17 Sep 2018 22:18:38 +0200</pubDate>
<guid>https://blog.hagfi.sh/tools/ncdu/</guid>
<description>&lt;p&gt;ncdu is a command line tool to scan and calculate directory and file sizes.&lt;/p&gt;</description>
</item>
</channel>
</rss>

259
public/css/prism.css

@ -0,0 +1,259 @@
/* PrismJS 1.15.0
https://prismjs.com/download.html#themes=prism-okaidia&languages=markup+css+clike+javascript+markup-templating+php+puppet+pug+yaml&plugins=line-numbers+toolbar+show-language */
/**
* okaidia theme for JavaScript, CSS and HTML
* Loosely based on Monokai textmate theme by http://www.monokai.nl/
* @author ocodia
*/
code[class*="language-"],
pre[class*="language-"] {
color: #f8f8f2;
background: none;
text-shadow: 0 1px rgba(0, 0, 0, 0.3);
font-family: Consolas, Monaco, 'Andale Mono', 'Ubuntu Mono', monospace;
text-align: left;
white-space: pre;
word-spacing: normal;
word-break: normal;
word-wrap: normal;
line-height: 1.5;
-moz-tab-size: 4;
-o-tab-size: 4;
tab-size: 4;
-webkit-hyphens: none;
-moz-hyphens: none;
-ms-hyphens: none;
hyphens: none;
}
/* Code blocks */
pre[class*="language-"] {
padding: 1em;
margin: 0;
overflow: auto;
border-radius: 0.3em;
}
:not(pre) > code[class*="language-"],
pre[class*="language-"] {
background: #2E303A;
}
/* Inline code */
:not(pre) > code[class*="language-"] {
padding: .1em;
border-radius: .3em;
white-space: normal;
}
.token.comment,
.token.prolog,
.token.doctype,
.token.cdata {
color: slategray;
}
.token.punctuation {
color: #f8f8f2;
}
.namespace {
opacity: .7;
}
.token.property,
.token.tag,
.token.constant,
.token.symbol,
.token.deleted {
color: #f92672;
}
.token.boolean,
.token.number {
color: #ae81ff;
}
.token.selector,
.token.attr-name,
.token.string,
.token.char,
.token.builtin,
.token.inserted {
color: #a6e22e;
}
.token.operator,
.token.entity,
.token.url,
.language-css .token.string,
.style .token.string,
.token.variable {
color: #f8f8f2;
}
.token.atrule,
.token.attr-value,
.token.function,
.token.class-name {
color: #e6db74;
}
.token.keyword {
color: #66d9ef;
}
.token.regex,
.token.important {
color: #fd971f;
}
.token.important,
.token.bold {
font-weight: bold;
}
.token.italic {
font-style: italic;
}
.token.entity {
cursor: help;
}
pre[class*="language-"].line-numbers {
position: relative;
padding-left: 3.8em;
counter-reset: linenumber;
}
pre[class*="language-"].line-numbers > code {
position: relative;
white-space: inherit;
}
.line-numbers .line-numbers-rows {
position: absolute;
pointer-events: none;
top: 0;
font-size: 100%;
left: -3.8em;
width: 3em; /* works for line-numbers below 1000 lines */
letter-spacing: -1px;
-webkit-user-select: none;
-moz-user-select: none;
-ms-user-select: none;
user-select: none;
}
.line-numbers-rows > span {
pointer-events: none;
display: block;
counter-increment: linenumber;
}
.line-numbers-rows > span:before {
content: counter(linenumber);
color: #999;
display: block;
padding-right: 0.8em;
text-align: right;
}
div.code-toolbar {
border-radius: 0.3em;
overflow: hidden;
position: relative;
}
div.code-toolbar > .toolbar {
position: absolute;
top: 5px;
right: -2px;
transition: opacity 0.1s ease-in-out;
opacity: 0;
}
div.code-toolbar:hover > .toolbar {
opacity: 1;
}
div.code-toolbar > .toolbar .toolbar-item {
display: inline-block;
}
div.code-toolbar > .toolbar a {
cursor: pointer;
}
div.code-toolbar > .toolbar button {
background: none;
border: 0;
color: inherit;
font: inherit;
line-height: normal;
overflow: visible;
padding: 0;
-webkit-user-select: none; /* for button */
-moz-user-select: none;
-ms-user-select: none;
}
div.code-toolbar > .toolbar a,
div.code-toolbar > .toolbar button,
div.code-toolbar > .toolbar span {
color: #FFF;
font-size: .8em;
padding: 0 .5em;
background: #64C2A0;
padding: 1em;
border-top-right-radius: 0.4em;
border-bottom-left-radius: 0.5em;
}
div.code-toolbar > .toolbar a:hover,
div.code-toolbar > .toolbar a:focus,
div.code-toolbar > .toolbar button:hover,
div.code-toolbar > .toolbar button:focus,
div.code-toolbar > .toolbar span:hover,
div.code-toolbar > .toolbar span:focus {
text-decoration: none;
}
.command-line-prompt {
border-right: 1px solid #999;
display: block;
float: left;
font-size: 100%;
letter-spacing: -1px;
margin-right: 1em;
pointer-events: none;
-webkit-user-select: none;
-moz-user-select: none;
-ms-user-select: none;
user-select: none;
}
.command-line-prompt > span:before {
color: #999;
content: ' ';
display: block;
padding-right: 0.8em;
}
.command-line-prompt > span[data-user]:before {
content: "[" attr(data-user) "@" attr(data-host) "] $";
}
.command-line-prompt > span[data-user="root"]:before {
content: "[" attr(data-user) "@" attr(data-host) "] #";
}
.command-line-prompt > span[data-prompt]:before {
content: attr(data-prompt);
}

222
public/css/redlounge.css

@ -6,9 +6,12 @@
html {
color: #2d303b;
}
html, p, nav, section, article {
html, p, nav, section, article, div {
font-family: 'Raleway', 'Helvetica', 'Arial', sans-serif;
}
*:focus {
outline: 0;
}
pre {
padding: 0;
}
@ -24,7 +27,7 @@ a {
color: #616161;
}
a:hover {
color:#E54028;
color:#35c49e;
}
a:hover,
a:focus {
@ -38,7 +41,7 @@ a.pure-button-primary:hover, a.pure-button-primary:focus {
color: #fff;
}
p a {
color:#7F1000;
color:#35c49e;
}
h1 {
font-family: 'Libre Baskerville', serif;
@ -48,10 +51,10 @@ h1 {
text-align: center;
}
.red {
color: #E54028;
color: #35c49e;
}
.dark-red {
color: #7F1000;
color: #35c49e;
}
.thin-line {
height: 1px;
@ -105,7 +108,7 @@ h2.brand-tagline {
color: #fff;
}
.sidebar a:hover {
color:#E54028;
color:#35c49e;
}
/* Nav */
@ -118,7 +121,6 @@ h2.brand-tagline {
.nav-item {
display: inline-block;
*display: inline;
zoom: 1;
}
.nav-item a {
background: transparent;
@ -136,9 +138,9 @@ h2.brand-tagline {
text-decoration: none;
}
.nav-item-separator {
font-weight: 100;
font-weight: 300;
font-family: 'Raleway', 'Helvetica', 'Arial', sans-serif;
color: #E54028;
color: #35c49e;
letter-spacing: -0.35rem;
margin-right: 0.4rem;
}
@ -160,7 +162,7 @@ h1.post-title a {
color: #111111;
}
.post-date {
color: #E54028;
color: #35c49e;
font-family: 'Libre Baskerville', serif;
font-weight: 400;
font-size: 1.0rem;
@ -171,18 +173,18 @@ h1.post-title a {
}
.post-date-separator {
font-family: 'Raleway', 'Helvetica', 'Arial', sans-serif;
font-weight: 100;
font-weight: 300;
letter-spacing: -0.35rem;
font-size: 1.9rem;
color: #7F1000;
color: #35c49e;
}
.post-date-month {
font-size: 0.8rem;
color: #7F1000;
color: #35c49e;
}
.post-date-year {
font-size: 0.8rem;
color: #7F1000;
color: #35c49e;
}
a.post-author {
font-size: 0.9rem;
@ -195,7 +197,7 @@ a.post-author {
color: #bbb;
}
.post-author-social a:hover, .post-author-social a:focus {
color: #E54028;
color: #35c49e;
}
.post-author-social i {
font-size: 0.9rem;
@ -211,7 +213,7 @@ a.post-author {
.post h3 {
margin-bottom: .25rem;
font-size: 1.4rem;
color: #7F1000;
color: #35c49e;
font-weight: 500;
}
.post h3.post-subtitle {
@ -263,15 +265,15 @@ a.post-author {
/*text-transform: uppercase;*/
font-weight: 400;
font-size: 0.9rem;
color: #7F1000;
color: #35c49e;
}
.read-more-link a:hover, .read-more-link a:focus {
color: #E54028;
color: #35c49e;
}
.read-more-slashes {
font-weight: 100;
font-family: 'Raleway', 'Helvetica', 'Arial', sans-serif;
color: #E54028;
color: #35c49e;
letter-spacing: -0.26rem;
margin-right: 0.3rem;
}
@ -292,7 +294,7 @@ p.post-meta {
color: #616161;
}
.post-meta a:hover {
color: #E54028;
color: #35c49e;
}
.post-categories {
clear: left;
@ -369,7 +371,7 @@ a.post-category:hover {
/* Decorative Marker */
.decorative-marker {
color: #E54028;
color: #35c49e;
letter-spacing: -0.25rem;
margin-right: 0.4rem;
margin-lefT: 0.1rem;
@ -424,7 +426,7 @@ nav#TableOfContents ul:first-child {
text-decoration: none;
}
.footer a:hover {
color:#E54028;
color:#35c49e;
text-decoration: underline;
}
.footer .pure-menu a:hover,
@ -451,7 +453,161 @@ hr.thin {
width: 90%;
}
.search {
padding: 0.5em;
border: 0;
border-radius: 0.2em;
width: 100%;
}
.result-items {
padding: 0;
}
.result-items .post-date-day,
.result-items .post-date-separator,
.result-items .post-date-month,
.result-items .post-date-year {
color: white;
}
.result-item-left {
text-align: left;
}
.result-item-right {
text-align: right;
}
.result-item {
list-style-type: none;
text-align: right;
padding: 0.6em 0;
/*border-bottom: 1px solid #8B8B8B;*/
}
.result-item a {
text-decoration: none;
}
.result-item:last-child {
border-bottom: none;
}
.menu-item-depth-3 ul li.last a {
border-bottom: none;
}
.result-item > a {
text-decoration: none;
}
.result-item-separator,
.result-item-link {
transition: all .1s ease-out;
}
.result-point {
position: absolute;
left: -50px;
transition: all .2s ease-out;
}
.result-item-selected .result-item-link {
color: #35c49e;
}
hr {
color: #35c49e;
background-color: #35c49e;
height: 1px;
}
table {
border-collapse: collapse;
width: 100%;
}
table td, table th {
border: 0.1em solid #35c49e;
padding: 0.5em;
}
table tr:first-child th {
border-top: 0;
}
table tr:last-child td {
border-bottom: 0;
}
table tr td:first-child,
table tr th:first-child {
border-left: 0;
}
table tr td:last-child,
table tr th:last-child {
border-right: 0;
}
.counters {
display: flex;
flex-wrap: wrap;
margin-bottom: 2em;
}
.counters .counter {
text-decoration: none;
display: flex;
flex-direction: column;
flex: 33%;
text-align: center;
font-size: 4vw;
color: #FFF;
}
.counters .counter .counter-sub {
text-align: center;
font-size: 1.2vw;
}
h1 > a {
text-decoration: none;
}
h1 > a:hover {
text-decoration: none;
}
@media (max-width: 1024px) {
.search-wrapper {
margin: 0 0em;
}
/* .counters {
display: flex;
flex-direction: row;
margin-bottom: 2em;
}
.counters .counter {
text-align: center;
text-decoration: none;
display: flex;
flex-direction: row;
flex: 33%;
font-size: 3vw;
color: #FFF;
}
.counters .counter .counter-sub {
text-align: center;
display: flex;
justify-content: left;
font-size: 3vw;
}*/
.result-item {
list-style-type: none;
text-align: right;
padding: 0.2em 0;
}
h1.brand-title {
font-size: 2.5rem;
}
@ -468,7 +624,29 @@ hr.thin {
}
}
@media (max-width: 764px) {
.search-wrapper {
margin: 0 2em;
}
.counters .counter {
text-decoration: none;
display: flex;
flex-direction: column;
flex: 33%;
text-align: center;
font-size: 8vw;
color: #FFF;
}
.counters .counter .counter-sub {
text-align: center;
font-size: 4vw;
}
}
@media (min-width: 48rem) {
.content {
padding: 2rem 3rem 0;
margin-left: 25%;

210
public/development/index.html

@ -14,13 +14,13 @@
<meta name="description" content="">
<meta name="keywords" content="">
<meta name="author" content="">
<meta name="generator" content="Hugo 0.18.1" />
<meta name="generator" content="Hugo 0.92.0" />
<meta property="og:title" content="Developments" />
<meta property="og:description" content="" />
<meta property="og:type" content="website" />
<meta property="og:locale" content="en_US" />
<meta property="og:url" content="https://hagfi.sh/development/" />
<meta property="og:url" content="https://blog.hagfi.sh/development/" />
@ -32,7 +32,8 @@
<link rel="stylesheet" href="https://hagfi.sh//css/redlounge.css">
<link rel="stylesheet" href="https://blog.hagfi.sh//css/redlounge.css">
<link rel="stylesheet" href="https://blog.hagfi.sh//css/prism.css">
<link href="//maxcdn.bootstrapcdn.com/font-awesome/4.5.0/css/font-awesome.min.css" rel="stylesheet">
<link href='//fonts.googleapis.com/css?family=Raleway:400,200,100,700,300,500,600,800' rel='stylesheet' type='text/css'>
<link href='//fonts.googleapis.com/css?family=Libre+Baskerville:400,700,400italic' rel='stylesheet' type='text/css'>
@ -42,49 +43,97 @@
<link rel="shortcut icon" type="image/x-icon" href="/img/favicon.png">
<link href="https://hagfi.sh/development/index.xml" rel="alternate" type="application/rss+xml" title="Hagfi.sh" />
<link href="https://blog.hagfi.sh/development/index.xml" rel="alternate" type="application/rss+xml" title="Hagfi.sh" />
<link rel="stylesheet" href="//cdnjs.cloudflare.com/ajax/libs/highlight.js/8.7/styles/tomorrow-night-bright.min.css">
<script src="//cdnjs.cloudflare.com/ajax/libs/moment.js/2.18.1/moment.js"></script>
<script src="//cdnjs.cloudflare.com/ajax/libs/vue/2.5.17/vue.min.js"></script>
<script src="//cdnjs.cloudflare.com/ajax/libs/axios/0.18.0/axios.min.js"></script>
<script src="//cdnjs.cloudflare.com/ajax/libs/fuse.js/3.2.1/fuse.min.js"></script>
<script src="//cdn.jsdelivr.net/npm/vuewordcloud@18.7.11/VueWordCloud.js"></script>
<script src="https://blog.hagfi.sh//js/prism.js"></script>
<script src="//cdnjs.cloudflare.com/ajax/libs/highlight.js/8.7/highlight.min.js"></script>
<script>hljs.initHighlightingOnLoad();</script>
<script type="application/javascript">
var doNotTrack = false;
if (!doNotTrack) {
(function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){
(i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o),
m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m)
})(window,document,'script','https://www.google-analytics.com/analytics.js','ga');
ga('create', 'UA-124890410-1', 'auto');
ga('send', 'pageview');
}
</script>
</head>
<body>
<div id="layout" class="pure-g">
<div class="sidebar pure-u-1 pure-u-md-1-4">
<div class="sidebar pure-u-1 pure-u-md-1-4" id="app">
<div class="header">
<h1 class="brand-title">Hagfi.sh</h1>
<h2 class="brand-tagline">Documentation</h2>
<h1 class="brand-title"><a href="/">Hagfi.sh</a></h1>
<h2 class="brand-tagline">A devops guide to the galaxy</h2>
<div class="counters">
<a class="counter" href="/">13
<div class="counter-sub">Documents</div>
</a>
<a class="counter" href="/tags">29
<div class="counter-sub">Tags</div>
</a>
<a class="counter" href="/categories">3
<div class="counter-sub">Categories</div>
</a>
</div>
<nav class="nav">
<ul class="nav-list">
<li class="nav-item"><span class="nav-item-separator">//</span><a href="https://hagfi.sh/">Home</a></li>
<li class="nav-item"><span class="nav-item-separator">//</span><a href="/administration">Administration</a></li>
<li class="nav-item"><span class="nav-item-separator">//</span><a href="/development">Development</a></li>
<li class="nav-item"><span class="nav-item-separator">//</span><a href="/tools">Tools</a></li>
</ul>
</nav>
<div class="search-wrapper">
<input
type="text"
placeholder="Search ..."
v-model="search"
@keydown.down.prevent="navigate(1)"
@keydown.up.prevent="navigate(-1)"
@keyup.enter.prevent="navigate(result[selected].href)"
ref="searchInput"
class="search"
/>
<svg height="100" width="100" ref="resultPoint" class="result-point">
<circle cx="5" cy="5" r="5" fill="#FFF" />
</svg>
<ul class="result-items">
<li v-for="r, i of result" class="result-item" ref="resultItem">
<div class="result-item-wrapper" :class="{ 'result-item-selected': selected === i }">
<div class="result-item-left">
<span class="post-date">
<span class="post-date-day"><sup v-text="moment(r.date).format('D')"></sup></span><span class="post-date-separator" v-text="'/'"></span><span class="post-date-month" v-text="moment(r.date).format('MMM')"></span> <span class="post-date-year" v-text="moment(r.date).format('YYYY')"></span>
</span>
<template v-if="r.author">By <a class="post-author" v-text="r.author"></a></template>
</div>
<div class="result-item-left">
<span class="result-item-separator nav-item-separator" v-text="'//'"></span><a :href="r.href" v-text="r.title" class="result-item-link"></a>
</div>
</div>
</li>
</ul>
</div>
</div>
@ -101,36 +150,131 @@
<header class="post-header">
<h1 class="post-title">
<a href="/development/vue-js/">Vue Js</a>
<a href="/development/live-search-with-hugo/">Live Search With HUGO</a>
</h1>
</header>
<p class="post-meta">
<span class="post-date">
<span class="post-date-day"><sup>23</sup></span><span class="post-date-separator">/</span><span class="post-date-month">Aug</span> <span class="post-date-year">2018</span>
<span class="post-date-day"><sup>29</sup></span><span class="post-date-separator">/</span><span class="post-date-month">Aug</span> <span class="post-date-year">2018</span>
</span>
By <a class="post-author" >Kristof Vandam</a>
<span class="post-reading-time"><i class="fa fa-clock-o"></i> <em>1 min. read</em></span>
<span class="post-reading-time"><i class="fa fa-clock-o"></i> <em>5 min. read</em></span>
<div class="post-categories">
<a class="post-category post-category-development" href="https://blog.hagfi.sh//categories/development">development</a>
</div>
</p>
<h2 id="awesomeness-about-vuejs">Awesomeness about VueJS</h2>
<article class="post-summary">
<p>HUGO is static, that&rsquo;s a fact. How can I implement a live search? Searching the internet provided me only solutions
that require a page refresh, this time of age performance is key, so that&rsquo;s why I wanted a fast and fuzzy search implementation.</p>
</article>
<div class="read-more-link">
<a href="/development/live-search-with-hugo/"><span class="read-more-slashes">//</span>Read More...</a>
</div>
</section>
</div>
<div class="footer">
<hr class="thin" />
<div class="pure-menu pure-menu-horizontal pure-menu-open">
<ul class="footer-menu">
</ul>
</div>
<p>&copy; 2022. All rights reserved.</p>
</div>
</div>
</div>
<script>
var app = new Vue({
el: '#app',
data: {
fuse: null,
search: "",
result: [],
index: [],
selected: 0
},
mounted() {
let self = this
window.addEventListener("keypress", function(e) {
self.$refs.searchInput.focus()
})
let options = {
shouldSort: true,
threshold: 0.6,
location: 0,
distance: 100,
maxPatternLength: 32,
minMatchCharLength: 1,
keys: [
"title",
"author",
"date",
"content"
]
}
axios.get('/index.json')
.then(function (response) {
self.index = response.data
self.fuse = new Fuse(response.data, options)
})
.catch(function (error) {
})
},
watch: {
result(nval, oval) {
nval.length > 0 ? this.pointer(0) : this.pointer(-1)
},
search(nval, oval) {
this.result = this.fuse.search(nval)
}
},
methods: {
navigate(val) {
switch (val) {
case 1: if (this.selected < this.result.length - 1) { this.selected++ }; break;
case -1: if (this.selected > 0 ) { this.selected-- }; break;
default: window.location.href = val; break;
}
this.pointer(this.selected)
},
pointer(selected) {
let self = this
if (selected >= 0) {
Vue.nextTick().then(function() {
let height = self.$refs.resultItem[selected].clientHeight
let top = self.$refs.resultItem[selected].getBoundingClientRect().top
let left = self.$refs.resultItem[selected].getBoundingClientRect().left
self.$refs.resultPoint.style.top = (top+height/2)+'px'
self.$refs.resultPoint.style.left = (left-20)+'px'
})
} else {
this.$refs.resultPoint.style.left = '-50px'
return
}
}
}
})
</script>
</body>
</html>

24
public/development/index.xml

@ -1,25 +1,21 @@
<?xml version="1.0" encoding="utf-8" standalone="yes" ?>
<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom">
<channel>
<title>Developments on Hagfi.sh</title>
<link>https://hagfi.sh/development/index.xml</link>
<link>https://blog.hagfi.sh/development/</link>
<description>Recent content in Developments on Hagfi.sh</description>
<generator>Hugo -- gohugo.io</generator>
<language>en-us</language>
<lastBuildDate>Thu, 23 Aug 2018 22:44:46 +0200</lastBuildDate>
<atom:link href="https://hagfi.sh/development/index.xml" rel="self" type="application/rss+xml" />
<lastBuildDate>Wed, 29 Aug 2018 22:44:46 +0200</lastBuildDate><atom:link href="https://blog.hagfi.sh/development/index.xml" rel="self" type="application/rss+xml" />
<item>
<title>Vue Js</title>
<link>https://hagfi.sh/development/vue-js/</link>
<pubDate>Thu, 23 Aug 2018 22:44:46 +0200</pubDate>
<title>Live Search With HUGO</title>
<link>https://blog.hagfi.sh/development/live-search-with-hugo/</link>
<pubDate>Wed, 29 Aug 2018 22:44:46 +0200</pubDate>
<guid>https://hagfi.sh/development/vue-js/</guid>
<description>
&lt;h2 id=&#34;awesomeness-about-vuejs&#34;&gt;Awesomeness about VueJS&lt;/h2&gt;
</description>
<guid>https://blog.hagfi.sh/development/live-search-with-hugo/</guid>
<description>&lt;p&gt;HUGO is static, that&amp;rsquo;s a fact. How can I implement a live search? Searching the internet provided me only solutions
that require a page refresh, this time of age performance is key, so that&amp;rsquo;s why I wanted a fast and fuzzy search implementation.&lt;/p&gt;</description>
</item>
</channel>
</rss>
</rss>

564
public/development/live-search-with-hugo/index.html

@ -0,0 +1,564 @@
<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en-us">
<head>
<title>
Live Search With HUGO // Hagfi.sh
</title>
<link href="http://gmpg.org/xfn/11" rel="profile">
<meta http-equiv="content-type" content="text/html; charset=utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1">
<meta name="description" content="">
<meta name="keywords" content="">
<meta name="author" content="Kristof Vandam">
<meta name="generator" content="Hugo 0.92.0" />
<meta property="og:title" content="Live Search With HUGO" />
<meta property="og:description" content="" />
<meta property="og:type" content="website" />
<meta property="og:locale" content="en_US" />
<meta property="og:url" content="https://blog.hagfi.sh/development/live-search-with-hugo/" />
<link rel="stylesheet" href="//cdnjs.cloudflare.com/ajax/libs/pure/0.5.0/base-min.css">
<link rel="stylesheet" href="//cdnjs.cloudflare.com/ajax/libs/pure/0.5.0/pure-min.css">
<link rel="stylesheet" href="//cdnjs.cloudflare.com/ajax/libs/pure/0.5.0/grids-responsive-min.css">
<link rel="stylesheet" href="https://blog.hagfi.sh//css/redlounge.css">
<link rel="stylesheet" href="https://blog.hagfi.sh//css/prism.css">
<link href="//maxcdn.bootstrapcdn.com/font-awesome/4.5.0/css/font-awesome.min.css" rel="stylesheet">
<link href='//fonts.googleapis.com/css?family=Raleway:400,200,100,700,300,500,600,800' rel='stylesheet' type='text/css'>
<link href='//fonts.googleapis.com/css?family=Libre+Baskerville:400,700,400italic' rel='stylesheet' type='text/css'>
<link rel="apple-touch-icon-precomposed" sizes="144x144" href="/touch-icon-144-precomposed.png">
<link rel="shortcut icon" type="image/x-icon" href="/img/favicon.png">
<link href="" rel="alternate" type="application/rss+xml" title="Hagfi.sh" />
<script src="//cdnjs.cloudflare.com/ajax/libs/moment.js/2.18.1/moment.js"></script>
<script src="//cdnjs.cloudflare.com/ajax/libs/vue/2.5.17/vue.min.js"></script>
<script src="//cdnjs.cloudflare.com/ajax/libs/axios/0.18.0/axios.min.js"></script>
<script src="//cdnjs.cloudflare.com/ajax/libs/fuse.js/3.2.1/fuse.min.js"></script>
<script src="//cdn.jsdelivr.net/npm/vuewordcloud@18.7.11/VueWordCloud.js"></script>
<script src="https://blog.hagfi.sh//js/prism.js"></script>
<script type="application/javascript">
var doNotTrack = false;
if (!doNotTrack) {
(function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){
(i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o),
m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m)
})(window,document,'script','https://www.google-analytics.com/analytics.js','ga');
ga('create', 'UA-124890410-1', 'auto');
ga('send', 'pageview');
}
</script>
</head>
<body>
<div id="layout" class="pure-g">
<div class="sidebar pure-u-1 pure-u-md-1-4" id="app">
<div class="header">
<h1 class="brand-title"><a href="/">Hagfi.sh</a></h1>
<h2 class="brand-tagline">A devops guide to the galaxy</h2>
<div class="counters">
<a class="counter" href="/">13
<div class="counter-sub">Documents</div>
</a>
<a class="counter" href="/tags">29
<div class="counter-sub">Tags</div>
</a>
<a class="counter" href="/categories">3
<div class="counter-sub">Categories</div>
</a>
</div>
<nav class="nav">
</nav>
<div class="search-wrapper">
<input
type="text"
placeholder="Search ..."
v-model="search"
@keydown.down.prevent="navigate(1)"
@keydown.up.prevent="navigate(-1)"
@keyup.enter.prevent="navigate(result[selected].href)"
ref="searchInput"
class="search"
/>
<svg height="100" width="100" ref="resultPoint" class="result-point">
<circle cx="5" cy="5" r="5" fill="#FFF" />
</svg>
<ul class="result-items">
<li v-for="r, i of result" class="result-item" ref="resultItem">
<div class="result-item-wrapper" :class="{ 'result-item-selected': selected === i }">
<div class="result-item-left">
<span class="post-date">
<span class="post-date-day"><sup v-text="moment(r.date).format('D')"></sup></span><span class="post-date-separator" v-text="'/'"></span><span class="post-date-month" v-text="moment(r.date).format('MMM')"></span> <span class="post-date-year" v-text="moment(r.date).format('YYYY')"></span>
</span>
<template v-if="r.author">By <a class="post-author" v-text="r.author"></a></template>
</div>
<div class="result-item-left">
<span class="result-item-separator nav-item-separator" v-text="'//'"></span><a :href="r.href" v-text="r.title" class="result-item-link"></a>
</div>
</div>
</li>
</ul>
</div>
</div>
</div>
<div class="content pure-u-1 pure-u-md-3-4">
<a name="top"></a>
<div id="toc" class="pure-u-1 pure-u-md-1-4">
<small class="toc-label">Contents</small>
<nav id="TableOfContents">
<ul>
<li><a href="#research">Research</a></li>
<li><a href="#create-a-json-object-containing-all-articles">Create a JSON object containing all articles</a></li>
<li><a href="#add-the-required-dependencies-we-use-cdns">Add the required dependencies (we use CDN&rsquo;s)</a></li>
<li><a href="#add-the-actual-search-logic">Add the actual search logic</a>
<ul>
<li><a href="#create-the-vue-instance">Create the Vue instance</a></li>
<li><a href="#create-a-data-object">Create a data object</a></li>
<li><a href="#what-todo-when-everything-is-ready">What todo when everything is ready</a></li>
<li><a href="#when-something-is-entered-inside-the-search-field">When something is entered inside the search field</a></li>
<li><a href="#ok-cool-now-how-do-i-showcase-the-results">Ok, cool, now how do I showcase the results?</a></li>
</ul>
</li>
</ul>
</nav>
</div>
<section class="post">
<h1 class="post-title">
<a href="/development/live-search-with-hugo/">Live Search With HUGO</a>
</h1>
<h3 class="post-subtitle">
</h3>
<span class="post-date">
<span class="post-date-day"><sup>29</sup></span><span class="post-date-separator">/</span><span class="post-date-month">Aug</span> <span class="post-date-year">2018</span>
</span>
<span class="post-author-single">By <a class="post-author" target="">Kristof Vandam</a></span>
<div class="post-categories">
<a class="post-category post-category-development" href="https://blog.hagfi.sh//categories/development">development</a>
</div>
<p>HUGO is static, that&rsquo;s a fact. How can I implement a live search? Searching the internet provided me only solutions
that require a page refresh, this time of age performance is key, so that&rsquo;s why I wanted a fast and fuzzy search implementation.</p>
<h2 id="research">Research</h2>
<p>Some this I found which helped to get there are:</p>
<ul>
<li><a href="https://gohugo.io/tools/search/">here</a> <em>more specific</em> <a href="https://gist.github.com/eddiewebb/735feb48f50f0ddd65ae5606a1cb41ae">here</a></li>
<li><a href="https://vuejs.org/">https://vuejs.org/</a></li>
<li><a href="http://fusejs.io/">http://fusejs.io/</a></li>
<li><a href="https://momentjs.com/">https://momentjs.com/</a></li>
<li><a href="https://github.com/axios/axios">https://github.com/axios/axios</a></li>
</ul>
<h2 id="create-a-json-object-containing-all-articles">Create a JSON object containing all articles</h2>
<p>Actually every data you want to search, in this guide (and on this website) I use the following data:</p>
<ol>
<li>Title</li>
<li>Date</li>
<li>Author</li>
<li>Tags</li>
<li>Content</li>
</ol>
<p>This is specified in a custom <em>layout</em>. Note the <code>(dict &quot;title&quot; ...)</code> line. You can add any data that HUGO processes (for each article). Its a list of key/values, the keys are presented between the quotes, the value as first value.</p>
<p><strong>layouts/json/single.html</strong></p>
<pre tabindex="0"><code class="language-.language-none.line-numbers" data-lang=".language-none.line-numbers">{{- $.Scratch.Add &quot;index&quot; slice -}}
{{- range where .Site.Pages &quot;Type&quot; &quot;not in&quot; (slice &quot;page&quot; &quot;json&quot;) -}}
{{- $.Scratch.Add &quot;index&quot; (dict &quot;title&quot; .Title &quot;date&quot; .Date &quot;author&quot; .Params.author &quot;href&quot; .Permalink &quot;tags&quot; .Params.tags &quot;content&quot; .Plain) -}}
{{- end -}}
{{- $.Scratch.Get &quot;index&quot; | jsonify -}}
</code></pre><p>Now, with this file in place the next thing to do is to create a content page, where this layout is used. This file triggers the creation of &ldquo;index.json&rdquo;.</p>
<p><strong>content/search.md</strong></p>
<pre tabindex="0"><code class="language-.language-yaml.line-numbers" data-lang=".language-yaml.line-numbers">---
date: &quot;2017-03-05T21:10:52+01:00&quot;
type: &quot;json&quot;
url: &quot;index.json&quot;
---
</code></pre><p><strong>Example of the data returned</strong>
<em>You can checkout the json object for this website, just go to</em> <a href="https://hagfi.sh/index.json">https://hagfi.sh/index.json</a></p>
<pre tabindex="0"><code class="language-.language-json.line-numbers" data-lang=".language-json.line-numbers">[
{
&quot;author&quot;: &quot;Kristof Vandam&quot;,
&quot;content&quot;: &quot;HUGO is static, that\u0026rsquo;s a fact. How can I implement a live search? Searching the internet provided me only solutions that require a page refresh, this time of age performance is key, so that\u0026rsquo;s why I wanted a fast and fuzzy search implementation. Research Some this I found which helped to get there are:\n https://gohugo.io/tools/search/ &quot;,
&quot;date&quot;: &quot;2018-08-29T22:44:46+02:00&quot;,
&quot;href&quot;: &quot;http://localhost:1313/development/live-search-with-hugo/&quot;,
&quot;tags&quot;: null,
&quot;title&quot;: &quot;Live Search With HUGO&quot;
}
]
</code></pre><h2 id="add-the-required-dependencies-we-use-cdns">Add the required dependencies (we use CDN&rsquo;s)</h2>
<p>Make sure the following dependencies are loaded between the head tags. We use a little trick to let the browser decide if http or https is used. These are called <em>Protocol-Relative URL&rsquo;s</em>.</p>
<pre tabindex="0"><code class="language-.language-markup.line-numbers" data-lang=".language-markup.line-numbers">&lt;script src=&quot;//cdnjs.cloudflare.com/ajax/libs/moment.js/2.18.1/moment.js&quot;&gt;&lt;/script&gt;
&lt;script src=&quot;//cdnjs.cloudflare.com/ajax/libs/vue/2.5.17/vue.min.js&quot;&gt;&lt;/script&gt;
&lt;script src=&quot;//cdnjs.cloudflare.com/ajax/libs/axios/0.18.0/axios.min.js&quot;&gt;&lt;/script&gt;
&lt;script src=&quot;//cdn.bootcss.com/fuse.js/3.2.0/fuse.min.js&quot;&gt;&lt;/script&gt;
</code></pre><h2 id="add-the-actual-search-logic">Add the actual search logic</h2>
<p>It&rsquo;s a best practice to add the JavaScript right before the closing body tags. I highly suggest checking out VueJS with Webpack, but in this case a some simple JS inside script tags will do just fine.</p>
<p>I will go over each section to clarify.</p>
<pre tabindex="0"><code class="language-.language-javascript.line-numbers" data-lang=".language-javascript.line-numbers">var app = new Vue({
el: '#app',
data: {
fuse: null,
search: &quot;&quot;,
result: [],
index: []
},
mounted() {
let self = this
let options = {
shouldSort: true,
threshold: 0.6,
location: 0,
distance: 100,
maxPatternLength: 32,
minMatchCharLength: 1,
keys: [
&quot;title&quot;,
&quot;author&quot;,
&quot;date&quot;,
&quot;content&quot;
]
}
axios.get('/index.json')
.then(function (response) {
self.index = response.data
self.fuse = new Fuse(response.data, options);
self.result = fuse.search(&quot;&quot;);
})
.catch(function (error) {
console.log(error)
})
},
watch: {
search(nval, oval) {
if (nval.length &gt; 0) {
this.result = this.fuse.search(nval)
} else {
this.result = []
}
}
}
})
</code></pre><h3 id="create-the-vue-instance">Create the Vue instance</h3>
<p>When creating a new Vue instance we assign Vue to a DOM element, most of the time an ID on your body tag is used.</p>
<pre tabindex="0"><code class="language-.language-javascript.line-numbers" data-lang=".language-javascript.line-numbers">var app = new Vue({
el: '#app',
...
})
</code></pre><h3 id="create-a-data-object">Create a data object</h3>
<p>This object is accesible across your DOM and Vue instance. Inside functions you can reffer to these with <code>this.*</code>.language-<br>
I initiated some variables like &lsquo;fuse&rsquo; so it can be used inside <em>watch</em> and <em>methods</em>.</p>
<pre tabindex="0"><code class="language-.language-javascript.line-numbers" data-lang=".language-javascript.line-numbers">data: {
fuse: null,
search: &quot;&quot;,
result: [],
index: []
},
</code></pre><h3 id="what-todo-when-everything-is-ready">What todo when everything is ready</h3>
<p>The <code>mounted()</code> function is triggered when everything ready to start processing your custom code. <em>(This function used to name &lsquo;ready()')</em>.<br>
We assign <code>this</code> to <code>self</code> to handle some scope issues in the axios promise.<br>
We polulate some options for FuseJS, note that the keys array is important here. Here we specify which keys of our index.json we want to search.<br>
The index.json file is loaded with AJAX, this way the page should not wait for content that is not required immediately.<br>
When axios retrieves the date we create a Fuse instance (assigned to <code>self.fuse</code> (or <code>this.fuse</code>)).</p>
<pre tabindex="0"><code class="language-.language-javascript.line-numbers" data-lang=".language-javascript.line-numbers">mounted() {
let self = this
let options = {
shouldSort: true,
threshold: 0.6,
location: 0,
distance: 100,
maxPatternLength: 32,
minMatchCharLength: 1,
keys: [
&quot;title&quot;,
&quot;author&quot;,
&quot;date&quot;,
&quot;content&quot;
]
}
axios.get('/index.json')
.then(function (response) {
self.index = response.data
self.fuse = new Fuse(response.data, options);
self.result = fuse.search(&quot;&quot;);
})
.catch(function (error) {
console.log(error)
})
},
</code></pre><h3 id="when-something-is-entered-inside-the-search-field">When something is entered inside the search field</h3>
<p>We watch for <code>this.search</code> to change, if it changes this function is called. Remember we set <code>search: &quot;&quot;</code> inside our data object?
If the &lsquo;nval&rsquo; (New VALue) is larger than 0 characters we trigger the search function of fuse, which will return a new data set, but filtered.
This dataset is stored inside <code>this.result</code>.language-</p>
<p>If the length of &lsquo;nval&rsquo; changes to 0 characters we hardcode the result to be an empty array (to prevent possible edgecases).</p>
<pre tabindex="0"><code class="language-.language-javascript.line-numbers" data-lang=".language-javascript.line-numbers">watch: {
search(nval, oval) {
if (nval.length &gt; 0) {
this.result = this.fuse.search(nval)
} else {
this.result = []
}
}
}
</code></pre><h3 id="ok-cool-now-how-do-i-showcase-the-results">Ok, cool, now how do I showcase the results?</h3>
<p>Well, it&rsquo;s up to you. The most important parts in this example are:</p>
<ol>
<li>Bind <code>this.search</code> to the input field (with <code>v-model</code>)</li>
<li>Loop through <code>this.result</code> with <code>v-for</code>, it will recreate the li tag &lsquo;for each&rsquo; result item.</li>
<li>Use the result item, reffered as <code>r</code>.</li>
<li>Links are extracted from the result item by the &lsquo;href&rsquo; key and bound to the href attribute. <code>:href=&quot;r.href&quot;</code></li>
</ol>
<p>We use Moment.js to format the default (can be changed) HUGO date format to &lsquo;D&rsquo; (Day), &lsquo;MMM&rsquo; (Month, max 3 characters), &lsquo;YYYY&rsquo; (Full Year).</p>
<pre tabindex="0"><code class="language-.language-markup.line-numbers" data-lang=".language-markup.line-numbers">&lt;div class=&quot;search-wrapper&quot;&gt;
&lt;input type=&quot;text&quot; placeholder=&quot;Search ...&quot; v-model=&quot;search&quot; class=&quot;search&quot;/&gt;
&lt;ul class=&quot;result-items&quot;&gt;
&lt;li v-for=&quot;r of result&quot; class=&quot;result-item&quot;&gt;
&lt;div class=&quot;result-item-wrapper&quot;&gt;
&lt;div class=&quot;result-item-left&quot;&gt;
&lt;span class=&quot;post-date&quot;&gt;
&lt;span class=&quot;post-date-day&quot;&gt;&lt;sup v-text=&quot;moment(r.date).format('D')&quot;&gt;&lt;/sup&gt;&lt;/span&gt;&lt;span class=&quot;post-date-separator&quot;&gt;/&lt;/span&gt;&lt;span class=&quot;post-date-month&quot; v-text=&quot;moment(r.date).format('MMM')&quot;&gt;&lt;/span&gt; &lt;span class=&quot;post-date-year&quot; v-text=&quot;moment(r.date).format('YYYY')&quot;&gt;&lt;/span&gt;
&lt;/span&gt;
&lt;template v-if=&quot;r.author&quot;&gt;By &lt;a class=&quot;post-author&quot; v-text=&quot;r.author&quot;&gt;&lt;/a&gt;&lt;/template&gt;
&lt;/div&gt;
&lt;div class=&quot;result-item-left&quot;&gt;
&lt;span class=&quot;nav-item-separator&quot;&gt;//&lt;/span&gt;&lt;a :href=&quot;r.href&quot; v-text=&quot;r.title&quot;&gt;&lt;/a&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;/div&gt;
</code></pre>
<div class="tags-list">
<span class="dark-red">Tags</span><span class="decorative-marker">//</span>
<a class="post-tag post-tag-vue" href="https://blog.hagfi.sh//tags/vue">vue</a>,
<a class="post-tag post-tag-vuejs" href="https://blog.hagfi.sh//tags/vuejs">vuejs</a>,
<a class="post-tag post-tag-prism" href="https://blog.hagfi.sh//tags/prism">prism</a>,
<a class="post-tag post-tag-prismjs" href="https://blog.hagfi.sh//tags/prismjs">prismjs</a>,
<a class="post-tag post-tag-hugo" href="https://blog.hagfi.sh//tags/hugo">hugo</a>,
<a class="post-tag post-tag-javascript" href="https://blog.hagfi.sh//tags/javascript">javascript</a>,
<a class="post-tag post-tag-js" href="https://blog.hagfi.sh//tags/js">js</a>,
<a class="post-tag post-tag-json" href="https://blog.hagfi.sh//tags/json">json</a>,
</div>
<div class="paging">
<span class="paging-label">More Reading</span>
<div class="paging-newer">
<span class="dark-red">Newer</span><span class="decorative-marker">//</span>
<a class="paging-link" href="/administration/letsencrypt/">Let&#39;s Encrypt</a>
</div>
<div class="paging-older">
<span class="dark-red">Older</span><span class="decorative-marker">//</span>
<a class="paging-link" href="/tools/ncdu/">NCDU: NCurses Disk Usage</a>
</div>
</div>
</section>
<div id="disqus_thread"></div>
<script type="application/javascript">
var disqus_config = function () {
};
(function() {
if (["localhost", "127.0.0.1"].indexOf(window.location.hostname) != -1) {
document.getElementById('disqus_thread').innerHTML = 'Disqus comments not available by default when the website is previewed locally.';
return;
}
var d = document, s = d.createElement('script'); s.async = true;
s.src = '//' + "hagfish" + '.disqus.com/embed.js';
s.setAttribute('data-timestamp', +new Date());
(d.head || d.body).appendChild(s);
})();
</script>
<noscript>Please enable JavaScript to view the <a href="https://disqus.com/?ref_noscript">comments powered by Disqus.</a></noscript>
<a href="https://disqus.com" class="dsq-brlink">comments powered by <span class="logo-disqus">Disqus</span></a>
<div class="footer">
<hr class="thin" />
<div class="pure-menu pure-menu-horizontal pure-menu-open">
<ul class="footer-menu">
</ul>
</div>
<p>&copy; 2022. All rights reserved.</p>
</div>
</div>
</div>
<script>
var app = new Vue({
el: '#app',
data: {
fuse: null,
search: "",
result: [],
index: [],
selected: 0
},
mounted() {
let self = this
window.addEventListener("keypress", function(e) {
self.$refs.searchInput.focus()
})
let options = {
shouldSort: true,
threshold: 0.6,
location: 0,
distance: 100,
maxPatternLength: 32,
minMatchCharLength: 1,
keys: [
"title",
"author",
"date",
"content"
]
}
axios.get('/index.json')
.then(function (response) {
self.index = response.data
self.fuse = new Fuse(response.data, options)
})
.catch(function (error) {
})
},
watch: {
result(nval, oval) {
nval.length > 0 ? this.pointer(0) : this.pointer(-1)
},
search(nval, oval) {
this.result = this.fuse.search(nval)
}
},
methods: {
navigate(val) {
switch (val) {
case 1: if (this.selected < this.result.length - 1) { this.selected++ }; break;
case -1: if (this.selected > 0 ) { this.selected-- }; break;
default: window.location.href = val; break;
}
this.pointer(this.selected)
},
pointer(selected) {
let self = this
if (selected >= 0) {
Vue.nextTick().then(function() {
let height = self.$refs.resultItem[selected].clientHeight
let top = self.$refs.resultItem[selected].getBoundingClientRect().top
let left = self.$refs.resultItem[selected].getBoundingClientRect().left
self.$refs.resultPoint.style.top = (top+height/2)+'px'
self.$refs.resultPoint.style.left = (left-20)+'px'
})
} else {
this.$refs.resultPoint.style.left = '-50px'
return
}
}
}
})
</script>
</body>
</html>

295
public/index.html

@ -14,13 +14,13 @@
<meta name="description" content="">
<meta name="keywords" content="">
<meta name="author" content="">
<meta name="generator" content="Hugo 0.18.1" />
<meta name="generator" content="Hugo 0.92.0" />
<meta property="og:title" content="Hagfi.sh" />
<meta property="og:description" content="" />
<meta property="og:type" content="website" />
<meta property="og:locale" content="en_US" />
<meta property="og:url" content="https://hagfi.sh/" />
<meta property="og:url" content="https://blog.hagfi.sh/" />
@ -32,7 +32,8 @@
<link rel="stylesheet" href="https://hagfi.sh//css/redlounge.css">
<link rel="stylesheet" href="https://blog.hagfi.sh//css/redlounge.css">
<link rel="stylesheet" href="https://blog.hagfi.sh//css/prism.css">
<link href="//maxcdn.bootstrapcdn.com/font-awesome/4.5.0/css/font-awesome.min.css" rel="stylesheet">
<link href='//fonts.googleapis.com/css?family=Raleway:400,200,100,700,300,500,600,800' rel='stylesheet' type='text/css'>
<link href='//fonts.googleapis.com/css?family=Libre+Baskerville:400,700,400italic' rel='stylesheet' type='text/css'>
@ -42,49 +43,97 @@
<link rel="shortcut icon" type="image/x-icon" href="/img/favicon.png">
<link href="https://hagfi.sh/index.xml" rel="alternate" type="application/rss+xml" title="Hagfi.sh" />
<link href="https://blog.hagfi.sh/index.xml" rel="alternate" type="application/rss+xml" title="Hagfi.sh" />
<link rel="stylesheet" href="//cdnjs.cloudflare.com/ajax/libs/highlight.js/8.7/styles/tomorrow-night-bright.min.css">
<script src="//cdnjs.cloudflare.com/ajax/libs/moment.js/2.18.1/moment.js"></script>
<script src="//cdnjs.cloudflare.com/ajax/libs/vue/2.5.17/vue.min.js"></script>
<script src="//cdnjs.cloudflare.com/ajax/libs/axios/0.18.0/axios.min.js"></script>
<script src="//cdnjs.cloudflare.com/ajax/libs/fuse.js/3.2.1/fuse.min.js"></script>
<script src="//cdn.jsdelivr.net/npm/vuewordcloud@18.7.11/VueWordCloud.js"></script>
<script src="https://blog.hagfi.sh//js/prism.js"></script>
<script src="//cdnjs.cloudflare.com/ajax/libs/highlight.js/8.7/highlight.min.js"></script>
<script>hljs.initHighlightingOnLoad();</script>
<script type="application/javascript">
var doNotTrack = false;
if (!doNotTrack) {
(function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){
(i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o),
m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m)
})(window,document,'script','https://www.google-analytics.com/analytics.js','ga');
ga('create', 'UA-124890410-1', 'auto');
ga('send', 'pageview');
}
</script>
</head>
<body>
<div id="layout" class="pure-g">
<div class="sidebar pure-u-1 pure-u-md-1-4">
<div class="sidebar pure-u-1 pure-u-md-1-4" id="app">
<div class="header">
<h1 class="brand-title">Hagfi.sh</h1>
<h2 class="brand-tagline">Documentation</h2>
<h1 class="brand-title"><a href="/">Hagfi.sh</a></h1>
<h2 class="brand-tagline">A devops guide to the galaxy</h2>
<div class="counters">
<a class="counter" href="/">13
<div class="counter-sub">Documents</div>
</a>
<a class="counter" href="/tags">29
<div class="counter-sub">Tags</div>
</a>
<a class="counter" href="/categories">3
<div class="counter-sub">Categories</div>
</a>
</div>
<nav class="nav">
<ul class="nav-list">
<li class="nav-item"><span class="nav-item-separator">//</span><a href="https://hagfi.sh/">Home</a></li>
<li class="nav-item"><span class="nav-item-separator">//</span><a href="/administration">Administration</a></li>
<li class="nav-item"><span class="nav-item-separator">//</span><a href="/development">Development</a></li>
<li class="nav-item"><span class="nav-item-separator">//</span><a href="/tools">Tools</a></li>
</ul>
</nav>
<div class="search-wrapper">
<input
type="text"
placeholder="Search ..."
v-model="search"
@keydown.down.prevent="navigate(1)"
@keydown.up.prevent="navigate(-1)"
@keyup.enter.prevent="navigate(result[selected].href)"
ref="searchInput"
class="search"
/>
<svg height="100" width="100" ref="resultPoint" class="result-point">
<circle cx="5" cy="5" r="5" fill="#FFF" />
</svg>
<ul class="result-items">
<li v-for="r, i of result" class="result-item" ref="resultItem">
<div class="result-item-wrapper" :class="{ 'result-item-selected': selected === i }">
<div class="result-item-left">
<span class="post-date">
<span class="post-date-day"><sup v-text="moment(r.date).format('D')"></sup></span><span class="post-date-separator" v-text="'/'"></span><span class="post-date-month" v-text="moment(r.date).format('MMM')"></span> <span class="post-date-year" v-text="moment(r.date).format('YYYY')"></span>
</span>
<template v-if="r.author">By <a class="post-author" v-text="r.author"></a></template>
</div>
<div class="result-item-left">
<span class="result-item-separator nav-item-separator" v-text="'//'"></span><a :href="r.href" v-text="r.title" class="result-item-link"></a>
</div>
</div>
</li>
</ul>
</div>
</div>
@ -102,62 +151,25 @@
<header class="post-header">
<h1 class="post-title">
<a href="/administration/letsencrypt/">Let&#39;s Encrypt</a>
</h1>
</header>
<p class="post-meta">
<span class="post-date">
<span class="post-date-day"><sup>25</sup></span><span class="post-date-separator">/</span><span class="post-date-month">Aug</span> <span class="post-date-year">2018</span>
</span>
<span class="post-reading-time"><i class="fa fa-clock-o"></i> <em>2 min. read</em></span>
</p>
<article class="post-summary">
Let&rsquo;s Encrypt: Aanmaken / vernieuwen certificaat: /opt/letsencrypt/letsencrypt-auto certonly --expand ---email support@nucleus.be --agree-tos --webroot -w /var/www/vhosts/WEB/ROOT -d domain.tld -d domainalias.tld --dry-run /bin/certbot --text --agree-tos --non-interactive certonly -a webroot --webroot-path /var/www/vhosts/WEB/ROOT -d domain.tld -d domainalias.tld --dry-run --dry-run om het aanmaken te testen.
Apache / httpd (1) Voeg volgende regels toe aan de apache config: Alias /.well-known /var/www/vhosts/letsencrypt/.well-known &lt;Directory /var/www/vhosts/letsencrypt/.well-known&gt; order allow,deny allow from all satisfy any &lt;/Directory&gt; Of (2) voeg volgende regels toe aan .
</article>
<div class="read-more-link">
<a href="/administration/letsencrypt/"><span class="read-more-slashes">//</span>Read More...</a>
</div>
</section>
<section class="post">
<header class="post-header">
<h1 class="post-title">
<a href="/administration/mysql_tuner/">MySQL Tuner</a>
<a href="/administration/">Administrations</a>
</h1>
</header>
<p class="post-meta">
<span class="post-date">
<span class="post-date-day"><sup>25</sup></span><span class="post-date-separator">/</span><span class="post-date-month">Aug</span> <span class="post-date-year">2018</span>
<span class="post-date-day"><sup>30</sup></span><span class="post-date-separator">/</span><span class="post-date-month">Nov</span> <span class="post-date-year">2018</span>
</span>
<span class="post-reading-time"><i class="fa fa-clock-o"></i> <em>3 min. read</em></span>
<span class="post-reading-time"><i class="fa fa-clock-o"></i> <em>0 min. read</em></span>
</p>
<article class="post-summary">
MySQL Tuner WAARDE ACTIE query_cache_size AFBLIJVEN table_cache AFBLIJVEN (maximumwaarde = 64) table_open_cache AFBLIJVEN join_buffer_size Verhogen indien Joins performed without indexes++ tmp_table_size Verhogen = max_heap_table_size max_heap_table_size Verhogen = tmp_table_size query_cache_type =1 indien =0 mysql tuning improvements table_cache NOOIT hoger dan 64 Sudo vim /etc/my.cnf query_cache_size&rsquo; =&gt; &lsquo;256M’, It caches the select query along with the result set, which enables the identical selects to execute faster as the data fetches from the in memory.
</article>
<div class="read-more-link">
<a href="/administration/mysql_tuner/"><span class="read-more-slashes">//</span>Read More...</a>
</div>
</section>
@ -165,36 +177,25 @@ Apache / httpd (1) Voeg volgende regels toe aan de apache config: Alias /.well
<header class="post-header">
<h1 class="post-title">
<a href="/administration/windows_troubleshooting/">Windows troubleshooting</a>
<a href="/tools/">Tools</a>
</h1>
</header>
<p class="post-meta">
<span class="post-date">
<span class="post-date-day"><sup>25</sup></span><span class="post-date-separator">/</span><span class="post-date-month">Aug</span> <span class="post-date-year">2018</span>
<span class="post-date-day"><sup>5</sup></span><span class="post-date-separator">/</span><span class="post-date-month">Nov</span> <span class="post-date-year">2018</span>
</span>
<span class="post-reading-time"><i class="fa fa-clock-o"></i> <em>2 min. read</em></span>
<span class="post-reading-time"><i class="fa fa-clock-o"></i> <em>0 min. read</em></span>
</p>
<article class="post-summary">
Windows troubleshooting VRAGEN: + openen vanuit ticketing, wachtwoord en gebruiker + custom even viewer view? + test server?
EventViewer run: eventvwr
custom views windows application (non windows standard, puppet, vmware, mssql, &hellip;) security, aan en afmelden set-up: updates en installatie verwijderen programma&rsquo;s system: OS meldingen application and services: diep graven &ndash;&gt; Filter Log:
logged (date range)
event level
event source
event ID: 99,-1024,-4634
</article>
<div class="read-more-link">
<a href="/administration/windows_troubleshooting/"><span class="read-more-slashes">//</span>Read More...</a>
</div>
</section>
@ -202,28 +203,25 @@ EventViewer run: eventvwr
<header class="post-header">
<h1 class="post-title">
<a href="/administration/dont-let-your-application-interfere-with-letsencrypt/">Dont Let Your Application Interfere With Letsencrypt</a>
<a href="/development/">Developments</a>
</h1>
</header>
<p class="post-meta">
<span class="post-date">
<span class="post-date-day"><sup>23</sup></span><span class="post-date-separator">/</span><span class="post-date-month">Aug</span> <span class="post-date-year">2018</span>
<span class="post-date-day"><sup>29</sup></span><span class="post-date-separator">/</span><span class="post-date-month">Aug</span> <span class="post-date-year">2018</span>
</span>
<span class="post-reading-time"><i class="fa fa-clock-o"></i> <em>1 min. read</em></span>
<span class="post-reading-time"><i class="fa fa-clock-o"></i> <em>0 min. read</em></span>
</p>
<h2 id="tips-and-tricks-to-keep-letsencrypt-working">Tips and tricks to keep letsencrypt working</h2>
</section>
@ -231,67 +229,118 @@ EventViewer run: eventvwr
<header class="post-header">
<h1 class="post-title">
<a href="/development/vue-js/">Vue Js</a>
<a href="/index.json"></a>
</h1>
</header>
<p class="post-meta">
<span class="post-date">
<span class="post-date-day"><sup>23</sup></span><span class="post-date-separator">/</span><span class="post-date-month">Aug</span> <span class="post-date-year">2018</span>
<span class="post-date-day"><sup>5</sup></span><span class="post-date-separator">/</span><span class="post-date-month">Mar</span> <span class="post-date-year">2017</span>
</span>
<span class="post-reading-time"><i class="fa fa-clock-o"></i> <em>1 min. read</em></span>
<span class="post-reading-time"><i class="fa fa-clock-o"></i> <em>0 min. read</em></span>
</p>
<h2 id="awesomeness-about-vuejs">Awesomeness about VueJS</h2>
</section>
<section class="post">
<header class="post-header">
<h1 class="post-title">
<a href="/administration/luks-encryption/">Luks Encryption</a>
</h1>
</header>
<p class="post-meta">
<span class="post-date">
<span class="post-date-day"><sup>23</sup></span><span class="post-date-separator">/</span><span class="post-date-month">Aug</span> <span class="post-date-year">2018</span>
</span>
By <a class="post-author" >Kristof Vandam</a>
<span class="post-reading-time"><i class="fa fa-clock-o"></i> <em>1 min. read</em></span>
</p>
<article class="post-summary">
Add a new disk (LVM) root@server:/dev/centos # for i in /sys/class/scsi_host/host*; do echo &quot;- - -&quot; &gt; $i/scan; done root@server:/dev/centos # NEWDISK=$(dmesg|tail|grep 'Attached'|awk '{print $4}'|tail -n1|cut -d &quot;[&quot; -f2|cut -d &quot;]&quot; -f1) root@server:/dev/centos # VGROUP=$(vgdisplay|grep Name|head -n1|awk '{print $3}') root@server:/dev/centos # echo ${NEWDISK} sdd root@server:/dev/centos # echo ${VGROUP} centos root@server:/dev/centos # pvcreate /dev/${NEWDISK} Physical volume &quot;/dev/sdd&quot; successfully created. root@server:/dev/centos # vgextend ${VGROUP} /dev/${NEWDISK} Volume group &quot;centos&quot; successfully extended Create a logical volume (LVM) root@server:/dev/centos # lvcreate -L 15G -n encrypted centos Logical volume &quot;encrypted&quot; created.
</article>
<div class="read-more-link">
<a href="/administration/luks-encryption/"><span class="read-more-slashes">//</span>Read More...</a>
</div>
</section>
</div>
<div class="footer">
<hr class="thin" />
<div class="pure-menu pure-menu-horizontal pure-menu-open">
<ul class="footer-menu">
</ul>
</div>
<p>&copy; 2022. All rights reserved.</p>
</div>
</div>
</div>
<script>
var app = new Vue({
el: '#app',
data: {
fuse: null,
search: "",
result: [],
index: [],
selected: 0
},
mounted() {
let self = this
window.addEventListener("keypress", function(e) {
self.$refs.searchInput.focus()
})
let options = {
shouldSort: true,
threshold: 0.6,
location: 0,
distance: 100,
maxPatternLength: 32,
minMatchCharLength: 1,
keys: [
"title",
"author",
"date",
"content"
]
}
axios.get('/index.json')
.then(function (response) {
self.index = response.data
self.fuse = new Fuse(response.data, options)
})
.catch(function (error) {
})
},
watch: {
result(nval, oval) {
nval.length > 0 ? this.pointer(0) : this.pointer(-1)
},
search(nval, oval) {
this.result = this.fuse.search(nval)
}
},
methods: {
navigate(val) {
switch (val) {
case 1: if (this.selected < this.result.length - 1) { this.selected++ }; break;
case -1: if (this.selected > 0 ) { this.selected-- }; break;
default: window.location.href = val; break;
}
this.pointer(this.selected)
},
pointer(selected) {
let self = this
if (selected >= 0) {
Vue.nextTick().then(function() {
let height = self.$refs.resultItem[selected].clientHeight
let top = self.$refs.resultItem[selected].getBoundingClientRect().top
let left = self.$refs.resultItem[selected].getBoundingClientRect().left
self.$refs.resultPoint.style.top = (top+height/2)+'px'
self.$refs.resultPoint.style.left = (left-20)+'px'
})
} else {
this.$refs.resultPoint.style.left = '-50px'
return
}
}
}
})
</script>
</body>
</html>

1
public/index.json

File diff suppressed because one or more lines are too long

558
public/index.xml

@ -1,495 +1,133 @@
<?xml version="1.0" encoding="utf-8" standalone="yes" ?>
<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom">
<channel>
<title>Hagfi.sh</title>
<link>https://hagfi.sh/index.xml</link>
<link>https://blog.hagfi.sh/</link>
<description>Recent content on Hagfi.sh</description>
<generator>Hugo -- gohugo.io</generator>
<language>en-us</language>
<lastBuildDate>Sat, 25 Aug 2018 22:08:15 +0200</lastBuildDate>
<atom:link href="https://hagfi.sh/index.xml" rel="self" type="application/rss+xml" />
<lastBuildDate>Fri, 30 Nov 2018 10:08:22 +0200</lastBuildDate><atom:link href="https://blog.hagfi.sh/index.xml" rel="self" type="application/rss+xml" />
<item>
<title>Yet Another Arch Guide</title>
<link>https://blog.hagfi.sh/administration/yet-another-arch-guide/</link>
<pubDate>Fri, 30 Nov 2018 10:08:22 +0200</pubDate>
<guid>https://blog.hagfi.sh/administration/yet-another-arch-guide/</guid>
<description>&lt;p&gt;Setting up Arch with other bells and whistles.&lt;/p&gt;</description>
</item>
<item>
<title>Let&#39;s Encrypt</title>
<link>https://hagfi.sh/administration/letsencrypt/</link>
<pubDate>Sat, 25 Aug 2018 22:08:15 +0200</pubDate>
<title>Bash Tips &amp; Tricks</title>
<link>https://blog.hagfi.sh/administration/bash/</link>
<pubDate>Sun, 11 Nov 2018 16:01:15 +0100</pubDate>
<guid>https://hagfi.sh/administration/letsencrypt/</guid>
<description>
&lt;h2 id=&#34;let-s-encrypt&#34;&gt;Let&amp;rsquo;s Encrypt:&lt;/h2&gt;
&lt;ul&gt;
&lt;li&gt;Aanmaken / vernieuwen certificaat:&lt;/li&gt;
&lt;/ul&gt;
&lt;pre&gt;&lt;code&gt;/opt/letsencrypt/letsencrypt-auto certonly
--expand
---email support@nucleus.be
--agree-tos
--webroot
-w /var/www/vhosts/WEB/ROOT
-d domain.tld
-d domainalias.tld
--dry-run
&lt;/code&gt;&lt;/pre&gt;
&lt;pre&gt;&lt;code&gt;/bin/certbot
--text
--agree-tos
--non-interactive
certonly
-a webroot
--webroot-path /var/www/vhosts/WEB/ROOT
-d domain.tld
-d domainalias.tld
--dry-run
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;&lt;code&gt;--dry-run&lt;/code&gt; om het aanmaken te testen.&lt;/p&gt;
&lt;h3 id=&#34;apache-httpd&#34;&gt;Apache / httpd&lt;/h3&gt;
&lt;ul&gt;
&lt;li&gt;(1) Voeg volgende regels toe aan de apache config:&lt;/li&gt;
&lt;/ul&gt;
&lt;pre&gt;&lt;code&gt;Alias /.well-known /var/www/vhosts/letsencrypt/.well-known
&amp;lt;Directory /var/www/vhosts/letsencrypt/.well-known&amp;gt;
order allow,deny
allow from all
satisfy any
&amp;lt;/Directory&amp;gt;
&lt;/code&gt;&lt;/pre&gt;
&lt;ul&gt;
&lt;li&gt;Of (2) voeg volgende regels toe aan .htaccess:&lt;/li&gt;
&lt;/ul&gt;
&lt;pre&gt;&lt;code&gt;&amp;lt;IfModule mod_rewrite.c&amp;gt;
RewriteEngine on
#Allow Let&#39;s Encrypt SSL renewal
RewriteRule ^.well-known/ - [L,NC]
RewriteCond %{REQUEST_URI} !^/.well-known/acme-challenge/
RewriteRule ^/?(.*) https://%{SERVER_NAME}/$1 [R=301,L]
&lt;/code&gt;&lt;/pre&gt;
&lt;ul&gt;
&lt;li&gt;Combineer Basic Auth met Let&amp;rsquo;s Encrypt:&lt;br /&gt;
&lt;em&gt;Dit moet je bekijken ale een if/else. (Ofwel valid-user ofwel REQUEST_URI)&lt;/em&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;pre&gt;&lt;code&gt; &amp;lt;Directory /var/www/vhosts/WEB/ROOT&amp;gt;
AuthType Basic
AuthName protected
AuthUserFile /etc/httpd/passwd/phpmyadmin.htpasswd
require valid-user
Require expr %{REQUEST_URI} =~ m#^/.well-known/acme-challenge/.*#
&amp;lt;/Directory&amp;gt;
&lt;/code&gt;&lt;/pre&gt;
&lt;h3 id=&#34;nginx&#34;&gt;Nginx&lt;/h3&gt;
&lt;ul&gt;
&lt;li&gt;Voeg volgende regels toe aan Nginx&lt;/li&gt;
&lt;/ul&gt;
&lt;pre&gt;&lt;code&gt; location /.well-known {
root /var/www/vhosts/WEB/ROOT;
index index.html index.htm index.php;
}
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;-&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Controleer DNS lijst domeinen:&lt;/li&gt;
&lt;/ul&gt;
&lt;pre&gt;&lt;code&gt;while read LINE;
do
echo $LINE &amp;gt;&amp;gt; list_processed.txt &amp;amp;&amp;amp; dig +short @9.9.9.9 $LINE &amp;gt;&amp;gt; list_processed.txt;
done &amp;lt; list.txt
&lt;/code&gt;&lt;/pre&gt;
&lt;ul&gt;
&lt;li&gt;(WIP)
&lt;br /&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;pre&gt;&lt;code&gt;#!/bin/bash
#IP=&amp;lt;%= @default_ipadress %&amp;gt;
IP=$(dig +short @9.9.9.9 $(hostname))
FILE=$1
while read LINE
do
CHK=$(dig +short @9.9.9.9 $LINE)
if $IP -eq $CHK
echo &amp;quot;$LINE|$CHK&amp;quot; &amp;gt;&amp;gt; /tmp/le-ok
elif
echo &amp;quot;$LINE|$CHK&amp;quot; &amp;gt;&amp;gt; /tmp/le-nok
fi
done &amp;lt; $FILE
echo &amp;quot;Domains OK:&amp;quot;
echo /tmp/le-ok | column
echo &amp;quot;-------------------------------&amp;quot;
echo &amp;quot;Domains NOT OK:&amp;quot;
echo /tmp/le-nok | column
rm -rf /tmp/le-ok
rm -rf /tmp/le-nok
&lt;/code&gt;&lt;/pre&gt;
</description>
<guid>https://blog.hagfi.sh/administration/bash/</guid>
<description>&lt;p&gt;Usefull bash tips &amp;amp; tricks&lt;/p&gt;</description>
</item>
<item>
<title>MySQL Tuner</title>
<link>https://hagfi.sh/administration/mysql_tuner/</link>
<pubDate>Sat, 25 Aug 2018 22:08:15 +0200</pubDate>
<title>Changing boot targets</title>
<link>https://blog.hagfi.sh/administration/boot-targets/</link>
<pubDate>Fri, 09 Nov 2018 10:08:15 +0200</pubDate>
<guid>https://hagfi.sh/administration/mysql_tuner/</guid>
<description>
&lt;h2 id=&#34;mysql-tuner&#34;&gt;MySQL Tuner&lt;/h2&gt;
&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;WAARDE&lt;/th&gt;
&lt;th&gt;ACTIE&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;&lt;code&gt;query_cache_size&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;AFBLIJVEN&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;code&gt;table_cache&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;AFBLIJVEN &lt;em&gt;(maximumwaarde = 64)&lt;/em&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;code&gt;table_open_cache&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;AFBLIJVEN&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;code&gt;join_buffer_size&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;Verhogen indien &lt;code&gt;Joins performed without indexes++&lt;/code&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;code&gt;tmp_table_size&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;Verhogen = &lt;code&gt;max_heap_table_size&lt;/code&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;code&gt;max_heap_table_size&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;Verhogen &lt;code&gt;= tmp_table_size&lt;/code&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;code&gt;query_cache_type&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;&lt;code&gt;=1&lt;/code&gt; indien &lt;code&gt;=0&lt;/code&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;
&lt;blockquote&gt;
&lt;p&gt;mysql tuning improvements
&lt;code&gt;table_cache&lt;/code&gt; NOOIT hoger dan 64
Sudo vim /etc/my.cnf
query_cache_size&amp;rsquo; =&amp;gt; &amp;lsquo;256M’,
It caches the select query along with the result set, which enables the identical selects to execute faster as the data fetches from the in memory.
Caching voor select queries en bijhorende result sets, wat het mogelijk maakt om identieke selects sneller op te vragen uit memory.
&amp;lsquo;open_files_limit&amp;rsquo; =&amp;gt; &amp;lsquo;4096&amp;rsquo;,
Changes the number of file descriptors available to mysqld. You should try increasing the value of this option if mysqld gives you the error Too many open files.
&amp;lsquo;join_buffer_size&amp;rsquo; =&amp;gt; &amp;lsquo;256K’,
The minimum size of the buffer that is used for plain index scans, range index scans, and joins that do not use indexes and thus perform full table scans. Normally, the best way to get fast joins is to add indexes. Increase the value of join_buffer_size to get a faster full join when adding indexes is not possible.
Minimumgrootte van buffer voor index en table scans.&lt;/p&gt;
&lt;/blockquote&gt;
&lt;hr /&gt;
&lt;blockquote&gt;
&lt;p&gt;&amp;lsquo;max_heap_table_size&amp;rsquo; =&amp;gt; &amp;lsquo;32M’,
This variable sets the maximum size to which user-created MEMORY tables are permitted to grow.
Max grootte van user-created memory tables
These 2 need to be the same size!!!
&amp;lsquo;tmp_table_size&amp;rsquo; =&amp;gt; &amp;lsquo;32M’,
The maximum size of internal in-memory temporary tables.
Max grootte van interne in-memory tijdelijke tabellen&lt;/p&gt;
&lt;/blockquote&gt;
&lt;hr /&gt;
&lt;blockquote&gt;
&lt;p&gt;table_cache=64 (maximumwaarde!!)
Table_Cache should always - well mostly anyway - be significantly bigger than the total number of tables in the server. Otherwise it&amp;rsquo;ll keep opening and closing tables.
Maximumwaarde voor caching van geopende tabellen.
thread_cache_size=4
How many threads the server should cache for reuse.
Aantal threads dat de server kan cachen voor hergebruik.
&amp;lsquo;innodb_buffer_pool_size&amp;rsquo; =&amp;gt; &amp;lsquo;1G&amp;rsquo;,
The size in bytes of the buffer pool, the memory area where InnoDB caches table and index data. The default value is 128MB.&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;Sudo service mysql/mariadb reload (restart enkel onder toezicht)&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;code&gt;query_cache_*&lt;/code&gt;:&lt;/li&gt;
&lt;/ul&gt;
&lt;blockquote&gt;
&lt;p&gt;&lt;code&gt;query_cache_type&lt;/code&gt;&lt;br /&gt;
Needs to be set to 1 to enable caching.&lt;br /&gt;
&lt;code&gt;query_cache_size&lt;/code&gt;&lt;br /&gt;
Is the size of the cache. This can be in bytes, or you can use a M suffix to specify the amount of megabytes.&lt;br /&gt;
&lt;code&gt;query_cache_limit&lt;/code&gt;&lt;br /&gt;
Is the maximum size of an individually cached query. Queries over this size won’t go into the cache. This is also in bytes, or megabytes with the M suffix. 1MB is a safe bet.&lt;br /&gt;
Maximumgrootte voor elke individuele gecachte query. Queries groter dan dit zullen niet gecacht worden.&lt;br /&gt;
&lt;code&gt;table_open_cache&lt;/code&gt;&lt;br /&gt;
Indicates the maximum number of tables the server keeps open&lt;/p&gt;
&lt;/blockquote&gt;
&lt;hr /&gt;
&lt;p&gt;&lt;code&gt;innodb_buffer_pool_instances=2&lt;/code&gt;&lt;br /&gt;
&lt;em&gt;Enables the use of multiple threads for innodb.&lt;/em&gt;&lt;/p&gt;
&lt;p&gt;&lt;code&gt;query_cache_type=1&lt;/code&gt;&lt;br /&gt;
&lt;em&gt;Enables query caching.&lt;/em&gt;&lt;/p&gt;
&lt;p&gt;&lt;code&gt;join_buffer_size=1024K&lt;/code&gt;&lt;br /&gt;
&lt;em&gt;Increased the buffer size for non-indexed joins.&lt;/em&gt;&lt;/p&gt;
&lt;p&gt;&lt;code&gt;tmp_table_size=64M &amp;amp;&amp;amp; max_heap_table_size=64M&lt;/code&gt;&lt;br /&gt;
&lt;em&gt;Increased the size for temporary tables.&lt;/em&gt;&lt;/p&gt;
&lt;p&gt;&lt;code&gt;join_buffer_size&lt;/code&gt;&lt;br /&gt;
&lt;em&gt;Omwille van het aantal JOIN queries uitgevoerd zonder indexes, werd de minimumgrootte van de buffer voor index en table scans verhoogd.&lt;/em&gt;&lt;/p&gt;
&lt;p&gt;&lt;code&gt;max_heap_table_size &amp;amp; tmp_table_size&lt;/code&gt;&lt;br /&gt;
&lt;em&gt;De maximale grootte van user-created memory tables en van interne in-memory tijdelijke tabellen werd verhoogd.&lt;/em&gt;&lt;/p&gt;
&lt;p&gt;&lt;code&gt;thread_cache_size&lt;/code&gt;&lt;br /&gt;
&lt;em&gt;Het maximale aantal threads dat de server kan cachen voor hergebruik werd verhoogd.&lt;/em&gt;&lt;/p&gt;
</description>
<guid>https://blog.hagfi.sh/administration/boot-targets/</guid>
<description>&lt;p&gt;Switch between run levels / environments.&lt;/p&gt;</description>
</item>
<item>
<title>Windows troubleshooting</title>
<link>https://hagfi.sh/administration/windows_troubleshooting/</link>
<title>Mount with automount (autofs)</title>
<link>https://blog.hagfi.sh/administration/autofs/</link>
<pubDate>Fri, 09 Nov 2018 10:08:15 +0200</pubDate>
<guid>https://blog.hagfi.sh/administration/autofs/</guid>
<description>&lt;p&gt;Automagically mount remote directories on login.&lt;/p&gt;</description>
</item>
<item>
<title>Fatrace: Report system wide file access events</title>
<link>https://blog.hagfi.sh/tools/fatrace/</link>
<pubDate>Mon, 05 Nov 2018 22:13:49 +0200</pubDate>
<guid>https://blog.hagfi.sh/tools/fatrace/</guid>
<description>&lt;p&gt;fatrace watches every file on server (except from itself and other kernel file systems).&lt;/p&gt;</description>
</item>
<item>
<title>Troubles with interfaces after a VM clone</title>
<link>https://blog.hagfi.sh/administration/toubles-with-interfaces-after-clone/</link>
<pubDate>Mon, 05 Nov 2018 22:13:49 +0200</pubDate>
<guid>https://blog.hagfi.sh/administration/toubles-with-interfaces-after-clone/</guid>
<description>&lt;p&gt;Remapping interfaces and their MAC address.&lt;/p&gt;</description>
</item>
<item>
<title>NCDU: NCurses Disk Usage</title>
<link>https://blog.hagfi.sh/tools/ncdu/</link>
<pubDate>Mon, 17 Sep 2018 22:18:38 +0200</pubDate>
<guid>https://blog.hagfi.sh/tools/ncdu/</guid>
<description>&lt;p&gt;ncdu is a command line tool to scan and calculate directory and file sizes.&lt;/p&gt;</description>
</item>
<item>
<title>Live Search With HUGO</title>
<link>https://blog.hagfi.sh/development/live-search-with-hugo/</link>
<pubDate>Wed, 29 Aug 2018 22:44:46 +0200</pubDate>
<guid>https://blog.hagfi.sh/development/live-search-with-hugo/</guid>
<description>&lt;p&gt;HUGO is static, that&amp;rsquo;s a fact. How can I implement a live search? Searching the internet provided me only solutions
that require a page refresh, this time of age performance is key, so that&amp;rsquo;s why I wanted a fast and fuzzy search implementation.&lt;/p&gt;</description>
</item>
<item>
<title>Let&#39;s Encrypt</title>
<link>https://blog.hagfi.sh/administration/letsencrypt/</link>
<pubDate>Sat, 25 Aug 2018 22:08:15 +0200</pubDate>
<guid>https://hagfi.sh/administration/windows_troubleshooting/</guid>
<description>
&lt;h2 id=&#34;windows-troubleshooting&#34;&gt;Windows troubleshooting&lt;/h2&gt;
&lt;p&gt;VRAGEN:
+ openen vanuit ticketing, wachtwoord en gebruiker
+ custom even viewer view?
+ test server?&lt;/p&gt;
&lt;h3 id=&#34;eventviewer&#34;&gt;&lt;em&gt;EventViewer&lt;/em&gt;&lt;/h3&gt;
&lt;p&gt;run: eventvwr&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;custom views&lt;/li&gt;
&lt;li&gt;windows
&lt;ul&gt;
&lt;li&gt;application (non windows standard, puppet, vmware, mssql, &amp;hellip;)&lt;/li&gt;
&lt;li&gt;security, aan en afmelden&lt;/li&gt;
&lt;li&gt;set-up: updates en installatie verwijderen programma&amp;rsquo;s&lt;/li&gt;
&lt;li&gt;system: OS meldingen&lt;/li&gt;
&lt;/ul&gt;&lt;/li&gt;
&lt;li&gt;application and services: diep graven
&lt;br /&gt;
&lt;br /&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;&amp;ndash;&amp;gt; Filter Log:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;logged (date range)&lt;br /&gt;&lt;/li&gt;
&lt;li&gt;event level&lt;br /&gt;&lt;/li&gt;
&lt;li&gt;event source&lt;br /&gt;&lt;/li&gt;
&lt;li&gt;event ID: 99,-1024,-4634&lt;br /&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;rechtsonderaan &amp;gt; event copy &amp;gt; copy as text&lt;/p&gt;
&lt;h3 id=&#34;powershell&#34;&gt;&lt;em&gt;PowerShell&lt;/em&gt;&lt;/h3&gt;
&lt;pre&gt;&lt;code class=&#34;language-PowerShell&#34;&gt;$first =
$last =
get-eventlog -Logname system -
&lt;/code&gt;&lt;/pre&gt;
&lt;pre&gt;&lt;code class=&#34;language-PowerShell&#34;&gt; `get-winevent -LogName &#39;Microsoft-Windows-TaskScheduler/Operational&#39; | Where-Object { $_.Message -like ‘*insta* }`
&lt;/code&gt;&lt;/pre&gt;
&lt;h3 id=&#34;task-viewer&#34;&gt;&lt;em&gt;Task Viewer&lt;/em&gt;&lt;/h3&gt;
&lt;ul&gt;
&lt;li&gt;tasks&lt;/li&gt;
&lt;li&gt;users&lt;/li&gt;
&lt;li&gt;performance (indien gecrasht, bevestigen anders is het netwerk)&lt;/li&gt;
&lt;/ul&gt;
&lt;h3 id=&#34;resource-monitor&#34;&gt;&lt;em&gt;Resource monitor&lt;/em&gt;&lt;/h3&gt;
&lt;p&gt;(task manager &amp;gt; performance &amp;gt; open resouce monitor)&lt;/p&gt;
&lt;p&gt;Overview &amp;gt; CPU (ovenste tab) app aanvinken &amp;ndash;&amp;gt; filtert alles&lt;/p&gt;
&lt;h3 id=&#34;netstat&#34;&gt;&lt;em&gt;Netstat&lt;/em&gt;&lt;/h3&gt;
&lt;p&gt;&lt;code&gt;netstat -abo &amp;gt; C:\temp\log.txt&lt;/code&gt;&lt;/p&gt;
&lt;h3 id=&#34;chocolate&#34;&gt;&lt;em&gt;Chocolate&lt;/em&gt;&lt;/h3&gt;
&lt;p&gt;C:\ProgramData\chocolatey\bin\Procmon.exe
&amp;ndash;&amp;gt; selecteer lijn+kolom &amp;gt; exclude &amp;lsquo;name&amp;rsquo; (=grep -v) / include &amp;lsquo;name&amp;rsquo; (=grep)&lt;/p&gt;
&lt;h3 id=&#34;usefull-programs&#34;&gt;&lt;em&gt;Usefull programs&lt;/em&gt;&lt;/h3&gt;
&lt;ul&gt;
&lt;li&gt;TreeView&lt;/li&gt;
&lt;li&gt;VBluescreenviewer&lt;/li&gt;
&lt;li&gt;Sysinternals&lt;/li&gt;
&lt;li&gt;Zabbix&lt;/li&gt;
&lt;li&gt;VMware events&lt;/li&gt;
&lt;li&gt;BareTail&lt;/li&gt;
&lt;li&gt;choco install&lt;/li&gt;
&lt;li&gt;choco list -lo (view choco installed programs)&lt;/li&gt;
&lt;li&gt;telnet 12.34.56.78 900&lt;/li&gt;
&lt;li&gt;powershell: &lt;code&gt;stop service &#39;name&#39;&lt;/code&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;h3 id=&#34;eventid-s&#34;&gt;&lt;em&gt;EventID&amp;rsquo;s&lt;/em&gt;&lt;/h3&gt;
&lt;ul&gt;
&lt;li&gt;Event ID 6005: “The event log service was started.” This is synonymous to system startup.&lt;/li&gt;
&lt;li&gt;Event ID 6006: “The event log service was stopped.” This is synonymous to system shutdown.&lt;/li&gt;
&lt;li&gt;Event ID 6008: &amp;ldquo;The previous system shutdown was unexpected.&amp;rdquo; Records that the system started after it was not shut down properly.&lt;/li&gt;
&lt;li&gt;Event ID 6009: Indicates the Windows product name, version, build number, service pack number, and operating system type detected at boot time.&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Event ID 6013: Displays the uptime of the computer. There is no TechNet page for this id.
Add to that a couple more from the Server Fault answers listed in my OP:&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Event ID 1074: &amp;ldquo;The process X has initiated the restart / shutdown of computer on behalf of user Y for the following reason: Z.&amp;rdquo; Indicates that an application or a user initiated a restart or shutdown.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Event ID 1076: &amp;ldquo;The reason supplied by user X for the last unexpected shutdown of this computer is: Y.&amp;rdquo; Records when the first user with shutdown privileges logs on to the computer after an unexpected restart or shutdown and supplies a reason for the occurrence.&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;h3 id=&#34;powershell-1&#34;&gt;&lt;em&gt;PowerShell&lt;/em&gt;&lt;/h3&gt;
&lt;pre&gt;&lt;code class=&#34;language-PowerShell&#34;&gt;$filter = &amp;quot;*abbix*&amp;quot;
get-winevent -logname &#39;Application&#39; | Where-Object { $_.Message -like $filter }
&lt;/code&gt;&lt;/pre&gt;
</description>
<guid>https://blog.hagfi.sh/administration/letsencrypt/</guid>
<description>Let&amp;rsquo;s Encrypt: Aanmaken / vernieuwen certificaat: /opt/letsencrypt/letsencrypt-auto certonly --expand ---email support@domain.tld --agree-tos --webroot -w /var/www/vhosts/WEB/ROOT -d domain.tld -d domainalias.tld --dry-run /bin/certbot --text --agree-tos --non-interactive certonly -a webroot --webroot-path /var/www/vhosts/WEB/ROOT -d domain.tld -d domainalias.tld --dry-run --dry-run om het aanmaken te testen.
Apache / httpd (1) Voeg volgende regels toe aan de apache config: Alias /.well-known /var/www/vhosts/letsencrypt/.well-known &amp;lt;Directory /var/www/vhosts/letsencrypt/.well-known&amp;gt; order allow,deny allow from all satisfy any &amp;lt;/Directory&amp;gt; Of (2) voeg volgende regels toe aan .</description>
</item>
<item>
<title>Dont Let Your Application Interfere With Letsencrypt</title>
<link>https://hagfi.sh/administration/dont-let-your-application-interfere-with-letsencrypt/</link>
<pubDate>Thu, 23 Aug 2018 22:46:41 +0200</pubDate>
<title>MySQL Tuner</title>
<link>https://blog.hagfi.sh/administration/mysql_tuner/</link>
<pubDate>Sat, 25 Aug 2018 22:08:15 +0200</pubDate>
<guid>https://hagfi.sh/administration/dont-let-your-application-interfere-with-letsencrypt/</guid>
<description>
&lt;h2 id=&#34;tips-and-tricks-to-keep-letsencrypt-working&#34;&gt;Tips and tricks to keep letsencrypt working&lt;/h2&gt;
</description>
<guid>https://blog.hagfi.sh/administration/mysql_tuner/</guid>
<description>MySQL Tuner WAARDE ACTIE query_cache_size AFBLIJVEN table_cache AFBLIJVEN (maximumwaarde = 64) table_open_cache AFBLIJVEN join_buffer_size Verhogen indien Joins performed without indexes++ tmp_table_size Verhogen = max_heap_table_size max_heap_table_size Verhogen = tmp_table_size query_cache_type =1 indien =0 mysql tuning improvements table_cache NOOIT hoger dan 64 Sudo vim /etc/my.cnf query_cache_size&#39; =&amp;gt; &amp;lsquo;256M’, It caches the select query along with the result set, which enables the identical selects to execute faster as the data fetches from the in memory.</description>
</item>
<item>
<title>Vue Js</title>
<link>https://hagfi.sh/development/vue-js/</link>
<pubDate>Thu, 23 Aug 2018 22:44:46 +0200</pubDate>
<title>Windows troubleshooting</title>
<link>https://blog.hagfi.sh/administration/windows_troubleshooting/</link>
<pubDate>Sat, 25 Aug 2018 22:08:15 +0200</pubDate>
<guid>https://hagfi.sh/development/vue-js/</guid>
<description>
&lt;h2 id=&#34;awesomeness-about-vuejs&#34;&gt;Awesomeness about VueJS&lt;/h2&gt;
</description>
<guid>https://blog.hagfi.sh/administration/windows_troubleshooting/</guid>
<description>Windows troubleshooting VRAGEN:
openen vanuit ticketing, wachtwoord en gebruiker custom even viewer view? test server? EventViewer run: eventvwr
custom views windows application (non windows standard, puppet, vmware, mssql, &amp;hellip;) security, aan en afmelden set-up: updates en installatie verwijderen programma&amp;rsquo;s system: OS meldingen application and services: diep graven &amp;ndash;&amp;gt; Filter Log:
logged (date range) event level event source event ID: 99,-1024,-4634 rechtsonderaan &amp;gt; event copy &amp;gt; copy as text</description>
</item>
<item>
<title>Luks Encryption</title>
<link>https://hagfi.sh/administration/luks-encryption/</link>
<link>https://blog.hagfi.sh/administration/luks-encryption/</link>
<pubDate>Thu, 23 Aug 2018 22:08:15 +0200</pubDate>
<guid>https://hagfi.sh/administration/luks-encryption/</guid>
<description>
&lt;h2 id=&#34;add-a-new-disk-lvm&#34;&gt;Add a new disk (LVM)&lt;/h2&gt;
&lt;pre&gt;&lt;code&gt;root@server:/dev/centos # for i in /sys/class/scsi_host/host*; do echo &amp;quot;- - -&amp;quot; &amp;gt; $i/scan; done
root@server:/dev/centos # NEWDISK=$(dmesg|tail|grep &#39;Attached&#39;|awk &#39;{print $4}&#39;|tail -n1|cut -d &amp;quot;[&amp;quot; -f2|cut -d &amp;quot;]&amp;quot; -f1)
root@server:/dev/centos # VGROUP=$(vgdisplay|grep Name|head -n1|awk &#39;{print $3}&#39;)
root@server:/dev/centos # echo ${NEWDISK}
sdd
root@server:/dev/centos # echo ${VGROUP}
centos
root@server:/dev/centos # pvcreate /dev/${NEWDISK}
Physical volume &amp;quot;/dev/sdd&amp;quot; successfully created.
root@server:/dev/centos # vgextend ${VGROUP} /dev/${NEWDISK}
Volume group &amp;quot;centos&amp;quot; successfully extended
&lt;/code&gt;&lt;/pre&gt;
&lt;h2 id=&#34;create-a-logical-volume-lvm&#34;&gt;Create a logical volume (LVM)&lt;/h2&gt;
&lt;pre&gt;&lt;code&gt;root@server:/dev/centos # lvcreate -L 15G -n encrypted centos
Logical volume &amp;quot;encrypted&amp;quot; created.
&lt;/code&gt;&lt;/pre&gt;
&lt;h2 id=&#34;encrypt-the-partition&#34;&gt;Encrypt the partition&lt;/h2&gt;
&lt;pre&gt;&lt;code&gt;root@server:/dev/centos # cryptsetup -v --verify-passphrase luksFormat /dev/centos/encrypted
root@server:/dev/mapper # cryptsetup luksOpen /dev/centos/encrypted luks-encrypted
&lt;/code&gt;&lt;/pre&gt;
&lt;h2 id=&#34;create-a-mountpoint&#34;&gt;Create a mountpoint&lt;/h2&gt;
&lt;pre&gt;&lt;code&gt;root@server:/dev/mapper # mkdir /encrypted
root@server:/dev/mapper # mount /dev/mapper/luks-encrypted /encrypted
&lt;/code&gt;&lt;/pre&gt;
&lt;h2 id=&#34;create-a-key-to-auto-mount-the-encrypted-disk&#34;&gt;Create a key (to auto-mount the encrypted disk)&lt;/h2&gt;
&lt;pre&gt;&lt;code&gt;root@server:/dev/mapper # dd if=/dev/urandom of=/root/lukskey bs=1024 count=4
root@server:/dev/mapper # chmod 0400 /root/lukskey
&lt;/code&gt;&lt;/pre&gt;
&lt;h2 id=&#34;unmount-and-add-the-key&#34;&gt;Unmount and add the key&lt;/h2&gt;
&lt;pre&gt;&lt;code&gt;root@server:/ # umount /encrypted
root@server:/ # cryptsetup luksClose luks-encrypted
root@server:/ # cryptsetup luksAddKey /dev/mapper/centos-encrypted /root/lukskey
&lt;/code&gt;&lt;/pre&gt;
&lt;h2 id=&#34;get-uuid&#34;&gt;Get UUID&lt;/h2&gt;
&lt;pre&gt;&lt;code&gt;root@server:/ # blkid /dev/mapper/centos-encrypted
/dev/mapper/centos-encrypted: UUID=&amp;quot;0dab9a5c-1870-478d-8d74-226eeb512f78&amp;quot; TYPE=&amp;quot;crypto_LUKS&amp;quot;
&lt;/code&gt;&lt;/pre&gt;
&lt;h2 id=&#34;auto-mount-luks-edit-etc-cypttab&#34;&gt;Auto-mount LUKS (edit /etc/cypttab)&lt;/h2&gt;
&lt;pre&gt;&lt;code&gt;luks-encrypted /dev/disk/by-uuid/0dab9a5c-1870-478d-8d74-226eeb512f78 /root/lukskey luks
&lt;/code&gt;&lt;/pre&gt;
</description>
<guid>https://blog.hagfi.sh/administration/luks-encryption/</guid>
<description>&lt;p&gt;Create an encrypted partition that will automatically mount at boot.&lt;/p&gt;</description>
</item>
<item>
<title></title>
<link>https://blog.hagfi.sh/index.json</link>
<pubDate>Sun, 05 Mar 2017 21:10:52 +0100</pubDate>
<guid>https://blog.hagfi.sh/index.json</guid>
<description></description>
</item>
</channel>
</rss>
</rss>

46
public/js/prism.js

File diff suppressed because one or more lines are too long

199
public/sitemap.xml

@ -1,53 +1,158 @@
<?xml version="1.0" encoding="utf-8" standalone="yes" ?>
<urlset xmlns="http://www.sitemaps.org/schemas/sitemap/0.9">
<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<urlset xmlns="http://www.sitemaps.org/schemas/sitemap/0.9"
xmlns:xhtml="http://www.w3.org/1999/xhtml">
<url>
<loc>https://hagfi.sh/administration/letsencrypt/</loc>
<loc>https://blog.hagfi.sh/categories/administration/</loc>
<lastmod>2018-11-30T10:08:22+02:00</lastmod>
</url><url>
<loc>https://blog.hagfi.sh/administration/</loc>
<lastmod>2018-11-30T10:08:22+02:00</lastmod>
</url><url>
<loc>https://blog.hagfi.sh/tags/arch/</loc>
<lastmod>2018-11-30T10:08:22+02:00</lastmod>
</url><url>
<loc>https://blog.hagfi.sh/categories/</loc>
<lastmod>2018-11-30T10:08:22+02:00</lastmod>
</url><url>
<loc>https://blog.hagfi.sh/</loc>
<lastmod>2018-11-30T10:08:22+02:00</lastmod>
</url><url>
<loc>https://blog.hagfi.sh/tags/</loc>
<lastmod>2018-11-30T10:08:22+02:00</lastmod>
</url><url>
<loc>https://blog.hagfi.sh/administration/yet-another-arch-guide/</loc>
<lastmod>2018-11-30T10:08:22+02:00</lastmod>
</url><url>
<loc>https://blog.hagfi.sh/tags/bash/</loc>
<lastmod>2018-11-11T16:01:15+01:00</lastmod>
</url><url>
<loc>https://blog.hagfi.sh/administration/bash/</loc>
<lastmod>2018-11-11T16:01:15+01:00</lastmod>
</url><url>
<loc>https://blog.hagfi.sh/categories/development/</loc>
<lastmod>2018-11-11T16:01:15+01:00</lastmod>
</url><url>
<loc>https://blog.hagfi.sh/tags/script/</loc>
<lastmod>2018-11-11T16:01:15+01:00</lastmod>
</url><url>
<loc>https://blog.hagfi.sh/tags/boot/</loc>
<lastmod>2018-11-09T10:08:15+02:00</lastmod>
</url><url>
<loc>https://blog.hagfi.sh/administration/boot-targets/</loc>
<lastmod>2018-11-09T10:08:15+02:00</lastmod>
</url><url>
<loc>https://blog.hagfi.sh/tags/data/</loc>
<lastmod>2018-11-09T10:08:15+02:00</lastmod>
</url><url>
<loc>https://blog.hagfi.sh/tags/linux/</loc>
<lastmod>2018-11-09T10:08:15+02:00</lastmod>
</url><url>
<loc>https://blog.hagfi.sh/tags/mount/</loc>
<lastmod>2018-11-09T10:08:15+02:00</lastmod>
</url><url>
<loc>https://blog.hagfi.sh/administration/autofs/</loc>
<lastmod>2018-11-09T10:08:15+02:00</lastmod>
</url><url>
<loc>https://blog.hagfi.sh/tags/security/</loc>
<lastmod>2018-11-09T10:08:15+02:00</lastmod>
</url><url>
<loc>https://blog.hagfi.sh/tags/shares/</loc>
<lastmod>2018-11-09T10:08:15+02:00</lastmod>
</url><url>
<loc>https://blog.hagfi.sh/tags/directory/</loc>
<lastmod>2018-11-05T22:13:49+02:00</lastmod>
</url><url>
<loc>https://blog.hagfi.sh/tools/fatrace/</loc>
<lastmod>2018-11-05T22:13:49+02:00</lastmod>
</url><url>
<loc>https://blog.hagfi.sh/tags/ifconfig/</loc>
<lastmod>2018-11-05T22:13:49+02:00</lastmod>
</url><url>
<loc>https://blog.hagfi.sh/tags/interfaces/</loc>
<lastmod>2018-11-05T22:13:49+02:00</lastmod>
</url><url>
<loc>https://blog.hagfi.sh/tags/inventory/</loc>
<lastmod>2018-11-05T22:13:49+02:00</lastmod>
</url><url>
<loc>https://blog.hagfi.sh/tags/network/</loc>
<lastmod>2018-11-05T22:13:49+02:00</lastmod>
</url><url>
<loc>https://blog.hagfi.sh/tags/networking/</loc>
<lastmod>2018-11-05T22:13:49+02:00</lastmod>
</url><url>
<loc>https://blog.hagfi.sh/tags/size/</loc>
<lastmod>2018-11-05T22:13:49+02:00</lastmod>
</url><url>
<loc>https://blog.hagfi.sh/tools/</loc>
<lastmod>2018-11-05T22:13:49+02:00</lastmod>
</url><url>
<loc>https://blog.hagfi.sh/categories/tools/</loc>
<lastmod>2018-11-05T22:13:49+02:00</lastmod>
</url><url>
<loc>https://blog.hagfi.sh/administration/toubles-with-interfaces-after-clone/</loc>
<lastmod>2018-11-05T22:13:49+02:00</lastmod>
</url><url>
<loc>https://blog.hagfi.sh/tags/du/</loc>
<lastmod>2018-09-17T22:18:38+02:00</lastmod>
</url><url>
<loc>https://blog.hagfi.sh/tags/ncdu/</loc>
<lastmod>2018-09-17T22:18:38+02:00</lastmod>
</url><url>
<loc>https://blog.hagfi.sh/tools/ncdu/</loc>
<lastmod>2018-09-17T22:18:38+02:00</lastmod>
</url><url>
<loc>https://blog.hagfi.sh/development/</loc>
<lastmod>2018-08-29T22:44:46+02:00</lastmod>
</url><url>
<loc>https://blog.hagfi.sh/tags/hugo/</loc>
<lastmod>2018-08-29T22:44:46+02:00</lastmod>
</url><url>
<loc>https://blog.hagfi.sh/tags/javascript/</loc>
<lastmod>2018-08-29T22:44:46+02:00</lastmod>
</url><url>
<loc>https://blog.hagfi.sh/tags/js/</loc>
<lastmod>2018-08-29T22:44:46+02:00</lastmod>
</url><url>
<loc>https://blog.hagfi.sh/tags/json/</loc>
<lastmod>2018-08-29T22:44:46+02:00</lastmod>
</url><url>
<loc>https://blog.hagfi.sh/development/live-search-with-hugo/</loc>
<lastmod>2018-08-29T22:44:46+02:00</lastmod>
</url><url>
<loc>https://blog.hagfi.sh/tags/prism/</loc>
<lastmod>2018-08-29T22:44:46+02:00</lastmod>
</url><url>
<loc>https://blog.hagfi.sh/tags/prismjs/</loc>
<lastmod>2018-08-29T22:44:46+02:00</lastmod>
</url><url>
<loc>https://blog.hagfi.sh/tags/vue/</loc>
<lastmod>2018-08-29T22:44:46+02:00</lastmod>
</url><url>
<loc>https://blog.hagfi.sh/tags/vuejs/</loc>
<lastmod>2018-08-29T22:44:46+02:00</lastmod>
</url><url>
<loc>https://blog.hagfi.sh/administration/letsencrypt/</loc>
<lastmod>2018-08-25T22:08:15+02:00</lastmod>
</url>
<url>
<loc>https://hagfi.sh/administration/mysql_tuner/</loc>
</url><url>
<loc>https://blog.hagfi.sh/administration/mysql_tuner/</loc>
<lastmod>2018-08-25T22:08:15+02:00</lastmod>
</url>
<url>
<loc>https://hagfi.sh/administration/windows_troubleshooting/</loc>
</url><url>
<loc>https://blog.hagfi.sh/administration/windows_troubleshooting/</loc>
<lastmod>2018-08-25T22:08:15+02:00</lastmod>
</url>
<url>
<loc>https://hagfi.sh/administration/dont-let-your-application-interfere-with-letsencrypt/</loc>
<lastmod>2018-08-23T22:46:41+02:00</lastmod>
</url>
<url>
<loc>https://hagfi.sh/development/vue-js/</loc>
<lastmod>2018-08-23T22:44:46+02:00</lastmod>
</url>
<url>
<loc>https://hagfi.sh/administration/luks-encryption/</loc>
</url><url>
<loc>https://blog.hagfi.sh/tags/disk/</loc>
<lastmod>2018-08-23T22:08:15+02:00</lastmod>
<priority>0.1</priority>
</url>
<url>
<loc>https://hagfi.sh/administration/</loc>
<lastmod>2018-08-25T22:08:15+02:00</lastmod>
<priority>0</priority>
</url>
<url>
<loc>https://hagfi.sh/development/</loc>
<lastmod>2018-08-23T22:44:46+02:00</lastmod>
<priority>0</priority>
</url>
<url>
<loc>https://hagfi.sh/</loc>
<lastmod>2018-08-25T22:08:15+02:00</lastmod>
<priority>0</priority>
</url><url>
<loc>https://blog.hagfi.sh/tags/encryption/</loc>
<lastmod>2018-08-23T22:08:15+02:00</lastmod>
</url><url>
<loc>https://blog.hagfi.sh/administration/luks-encryption/</loc>
<lastmod>2018-08-23T22:08:15+02:00</lastmod>
</url><url>
<loc>https://blog.hagfi.sh/tags/partition/</loc>
<lastmod>2018-08-23T22:08:15+02:00</lastmod>
</url><url>
<loc>https://blog.hagfi.sh/index.json</loc>
<lastmod>2017-03-05T21:10:52+01:00</lastmod>
</url>
</urlset>
</urlset>

279
public/tags/arch/index.html

@ -0,0 +1,279 @@
<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en-us">
<head>
<title>
arch // Hagfi.sh
</title>
<link href="http://gmpg.org/xfn/11" rel="profile">
<meta http-equiv="content-type" content="text/html; charset=utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1">
<meta name="description" content="">
<meta name="keywords" content="">
<meta name="author" content="">
<meta name="generator" content="Hugo 0.92.0" />
<meta property="og:title" content="arch" />
<meta property="og:description" content="" />
<meta property="og:type" content="website" />
<meta property="og:locale" content="en_US" />
<meta property="og:url" content="https://blog.hagfi.sh/tags/arch/" />
<link rel="stylesheet" href="//cdnjs.cloudflare.com/ajax/libs/pure/0.5.0/base-min.css">
<link rel="stylesheet" href="//cdnjs.cloudflare.com/ajax/libs/pure/0.5.0/pure-min.css">
<link rel="stylesheet" href="//cdnjs.cloudflare.com/ajax/libs/pure/0.5.0/grids-responsive-min.css">
<link rel="stylesheet" href="https://blog.hagfi.sh//css/redlounge.css">
<link rel="stylesheet" href="https://blog.hagfi.sh//css/prism.css">
<link href="//maxcdn.bootstrapcdn.com/font-awesome/4.5.0/css/font-awesome.min.css" rel="stylesheet">
<link href='//fonts.googleapis.com/css?family=Raleway:400,200,100,700,300,500,600,800' rel='stylesheet' type='text/css'>
<link href='//fonts.googleapis.com/css?family=Libre+Baskerville:400,700,400italic' rel='stylesheet' type='text/css'>
<link rel="apple-touch-icon-precomposed" sizes="144x144" href="/touch-icon-144-precomposed.png">
<link rel="shortcut icon" type="image/x-icon" href="/img/favicon.png">
<link href="https://blog.hagfi.sh/tags/arch/index.xml" rel="alternate" type="application/rss+xml" title="Hagfi.sh" />
<script src="//cdnjs.cloudflare.com/ajax/libs/moment.js/2.18.1/moment.js"></script>
<script src="//cdnjs.cloudflare.com/ajax/libs/vue/2.5.17/vue.min.js"></script>
<script src="//cdnjs.cloudflare.com/ajax/libs/axios/0.18.0/axios.min.js"></script>
<script src="//cdnjs.cloudflare.com/ajax/libs/fuse.js/3.2.1/fuse.min.js"></script>
<script src="//cdn.jsdelivr.net/npm/vuewordcloud@18.7.11/VueWordCloud.js"></script>
<script src="https://blog.hagfi.sh//js/prism.js"></script>
<script type="application/javascript">
var doNotTrack = false;
if (!doNotTrack) {
(function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){
(i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o),
m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m)
})(window,document,'script','https://www.google-analytics.com/analytics.js','ga');
ga('create', 'UA-124890410-1', 'auto');
ga('send', 'pageview');
}
</script>
</head>
<body>
<div id="layout" class="pure-g">
<div class="sidebar pure-u-1 pure-u-md-1-4" id="app">
<div class="header">
<h1 class="brand-title"><a href="/">Hagfi.sh</a></h1>
<h2 class="brand-tagline">A devops guide to the galaxy</h2>
<div class="counters">
<a class="counter" href="/">13
<div class="counter-sub">Documents</div>
</a>
<a class="counter" href="/tags">29
<div class="counter-sub">Tags</div>
</a>
<a class="counter" href="/categories">3
<div class="counter-sub">Categories</div>
</a>
</div>
<nav class="nav">
</nav>
<div class="search-wrapper">
<input
type="text"
placeholder="Search ..."
v-model="search"
@keydown.down.prevent="navigate(1)"
@keydown.up.prevent="navigate(-1)"
@keyup.enter.prevent="navigate(result[selected].href)"
ref="searchInput"
class="search"
/>
<svg height="100" width="100" ref="resultPoint" class="result-point">
<circle cx="5" cy="5" r="5" fill="#FFF" />
</svg>
<ul class="result-items">
<li v-for="r, i of result" class="result-item" ref="resultItem">
<div class="result-item-wrapper" :class="{ 'result-item-selected': selected === i }">
<div class="result-item-left">
<span class="post-date">
<span class="post-date-day"><sup v-text="moment(r.date).format('D')"></sup></span><span class="post-date-separator" v-text="'/'"></span><span class="post-date-month" v-text="moment(r.date).format('MMM')"></span> <span class="post-date-year" v-text="moment(r.date).format('YYYY')"></span>
</span>
<template v-if="r.author">By <a class="post-author" v-text="r.author"></a></template>
</div>
<div class="result-item-left">
<span class="result-item-separator nav-item-separator" v-text="'//'"></span><a :href="r.href" v-text="r.title" class="result-item-link"></a>
</div>
</div>
</li>
</ul>
</div>
</div>
</div>
<div class="content pure-u-1 pure-u-md-3-4">
<a name="top"></a>
<div class="posts">
<section class="post">
<header class="post-header">
<h1 class="post-title">
<a href="/administration/yet-another-arch-guide/">Yet Another Arch Guide</a>
</h1>
</header>
<p class="post-meta">
<span class="post-date">
<span class="post-date-day"><sup>30</sup></span><span class="post-date-separator">/</span><span class="post-date-month">Nov</span> <span class="post-date-year">2018</span>
</span>
By <a class="post-author" >Kristof Vandam - Adam Verbeeck</a>
<span class="post-reading-time"><i class="fa fa-clock-o"></i> <em>2 min. read</em></span>
<div class="post-categories">
<a class="post-category post-category-administration" href="https://blog.hagfi.sh//categories/administration">administration</a>
</div>
</p>
<article class="post-summary">
<p>Setting up Arch with other bells and whistles.</p>
</article>
<div class="read-more-link">
<a href="/administration/yet-another-arch-guide/"><span class="read-more-slashes">//</span>Read More...</a>
</div>
</section>
</div>
<div class="footer">
<hr class="thin" />
<div class="pure-menu pure-menu-horizontal pure-menu-open">
<ul class="footer-menu">
</ul>
</div>
<p>&copy; 2022. All rights reserved.</p>
</div>
</div>
</div>
<script>
var app = new Vue({
el: '#app',
data: {
fuse: null,
search: "",
result: [],
index: [],
selected: 0
},
mounted() {
let self = this
window.addEventListener("keypress", function(e) {
self.$refs.searchInput.focus()
})
let options = {
shouldSort: true,
threshold: 0.6,
location: 0,
distance: 100,
maxPatternLength: 32,
minMatchCharLength: 1,
keys: [
"title",
"author",
"date",
"content"
]
}
axios.get('/index.json')
.then(function (response) {
self.index = response.data
self.fuse = new Fuse(response.data, options)
})
.catch(function (error) {
})
},
watch: {
result(nval, oval) {
nval.length > 0 ? this.pointer(0) : this.pointer(-1)
},
search(nval, oval) {
this.result = this.fuse.search(nval)
}
},
methods: {
navigate(val) {
switch (val) {
case 1: if (this.selected < this.result.length - 1) { this.selected++ }; break;
case -1: if (this.selected > 0 ) { this.selected-- }; break;
default: window.location.href = val; break;
}
this.pointer(this.selected)
},
pointer(selected) {
let self = this
if (selected >= 0) {
Vue.nextTick().then(function() {
let height = self.$refs.resultItem[selected].clientHeight
let top = self.$refs.resultItem[selected].getBoundingClientRect().top
let left = self.$refs.resultItem[selected].getBoundingClientRect().left
self.$refs.resultPoint.style.top = (top+height/2)+'px'
self.$refs.resultPoint.style.left = (left-20)+'px'
})
} else {
this.$refs.resultPoint.style.left = '-50px'
return
}
}
}
})
</script>
</body>
</html>

20
public/tags/arch/index.xml

@ -0,0 +1,20 @@
<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom">
<channel>
<title>arch on Hagfi.sh</title>
<link>https://blog.hagfi.sh/tags/arch/</link>
<description>Recent content in arch on Hagfi.sh</description>
<generator>Hugo -- gohugo.io</generator>
<language>en-us</language>
<lastBuildDate>Fri, 30 Nov 2018 10:08:22 +0200</lastBuildDate><atom:link href="https://blog.hagfi.sh/tags/arch/index.xml" rel="self" type="application/rss+xml" />
<item>
<title>Yet Another Arch Guide</title>
<link>https://blog.hagfi.sh/administration/yet-another-arch-guide/</link>
<pubDate>Fri, 30 Nov 2018 10:08:22 +0200</pubDate>
<guid>https://blog.hagfi.sh/administration/yet-another-arch-guide/</guid>
<description>&lt;p&gt;Setting up Arch with other bells and whistles.&lt;/p&gt;</description>
</item>
</channel>
</rss>

281
public/tags/bash/index.html

@ -0,0 +1,281 @@
<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en-us">
<head>
<title>
bash // Hagfi.sh
</title>
<link href="http://gmpg.org/xfn/11" rel="profile">
<meta http-equiv="content-type" content="text/html; charset=utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1">
<meta name="description" content="">
<meta name="keywords" content="">
<meta name="author" content="">
<meta name="generator" content="Hugo 0.92.0" />
<meta property="og:title" content="bash" />
<meta property="og:description" content="" />
<meta property="og:type" content="website" />
<meta property="og:locale" content="en_US" />
<meta property="og:url" content="https://blog.hagfi.sh/tags/bash/" />
<link rel="stylesheet" href="//cdnjs.cloudflare.com/ajax/libs/pure/0.5.0/base-min.css">
<link rel="stylesheet" href="//cdnjs.cloudflare.com/ajax/libs/pure/0.5.0/pure-min.css">
<link rel="stylesheet" href="//cdnjs.cloudflare.com/ajax/libs/pure/0.5.0/grids-responsive-min.css">
<link rel="stylesheet" href="https://blog.hagfi.sh//css/redlounge.css">
<link rel="stylesheet" href="https://blog.hagfi.sh//css/prism.css">
<link href="//maxcdn.bootstrapcdn.com/font-awesome/4.5.0/css/font-awesome.min.css" rel="stylesheet">
<link href='//fonts.googleapis.com/css?family=Raleway:400,200,100,700,300,500,600,800' rel='stylesheet' type='text/css'>
<link href='//fonts.googleapis.com/css?family=Libre+Baskerville:400,700,400italic' rel='stylesheet' type='text/css'>
<link rel="apple-touch-icon-precomposed" sizes="144x144" href="/touch-icon-144-precomposed.png">
<link rel="shortcut icon" type="image/x-icon" href="/img/favicon.png">
<link href="https://blog.hagfi.sh/tags/bash/index.xml" rel="alternate" type="application/rss+xml" title="Hagfi.sh" />
<script src="//cdnjs.cloudflare.com/ajax/libs/moment.js/2.18.1/moment.js"></script>
<script src="//cdnjs.cloudflare.com/ajax/libs/vue/2.5.17/vue.min.js"></script>
<script src="//cdnjs.cloudflare.com/ajax/libs/axios/0.18.0/axios.min.js"></script>
<script src="//cdnjs.cloudflare.com/ajax/libs/fuse.js/3.2.1/fuse.min.js"></script>
<script src="//cdn.jsdelivr.net/npm/vuewordcloud@18.7.11/VueWordCloud.js"></script>
<script src="https://blog.hagfi.sh//js/prism.js"></script>
<script type="application/javascript">
var doNotTrack = false;
if (!doNotTrack) {
(function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){
(i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o),
m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m)
})(window,document,'script','https://www.google-analytics.com/analytics.js','ga');
ga('create', 'UA-124890410-1', 'auto');
ga('send', 'pageview');
}
</script>
</head>
<body>
<div id="layout" class="pure-g">
<div class="sidebar pure-u-1 pure-u-md-1-4" id="app">
<div class="header">
<h1 class="brand-title"><a href="/">Hagfi.sh</a></h1>
<h2 class="brand-tagline">A devops guide to the galaxy</h2>
<div class="counters">
<a class="counter" href="/">13
<div class="counter-sub">Documents</div>
</a>
<a class="counter" href="/tags">29
<div class="counter-sub">Tags</div>
</a>
<a class="counter" href="/categories">3
<div class="counter-sub">Categories</div>
</a>
</div>
<nav class="nav">
</nav>
<div class="search-wrapper">
<input
type="text"
placeholder="Search ..."
v-model="search"
@keydown.down.prevent="navigate(1)"
@keydown.up.prevent="navigate(-1)"
@keyup.enter.prevent="navigate(result[selected].href)"
ref="searchInput"
class="search"
/>
<svg height="100" width="100" ref="resultPoint" class="result-point">
<circle cx="5" cy="5" r="5" fill="#FFF" />
</svg>
<ul class="result-items">
<li v-for="r, i of result" class="result-item" ref="resultItem">
<div class="result-item-wrapper" :class="{ 'result-item-selected': selected === i }">
<div class="result-item-left">
<span class="post-date">
<span class="post-date-day"><sup v-text="moment(r.date).format('D')"></sup></span><span class="post-date-separator" v-text="'/'"></span><span class="post-date-month" v-text="moment(r.date).format('MMM')"></span> <span class="post-date-year" v-text="moment(r.date).format('YYYY')"></span>
</span>
<template v-if="r.author">By <a class="post-author" v-text="r.author"></a></template>
</div>
<div class="result-item-left">
<span class="result-item-separator nav-item-separator" v-text="'//'"></span><a :href="r.href" v-text="r.title" class="result-item-link"></a>
</div>
</div>
</li>
</ul>
</div>
</div>
</div>
<div class="content pure-u-1 pure-u-md-3-4">
<a name="top"></a>
<div class="posts">
<section class="post">
<header class="post-header">
<h1 class="post-title">
<a href="/administration/bash/">Bash Tips &amp; Tricks</a>
</h1>
</header>
<p class="post-meta">
<span class="post-date">
<span class="post-date-day"><sup>11</sup></span><span class="post-date-separator">/</span><span class="post-date-month">Nov</span> <span class="post-date-year">2018</span>
</span>
By <a class="post-author" >Olivier De Ram</a>
<span class="post-reading-time"><i class="fa fa-clock-o"></i> <em>2 min. read</em></span>
<div class="post-categories">
<a class="post-category post-category-administration" href="https://blog.hagfi.sh//categories/administration">administration</a>
<a class="post-category post-category-development" href="https://blog.hagfi.sh//categories/development">development</a>
</div>
</p>
<article class="post-summary">
<p>Usefull bash tips &amp; tricks</p>
</article>
<div class="read-more-link">
<a href="/administration/bash/"><span class="read-more-slashes">//</span>Read More...</a>
</div>
</section>
</div>
<div class="footer">
<hr class="thin" />
<div class="pure-menu pure-menu-horizontal pure-menu-open">
<ul class="footer-menu">
</ul>
</div>
<p>&copy; 2022. All rights reserved.</p>
</div>
</div>
</div>
<script>
var app = new Vue({
el: '#app',
data: {
fuse: null,
search: "",
result: [],
index: [],
selected: 0
},
mounted() {
let self = this
window.addEventListener("keypress", function(e) {
self.$refs.searchInput.focus()
})
let options = {
shouldSort: true,
threshold: 0.6,
location: 0,
distance: 100,
maxPatternLength: 32,
minMatchCharLength: 1,
keys: [
"title",
"author",
"date",
"content"
]
}
axios.get('/index.json')
.then(function (response) {
self.index = response.data
self.fuse = new Fuse(response.data, options)
})
.catch(function (error) {
})
},
watch: {
result(nval, oval) {
nval.length > 0 ? this.pointer(0) : this.pointer(-1)
},
search(nval, oval) {
this.result = this.fuse.search(nval)
}
},
methods: {
navigate(val) {
switch (val) {
case 1: if (this.selected < this.result.length - 1) { this.selected++ }; break;
case -1: if (this.selected > 0 ) { this.selected-- }; break;
default: window.location.href = val; break;
}
this.pointer(this.selected)
},
pointer(selected) {
let self = this
if (selected >= 0) {
Vue.nextTick().then(function() {
let height = self.$refs.resultItem[selected].clientHeight
let top = self.$refs.resultItem[selected].getBoundingClientRect().top
let left = self.$refs.resultItem[selected].getBoundingClientRect().left
self.$refs.resultPoint.style.top = (top+height/2)+'px'
self.$refs.resultPoint.style.left = (left-20)+'px'
})
} else {
this.$refs.resultPoint.style.left = '-50px'
return
}
}
}
})
</script>
</body>
</html>

20
public/tags/bash/index.xml

@ -0,0 +1,20 @@
<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom">
<channel>
<title>bash on Hagfi.sh</title>
<link>https://blog.hagfi.sh/tags/bash/</link>
<description>Recent content in bash on Hagfi.sh</description>
<generator>Hugo -- gohugo.io</generator>
<language>en-us</language>
<lastBuildDate>Sun, 11 Nov 2018 16:01:15 +0100</lastBuildDate><atom:link href="https://blog.hagfi.sh/tags/bash/index.xml" rel="self" type="application/rss+xml" />
<item>
<title>Bash Tips &amp; Tricks</title>
<link>https://blog.hagfi.sh/administration/bash/</link>
<pubDate>Sun, 11 Nov 2018 16:01:15 +0100</pubDate>
<guid>https://blog.hagfi.sh/administration/bash/</guid>
<description>&lt;p&gt;Usefull bash tips &amp;amp; tricks&lt;/p&gt;</description>
</item>
</channel>
</rss>

279
public/tags/boot/index.html

@ -0,0 +1,279 @@
<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en-us">
<head>
<title>
boot // Hagfi.sh
</title>
<link href="http://gmpg.org/xfn/11" rel="profile">
<meta http-equiv="content-type" content="text/html; charset=utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1">
<meta name="description" content="">
<meta name="keywords" content="">
<meta name="author" content="">
<meta name="generator" content="Hugo 0.92.0" />
<meta property="og:title" content="boot" />
<meta property="og:description" content="" />
<meta property="og:type" content="website" />
<meta property="og:locale" content="en_US" />
<meta property="og:url" content="https://blog.hagfi.sh/tags/boot/" />
<link rel="stylesheet" href="//cdnjs.cloudflare.com/ajax/libs/pure/0.5.0/base-min.css">
<link rel="stylesheet" href="//cdnjs.cloudflare.com/ajax/libs/pure/0.5.0/pure-min.css">
<link rel="stylesheet" href="//cdnjs.cloudflare.com/ajax/libs/pure/0.5.0/grids-responsive-min.css">
<link rel="stylesheet" href="https://blog.hagfi.sh//css/redlounge.css">
<link rel="stylesheet" href="https://blog.hagfi.sh//css/prism.css">
<link href="//maxcdn.bootstrapcdn.com/font-awesome/4.5.0/css/font-awesome.min.css" rel="stylesheet">
<link href='//fonts.googleapis.com/css?family=Raleway:400,200,100,700,300,500,600,800' rel='stylesheet' type='text/css'>
<link href='//fonts.googleapis.com/css?family=Libre+Baskerville:400,700,400italic' rel='stylesheet' type='text/css'>
<link rel="apple-touch-icon-precomposed" sizes="144x144" href="/touch-icon-144-precomposed.png">
<link rel="shortcut icon" type="image/x-icon" href="/img/favicon.png">
<link href="https://blog.hagfi.sh/tags/boot/index.xml" rel="alternate" type="application/rss+xml" title="Hagfi.sh" />
<script src="//cdnjs.cloudflare.com/ajax/libs/moment.js/2.18.1/moment.js"></script>
<script src="//cdnjs.cloudflare.com/ajax/libs/vue/2.5.17/vue.min.js"></script>
<script src="//cdnjs.cloudflare.com/ajax/libs/axios/0.18.0/axios.min.js"></script>
<script src="//cdnjs.cloudflare.com/ajax/libs/fuse.js/3.2.1/fuse.min.js"></script>
<script src="//cdn.jsdelivr.net/npm/vuewordcloud@18.7.11/VueWordCloud.js"></script>
<script src="https://blog.hagfi.sh//js/prism.js"></script>
<script type="application/javascript">
var doNotTrack = false;
if (!doNotTrack) {
(function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){
(i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o),
m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m)
})(window,document,'script','https://www.google-analytics.com/analytics.js','ga');
ga('create', 'UA-124890410-1', 'auto');
ga('send', 'pageview');
}
</script>
</head>
<body>
<div id="layout" class="pure-g">
<div class="sidebar pure-u-1 pure-u-md-1-4" id="app">
<div class="header">
<h1 class="brand-title"><a href="/">Hagfi.sh</a></h1>
<h2 class="brand-tagline">A devops guide to the galaxy</h2>
<div class="counters">
<a class="counter" href="/">13
<div class="counter-sub">Documents</div>
</a>
<a class="counter" href="/tags">29
<div class="counter-sub">Tags</div>
</a>
<a class="counter" href="/categories">3
<div class="counter-sub">Categories</div>
</a>
</div>
<nav class="nav">
</nav>
<div class="search-wrapper">
<input
type="text"
placeholder="Search ..."
v-model="search"
@keydown.down.prevent="navigate(1)"
@keydown.up.prevent="navigate(-1)"
@keyup.enter.prevent="navigate(result[selected].href)"
ref="searchInput"
class="search"
/>
<svg height="100" width="100" ref="resultPoint" class="result-point">
<circle cx="5" cy="5" r="5" fill="#FFF" />
</svg>
<ul class="result-items">
<li v-for="r, i of result" class="result-item" ref="resultItem">
<div class="result-item-wrapper" :class="{ 'result-item-selected': selected === i }">
<div class="result-item-left">
<span class="post-date">
<span class="post-date-day"><sup v-text="moment(r.date).format('D')"></sup></span><span class="post-date-separator" v-text="'/'"></span><span class="post-date-month" v-text="moment(r.date).format('MMM')"></span> <span class="post-date-year" v-text="moment(r.date).format('YYYY')"></span>
</span>
<template v-if="r.author">By <a class="post-author" v-text="r.author"></a></template>
</div>
<div class="result-item-left">
<span class="result-item-separator nav-item-separator" v-text="'//'"></span><a :href="r.href" v-text="r.title" class="result-item-link"></a>
</div>
</div>
</li>
</ul>
</div>
</div>
</div>
<div class="content pure-u-1 pure-u-md-3-4">
<a name="top"></a>
<div class="posts">
<section class="post">
<header class="post-header">
<h1 class="post-title">
<a href="/administration/boot-targets/">Changing boot targets</a>
</h1>
</header>
<p class="post-meta">
<span class="post-date">
<span class="post-date-day"><sup>9</sup></span><span class="post-date-separator">/</span><span class="post-date-month">Nov</span> <span class="post-date-year">2018</span>
</span>
By <a class="post-author" >Kristof Vandam</a>
<span class="post-reading-time"><i class="fa fa-clock-o"></i> <em>1 min. read</em></span>
<div class="post-categories">
<a class="post-category post-category-administration" href="https://blog.hagfi.sh//categories/administration">administration</a>
</div>
</p>
<article class="post-summary">
<p>Switch between run levels / environments.</p>
</article>
<div class="read-more-link">
<a href="/administration/boot-targets/"><span class="read-more-slashes">//</span>Read More...</a>
</div>
</section>
</div>
<div class="footer">
<hr class="thin" />
<div class="pure-menu pure-menu-horizontal pure-menu-open">
<ul class="footer-menu">
</ul>
</div>
<p>&copy; 2022. All rights reserved.</p>
</div>
</div>
</div>
<script>
var app = new Vue({
el: '#app',
data: {
fuse: null,
search: "",
result: [],
index: [],
selected: 0
},
mounted() {
let self = this
window.addEventListener("keypress", function(e) {
self.$refs.searchInput.focus()
})
let options = {
shouldSort: true,
threshold: 0.6,
location: 0,
distance: 100,
maxPatternLength: 32,
minMatchCharLength: 1,
keys: [
"title",
"author",
"date",
"content"
]
}
axios.get('/index.json')
.then(function (response) {
self.index = response.data
self.fuse = new Fuse(response.data, options)
})
.catch(function (error) {
})
},
watch: {
result(nval, oval) {
nval.length > 0 ? this.pointer(0) : this.pointer(-1)
},
search(nval, oval) {
this.result = this.fuse.search(nval)
}
},
methods: {
navigate(val) {
switch (val) {
case 1: if (this.selected < this.result.length - 1) { this.selected++ }; break;
case -1: if (this.selected > 0 ) { this.selected-- }; break;
default: window.location.href = val; break;
}
this.pointer(this.selected)
},
pointer(selected) {
let self = this
if (selected >= 0) {
Vue.nextTick().then(function() {
let height = self.$refs.resultItem[selected].clientHeight
let top = self.$refs.resultItem[selected].getBoundingClientRect().top
let left = self.$refs.resultItem[selected].getBoundingClientRect().left
self.$refs.resultPoint.style.top = (top+height/2)+'px'
self.$refs.resultPoint.style.left = (left-20)+'px'
})
} else {
this.$refs.resultPoint.style.left = '-50px'
return
}
}
}
})
</script>
</body>
</html>

20
public/tags/boot/index.xml

@ -0,0 +1,20 @@
<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom">
<channel>
<title>boot on Hagfi.sh</title>
<link>https://blog.hagfi.sh/tags/boot/</link>
<description>Recent content in boot on Hagfi.sh</description>
<generator>Hugo -- gohugo.io</generator>
<language>en-us</language>
<lastBuildDate>Fri, 09 Nov 2018 10:08:15 +0200</lastBuildDate><atom:link href="https://blog.hagfi.sh/tags/boot/index.xml" rel="self" type="application/rss+xml" />
<item>
<title>Changing boot targets</title>
<link>https://blog.hagfi.sh/administration/boot-targets/</link>
<pubDate>Fri, 09 Nov 2018 10:08:15 +0200</pubDate>
<guid>https://blog.hagfi.sh/administration/boot-targets/</guid>
<description>&lt;p&gt;Switch between run levels / environments.&lt;/p&gt;</description>
</item>
</channel>
</rss>

279
public/tags/data/index.html

@ -0,0 +1,279 @@
<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en-us">
<head>
<title>
data // Hagfi.sh
</title>
<link href="http://gmpg.org/xfn/11" rel="profile">
<meta http-equiv="content-type" content="text/html; charset=utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1">
<meta name="description" content="">
<meta name="keywords" content="">
<meta name="author" content="">
<meta name="generator" content="Hugo 0.92.0" />
<meta property="og:title" content="data" />
<meta property="og:description" content="" />
<meta property="og:type" content="website" />
<meta property="og:locale" content="en_US" />
<meta property="og:url" content="https://blog.hagfi.sh/tags/data/" />
<link rel="stylesheet" href="//cdnjs.cloudflare.com/ajax/libs/pure/0.5.0/base-min.css">
<link rel="stylesheet" href="//cdnjs.cloudflare.com/ajax/libs/pure/0.5.0/pure-min.css">
<link rel="stylesheet" href="//cdnjs.cloudflare.com/ajax/libs/pure/0.5.0/grids-responsive-min.css">
<link rel="stylesheet" href="https://blog.hagfi.sh//css/redlounge.css">
<link rel="stylesheet" href="https://blog.hagfi.sh//css/prism.css">
<link href="//maxcdn.bootstrapcdn.com/font-awesome/4.5.0/css/font-awesome.min.css" rel="stylesheet">
<link href='//fonts.googleapis.com/css?family=Raleway:400,200,100,700,300,500,600,800' rel='stylesheet' type='text/css'>
<link href='//fonts.googleapis.com/css?family=Libre+Baskerville:400,700,400italic' rel='stylesheet' type='text/css'>
<link rel="apple-touch-icon-precomposed" sizes="144x144" href="/touch-icon-144-precomposed.png">
<link rel="shortcut icon" type="image/x-icon" href="/img/favicon.png">
<link href="https://blog.hagfi.sh/tags/data/index.xml" rel="alternate" type="application/rss+xml" title="Hagfi.sh" />
<script src="//cdnjs.cloudflare.com/ajax/libs/moment.js/2.18.1/moment.js"></script>
<script src="//cdnjs.cloudflare.com/ajax/libs/vue/2.5.17/vue.min.js"></script>
<script src="//cdnjs.cloudflare.com/ajax/libs/axios/0.18.0/axios.min.js"></script>
<script src="//cdnjs.cloudflare.com/ajax/libs/fuse.js/3.2.1/fuse.min.js"></script>
<script src="//cdn.jsdelivr.net/npm/vuewordcloud@18.7.11/VueWordCloud.js"></script>
<script src="https://blog.hagfi.sh//js/prism.js"></script>
<script type="application/javascript">
var doNotTrack = false;
if (!doNotTrack) {
(function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){
(i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o),
m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m)
})(window,document,'script','https://www.google-analytics.com/analytics.js','ga');
ga('create', 'UA-124890410-1', 'auto');
ga('send', 'pageview');
}
</script>
</head>
<body>
<div id="layout" class="pure-g">
<div class="sidebar pure-u-1 pure-u-md-1-4" id="app">
<div class="header">
<h1 class="brand-title"><a href="/">Hagfi.sh</a></h1>
<h2 class="brand-tagline">A devops guide to the galaxy</h2>
<div class="counters">
<a class="counter" href="/">13
<div class="counter-sub">Documents</div>
</a>
<a class="counter" href="/tags">29
<div class="counter-sub">Tags</div>
</a>
<a class="counter" href="/categories">3
<div class="counter-sub">Categories</div>
</a>
</div>
<nav class="nav">
</nav>
<div class="search-wrapper">
<input
type="text"
placeholder="Search ..."
v-model="search"
@keydown.down.prevent="navigate(1)"
@keydown.up.prevent="navigate(-1)"
@keyup.enter.prevent="navigate(result[selected].href)"
ref="searchInput"
class="search"
/>
<svg height="100" width="100" ref="resultPoint" class="result-point">
<circle cx="5" cy="5" r="5" fill="#FFF" />
</svg>
<ul class="result-items">
<li v-for="r, i of result" class="result-item" ref="resultItem">
<div class="result-item-wrapper" :class="{ 'result-item-selected': selected === i }">
<div class="result-item-left">
<span class="post-date">
<span class="post-date-day"><sup v-text="moment(r.date).format('D')"></sup></span><span class="post-date-separator" v-text="'/'"></span><span class="post-date-month" v-text="moment(r.date).format('MMM')"></span> <span class="post-date-year" v-text="moment(r.date).format('YYYY')"></span>
</span>
<template v-if="r.author">By <a class="post-author" v-text="r.author"></a></template>
</div>
<div class="result-item-left">
<span class="result-item-separator nav-item-separator" v-text="'//'"></span><a :href="r.href" v-text="r.title" class="result-item-link"></a>
</div>
</div>
</li>
</ul>
</div>
</div>
</div>
<div class="content pure-u-1 pure-u-md-3-4">
<a name="top"></a>
<div class="posts">
<section class="post">
<header class="post-header">
<h1 class="post-title">
<a href="/administration/autofs/">Mount with automount (autofs)</a>
</h1>
</header>
<p class="post-meta">
<span class="post-date">
<span class="post-date-day"><sup>9</sup></span><span class="post-date-separator">/</span><span class="post-date-month">Nov</span> <span class="post-date-year">2018</span>
</span>
By <a class="post-author" >Kristof Vandam</a>
<span class="post-reading-time"><i class="fa fa-clock-o"></i> <em>2 min. read</em></span>
<div class="post-categories">
<a class="post-category post-category-administration" href="https://blog.hagfi.sh//categories/administration">administration</a>
</div>
</p>
<article class="post-summary">
<p>Automagically mount remote directories on login.</p>
</article>
<div class="read-more-link">
<a href="/administration/autofs/"><span class="read-more-slashes">//</span>Read More...</a>
</div>
</section>
</div>
<div class="footer">
<hr class="thin" />
<div class="pure-menu pure-menu-horizontal pure-menu-open">
<ul class="footer-menu">
</ul>
</div>
<p>&copy; 2022. All rights reserved.</p>
</div>
</div>
</div>
<script>
var app = new Vue({
el: '#app',
data: {
fuse: null,
search: "",
result: [],
index: [],
selected: 0
},
mounted() {
let self = this
window.addEventListener("keypress", function(e) {
self.$refs.searchInput.focus()
})
let options = {
shouldSort: true,
threshold: 0.6,
location: 0,
distance: 100,
maxPatternLength: 32,
minMatchCharLength: 1,
keys: [
"title",
"author",
"date",
"content"
]
}
axios.get('/index.json')
.then(function (response) {
self.index = response.data
self.fuse = new Fuse(response.data, options)
})
.catch(function (error) {
})
},
watch: {
result(nval, oval) {
nval.length > 0 ? this.pointer(0) : this.pointer(-1)
},
search(nval, oval) {
this.result = this.fuse.search(nval)
}
},
methods: {
navigate(val) {
switch (val) {
case 1: if (this.selected < this.result.length - 1) { this.selected++ }; break;
case -1: if (this.selected > 0 ) { this.selected-- }; break;
default: window.location.href = val; break;
}
this.pointer(this.selected)
},
pointer(selected) {
let self = this
if (selected >= 0) {
Vue.nextTick().then(function() {
let height = self.$refs.resultItem[selected].clientHeight
let top = self.$refs.resultItem[selected].getBoundingClientRect().top
let left = self.$refs.resultItem[selected].getBoundingClientRect().left
self.$refs.resultPoint.style.top = (top+height/2)+'px'
self.$refs.resultPoint.style.left = (left-20)+'px'
})
} else {
this.$refs.resultPoint.style.left = '-50px'
return
}
}
}
})
</script>
</body>
</html>

20
public/tags/data/index.xml

@ -0,0 +1,20 @@
<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom">
<channel>
<title>data on Hagfi.sh</title>
<link>https://blog.hagfi.sh/tags/data/</link>
<description>Recent content in data on Hagfi.sh</description>
<generator>Hugo -- gohugo.io</generator>
<language>en-us</language>
<lastBuildDate>Fri, 09 Nov 2018 10:08:15 +0200</lastBuildDate><atom:link href="https://blog.hagfi.sh/tags/data/index.xml" rel="self" type="application/rss+xml" />
<item>
<title>Mount with automount (autofs)</title>
<link>https://blog.hagfi.sh/administration/autofs/</link>
<pubDate>Fri, 09 Nov 2018 10:08:15 +0200</pubDate>
<guid>https://blog.hagfi.sh/administration/autofs/</guid>
<description>&lt;p&gt;Automagically mount remote directories on login.&lt;/p&gt;</description>
</item>
</channel>
</rss>

321
public/tags/directory/index.html

@ -0,0 +1,321 @@
<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en-us">
<head>
<title>
directory // Hagfi.sh
</title>
<link href="http://gmpg.org/xfn/11" rel="profile">
<meta http-equiv="content-type" content="text/html; charset=utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1">
<meta name="description" content="">
<meta name="keywords" content="">
<meta name="author" content="">
<meta name="generator" content="Hugo 0.92.0" />
<meta property="og:title" content="directory" />
<meta property="og:description" content="" />
<meta property="og:type" content="website" />
<meta property="og:locale" content="en_US" />
<meta property="og:url" content="https://blog.hagfi.sh/tags/directory/" />
<link rel="stylesheet" href="//cdnjs.cloudflare.com/ajax/libs/pure/0.5.0/base-min.css">
<link rel="stylesheet" href="//cdnjs.cloudflare.com/ajax/libs/pure/0.5.0/pure-min.css">
<link rel="stylesheet" href="//cdnjs.cloudflare.com/ajax/libs/pure/0.5.0/grids-responsive-min.css">
<link rel="stylesheet" href="https://blog.hagfi.sh//css/redlounge.css">
<link rel="stylesheet" href="https://blog.hagfi.sh//css/prism.css">
<link href="//maxcdn.bootstrapcdn.com/font-awesome/4.5.0/css/font-awesome.min.css" rel="stylesheet">
<link href='//fonts.googleapis.com/css?family=Raleway:400,200,100,700,300,500,600,800' rel='stylesheet' type='text/css'>
<link href='//fonts.googleapis.com/css?family=Libre+Baskerville:400,700,400italic' rel='stylesheet' type='text/css'>
<link rel="apple-touch-icon-precomposed" sizes="144x144" href="/touch-icon-144-precomposed.png">
<link rel="shortcut icon" type="image/x-icon" href="/img/favicon.png">
<link href="https://blog.hagfi.sh/tags/directory/index.xml" rel="alternate" type="application/rss+xml" title="Hagfi.sh" />
<script src="//cdnjs.cloudflare.com/ajax/libs/moment.js/2.18.1/moment.js"></script>
<script src="//cdnjs.cloudflare.com/ajax/libs/vue/2.5.17/vue.min.js"></script>
<script src="//cdnjs.cloudflare.com/ajax/libs/axios/0.18.0/axios.min.js"></script>
<script src="//cdnjs.cloudflare.com/ajax/libs/fuse.js/3.2.1/fuse.min.js"></script>
<script src="//cdn.jsdelivr.net/npm/vuewordcloud@18.7.11/VueWordCloud.js"></script>
<script src="https://blog.hagfi.sh//js/prism.js"></script>
<script type="application/javascript">
var doNotTrack = false;
if (!doNotTrack) {
(function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){
(i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o),
m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m)
})(window,document,'script','https://www.google-analytics.com/analytics.js','ga');
ga('create', 'UA-124890410-1', 'auto');
ga('send', 'pageview');
}
</script>
</head>
<body>
<div id="layout" class="pure-g">
<div class="sidebar pure-u-1 pure-u-md-1-4" id="app">
<div class="header">
<h1 class="brand-title"><a href="/">Hagfi.sh</a></h1>
<h2 class="brand-tagline">A devops guide to the galaxy</h2>
<div class="counters">
<a class="counter" href="/">13
<div class="counter-sub">Documents</div>
</a>
<a class="counter" href="/tags">29
<div class="counter-sub">Tags</div>
</a>
<a class="counter" href="/categories">3
<div class="counter-sub">Categories</div>
</a>
</div>
<nav class="nav">
</nav>
<div class="search-wrapper">
<input
type="text"
placeholder="Search ..."
v-model="search"
@keydown.down.prevent="navigate(1)"
@keydown.up.prevent="navigate(-1)"
@keyup.enter.prevent="navigate(result[selected].href)"
ref="searchInput"
class="search"
/>
<svg height="100" width="100" ref="resultPoint" class="result-point">
<circle cx="5" cy="5" r="5" fill="#FFF" />
</svg>
<ul class="result-items">
<li v-for="r, i of result" class="result-item" ref="resultItem">
<div class="result-item-wrapper" :class="{ 'result-item-selected': selected === i }">
<div class="result-item-left">
<span class="post-date">
<span class="post-date-day"><sup v-text="moment(r.date).format('D')"></sup></span><span class="post-date-separator" v-text="'/'"></span><span class="post-date-month" v-text="moment(r.date).format('MMM')"></span> <span class="post-date-year" v-text="moment(r.date).format('YYYY')"></span>
</span>
<template v-if="r.author">By <a class="post-author" v-text="r.author"></a></template>
</div>
<div class="result-item-left">
<span class="result-item-separator nav-item-separator" v-text="'//'"></span><a :href="r.href" v-text="r.title" class="result-item-link"></a>
</div>
</div>
</li>
</ul>
</div>
</div>
</div>
<div class="content pure-u-1 pure-u-md-3-4">
<a name="top"></a>
<div class="posts">
<section class="post">
<header class="post-header">
<h1 class="post-title">
<a href="/tools/fatrace/">Fatrace: Report system wide file access events</a>
</h1>
</header>
<p class="post-meta">
<span class="post-date">
<span class="post-date-day"><sup>5</sup></span><span class="post-date-separator">/</span><span class="post-date-month">Nov</span> <span class="post-date-year">2018</span>
</span>
By <a class="post-author" >Kristof Vandam</a>
<span class="post-reading-time"><i class="fa fa-clock-o"></i> <em>1 min. read</em></span>
<div class="post-categories">
<a class="post-category post-category-tools" href="https://blog.hagfi.sh//categories/tools">tools</a>
<a class="post-category post-category-administration" href="https://blog.hagfi.sh//categories/administration">administration</a>
</div>
</p>
<article class="post-summary">
<p>fatrace watches every file on server (except from itself and other kernel file systems).</p>
</article>
<div class="read-more-link">
<a href="/tools/fatrace/"><span class="read-more-slashes">//</span>Read More...</a>
</div>
</section>
<section class="post">
<header class="post-header">
<h1 class="post-title">
<a href="/tools/ncdu/">NCDU: NCurses Disk Usage</a>
</h1>
</header>
<p class="post-meta">
<span class="post-date">
<span class="post-date-day"><sup>17</sup></span><span class="post-date-separator">/</span><span class="post-date-month">Sep</span> <span class="post-date-year">2018</span>
</span>
By <a class="post-author" >Kristof Vandam</a>
<span class="post-reading-time"><i class="fa fa-clock-o"></i> <em>2 min. read</em></span>
<div class="post-categories">
<a class="post-category post-category-tools" href="https://blog.hagfi.sh//categories/tools">tools</a>
<a class="post-category post-category-administration" href="https://blog.hagfi.sh//categories/administration">administration</a>
</div>
</p>
<article class="post-summary">
<p>ncdu is a command line tool to scan and calculate directory and file sizes.</p>
</article>
<div class="read-more-link">
<a href="/tools/ncdu/"><span class="read-more-slashes">//</span>Read More...</a>
</div>
</section>
</div>
<div class="footer">
<hr class="thin" />
<div class="pure-menu pure-menu-horizontal pure-menu-open">
<ul class="footer-menu">
</ul>
</div>
<p>&copy; 2022. All rights reserved.</p>
</div>
</div>
</div>
<script>
var app = new Vue({
el: '#app',
data: {
fuse: null,
search: "",
result: [],
index: [],
selected: 0
},
mounted() {
let self = this
window.addEventListener("keypress", function(e) {
self.$refs.searchInput.focus()
})
let options = {
shouldSort: true,
threshold: 0.6,
location: 0,
distance: 100,
maxPatternLength: 32,
minMatchCharLength: 1,
keys: [
"title",
"author",
"date",
"content"
]
}
axios.get('/index.json')
.then(function (response) {
self.index = response.data
self.fuse = new Fuse(response.data, options)
})
.catch(function (error) {
})
},
watch: {
result(nval, oval) {
nval.length > 0 ? this.pointer(0) : this.pointer(-1)
},
search(nval, oval) {
this.result = this.fuse.search(nval)
}
},
methods: {
navigate(val) {
switch (val) {
case 1: if (this.selected < this.result.length - 1) { this.selected++ }; break;
case -1: if (this.selected > 0 ) { this.selected-- }; break;
default: window.location.href = val; break;
}
this.pointer(this.selected)
},
pointer(selected) {
let self = this
if (selected >= 0) {
Vue.nextTick().then(function() {
let height = self.$refs.resultItem[selected].clientHeight
let top = self.$refs.resultItem[selected].getBoundingClientRect().top
let left = self.$refs.resultItem[selected].getBoundingClientRect().left
self.$refs.resultPoint.style.top = (top+height/2)+'px'
self.$refs.resultPoint.style.left = (left-20)+'px'
})
} else {
this.$refs.resultPoint.style.left = '-50px'
return
}
}
}
})
</script>
</body>
</html>

29
public/tags/directory/index.xml

@ -0,0 +1,29 @@
<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom">
<channel>
<title>directory on Hagfi.sh</title>
<link>https://blog.hagfi.sh/tags/directory/</link>
<description>Recent content in directory on Hagfi.sh</description>
<generator>Hugo -- gohugo.io</generator>
<language>en-us</language>
<lastBuildDate>Mon, 05 Nov 2018 22:13:49 +0200</lastBuildDate><atom:link href="https://blog.hagfi.sh/tags/directory/index.xml" rel="self" type="application/rss+xml" />
<item>
<title>Fatrace: Report system wide file access events</title>
<link>https://blog.hagfi.sh/tools/fatrace/</link>
<pubDate>Mon, 05 Nov 2018 22:13:49 +0200</pubDate>
<guid>https://blog.hagfi.sh/tools/fatrace/</guid>
<description>&lt;p&gt;fatrace watches every file on server (except from itself and other kernel file systems).&lt;/p&gt;</description>
</item>
<item>
<title>NCDU: NCurses Disk Usage</title>
<link>https://blog.hagfi.sh/tools/ncdu/</link>
<pubDate>Mon, 17 Sep 2018 22:18:38 +0200</pubDate>
<guid>https://blog.hagfi.sh/tools/ncdu/</guid>
<description>&lt;p&gt;ncdu is a command line tool to scan and calculate directory and file sizes.&lt;/p&gt;</description>
</item>
</channel>
</rss>

279
public/tags/disk/index.html

@ -0,0 +1,279 @@
<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en-us">
<head>
<title>
disk // Hagfi.sh
</title>
<link href="http://gmpg.org/xfn/11" rel="profile">
<meta http-equiv="content-type" content="text/html; charset=utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1">
<meta name="description" content="">
<meta name="keywords" content="">
<meta name="author" content="">
<meta name="generator" content="Hugo 0.92.0" />
<meta property="og:title" content="disk" />
<meta property="og:description" content="" />
<meta property="og:type" content="website" />
<meta property="og:locale" content="en_US" />
<meta property="og:url" content="https://blog.hagfi.sh/tags/disk/" />
<link rel="stylesheet" href="//cdnjs.cloudflare.com/ajax/libs/pure/0.5.0/base-min.css">
<link rel="stylesheet" href="//cdnjs.cloudflare.com/ajax/libs/pure/0.5.0/pure-min.css">
<link rel="stylesheet" href="//cdnjs.cloudflare.com/ajax/libs/pure/0.5.0/grids-responsive-min.css">
<link rel="stylesheet" href="https://blog.hagfi.sh//css/redlounge.css">
<link rel="stylesheet" href="https://blog.hagfi.sh//css/prism.css">
<link href="//maxcdn.bootstrapcdn.com/font-awesome/4.5.0/css/font-awesome.min.css" rel="stylesheet">
<link href='//fonts.googleapis.com/css?family=Raleway:400,200,100,700,300,500,600,800' rel='stylesheet' type='text/css'>
<link href='//fonts.googleapis.com/css?family=Libre+Baskerville:400,700,400italic' rel='stylesheet' type='text/css'>
<link rel="apple-touch-icon-precomposed" sizes="144x144" href="/touch-icon-144-precomposed.png">
<link rel="shortcut icon" type="image/x-icon" href="/img/favicon.png">
<link href="https://blog.hagfi.sh/tags/disk/index.xml" rel="alternate" type="application/rss+xml" title="Hagfi.sh" />
<script src="//cdnjs.cloudflare.com/ajax/libs/moment.js/2.18.1/moment.js"></script>
<script src="//cdnjs.cloudflare.com/ajax/libs/vue/2.5.17/vue.min.js"></script>
<script src="//cdnjs.cloudflare.com/ajax/libs/axios/0.18.0/axios.min.js"></script>
<script src="//cdnjs.cloudflare.com/ajax/libs/fuse.js/3.2.1/fuse.min.js"></script>
<script src="//cdn.jsdelivr.net/npm/vuewordcloud@18.7.11/VueWordCloud.js"></script>
<script src="https://blog.hagfi.sh//js/prism.js"></script>
<script type="application/javascript">
var doNotTrack = false;
if (!doNotTrack) {
(function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){
(i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o),
m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m)
})(window,document,'script','https://www.google-analytics.com/analytics.js','ga');
ga('create', 'UA-124890410-1', 'auto');
ga('send', 'pageview');
}
</script>
</head>
<body>
<div id="layout" class="pure-g">
<div class="sidebar pure-u-1 pure-u-md-1-4" id="app">
<div class="header">
<h1 class="brand-title"><a href="/">Hagfi.sh</a></h1>
<h2 class="brand-tagline">A devops guide to the galaxy</h2>
<div class="counters">
<a class="counter" href="/">13
<div class="counter-sub">Documents</div>
</a>
<a class="counter" href="/tags">29
<div class="counter-sub">Tags</div>
</a>
<a class="counter" href="/categories">3
<div class="counter-sub">Categories</div>
</a>
</div>
<nav class="nav">
</nav>
<div class="search-wrapper">
<input
type="text"
placeholder="Search ..."
v-model="search"
@keydown.down.prevent="navigate(1)"
@keydown.up.prevent="navigate(-1)"
@keyup.enter.prevent="navigate(result[selected].href)"
ref="searchInput"
class="search"
/>
<svg height="100" width="100" ref="resultPoint" class="result-point">
<circle cx="5" cy="5" r="5" fill="#FFF" />
</svg>
<ul class="result-items">
<li v-for="r, i of result" class="result-item" ref="resultItem">
<div class="result-item-wrapper" :class="{ 'result-item-selected': selected === i }">
<div class="result-item-left">
<span class="post-date">
<span class="post-date-day"><sup v-text="moment(r.date).format('D')"></sup></span><span class="post-date-separator" v-text="'/'"></span><span class="post-date-month" v-text="moment(r.date).format('MMM')"></span> <span class="post-date-year" v-text="moment(r.date).format('YYYY')"></span>
</span>
<template v-if="r.author">By <a class="post-author" v-text="r.author"></a></template>
</div>
<div class="result-item-left">
<span class="result-item-separator nav-item-separator" v-text="'//'"></span><a :href="r.href" v-text="r.title" class="result-item-link"></a>
</div>
</div>
</li>
</ul>
</div>
</div>
</div>
<div class="content pure-u-1 pure-u-md-3-4">
<a name="top"></a>
<div class="posts">
<section class="post">
<header class="post-header">
<h1 class="post-title">
<a href="/administration/luks-encryption/">Luks Encryption</a>
</h1>
</header>
<p class="post-meta">
<span class="post-date">
<span class="post-date-day"><sup>23</sup></span><span class="post-date-separator">/</span><span class="post-date-month">Aug</span> <span class="post-date-year">2018</span>
</span>
By <a class="post-author" >Kristof Vandam</a>
<span class="post-reading-time"><i class="fa fa-clock-o"></i> <em>4 min. read</em></span>
<div class="post-categories">
<a class="post-category post-category-administration" href="https://blog.hagfi.sh//categories/administration">administration</a>
</div>
</p>
<article class="post-summary">
<p>Create an encrypted partition that will automatically mount at boot.</p>
</article>
<div class="read-more-link">
<a href="/administration/luks-encryption/"><span class="read-more-slashes">//</span>Read More...</a>
</div>
</section>
</div>
<div class="footer">
<hr class="thin" />
<div class="pure-menu pure-menu-horizontal pure-menu-open">
<ul class="footer-menu">
</ul>
</div>
<p>&copy; 2022. All rights reserved.</p>
</div>
</div>
</div>
<script>
var app = new Vue({
el: '#app',
data: {
fuse: null,
search: "",
result: [],
index: [],
selected: 0
},
mounted() {
let self = this
window.addEventListener("keypress", function(e) {
self.$refs.searchInput.focus()
})
let options = {
shouldSort: true,
threshold: 0.6,
location: 0,
distance: 100,
maxPatternLength: 32,
minMatchCharLength: 1,
keys: [
"title",
"author",
"date",
"content"
]
}
axios.get('/index.json')
.then(function (response) {
self.index = response.data
self.fuse = new Fuse(response.data, options)
})
.catch(function (error) {
})
},
watch: {
result(nval, oval) {
nval.length > 0 ? this.pointer(0) : this.pointer(-1)
},
search(nval, oval) {
this.result = this.fuse.search(nval)
}
},
methods: {
navigate(val) {
switch (val) {
case 1: if (this.selected < this.result.length - 1) { this.selected++ }; break;
case -1: if (this.selected > 0 ) { this.selected-- }; break;
default: window.location.href = val; break;
}
this.pointer(this.selected)
},
pointer(selected) {
let self = this
if (selected >= 0) {
Vue.nextTick().then(function() {
let height = self.$refs.resultItem[selected].clientHeight
let top = self.$refs.resultItem[selected].getBoundingClientRect().top
let left = self.$refs.resultItem[selected].getBoundingClientRect().left
self.$refs.resultPoint.style.top = (top+height/2)+'px'
self.$refs.resultPoint.style.left = (left-20)+'px'
})
} else {
this.$refs.resultPoint.style.left = '-50px'
return
}
}
}
})
</script>
</body>
</html>

20
public/tags/disk/index.xml

@ -0,0 +1,20 @@
<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom">
<channel>
<title>disk on Hagfi.sh</title>
<link>https://blog.hagfi.sh/tags/disk/</link>
<description>Recent content in disk on Hagfi.sh</description>
<generator>Hugo -- gohugo.io</generator>
<language>en-us</language>
<lastBuildDate>Thu, 23 Aug 2018 22:08:15 +0200</lastBuildDate><atom:link href="https://blog.hagfi.sh/tags/disk/index.xml" rel="self" type="application/rss+xml" />
<item>
<title>Luks Encryption</title>
<link>https://blog.hagfi.sh/administration/luks-encryption/</link>
<pubDate>Thu, 23 Aug 2018 22:08:15 +0200</pubDate>
<guid>https://blog.hagfi.sh/administration/luks-encryption/</guid>
<description>&lt;p&gt;Create an encrypted partition that will automatically mount at boot.&lt;/p&gt;</description>
</item>
</channel>
</rss>

281
public/tags/du/index.html

@ -0,0 +1,281 @@
<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en-us">
<head>
<title>
du // Hagfi.sh
</title>
<link href="http://gmpg.org/xfn/11" rel="profile">
<meta http-equiv="content-type" content="text/html; charset=utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1">
<meta name="description" content="">
<meta name="keywords" content="">
<meta name="author" content="">
<meta name="generator" content="Hugo 0.92.0" />
<meta property="og:title" content="du" />
<meta property="og:description" content="" />
<meta property="og:type" content="website" />
<meta property="og:locale" content="en_US" />
<meta property="og:url" content="https://blog.hagfi.sh/tags/du/" />
<link rel="stylesheet" href="//cdnjs.cloudflare.com/ajax/libs/pure/0.5.0/base-min.css">
<link rel="stylesheet" href="//cdnjs.cloudflare.com/ajax/libs/pure/0.5.0/pure-min.css">
<link rel="stylesheet" href="//cdnjs.cloudflare.com/ajax/libs/pure/0.5.0/grids-responsive-min.css">
<link rel="stylesheet" href="https://blog.hagfi.sh//css/redlounge.css">
<link rel="stylesheet" href="https://blog.hagfi.sh//css/prism.css">
<link href="//maxcdn.bootstrapcdn.com/font-awesome/4.5.0/css/font-awesome.min.css" rel="stylesheet">
<link href='//fonts.googleapis.com/css?family=Raleway:400,200,100,700,300,500,600,800' rel='stylesheet' type='text/css'>
<link href='//fonts.googleapis.com/css?family=Libre+Baskerville:400,700,400italic' rel='stylesheet' type='text/css'>
<link rel="apple-touch-icon-precomposed" sizes="144x144" href="/touch-icon-144-precomposed.png">
<link rel="shortcut icon" type="image/x-icon" href="/img/favicon.png">
<link href="https://blog.hagfi.sh/tags/du/index.xml" rel="alternate" type="application/rss+xml" title="Hagfi.sh" />
<script src="//cdnjs.cloudflare.com/ajax/libs/moment.js/2.18.1/moment.js"></script>
<script src="//cdnjs.cloudflare.com/ajax/libs/vue/2.5.17/vue.min.js"></script>
<script src="//cdnjs.cloudflare.com/ajax/libs/axios/0.18.0/axios.min.js"></script>
<script src="//cdnjs.cloudflare.com/ajax/libs/fuse.js/3.2.1/fuse.min.js"></script>
<script src="//cdn.jsdelivr.net/npm/vuewordcloud@18.7.11/VueWordCloud.js"></script>
<script src="https://blog.hagfi.sh//js/prism.js"></script>
<script type="application/javascript">
var doNotTrack = false;
if (!doNotTrack) {
(function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){
(i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o),
m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m)
})(window,document,'script','https://www.google-analytics.com/analytics.js','ga');
ga('create', 'UA-124890410-1', 'auto');
ga('send', 'pageview');
}
</script>
</head>
<body>
<div id="layout" class="pure-g">
<div class="sidebar pure-u-1 pure-u-md-1-4" id="app">
<div class="header">
<h1 class="brand-title"><a href="/">Hagfi.sh</a></h1>
<h2 class="brand-tagline">A devops guide to the galaxy</h2>
<div class="counters">
<a class="counter" href="/">13
<div class="counter-sub">Documents</div>
</a>
<a class="counter" href="/tags">29
<div class="counter-sub">Tags</div>
</a>
<a class="counter" href="/categories">3
<div class="counter-sub">Categories</div>
</a>
</div>
<nav class="nav">
</nav>
<div class="search-wrapper">
<input
type="text"
placeholder="Search ..."
v-model="search"
@keydown.down.prevent="navigate(1)"
@keydown.up.prevent="navigate(-1)"
@keyup.enter.prevent="navigate(result[selected].href)"
ref="searchInput"
class="search"
/>
<svg height="100" width="100" ref="resultPoint" class="result-point">
<circle cx="5" cy="5" r="5" fill="#FFF" />
</svg>
<ul class="result-items">
<li v-for="r, i of result" class="result-item" ref="resultItem">
<div class="result-item-wrapper" :class="{ 'result-item-selected': selected === i }">
<div class="result-item-left">
<span class="post-date">
<span class="post-date-day"><sup v-text="moment(r.date).format('D')"></sup></span><span class="post-date-separator" v-text="'/'"></span><span class="post-date-month" v-text="moment(r.date).format('MMM')"></span> <span class="post-date-year" v-text="moment(r.date).format('YYYY')"></span>
</span>
<template v-if="r.author">By <a class="post-author" v-text="r.author"></a></template>
</div>
<div class="result-item-left">
<span class="result-item-separator nav-item-separator" v-text="'//'"></span><a :href="r.href" v-text="r.title" class="result-item-link"></a>
</div>
</div>
</li>
</ul>
</div>
</div>
</div>
<div class="content pure-u-1 pure-u-md-3-4">
<a name="top"></a>
<div class="posts">
<section class="post">
<header class="post-header">
<h1 class="post-title">
<a href="/tools/ncdu/">NCDU: NCurses Disk Usage</a>
</h1>
</header>
<p class="post-meta">
<span class="post-date">
<span class="post-date-day"><sup>17</sup></span><span class="post-date-separator">/</span><span class="post-date-month">Sep</span> <span class="post-date-year">2018</span>
</span>
By <a class="post-author" >Kristof Vandam</a>
<span class="post-reading-time"><i class="fa fa-clock-o"></i> <em>2 min. read</em></span>
<div class="post-categories">
<a class="post-category post-category-tools" href="https://blog.hagfi.sh//categories/tools">tools</a>
<a class="post-category post-category-administration" href="https://blog.hagfi.sh//categories/administration">administration</a>
</div>
</p>
<article class="post-summary">
<p>ncdu is a command line tool to scan and calculate directory and file sizes.</p>
</article>
<div class="read-more-link">
<a href="/tools/ncdu/"><span class="read-more-slashes">//</span>Read More...</a>
</div>
</section>
</div>
<div class="footer">
<hr class="thin" />
<div class="pure-menu pure-menu-horizontal pure-menu-open">
<ul class="footer-menu">
</ul>
</div>
<p>&copy; 2022. All rights reserved.</p>
</div>
</div>
</div>
<script>
var app = new Vue({
el: '#app',
data: {
fuse: null,
search: "",
result: [],
index: [],
selected: 0
},
mounted() {
let self = this
window.addEventListener("keypress", function(e) {
self.$refs.searchInput.focus()
})
let options = {
shouldSort: true,
threshold: 0.6,
location: 0,
distance: 100,
maxPatternLength: 32,
minMatchCharLength: 1,
keys: [
"title",
"author",
"date",
"content"
]
}
axios.get('/index.json')
.then(function (response) {
self.index = response.data
self.fuse = new Fuse(response.data, options)
})
.catch(function (error) {
})
},
watch: {
result(nval, oval) {
nval.length > 0 ? this.pointer(0) : this.pointer(-1)
},
search(nval, oval) {
this.result = this.fuse.search(nval)
}
},
methods: {
navigate(val) {
switch (val) {
case 1: if (this.selected < this.result.length - 1) { this.selected++ }; break;
case -1: if (this.selected > 0 ) { this.selected-- }; break;
default: window.location.href = val; break;
}
this.pointer(this.selected)
},
pointer(selected) {
let self = this
if (selected >= 0) {
Vue.nextTick().then(function() {
let height = self.$refs.resultItem[selected].clientHeight
let top = self.$refs.resultItem[selected].getBoundingClientRect().top
let left = self.$refs.resultItem[selected].getBoundingClientRect().left
self.$refs.resultPoint.style.top = (top+height/2)+'px'
self.$refs.resultPoint.style.left = (left-20)+'px'
})
} else {
this.$refs.resultPoint.style.left = '-50px'
return
}
}
}
})
</script>
</body>
</html>

20
public/tags/du/index.xml

@ -0,0 +1,20 @@
<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom">
<channel>
<title>du on Hagfi.sh</title>
<link>https://blog.hagfi.sh/tags/du/</link>
<description>Recent content in du on Hagfi.sh</description>
<generator>Hugo -- gohugo.io</generator>
<language>en-us</language>
<lastBuildDate>Mon, 17 Sep 2018 22:18:38 +0200</lastBuildDate><atom:link href="https://blog.hagfi.sh/tags/du/index.xml" rel="self" type="application/rss+xml" />
<item>
<title>NCDU: NCurses Disk Usage</title>
<link>https://blog.hagfi.sh/tools/ncdu/</link>
<pubDate>Mon, 17 Sep 2018 22:18:38 +0200</pubDate>
<guid>https://blog.hagfi.sh/tools/ncdu/</guid>
<description>&lt;p&gt;ncdu is a command line tool to scan and calculate directory and file sizes.&lt;/p&gt;</description>
</item>
</channel>
</rss>

279
public/tags/encryption/index.html

@ -0,0 +1,279 @@
<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en-us">
<head>
<title>
encryption // Hagfi.sh
</title>
<link href="http://gmpg.org/xfn/11" rel="profile">
<meta http-equiv="content-type" content="text/html; charset=utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1">
<meta name="description" content="">
<meta name="keywords" content="">
<meta name="author" content="">
<meta name="generator" content="Hugo 0.92.0" />
<meta property="og:title" content="encryption" />
<meta property="og:description" content="" />
<meta property="og:type" content="website" />
<meta property="og:locale" content="en_US" />
<meta property="og:url" content="https://blog.hagfi.sh/tags/encryption/" />
<link rel="stylesheet" href="//cdnjs.cloudflare.com/ajax/libs/pure/0.5.0/base-min.css">
<link rel="stylesheet" href="//cdnjs.cloudflare.com/ajax/libs/pure/0.5.0/pure-min.css">
<link rel="stylesheet" href="//cdnjs.cloudflare.com/ajax/libs/pure/0.5.0/grids-responsive-min.css">
<link rel="stylesheet" href="https://blog.hagfi.sh//css/redlounge.css">
<link rel="stylesheet" href="https://blog.hagfi.sh//css/prism.css">
<link href="//maxcdn.bootstrapcdn.com/font-awesome/4.5.0/css/font-awesome.min.css" rel="stylesheet">
<link href='//fonts.googleapis.com/css?family=Raleway:400,200,100,700,300,500,600,800' rel='stylesheet' type='text/css'>
<link href='//fonts.googleapis.com/css?family=Libre+Baskerville:400,700,400italic' rel='stylesheet' type='text/css'>
<link rel="apple-touch-icon-precomposed" sizes="144x144" href="/touch-icon-144-precomposed.png">
<link rel="shortcut icon" type="image/x-icon" href="/img/favicon.png">
<link href="https://blog.hagfi.sh/tags/encryption/index.xml" rel="alternate" type="application/rss+xml" title="Hagfi.sh" />
<script src="//cdnjs.cloudflare.com/ajax/libs/moment.js/2.18.1/moment.js"></script>
<script src="//cdnjs.cloudflare.com/ajax/libs/vue/2.5.17/vue.min.js"></script>
<script src="//cdnjs.cloudflare.com/ajax/libs/axios/0.18.0/axios.min.js"></script>
<script src="//cdnjs.cloudflare.com/ajax/libs/fuse.js/3.2.1/fuse.min.js"></script>
<script src="//cdn.jsdelivr.net/npm/vuewordcloud@18.7.11/VueWordCloud.js"></script>
<script src="https://blog.hagfi.sh//js/prism.js"></script>
<script type="application/javascript">
var doNotTrack = false;
if (!doNotTrack) {
(function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){
(i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o),
m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m)
})(window,document,'script','https://www.google-analytics.com/analytics.js','ga');
ga('create', 'UA-124890410-1', 'auto');
ga('send', 'pageview');
}
</script>
</head>
<body>
<div id="layout" class="pure-g">
<div class="sidebar pure-u-1 pure-u-md-1-4" id="app">
<div class="header">
<h1 class="brand-title"><a href="/">Hagfi.sh</a></h1>
<h2 class="brand-tagline">A devops guide to the galaxy</h2>
<div class="counters">
<a class="counter" href="/">13
<div class="counter-sub">Documents</div>
</a>
<a class="counter" href="/tags">29
<div class="counter-sub">Tags</div>
</a>
<a class="counter" href="/categories">3
<div class="counter-sub">Categories</div>
</a>
</div>
<nav class="nav">
</nav>
<div class="search-wrapper">
<input
type="text"
placeholder="Search ..."
v-model="search"
@keydown.down.prevent="navigate(1)"
@keydown.up.prevent="navigate(-1)"
@keyup.enter.prevent="navigate(result[selected].href)"
ref="searchInput"
class="search"
/>
<svg height="100" width="100" ref="resultPoint" class="result-point">
<circle cx="5" cy="5" r="5" fill="#FFF" />
</svg>
<ul class="result-items">
<li v-for="r, i of result" class="result-item" ref="resultItem">
<div class="result-item-wrapper" :class="{ 'result-item-selected': selected === i }">
<div class="result-item-left">
<span class="post-date">
<span class="post-date-day"><sup v-text="moment(r.date).format('D')"></sup></span><span class="post-date-separator" v-text="'/'"></span><span class="post-date-month" v-text="moment(r.date).format('MMM')"></span> <span class="post-date-year" v-text="moment(r.date).format('YYYY')"></span>
</span>
<template v-if="r.author">By <a class="post-author" v-text="r.author"></a></template>
</div>
<div class="result-item-left">
<span class="result-item-separator nav-item-separator" v-text="'//'"></span><a :href="r.href" v-text="r.title" class="result-item-link"></a>
</div>
</div>
</li>
</ul>
</div>
</div>
</div>
<div class="content pure-u-1 pure-u-md-3-4">
<a name="top"></a>
<div class="posts">
<section class="post">
<header class="post-header">
<h1 class="post-title">
<a href="/administration/luks-encryption/">Luks Encryption</a>
</h1>
</header>
<p class="post-meta">
<span class="post-date">
<span class="post-date-day"><sup>23</sup></span><span class="post-date-separator">/</span><span class="post-date-month">Aug</span> <span class="post-date-year">2018</span>
</span>
By <a class="post-author" >Kristof Vandam</a>
<span class="post-reading-time"><i class="fa fa-clock-o"></i> <em>4 min. read</em></span>
<div class="post-categories">
<a class="post-category post-category-administration" href="https://blog.hagfi.sh//categories/administration">administration</a>
</div>
</p>
<article class="post-summary">
<p>Create an encrypted partition that will automatically mount at boot.</p>
</article>
<div class="read-more-link">
<a href="/administration/luks-encryption/"><span class="read-more-slashes">//</span>Read More...</a>
</div>
</section>
</div>
<div class="footer">
<hr class="thin" />
<div class="pure-menu pure-menu-horizontal pure-menu-open">
<ul class="footer-menu">
</ul>
</div>
<p>&copy; 2022. All rights reserved.</p>
</div>
</div>
</div>
<script>
var app = new Vue({
el: '#app',
data: {
fuse: null,
search: "",
result: [],
index: [],
selected: 0
},
mounted() {
let self = this
window.addEventListener("keypress", function(e) {
self.$refs.searchInput.focus()
})
let options = {
shouldSort: true,
threshold: 0.6,
location: 0,
distance: 100,
maxPatternLength: 32,
minMatchCharLength: 1,
keys: [
"title",
"author",
"date",
"content"
]
}
axios.get('/index.json')
.then(function (response) {
self.index = response.data
self.fuse = new Fuse(response.data, options)
})
.catch(function (error) {
})
},
watch: {
result(nval, oval) {
nval.length > 0 ? this.pointer(0) : this.pointer(-1)
},
search(nval, oval) {
this.result = this.fuse.search(nval)
}
},
methods: {
navigate(val) {
switch (val) {
case 1: if (this.selected < this.result.length - 1) { this.selected++ }; break;
case -1: if (this.selected > 0 ) { this.selected-- }; break;
default: window.location.href = val; break;
}
this.pointer(this.selected)
},
pointer(selected) {
let self = this
if (selected >= 0) {
Vue.nextTick().then(function() {
let height = self.$refs.resultItem[selected].clientHeight
let top = self.$refs.resultItem[selected].getBoundingClientRect().top
let left = self.$refs.resultItem[selected].getBoundingClientRect().left
self.$refs.resultPoint.style.top = (top+height/2)+'px'
self.$refs.resultPoint.style.left = (left-20)+'px'
})
} else {
this.$refs.resultPoint.style.left = '-50px'
return
}
}
}
})
</script>
</body>
</html>

20
public/tags/encryption/index.xml

@ -0,0 +1,20 @@
<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom">
<channel>
<title>encryption on Hagfi.sh</title>
<link>https://blog.hagfi.sh/tags/encryption/</link>
<description>Recent content in encryption on Hagfi.sh</description>
<generator>Hugo -- gohugo.io</generator>
<language>en-us</language>
<lastBuildDate>Thu, 23 Aug 2018 22:08:15 +0200</lastBuildDate><atom:link href="https://blog.hagfi.sh/tags/encryption/index.xml" rel="self" type="application/rss+xml" />
<item>
<title>Luks Encryption</title>
<link>https://blog.hagfi.sh/administration/luks-encryption/</link>
<pubDate>Thu, 23 Aug 2018 22:08:15 +0200</pubDate>
<guid>https://blog.hagfi.sh/administration/luks-encryption/</guid>
<description>&lt;p&gt;Create an encrypted partition that will automatically mount at boot.&lt;/p&gt;</description>
</item>
</channel>
</rss>

280
public/tags/hugo/index.html

@ -0,0 +1,280 @@
<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en-us">
<head>
<title>
hugo // Hagfi.sh
</title>
<link href="http://gmpg.org/xfn/11" rel="profile">
<meta http-equiv="content-type" content="text/html; charset=utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1">
<meta name="description" content="">
<meta name="keywords" content="">
<meta name="author" content="">
<meta name="generator" content="Hugo 0.92.0" />
<meta property="og:title" content="hugo" />
<meta property="og:description" content="" />
<meta property="og:type" content="website" />
<meta property="og:locale" content="en_US" />
<meta property="og:url" content="https://blog.hagfi.sh/tags/hugo/" />
<link rel="stylesheet" href="//cdnjs.cloudflare.com/ajax/libs/pure/0.5.0/base-min.css">
<link rel="stylesheet" href="//cdnjs.cloudflare.com/ajax/libs/pure/0.5.0/pure-min.css">
<link rel="stylesheet" href="//cdnjs.cloudflare.com/ajax/libs/pure/0.5.0/grids-responsive-min.css">
<link rel="stylesheet" href="https://blog.hagfi.sh//css/redlounge.css">
<link rel="stylesheet" href="https://blog.hagfi.sh//css/prism.css">
<link href="//maxcdn.bootstrapcdn.com/font-awesome/4.5.0/css/font-awesome.min.css" rel="stylesheet">
<link href='//fonts.googleapis.com/css?family=Raleway:400,200,100,700,300,500,600,800' rel='stylesheet' type='text/css'>
<link href='//fonts.googleapis.com/css?family=Libre+Baskerville:400,700,400italic' rel='stylesheet' type='text/css'>
<link rel="apple-touch-icon-precomposed" sizes="144x144" href="/touch-icon-144-precomposed.png">
<link rel="shortcut icon" type="image/x-icon" href="/img/favicon.png">
<link href="https://blog.hagfi.sh/tags/hugo/index.xml" rel="alternate" type="application/rss+xml" title="Hagfi.sh" />
<script src="//cdnjs.cloudflare.com/ajax/libs/moment.js/2.18.1/moment.js"></script>
<script src="//cdnjs.cloudflare.com/ajax/libs/vue/2.5.17/vue.min.js"></script>
<script src="//cdnjs.cloudflare.com/ajax/libs/axios/0.18.0/axios.min.js"></script>
<script src="//cdnjs.cloudflare.com/ajax/libs/fuse.js/3.2.1/fuse.min.js"></script>
<script src="//cdn.jsdelivr.net/npm/vuewordcloud@18.7.11/VueWordCloud.js"></script>
<script src="https://blog.hagfi.sh//js/prism.js"></script>
<script type="application/javascript">
var doNotTrack = false;
if (!doNotTrack) {
(function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){
(i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o),
m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m)
})(window,document,'script','https://www.google-analytics.com/analytics.js','ga');
ga('create', 'UA-124890410-1', 'auto');
ga('send', 'pageview');
}
</script>
</head>
<body>
<div id="layout" class="pure-g">
<div class="sidebar pure-u-1 pure-u-md-1-4" id="app">
<div class="header">
<h1 class="brand-title"><a href="/">Hagfi.sh</a></h1>
<h2 class="brand-tagline">A devops guide to the galaxy</h2>
<div class="counters">
<a class="counter" href="/">13
<div class="counter-sub">Documents</div>
</a>
<a class="counter" href="/tags">29
<div class="counter-sub">Tags</div>
</a>
<a class="counter" href="/categories">3
<div class="counter-sub">Categories</div>
</a>
</div>
<nav class="nav">
</nav>
<div class="search-wrapper">
<input
type="text"
placeholder="Search ..."
v-model="search"
@keydown.down.prevent="navigate(1)"
@keydown.up.prevent="navigate(-1)"
@keyup.enter.prevent="navigate(result[selected].href)"
ref="searchInput"
class="search"
/>
<svg height="100" width="100" ref="resultPoint" class="result-point">
<circle cx="5" cy="5" r="5" fill="#FFF" />
</svg>
<ul class="result-items">
<li v-for="r, i of result" class="result-item" ref="resultItem">
<div class="result-item-wrapper" :class="{ 'result-item-selected': selected === i }">
<div class="result-item-left">
<span class="post-date">
<span class="post-date-day"><sup v-text="moment(r.date).format('D')"></sup></span><span class="post-date-separator" v-text="'/'"></span><span class="post-date-month" v-text="moment(r.date).format('MMM')"></span> <span class="post-date-year" v-text="moment(r.date).format('YYYY')"></span>
</span>
<template v-if="r.author">By <a class="post-author" v-text="r.author"></a></template>
</div>
<div class="result-item-left">
<span class="result-item-separator nav-item-separator" v-text="'//'"></span><a :href="r.href" v-text="r.title" class="result-item-link"></a>
</div>
</div>
</li>
</ul>
</div>
</div>
</div>
<div class="content pure-u-1 pure-u-md-3-4">
<a name="top"></a>
<div class="posts">
<section class="post">
<header class="post-header">
<h1 class="post-title">
<a href="/development/live-search-with-hugo/">Live Search With HUGO</a>
</h1>
</header>
<p class="post-meta">
<span class="post-date">
<span class="post-date-day"><sup>29</sup></span><span class="post-date-separator">/</span><span class="post-date-month">Aug</span> <span class="post-date-year">2018</span>
</span>
By <a class="post-author" >Kristof Vandam</a>
<span class="post-reading-time"><i class="fa fa-clock-o"></i> <em>5 min. read</em></span>
<div class="post-categories">
<a class="post-category post-category-development" href="https://blog.hagfi.sh//categories/development">development</a>
</div>
</p>
<article class="post-summary">
<p>HUGO is static, that&rsquo;s a fact. How can I implement a live search? Searching the internet provided me only solutions
that require a page refresh, this time of age performance is key, so that&rsquo;s why I wanted a fast and fuzzy search implementation.</p>
</article>
<div class="read-more-link">
<a href="/development/live-search-with-hugo/"><span class="read-more-slashes">//</span>Read More...</a>
</div>
</section>
</div>
<div class="footer">
<hr class="thin" />
<div class="pure-menu pure-menu-horizontal pure-menu-open">
<ul class="footer-menu">
</ul>
</div>
<p>&copy; 2022. All rights reserved.</p>
</div>
</div>
</div>
<script>
var app = new Vue({
el: '#app',
data: {
fuse: null,
search: "",
result: [],
index: [],
selected: 0
},
mounted() {
let self = this
window.addEventListener("keypress", function(e) {
self.$refs.searchInput.focus()
})
let options = {
shouldSort: true,
threshold: 0.6,
location: 0,
distance: 100,
maxPatternLength: 32,
minMatchCharLength: 1,
keys: [
"title",
"author",
"date",
"content"
]
}
axios.get('/index.json')
.then(function (response) {
self.index = response.data
self.fuse = new Fuse(response.data, options)
})
.catch(function (error) {
})
},
watch: {
result(nval, oval) {
nval.length > 0 ? this.pointer(0) : this.pointer(-1)
},
search(nval, oval) {
this.result = this.fuse.search(nval)
}
},
methods: {
navigate(val) {
switch (val) {
case 1: if (this.selected < this.result.length - 1) { this.selected++ }; break;
case -1: if (this.selected > 0 ) { this.selected-- }; break;
default: window.location.href = val; break;
}
this.pointer(this.selected)
},
pointer(selected) {
let self = this
if (selected >= 0) {
Vue.nextTick().then(function() {
let height = self.$refs.resultItem[selected].clientHeight
let top = self.$refs.resultItem[selected].getBoundingClientRect().top
let left = self.$refs.resultItem[selected].getBoundingClientRect().left
self.$refs.resultPoint.style.top = (top+height/2)+'px'
self.$refs.resultPoint.style.left = (left-20)+'px'
})
} else {
this.$refs.resultPoint.style.left = '-50px'
return
}
}
}
})
</script>
</body>
</html>

21
public/tags/hugo/index.xml

@ -0,0 +1,21 @@
<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom">
<channel>
<title>hugo on Hagfi.sh</title>
<link>https://blog.hagfi.sh/tags/hugo/</link>
<description>Recent content in hugo on Hagfi.sh</description>
<generator>Hugo -- gohugo.io</generator>
<language>en-us</language>
<lastBuildDate>Wed, 29 Aug 2018 22:44:46 +0200</lastBuildDate><atom:link href="https://blog.hagfi.sh/tags/hugo/index.xml" rel="self" type="application/rss+xml" />
<item>
<title>Live Search With HUGO</title>
<link>https://blog.hagfi.sh/development/live-search-with-hugo/</link>
<pubDate>Wed, 29 Aug 2018 22:44:46 +0200</pubDate>
<guid>https://blog.hagfi.sh/development/live-search-with-hugo/</guid>
<description>&lt;p&gt;HUGO is static, that&amp;rsquo;s a fact. How can I implement a live search? Searching the internet provided me only solutions
that require a page refresh, this time of age performance is key, so that&amp;rsquo;s why I wanted a fast and fuzzy search implementation.&lt;/p&gt;</description>
</item>
</channel>
</rss>

279
public/tags/ifconfig/index.html

@ -0,0 +1,279 @@
<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en-us">
<head>
<title>
ifconfig // Hagfi.sh
</title>
<link href="http://gmpg.org/xfn/11" rel="profile">
<meta http-equiv="content-type" content="text/html; charset=utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1">
<meta name="description" content="">
<meta name="keywords" content="">
<meta name="author" content="">
<meta name="generator" content="Hugo 0.92.0" />
<meta property="og:title" content="ifconfig" />
<meta property="og:description" content="" />
<meta property="og:type" content="website" />
<meta property="og:locale" content="en_US" />
<meta property="og:url" content="https://blog.hagfi.sh/tags/ifconfig/" />
<link rel="stylesheet" href="//cdnjs.cloudflare.com/ajax/libs/pure/0.5.0/base-min.css">
<link rel="stylesheet" href="//cdnjs.cloudflare.com/ajax/libs/pure/0.5.0/pure-min.css">
<link rel="stylesheet" href="//cdnjs.cloudflare.com/ajax/libs/pure/0.5.0/grids-responsive-min.css">
<link rel="stylesheet" href="https://blog.hagfi.sh//css/redlounge.css">
<link rel="stylesheet" href="https://blog.hagfi.sh//css/prism.css">
<link href="//maxcdn.bootstrapcdn.com/font-awesome/4.5.0/css/font-awesome.min.css" rel="stylesheet">
<link href='//fonts.googleapis.com/css?family=Raleway:400,200,100,700,300,500,600,800' rel='stylesheet' type='text/css'>
<link href='//fonts.googleapis.com/css?family=Libre+Baskerville:400,700,400italic' rel='stylesheet' type='text/css'>
<link rel="apple-touch-icon-precomposed" sizes="144x144" href="/touch-icon-144-precomposed.png">
<link rel="shortcut icon" type="image/x-icon" href="/img/favicon.png">
<link href="https://blog.hagfi.sh/tags/ifconfig/index.xml" rel="alternate" type="application/rss+xml" title="Hagfi.sh" />
<script src="//cdnjs.cloudflare.com/ajax/libs/moment.js/2.18.1/moment.js"></script>
<script src="//cdnjs.cloudflare.com/ajax/libs/vue/2.5.17/vue.min.js"></script>
<script src="//cdnjs.cloudflare.com/ajax/libs/axios/0.18.0/axios.min.js"></script>
<script src="//cdnjs.cloudflare.com/ajax/libs/fuse.js/3.2.1/fuse.min.js"></script>
<script src="//cdn.jsdelivr.net/npm/vuewordcloud@18.7.11/VueWordCloud.js"></script>
<script src="https://blog.hagfi.sh//js/prism.js"></script>
<script type="application/javascript">
var doNotTrack = false;
if (!doNotTrack) {
(function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){
(i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o),
m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m)
})(window,document,'script','https://www.google-analytics.com/analytics.js','ga');
ga('create', 'UA-124890410-1', 'auto');
ga('send', 'pageview');
}
</script>
</head>
<body>
<div id="layout" class="pure-g">
<div class="sidebar pure-u-1 pure-u-md-1-4" id="app">
<div class="header">
<h1 class="brand-title"><a href="/">Hagfi.sh</a></h1>
<h2 class="brand-tagline">A devops guide to the galaxy</h2>
<div class="counters">
<a class="counter" href="/">13
<div class="counter-sub">Documents</div>
</a>
<a class="counter" href="/tags">29
<div class="counter-sub">Tags</div>
</a>
<a class="counter" href="/categories">3
<div class="counter-sub">Categories</div>
</a>
</div>
<nav class="nav">
</nav>
<div class="search-wrapper">
<input
type="text"
placeholder="Search ..."
v-model="search"
@keydown.down.prevent="navigate(1)"
@keydown.up.prevent="navigate(-1)"
@keyup.enter.prevent="navigate(result[selected].href)"
ref="searchInput"
class="search"
/>
<svg height="100" width="100" ref="resultPoint" class="result-point">
<circle cx="5" cy="5" r="5" fill="#FFF" />
</svg>
<ul class="result-items">
<li v-for="r, i of result" class="result-item" ref="resultItem">
<div class="result-item-wrapper" :class="{ 'result-item-selected': selected === i }">
<div class="result-item-left">
<span class="post-date">
<span class="post-date-day"><sup v-text="moment(r.date).format('D')"></sup></span><span class="post-date-separator" v-text="'/'"></span><span class="post-date-month" v-text="moment(r.date).format('MMM')"></span> <span class="post-date-year" v-text="moment(r.date).format('YYYY')"></span>
</span>
<template v-if="r.author">By <a class="post-author" v-text="r.author"></a></template>
</div>
<div class="result-item-left">
<span class="result-item-separator nav-item-separator" v-text="'//'"></span><a :href="r.href" v-text="r.title" class="result-item-link"></a>
</div>
</div>
</li>
</ul>
</div>
</div>
</div>
<div class="content pure-u-1 pure-u-md-3-4">
<a name="top"></a>
<div class="posts">
<section class="post">
<header class="post-header">
<h1 class="post-title">
<a href="/administration/toubles-with-interfaces-after-clone/">Troubles with interfaces after a VM clone</a>
</h1>
</header>
<p class="post-meta">
<span class="post-date">
<span class="post-date-day"><sup>5</sup></span><span class="post-date-separator">/</span><span class="post-date-month">Nov</span> <span class="post-date-year">2018</span>
</span>
By <a class="post-author" >Kristof Vandam</a>
<span class="post-reading-time"><i class="fa fa-clock-o"></i> <em>1 min. read</em></span>
<div class="post-categories">
<a class="post-category post-category-administration" href="https://blog.hagfi.sh//categories/administration">administration</a>
</div>
</p>
<article class="post-summary">
<p>Remapping interfaces and their MAC address.</p>
</article>
<div class="read-more-link">
<a href="/administration/toubles-with-interfaces-after-clone/"><span class="read-more-slashes">//</span>Read More...</a>
</div>
</section>
</div>
<div class="footer">
<hr class="thin" />
<div class="pure-menu pure-menu-horizontal pure-menu-open">
<ul class="footer-menu">
</ul>
</div>
<p>&copy; 2022. All rights reserved.</p>
</div>
</div>
</div>
<script>
var app = new Vue({
el: '#app',
data: {
fuse: null,
search: "",
result: [],
index: [],
selected: 0
},
mounted() {
let self = this
window.addEventListener("keypress", function(e) {
self.$refs.searchInput.focus()
})
let options = {
shouldSort: true,
threshold: 0.6,
location: 0,
distance: 100,
maxPatternLength: 32,
minMatchCharLength: 1,
keys: [
"title",
"author",
"date",
"content"
]
}
axios.get('/index.json')
.then(function (response) {
self.index = response.data
self.fuse = new Fuse(response.data, options)
})
.catch(function (error) {
})
},
watch: {
result(nval, oval) {
nval.length > 0 ? this.pointer(0) : this.pointer(-1)
},
search(nval, oval) {
this.result = this.fuse.search(nval)
}
},
methods: {
navigate(val) {
switch (val) {
case 1: if (this.selected < this.result.length - 1) { this.selected++ }; break;
case -1: if (this.selected > 0 ) { this.selected-- }; break;
default: window.location.href = val; break;
}
this.pointer(this.selected)
},
pointer(selected) {
let self = this
if (selected >= 0) {
Vue.nextTick().then(function() {
let height = self.$refs.resultItem[selected].clientHeight
let top = self.$refs.resultItem[selected].getBoundingClientRect().top
let left = self.$refs.resultItem[selected].getBoundingClientRect().left
self.$refs.resultPoint.style.top = (top+height/2)+'px'
self.$refs.resultPoint.style.left = (left-20)+'px'
})
} else {
this.$refs.resultPoint.style.left = '-50px'
return
}
}
}
})
</script>
</body>
</html>

20
public/tags/ifconfig/index.xml

@ -0,0 +1,20 @@
<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom">
<channel>
<title>ifconfig on Hagfi.sh</title>
<link>https://blog.hagfi.sh/tags/ifconfig/</link>
<description>Recent content in ifconfig on Hagfi.sh</description>
<generator>Hugo -- gohugo.io</generator>
<language>en-us</language>
<lastBuildDate>Mon, 05 Nov 2018 22:13:49 +0200</lastBuildDate><atom:link href="https://blog.hagfi.sh/tags/ifconfig/index.xml" rel="self" type="application/rss+xml" />
<item>
<title>Troubles with interfaces after a VM clone</title>
<link>https://blog.hagfi.sh/administration/toubles-with-interfaces-after-clone/</link>
<pubDate>Mon, 05 Nov 2018 22:13:49 +0200</pubDate>
<guid>https://blog.hagfi.sh/administration/toubles-with-interfaces-after-clone/</guid>
<description>&lt;p&gt;Remapping interfaces and their MAC address.&lt;/p&gt;</description>
</item>
</channel>
</rss>

995
public/tags/index.html

@ -0,0 +1,995 @@
<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en-us">
<head>
<title>
Tags // Hagfi.sh
</title>
<link href="http://gmpg.org/xfn/11" rel="profile">
<meta http-equiv="content-type" content="text/html; charset=utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1">
<meta name="description" content="">
<meta name="keywords" content="">
<meta name="author" content="">
<meta name="generator" content="Hugo 0.92.0" />
<meta property="og:title" content="Tags" />
<meta property="og:description" content="" />
<meta property="og:type" content="website" />
<meta property="og:locale" content="en_US" />
<meta property="og:url" content="https://blog.hagfi.sh/tags/" />
<link rel="stylesheet" href="//cdnjs.cloudflare.com/ajax/libs/pure/0.5.0/base-min.css">
<link rel="stylesheet" href="//cdnjs.cloudflare.com/ajax/libs/pure/0.5.0/pure-min.css">
<link rel="stylesheet" href="//cdnjs.cloudflare.com/ajax/libs/pure/0.5.0/grids-responsive-min.css">
<link rel="stylesheet" href="https://blog.hagfi.sh//css/redlounge.css">
<link rel="stylesheet" href="https://blog.hagfi.sh//css/prism.css">
<link href="//maxcdn.bootstrapcdn.com/font-awesome/4.5.0/css/font-awesome.min.css" rel="stylesheet">
<link href='//fonts.googleapis.com/css?family=Raleway:400,200,100,700,300,500,600,800' rel='stylesheet' type='text/css'>
<link href='//fonts.googleapis.com/css?family=Libre+Baskerville:400,700,400italic' rel='stylesheet' type='text/css'>
<link rel="apple-touch-icon-precomposed" sizes="144x144" href="/touch-icon-144-precomposed.png">
<link rel="shortcut icon" type="image/x-icon" href="/img/favicon.png">
<link href="https://blog.hagfi.sh/tags/index.xml" rel="alternate" type="application/rss+xml" title="Hagfi.sh" />
<script src="//cdnjs.cloudflare.com/ajax/libs/moment.js/2.18.1/moment.js"></script>
<script src="//cdnjs.cloudflare.com/ajax/libs/vue/2.5.17/vue.min.js"></script>
<script src="//cdnjs.cloudflare.com/ajax/libs/axios/0.18.0/axios.min.js"></script>
<script src="//cdnjs.cloudflare.com/ajax/libs/fuse.js/3.2.1/fuse.min.js"></script>
<script src="//cdn.jsdelivr.net/npm/vuewordcloud@18.7.11/VueWordCloud.js"></script>
<script src="https://blog.hagfi.sh//js/prism.js"></script>
<script type="application/javascript">
var doNotTrack = false;
if (!doNotTrack) {
(function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){
(i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o),
m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m)
})(window,document,'script','https://www.google-analytics.com/analytics.js','ga');
ga('create', 'UA-124890410-1', 'auto');
ga('send', 'pageview');
}
</script>
</head>
<body>
<div id="layout" class="pure-g">
<div class="sidebar pure-u-1 pure-u-md-1-4" id="app">
<div class="header">
<h1 class="brand-title"><a href="/">Hagfi.sh</a></h1>
<h2 class="brand-tagline">A devops guide to the galaxy</h2>
<div class="counters">
<a class="counter" href="/">13
<div class="counter-sub">Documents</div>
</a>
<a class="counter" href="/tags">29
<div class="counter-sub">Tags</div>
</a>
<a class="counter" href="/categories">3
<div class="counter-sub">Categories</div>
</a>
</div>
<nav class="nav">
</nav>
<div class="search-wrapper">
<input
type="text"
placeholder="Search ..."
v-model="search"
@keydown.down.prevent="navigate(1)"
@keydown.up.prevent="navigate(-1)"
@keyup.enter.prevent="navigate(result[selected].href)"
ref="searchInput"
class="search"
/>
<svg height="100" width="100" ref="resultPoint" class="result-point">
<circle cx="5" cy="5" r="5" fill="#FFF" />
</svg>
<ul class="result-items">
<li v-for="r, i of result" class="result-item" ref="resultItem">
<div class="result-item-wrapper" :class="{ 'result-item-selected': selected === i }">
<div class="result-item-left">
<span class="post-date">
<span class="post-date-day"><sup v-text="moment(r.date).format('D')"></sup></span><span class="post-date-separator" v-text="'/'"></span><span class="post-date-month" v-text="moment(r.date).format('MMM')"></span> <span class="post-date-year" v-text="moment(r.date).format('YYYY')"></span>
</span>
<template v-if="r.author">By <a class="post-author" v-text="r.author"></a></template>
</div>
<div class="result-item-left">
<span class="result-item-separator nav-item-separator" v-text="'//'"></span><a :href="r.href" v-text="r.title" class="result-item-link"></a>
</div>
</div>
</li>
</ul>
</div>
</div>
</div>
<div class="content pure-u-1 pure-u-md-3-4">
<a name="top"></a>
<div class="posts">
<section class="post">
<header class="post-header">
<h1 class="post-title">
<a href="/tags/arch/">arch</a>
</h1>
</header>
<p class="post-meta">
<span class="post-date">
<span class="post-date-day"><sup>30</sup></span><span class="post-date-separator">/</span><span class="post-date-month">Nov</span> <span class="post-date-year">2018</span>
</span>
<span class="post-reading-time"><i class="fa fa-clock-o"></i> <em>0 min. read</em></span>
</p>
</section>
<section class="post">
<header class="post-header">
<h1 class="post-title">
<a href="/tags/bash/">bash</a>
</h1>
</header>
<p class="post-meta">
<span class="post-date">
<span class="post-date-day"><sup>11</sup></span><span class="post-date-separator">/</span><span class="post-date-month">Nov</span> <span class="post-date-year">2018</span>
</span>
<span class="post-reading-time"><i class="fa fa-clock-o"></i> <em>0 min. read</em></span>
</p>
</section>
<section class="post">
<header class="post-header">
<h1 class="post-title">
<a href="/tags/script/">script</a>
</h1>
</header>
<p class="post-meta">
<span class="post-date">
<span class="post-date-day"><sup>11</sup></span><span class="post-date-separator">/</span><span class="post-date-month">Nov</span> <span class="post-date-year">2018</span>
</span>
<span class="post-reading-time"><i class="fa fa-clock-o"></i> <em>0 min. read</em></span>
</p>
</section>
<section class="post">
<header class="post-header">
<h1 class="post-title">
<a href="/tags/boot/">boot</a>
</h1>
</header>
<p class="post-meta">
<span class="post-date">
<span class="post-date-day"><sup>9</sup></span><span class="post-date-separator">/</span><span class="post-date-month">Nov</span> <span class="post-date-year">2018</span>
</span>
<span class="post-reading-time"><i class="fa fa-clock-o"></i> <em>0 min. read</em></span>
</p>
</section>
<section class="post">
<header class="post-header">
<h1 class="post-title">
<a href="/tags/data/">data</a>
</h1>
</header>
<p class="post-meta">
<span class="post-date">
<span class="post-date-day"><sup>9</sup></span><span class="post-date-separator">/</span><span class="post-date-month">Nov</span> <span class="post-date-year">2018</span>
</span>
<span class="post-reading-time"><i class="fa fa-clock-o"></i> <em>0 min. read</em></span>
</p>
</section>
<section class="post">
<header class="post-header">
<h1 class="post-title">
<a href="/tags/linux/">linux</a>
</h1>
</header>
<p class="post-meta">
<span class="post-date">
<span class="post-date-day"><sup>9</sup></span><span class="post-date-separator">/</span><span class="post-date-month">Nov</span> <span class="post-date-year">2018</span>
</span>
<span class="post-reading-time"><i class="fa fa-clock-o"></i> <em>0 min. read</em></span>
</p>
</section>
<section class="post">
<header class="post-header">
<h1 class="post-title">
<a href="/tags/mount/">mount</a>
</h1>
</header>
<p class="post-meta">
<span class="post-date">
<span class="post-date-day"><sup>9</sup></span><span class="post-date-separator">/</span><span class="post-date-month">Nov</span> <span class="post-date-year">2018</span>
</span>
<span class="post-reading-time"><i class="fa fa-clock-o"></i> <em>0 min. read</em></span>
</p>
</section>
<section class="post">
<header class="post-header">
<h1 class="post-title">
<a href="/tags/security/">security</a>
</h1>
</header>
<p class="post-meta">
<span class="post-date">
<span class="post-date-day"><sup>9</sup></span><span class="post-date-separator">/</span><span class="post-date-month">Nov</span> <span class="post-date-year">2018</span>
</span>
<span class="post-reading-time"><i class="fa fa-clock-o"></i> <em>0 min. read</em></span>
</p>
</section>
<section class="post">
<header class="post-header">
<h1 class="post-title">
<a href="/tags/shares/">shares</a>
</h1>
</header>
<p class="post-meta">
<span class="post-date">
<span class="post-date-day"><sup>9</sup></span><span class="post-date-separator">/</span><span class="post-date-month">Nov</span> <span class="post-date-year">2018</span>
</span>
<span class="post-reading-time"><i class="fa fa-clock-o"></i> <em>0 min. read</em></span>
</p>
</section>
<section class="post">
<header class="post-header">
<h1 class="post-title">
<a href="/tags/directory/">directory</a>
</h1>
</header>
<p class="post-meta">
<span class="post-date">
<span class="post-date-day"><sup>5</sup></span><span class="post-date-separator">/</span><span class="post-date-month">Nov</span> <span class="post-date-year">2018</span>
</span>
<span class="post-reading-time"><i class="fa fa-clock-o"></i> <em>0 min. read</em></span>
</p>
</section>
<section class="post">
<header class="post-header">
<h1 class="post-title">
<a href="/tags/ifconfig/">ifconfig</a>
</h1>
</header>
<p class="post-meta">
<span class="post-date">
<span class="post-date-day"><sup>5</sup></span><span class="post-date-separator">/</span><span class="post-date-month">Nov</span> <span class="post-date-year">2018</span>
</span>
<span class="post-reading-time"><i class="fa fa-clock-o"></i> <em>0 min. read</em></span>
</p>
</section>
<section class="post">
<header class="post-header">
<h1 class="post-title">
<a href="/tags/interfaces/">interfaces</a>
</h1>
</header>
<p class="post-meta">
<span class="post-date">
<span class="post-date-day"><sup>5</sup></span><span class="post-date-separator">/</span><span class="post-date-month">Nov</span> <span class="post-date-year">2018</span>
</span>
<span class="post-reading-time"><i class="fa fa-clock-o"></i> <em>0 min. read</em></span>
</p>
</section>
<section class="post">
<header class="post-header">
<h1 class="post-title">
<a href="/tags/inventory/">inventory</a>
</h1>
</header>
<p class="post-meta">
<span class="post-date">
<span class="post-date-day"><sup>5</sup></span><span class="post-date-separator">/</span><span class="post-date-month">Nov</span> <span class="post-date-year">2018</span>
</span>
<span class="post-reading-time"><i class="fa fa-clock-o"></i> <em>0 min. read</em></span>
</p>
</section>
<section class="post">
<header class="post-header">
<h1 class="post-title">
<a href="/tags/network/">network</a>
</h1>
</header>
<p class="post-meta">
<span class="post-date">
<span class="post-date-day"><sup>5</sup></span><span class="post-date-separator">/</span><span class="post-date-month">Nov</span> <span class="post-date-year">2018</span>
</span>
<span class="post-reading-time"><i class="fa fa-clock-o"></i> <em>0 min. read</em></span>
</p>
</section>
<section class="post">
<header class="post-header">
<h1 class="post-title">
<a href="/tags/networking/">networking</a>
</h1>
</header>
<p class="post-meta">
<span class="post-date">
<span class="post-date-day"><sup>5</sup></span><span class="post-date-separator">/</span><span class="post-date-month">Nov</span> <span class="post-date-year">2018</span>
</span>
<span class="post-reading-time"><i class="fa fa-clock-o"></i> <em>0 min. read</em></span>
</p>
</section>
<section class="post">
<header class="post-header">
<h1 class="post-title">
<a href="/tags/size/">size</a>
</h1>
</header>
<p class="post-meta">
<span class="post-date">
<span class="post-date-day"><sup>5</sup></span><span class="post-date-separator">/</span><span class="post-date-month">Nov</span> <span class="post-date-year">2018</span>
</span>
<span class="post-reading-time"><i class="fa fa-clock-o"></i> <em>0 min. read</em></span>
</p>
</section>
<section class="post">
<header class="post-header">
<h1 class="post-title">
<a href="/tags/du/">du</a>
</h1>
</header>
<p class="post-meta">
<span class="post-date">
<span class="post-date-day"><sup>17</sup></span><span class="post-date-separator">/</span><span class="post-date-month">Sep</span> <span class="post-date-year">2018</span>
</span>
<span class="post-reading-time"><i class="fa fa-clock-o"></i> <em>0 min. read</em></span>
</p>
</section>
<section class="post">
<header class="post-header">
<h1 class="post-title">
<a href="/tags/ncdu/">ncdu</a>
</h1>
</header>
<p class="post-meta">
<span class="post-date">
<span class="post-date-day"><sup>17</sup></span><span class="post-date-separator">/</span><span class="post-date-month">Sep</span> <span class="post-date-year">2018</span>
</span>
<span class="post-reading-time"><i class="fa fa-clock-o"></i> <em>0 min. read</em></span>
</p>
</section>
<section class="post">
<header class="post-header">
<h1 class="post-title">
<a href="/tags/hugo/">hugo</a>
</h1>
</header>
<p class="post-meta">
<span class="post-date">
<span class="post-date-day"><sup>29</sup></span><span class="post-date-separator">/</span><span class="post-date-month">Aug</span> <span class="post-date-year">2018</span>
</span>
<span class="post-reading-time"><i class="fa fa-clock-o"></i> <em>0 min. read</em></span>
</p>
</section>
<section class="post">
<header class="post-header">
<h1 class="post-title">
<a href="/tags/javascript/">javascript</a>
</h1>
</header>
<p class="post-meta">
<span class="post-date">
<span class="post-date-day"><sup>29</sup></span><span class="post-date-separator">/</span><span class="post-date-month">Aug</span> <span class="post-date-year">2018</span>
</span>
<span class="post-reading-time"><i class="fa fa-clock-o"></i> <em>0 min. read</em></span>
</p>
</section>
<section class="post">
<header class="post-header">
<h1 class="post-title">
<a href="/tags/js/">js</a>
</h1>
</header>
<p class="post-meta">
<span class="post-date">
<span class="post-date-day"><sup>29</sup></span><span class="post-date-separator">/</span><span class="post-date-month">Aug</span> <span class="post-date-year">2018</span>
</span>
<span class="post-reading-time"><i class="fa fa-clock-o"></i> <em>0 min. read</em></span>
</p>
</section>
<section class="post">
<header class="post-header">
<h1 class="post-title">
<a href="/tags/json/">json</a>
</h1>
</header>
<p class="post-meta">
<span class="post-date">
<span class="post-date-day"><sup>29</sup></span><span class="post-date-separator">/</span><span class="post-date-month">Aug</span> <span class="post-date-year">2018</span>
</span>
<span class="post-reading-time"><i class="fa fa-clock-o"></i> <em>0 min. read</em></span>
</p>
</section>
<section class="post">
<header class="post-header">
<h1 class="post-title">
<a href="/tags/prism/">prism</a>
</h1>
</header>
<p class="post-meta">
<span class="post-date">
<span class="post-date-day"><sup>29</sup></span><span class="post-date-separator">/</span><span class="post-date-month">Aug</span> <span class="post-date-year">2018</span>
</span>
<span class="post-reading-time"><i class="fa fa-clock-o"></i> <em>0 min. read</em></span>
</p>
</section>
<section class="post">
<header class="post-header">
<h1 class="post-title">
<a href="/tags/prismjs/">prismjs</a>
</h1>
</header>
<p class="post-meta">
<span class="post-date">
<span class="post-date-day"><sup>29</sup></span><span class="post-date-separator">/</span><span class="post-date-month">Aug</span> <span class="post-date-year">2018</span>
</span>
<span class="post-reading-time"><i class="fa fa-clock-o"></i> <em>0 min. read</em></span>
</p>
</section>
<section class="post">
<header class="post-header">
<h1 class="post-title">
<a href="/tags/vue/">vue</a>
</h1>
</header>
<p class="post-meta">
<span class="post-date">
<span class="post-date-day"><sup>29</sup></span><span class="post-date-separator">/</span><span class="post-date-month">Aug</span> <span class="post-date-year">2018</span>
</span>
<span class="post-reading-time"><i class="fa fa-clock-o"></i> <em>0 min. read</em></span>
</p>
</section>
<section class="post">
<header class="post-header">
<h1 class="post-title">
<a href="/tags/vuejs/">vuejs</a>
</h1>
</header>
<p class="post-meta">
<span class="post-date">
<span class="post-date-day"><sup>29</sup></span><span class="post-date-separator">/</span><span class="post-date-month">Aug</span> <span class="post-date-year">2018</span>
</span>
<span class="post-reading-time"><i class="fa fa-clock-o"></i> <em>0 min. read</em></span>
</p>
</section>
<section class="post">
<header class="post-header">
<h1 class="post-title">
<a href="/tags/disk/">disk</a>
</h1>
</header>
<p class="post-meta">
<span class="post-date">
<span class="post-date-day"><sup>23</sup></span><span class="post-date-separator">/</span><span class="post-date-month">Aug</span> <span class="post-date-year">2018</span>
</span>
<span class="post-reading-time"><i class="fa fa-clock-o"></i> <em>0 min. read</em></span>
</p>
</section>
<section class="post">
<header class="post-header">
<h1 class="post-title">
<a href="/tags/encryption/">encryption</a>
</h1>
</header>
<p class="post-meta">
<span class="post-date">
<span class="post-date-day"><sup>23</sup></span><span class="post-date-separator">/</span><span class="post-date-month">Aug</span> <span class="post-date-year">2018</span>
</span>
<span class="post-reading-time"><i class="fa fa-clock-o"></i> <em>0 min. read</em></span>
</p>
</section>
<section class="post">
<header class="post-header">
<h1 class="post-title">
<a href="/tags/partition/">partition</a>
</h1>
</header>
<p class="post-meta">
<span class="post-date">
<span class="post-date-day"><sup>23</sup></span><span class="post-date-separator">/</span><span class="post-date-month">Aug</span> <span class="post-date-year">2018</span>
</span>
<span class="post-reading-time"><i class="fa fa-clock-o"></i> <em>0 min. read</em></span>
</p>
</section>
</div>
<div class="footer">
<hr class="thin" />
<div class="pure-menu pure-menu-horizontal pure-menu-open">
<ul class="footer-menu">
</ul>
</div>
<p>&copy; 2022. All rights reserved.</p>
</div>
</div>
</div>
<script>
var app = new Vue({
el: '#app',
data: {
fuse: null,
search: "",
result: [],
index: [],
selected: 0
},
mounted() {
let self = this
window.addEventListener("keypress", function(e) {
self.$refs.searchInput.focus()
})
let options = {
shouldSort: true,
threshold: 0.6,
location: 0,
distance: 100,
maxPatternLength: 32,
minMatchCharLength: 1,
keys: [
"title",
"author",
"date",
"content"
]
}
axios.get('/index.json')
.then(function (response) {
self.index = response.data
self.fuse = new Fuse(response.data, options)
})
.catch(function (error) {
})
},
watch: {
result(nval, oval) {
nval.length > 0 ? this.pointer(0) : this.pointer(-1)
},
search(nval, oval) {
this.result = this.fuse.search(nval)
}
},
methods: {
navigate(val) {
switch (val) {
case 1: if (this.selected < this.result.length - 1) { this.selected++ }; break;
case -1: if (this.selected > 0 ) { this.selected-- }; break;
default: window.location.href = val; break;
}
this.pointer(this.selected)
},
pointer(selected) {
let self = this
if (selected >= 0) {
Vue.nextTick().then(function() {
let height = self.$refs.resultItem[selected].clientHeight
let top = self.$refs.resultItem[selected].getBoundingClientRect().top
let left = self.$refs.resultItem[selected].getBoundingClientRect().left
self.$refs.resultPoint.style.top = (top+height/2)+'px'
self.$refs.resultPoint.style.left = (left-20)+'px'
})
} else {
this.$refs.resultPoint.style.left = '-50px'
return
}
}
}
})
</script>
</body>
</html>

272
public/tags/index.xml

@ -0,0 +1,272 @@
<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom">
<channel>
<title>Tags on Hagfi.sh</title>
<link>https://blog.hagfi.sh/tags/</link>
<description>Recent content in Tags on Hagfi.sh</description>
<generator>Hugo -- gohugo.io</generator>
<language>en-us</language>
<lastBuildDate>Fri, 30 Nov 2018 10:08:22 +0200</lastBuildDate><atom:link href="https://blog.hagfi.sh/tags/index.xml" rel="self" type="application/rss+xml" />
<item>
<title>arch</title>
<link>https://blog.hagfi.sh/tags/arch/</link>
<pubDate>Fri, 30 Nov 2018 10:08:22 +0200</pubDate>
<guid>https://blog.hagfi.sh/tags/arch/</guid>
<description></description>
</item>
<item>
<title>bash</title>
<link>https://blog.hagfi.sh/tags/bash/</link>
<pubDate>Sun, 11 Nov 2018 16:01:15 +0100</pubDate>
<guid>https://blog.hagfi.sh/tags/bash/</guid>
<description></description>
</item>
<item>
<title>script</title>
<link>https://blog.hagfi.sh/tags/script/</link>
<pubDate>Sun, 11 Nov 2018 16:01:15 +0100</pubDate>
<guid>https://blog.hagfi.sh/tags/script/</guid>
<description></description>
</item>
<item>
<title>boot</title>
<link>https://blog.hagfi.sh/tags/boot/</link>
<pubDate>Fri, 09 Nov 2018 10:08:15 +0200</pubDate>
<guid>https://blog.hagfi.sh/tags/boot/</guid>
<description></description>
</item>
<item>
<title>data</title>
<link>https://blog.hagfi.sh/tags/data/</link>
<pubDate>Fri, 09 Nov 2018 10:08:15 +0200</pubDate>
<guid>https://blog.hagfi.sh/tags/data/</guid>
<description></description>
</item>
<item>
<title>linux</title>
<link>https://blog.hagfi.sh/tags/linux/</link>
<pubDate>Fri, 09 Nov 2018 10:08:15 +0200</pubDate>
<guid>https://blog.hagfi.sh/tags/linux/</guid>
<description></description>
</item>
<item>
<title>mount</title>
<link>https://blog.hagfi.sh/tags/mount/</link>
<pubDate>Fri, 09 Nov 2018 10:08:15 +0200</pubDate>
<guid>https://blog.hagfi.sh/tags/mount/</guid>
<description></description>
</item>
<item>
<title>security</title>
<link>https://blog.hagfi.sh/tags/security/</link>
<pubDate>Fri, 09 Nov 2018 10:08:15 +0200</pubDate>
<guid>https://blog.hagfi.sh/tags/security/</guid>
<description></description>
</item>
<item>
<title>shares</title>
<link>https://blog.hagfi.sh/tags/shares/</link>
<pubDate>Fri, 09 Nov 2018 10:08:15 +0200</pubDate>
<guid>https://blog.hagfi.sh/tags/shares/</guid>
<description></description>
</item>
<item>
<title>directory</title>
<link>https://blog.hagfi.sh/tags/directory/</link>
<pubDate>Mon, 05 Nov 2018 22:13:49 +0200</pubDate>
<guid>https://blog.hagfi.sh/tags/directory/</guid>
<description></description>
</item>
<item>
<title>ifconfig</title>
<link>https://blog.hagfi.sh/tags/ifconfig/</link>
<pubDate>Mon, 05 Nov 2018 22:13:49 +0200</pubDate>
<guid>https://blog.hagfi.sh/tags/ifconfig/</guid>
<description></description>
</item>
<item>
<title>interfaces</title>
<link>https://blog.hagfi.sh/tags/interfaces/</link>
<pubDate>Mon, 05 Nov 2018 22:13:49 +0200</pubDate>
<guid>https://blog.hagfi.sh/tags/interfaces/</guid>
<description></description>
</item>
<item>
<title>inventory</title>
<link>https://blog.hagfi.sh/tags/inventory/</link>
<pubDate>Mon, 05 Nov 2018 22:13:49 +0200</pubDate>
<guid>https://blog.hagfi.sh/tags/inventory/</guid>
<description></description>
</item>
<item>
<title>network</title>
<link>https://blog.hagfi.sh/tags/network/</link>
<pubDate>Mon, 05 Nov 2018 22:13:49 +0200</pubDate>
<guid>https://blog.hagfi.sh/tags/network/</guid>
<description></description>
</item>
<item>
<title>networking</title>
<link>https://blog.hagfi.sh/tags/networking/</link>
<pubDate>Mon, 05 Nov 2018 22:13:49 +0200</pubDate>
<guid>https://blog.hagfi.sh/tags/networking/</guid>
<description></description>
</item>
<item>
<title>size</title>
<link>https://blog.hagfi.sh/tags/size/</link>
<pubDate>Mon, 05 Nov 2018 22:13:49 +0200</pubDate>
<guid>https://blog.hagfi.sh/tags/size/</guid>
<description></description>
</item>
<item>
<title>du</title>
<link>https://blog.hagfi.sh/tags/du/</link>
<pubDate>Mon, 17 Sep 2018 22:18:38 +0200</pubDate>
<guid>https://blog.hagfi.sh/tags/du/</guid>
<description></description>
</item>
<item>
<title>ncdu</title>
<link>https://blog.hagfi.sh/tags/ncdu/</link>
<pubDate>Mon, 17 Sep 2018 22:18:38 +0200</pubDate>
<guid>https://blog.hagfi.sh/tags/ncdu/</guid>
<description></description>
</item>
<item>
<title>hugo</title>
<link>https://blog.hagfi.sh/tags/hugo/</link>
<pubDate>Wed, 29 Aug 2018 22:44:46 +0200</pubDate>
<guid>https://blog.hagfi.sh/tags/hugo/</guid>
<description></description>
</item>
<item>
<title>javascript</title>
<link>https://blog.hagfi.sh/tags/javascript/</link>
<pubDate>Wed, 29 Aug 2018 22:44:46 +0200</pubDate>
<guid>https://blog.hagfi.sh/tags/javascript/</guid>
<description></description>
</item>
<item>
<title>js</title>
<link>https://blog.hagfi.sh/tags/js/</link>
<pubDate>Wed, 29 Aug 2018 22:44:46 +0200</pubDate>
<guid>https://blog.hagfi.sh/tags/js/</guid>
<description></description>
</item>
<item>
<title>json</title>
<link>https://blog.hagfi.sh/tags/json/</link>
<pubDate>Wed, 29 Aug 2018 22:44:46 +0200</pubDate>
<guid>https://blog.hagfi.sh/tags/json/</guid>
<description></description>
</item>
<item>
<title>prism</title>
<link>https://blog.hagfi.sh/tags/prism/</link>
<pubDate>Wed, 29 Aug 2018 22:44:46 +0200</pubDate>
<guid>https://blog.hagfi.sh/tags/prism/</guid>
<description></description>
</item>
<item>
<title>prismjs</title>
<link>https://blog.hagfi.sh/tags/prismjs/</link>
<pubDate>Wed, 29 Aug 2018 22:44:46 +0200</pubDate>
<guid>https://blog.hagfi.sh/tags/prismjs/</guid>
<description></description>
</item>
<item>
<title>vue</title>
<link>https://blog.hagfi.sh/tags/vue/</link>
<pubDate>Wed, 29 Aug 2018 22:44:46 +0200</pubDate>
<guid>https://blog.hagfi.sh/tags/vue/</guid>
<description></description>
</item>
<item>
<title>vuejs</title>
<link>https://blog.hagfi.sh/tags/vuejs/</link>
<pubDate>Wed, 29 Aug 2018 22:44:46 +0200</pubDate>
<guid>https://blog.hagfi.sh/tags/vuejs/</guid>
<description></description>
</item>
<item>
<title>disk</title>
<link>https://blog.hagfi.sh/tags/disk/</link>
<pubDate>Thu, 23 Aug 2018 22:08:15 +0200</pubDate>
<guid>https://blog.hagfi.sh/tags/disk/</guid>
<description></description>
</item>
<item>
<title>encryption</title>
<link>https://blog.hagfi.sh/tags/encryption/</link>
<pubDate>Thu, 23 Aug 2018 22:08:15 +0200</pubDate>
<guid>https://blog.hagfi.sh/tags/encryption/</guid>
<description></description>
</item>
<item>
<title>partition</title>
<link>https://blog.hagfi.sh/tags/partition/</link>
<pubDate>Thu, 23 Aug 2018 22:08:15 +0200</pubDate>
<guid>https://blog.hagfi.sh/tags/partition/</guid>
<description></description>
</item>
</channel>
</rss>

279
public/tags/interfaces/index.html

@ -0,0 +1,279 @@
<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en-us">
<head>
<title>
interfaces // Hagfi.sh
</title>
<link href="http://gmpg.org/xfn/11" rel="profile">
<meta http-equiv="content-type" content="text/html; charset=utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1">
<meta name="description" content="">
<meta name="keywords" content="">
<meta name="author" content="">
<meta name="generator" content="Hugo 0.92.0" />
<meta property="og:title" content="interfaces" />
<meta property="og:description" content="" />
<meta property="og:type" content="website" />
<meta property="og:locale" content="en_US" />
<meta property="og:url" content="https://blog.hagfi.sh/tags/interfaces/" />
<link rel="stylesheet" href="//cdnjs.cloudflare.com/ajax/libs/pure/0.5.0/base-min.css">
<link rel="stylesheet" href="//cdnjs.cloudflare.com/ajax/libs/pure/0.5.0/pure-min.css">
<link rel="stylesheet" href="//cdnjs.cloudflare.com/ajax/libs/pure/0.5.0/grids-responsive-min.css">
<link rel="stylesheet" href="https://blog.hagfi.sh//css/redlounge.css">
<link rel="stylesheet" href="https://blog.hagfi.sh//css/prism.css">
<link href="//maxcdn.bootstrapcdn.com/font-awesome/4.5.0/css/font-awesome.min.css" rel="stylesheet">
<link href='//fonts.googleapis.com/css?family=Raleway:400,200,100,700,300,500,600,800' rel='stylesheet' type='text/css'>
<link href='//fonts.googleapis.com/css?family=Libre+Baskerville:400,700,400italic' rel='stylesheet' type='text/css'>
<link rel="apple-touch-icon-precomposed" sizes="144x144" href="/touch-icon-144-precomposed.png">
<link rel="shortcut icon" type="image/x-icon" href="/img/favicon.png">
<link href="https://blog.hagfi.sh/tags/interfaces/index.xml" rel="alternate" type="application/rss+xml" title="Hagfi.sh" />
<script src="//cdnjs.cloudflare.com/ajax/libs/moment.js/2.18.1/moment.js"></script>
<script src="//cdnjs.cloudflare.com/ajax/libs/vue/2.5.17/vue.min.js"></script>
<script src="//cdnjs.cloudflare.com/ajax/libs/axios/0.18.0/axios.min.js"></script>
<script src="//cdnjs.cloudflare.com/ajax/libs/fuse.js/3.2.1/fuse.min.js"></script>
<script src="//cdn.jsdelivr.net/npm/vuewordcloud@18.7.11/VueWordCloud.js"></script>
<script src="https://blog.hagfi.sh//js/prism.js"></script>
<script type="application/javascript">
var doNotTrack = false;
if (!doNotTrack) {
(function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){
(i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o),
m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m)
})(window,document,'script','https://www.google-analytics.com/analytics.js','ga');
ga('create', 'UA-124890410-1', 'auto');
ga('send', 'pageview');
}
</script>
</head>
<body>
<div id="layout" class="pure-g">
<div class="sidebar pure-u-1 pure-u-md-1-4" id="app">
<div class="header">
<h1 class="brand-title"><a href="/">Hagfi.sh</a></h1>
<h2 class="brand-tagline">A devops guide to the galaxy</h2>
<div class="counters">
<a class="counter" href="/">13
<div class="counter-sub">Documents</div>
</a>
<a class="counter" href="/tags">29
<div class="counter-sub">Tags</div>
</a>
<a class="counter" href="/categories">3
<div class="counter-sub">Categories</div>
</a>
</div>
<nav class="nav">
</nav>
<div class="search-wrapper">
<input
type="text"
placeholder="Search ..."
v-model="search"
@keydown.down.prevent="navigate(1)"
@keydown.up.prevent="navigate(-1)"
@keyup.enter.prevent="navigate(result[selected].href)"
ref="searchInput"
class="search"
/>
<svg height="100" width="100" ref="resultPoint" class="result-point">
<circle cx="5" cy="5" r="5" fill="#FFF" />
</svg>
<ul class="result-items">
<li v-for="r, i of result" class="result-item" ref="resultItem">
<div class="result-item-wrapper" :class="{ 'result-item-selected': selected === i }">
<div class="result-item-left">
<span class="post-date">
<span class="post-date-day"><sup v-text="moment(r.date).format('D')"></sup></span><span class="post-date-separator" v-text="'/'"></span><span class="post-date-month" v-text="moment(r.date).format('MMM')"></span> <span class="post-date-year" v-text="moment(r.date).format('YYYY')"></span>
</span>
<template v-if="r.author">By <a class="post-author" v-text="r.author"></a></template>
</div>
<div class="result-item-left">
<span class="result-item-separator nav-item-separator" v-text="'//'"></span><a :href="r.href" v-text="r.title" class="result-item-link"></a>
</div>
</div>
</li>
</ul>
</div>
</div>
</div>
<div class="content pure-u-1 pure-u-md-3-4">
<a name="top"></a>
<div class="posts">
<section class="post">
<header class="post-header">
<h1 class="post-title">
<a href="/administration/toubles-with-interfaces-after-clone/">Troubles with interfaces after a VM clone</a>
</h1>
</header>
<p class="post-meta">
<span class="post-date">
<span class="post-date-day"><sup>5</sup></span><span class="post-date-separator">/</span><span class="post-date-month">Nov</span> <span class="post-date-year">2018</span>
</span>
By <a class="post-author" >Kristof Vandam</a>
<span class="post-reading-time"><i class="fa fa-clock-o"></i> <em>1 min. read</em></span>
<div class="post-categories">
<a class="post-category post-category-administration" href="https://blog.hagfi.sh//categories/administration">administration</a>
</div>
</p>
<article class="post-summary">
<p>Remapping interfaces and their MAC address.</p>
</article>
<div class="read-more-link">
<a href="/administration/toubles-with-interfaces-after-clone/"><span class="read-more-slashes">//</span>Read More...</a>
</div>
</section>
</div>
<div class="footer">
<hr class="thin" />
<div class="pure-menu pure-menu-horizontal pure-menu-open">
<ul class="footer-menu">
</ul>
</div>
<p>&copy; 2022. All rights reserved.</p>
</div>
</div>
</div>
<script>
var app = new Vue({
el: '#app',
data: {
fuse: null,
search: "",
result: [],
index: [],
selected: 0
},
mounted() {
let self = this
window.addEventListener("keypress", function(e) {
self.$refs.searchInput.focus()
})
let options = {
shouldSort: true,
threshold: 0.6,
location: 0,
distance: 100,
maxPatternLength: 32,
minMatchCharLength: 1,
keys: [
"title",
"author",
"date",
"content"
]
}
axios.get('/index.json')
.then(function (response) {
self.index = response.data
self.fuse = new Fuse(response.data, options)
})
.catch(function (error) {
})
},
watch: {
result(nval, oval) {
nval.length > 0 ? this.pointer(0) : this.pointer(-1)
},
search(nval, oval) {
this.result = this.fuse.search(nval)
}
},
methods: {
navigate(val) {
switch (val) {
case 1: if (this.selected < this.result.length - 1) { this.selected++ }; break;
case -1: if (this.selected > 0 ) { this.selected-- }; break;
default: window.location.href = val; break;
}
this.pointer(this.selected)
},
pointer(selected) {
let self = this
if (selected >= 0) {
Vue.nextTick().then(function() {
let height = self.$refs.resultItem[selected].clientHeight
let top = self.$refs.resultItem[selected].getBoundingClientRect().top
let left = self.$refs.resultItem[selected].getBoundingClientRect().left
self.$refs.resultPoint.style.top = (top+height/2)+'px'
self.$refs.resultPoint.style.left = (left-20)+'px'
})
} else {
this.$refs.resultPoint.style.left = '-50px'
return
}
}
}
})
</script>
</body>
</html>

20
public/tags/interfaces/index.xml

@ -0,0 +1,20 @@
<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom">
<channel>
<title>interfaces on Hagfi.sh</title>
<link>https://blog.hagfi.sh/tags/interfaces/</link>
<description>Recent content in interfaces on Hagfi.sh</description>
<generator>Hugo -- gohugo.io</generator>
<language>en-us</language>
<lastBuildDate>Mon, 05 Nov 2018 22:13:49 +0200</lastBuildDate><atom:link href="https://blog.hagfi.sh/tags/interfaces/index.xml" rel="self" type="application/rss+xml" />
<item>
<title>Troubles with interfaces after a VM clone</title>
<link>https://blog.hagfi.sh/administration/toubles-with-interfaces-after-clone/</link>
<pubDate>Mon, 05 Nov 2018 22:13:49 +0200</pubDate>
<guid>https://blog.hagfi.sh/administration/toubles-with-interfaces-after-clone/</guid>
<description>&lt;p&gt;Remapping interfaces and their MAC address.&lt;/p&gt;</description>
</item>
</channel>
</rss>

321
public/tags/inventory/index.html

@ -0,0 +1,321 @@
<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en-us">
<head>
<title>
inventory // Hagfi.sh
</title>
<link href="http://gmpg.org/xfn/11" rel="profile">
<meta http-equiv="content-type" content="text/html; charset=utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1">
<meta name="description" content="">
<meta name="keywords" content="">
<meta name="author" content="">
<meta name="generator" content="Hugo 0.92.0" />
<meta property="og:title" content="inventory" />
<meta property="og:description" content="" />
<meta property="og:type" content="website" />
<meta property="og:locale" content="en_US" />
<meta property="og:url" content="https://blog.hagfi.sh/tags/inventory/" />
<link rel="stylesheet" href="//cdnjs.cloudflare.com/ajax/libs/pure/0.5.0/base-min.css">
<link rel="stylesheet" href="//cdnjs.cloudflare.com/ajax/libs/pure/0.5.0/pure-min.css">
<link rel="stylesheet" href="//cdnjs.cloudflare.com/ajax/libs/pure/0.5.0/grids-responsive-min.css">
<link rel="stylesheet" href="https://blog.hagfi.sh//css/redlounge.css">
<link rel="stylesheet" href="https://blog.hagfi.sh//css/prism.css">
<link href="//maxcdn.bootstrapcdn.com/font-awesome/4.5.0/css/font-awesome.min.css" rel="stylesheet">
<link href='//fonts.googleapis.com/css?family=Raleway:400,200,100,700,300,500,600,800' rel='stylesheet' type='text/css'>
<link href='//fonts.googleapis.com/css?family=Libre+Baskerville:400,700,400italic' rel='stylesheet' type='text/css'>
<link rel="apple-touch-icon-precomposed" sizes="144x144" href="/touch-icon-144-precomposed.png">
<link rel="shortcut icon" type="image/x-icon" href="/img/favicon.png">
<link href="https://blog.hagfi.sh/tags/inventory/index.xml" rel="alternate" type="application/rss+xml" title="Hagfi.sh" />
<script src="//cdnjs.cloudflare.com/ajax/libs/moment.js/2.18.1/moment.js"></script>
<script src="//cdnjs.cloudflare.com/ajax/libs/vue/2.5.17/vue.min.js"></script>
<script src="//cdnjs.cloudflare.com/ajax/libs/axios/0.18.0/axios.min.js"></script>
<script src="//cdnjs.cloudflare.com/ajax/libs/fuse.js/3.2.1/fuse.min.js"></script>
<script src="//cdn.jsdelivr.net/npm/vuewordcloud@18.7.11/VueWordCloud.js"></script>
<script src="https://blog.hagfi.sh//js/prism.js"></script>
<script type="application/javascript">
var doNotTrack = false;
if (!doNotTrack) {
(function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){
(i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o),
m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m)
})(window,document,'script','https://www.google-analytics.com/analytics.js','ga');
ga('create', 'UA-124890410-1', 'auto');
ga('send', 'pageview');
}
</script>
</head>
<body>
<div id="layout" class="pure-g">
<div class="sidebar pure-u-1 pure-u-md-1-4" id="app">
<div class="header">
<h1 class="brand-title"><a href="/">Hagfi.sh</a></h1>
<h2 class="brand-tagline">A devops guide to the galaxy</h2>
<div class="counters">
<a class="counter" href="/">13
<div class="counter-sub">Documents</div>
</a>
<a class="counter" href="/tags">29
<div class="counter-sub">Tags</div>
</a>
<a class="counter" href="/categories">3
<div class="counter-sub">Categories</div>
</a>
</div>
<nav class="nav">
</nav>
<div class="search-wrapper">
<input
type="text"
placeholder="Search ..."
v-model="search"
@keydown.down.prevent="navigate(1)"
@keydown.up.prevent="navigate(-1)"
@keyup.enter.prevent="navigate(result[selected].href)"
ref="searchInput"
class="search"
/>
<svg height="100" width="100" ref="resultPoint" class="result-point">
<circle cx="5" cy="5" r="5" fill="#FFF" />
</svg>
<ul class="result-items">
<li v-for="r, i of result" class="result-item" ref="resultItem">
<div class="result-item-wrapper" :class="{ 'result-item-selected': selected === i }">
<div class="result-item-left">
<span class="post-date">
<span class="post-date-day"><sup v-text="moment(r.date).format('D')"></sup></span><span class="post-date-separator" v-text="'/'"></span><span class="post-date-month" v-text="moment(r.date).format('MMM')"></span> <span class="post-date-year" v-text="moment(r.date).format('YYYY')"></span>
</span>
<template v-if="r.author">By <a class="post-author" v-text="r.author"></a></template>
</div>
<div class="result-item-left">
<span class="result-item-separator nav-item-separator" v-text="'//'"></span><a :href="r.href" v-text="r.title" class="result-item-link"></a>
</div>
</div>
</li>
</ul>
</div>
</div>
</div>
<div class="content pure-u-1 pure-u-md-3-4">
<a name="top"></a>
<div class="posts">
<section class="post">
<header class="post-header">
<h1 class="post-title">
<a href="/tools/fatrace/">Fatrace: Report system wide file access events</a>
</h1>
</header>
<p class="post-meta">
<span class="post-date">
<span class="post-date-day"><sup>5</sup></span><span class="post-date-separator">/</span><span class="post-date-month">Nov</span> <span class="post-date-year">2018</span>
</span>
By <a class="post-author" >Kristof Vandam</a>
<span class="post-reading-time"><i class="fa fa-clock-o"></i> <em>1 min. read</em></span>
<div class="post-categories">
<a class="post-category post-category-tools" href="https://blog.hagfi.sh//categories/tools">tools</a>
<a class="post-category post-category-administration" href="https://blog.hagfi.sh//categories/administration">administration</a>
</div>
</p>
<article class="post-summary">
<p>fatrace watches every file on server (except from itself and other kernel file systems).</p>
</article>
<div class="read-more-link">
<a href="/tools/fatrace/"><span class="read-more-slashes">//</span>Read More...</a>
</div>
</section>
<section class="post">
<header class="post-header">
<h1 class="post-title">
<a href="/tools/ncdu/">NCDU: NCurses Disk Usage</a>
</h1>
</header>
<p class="post-meta">
<span class="post-date">
<span class="post-date-day"><sup>17</sup></span><span class="post-date-separator">/</span><span class="post-date-month">Sep</span> <span class="post-date-year">2018</span>
</span>
By <a class="post-author" >Kristof Vandam</a>
<span class="post-reading-time"><i class="fa fa-clock-o"></i> <em>2 min. read</em></span>
<div class="post-categories">
<a class="post-category post-category-tools" href="https://blog.hagfi.sh//categories/tools">tools</a>
<a class="post-category post-category-administration" href="https://blog.hagfi.sh//categories/administration">administration</a>
</div>
</p>
<article class="post-summary">
<p>ncdu is a command line tool to scan and calculate directory and file sizes.</p>
</article>
<div class="read-more-link">
<a href="/tools/ncdu/"><span class="read-more-slashes">//</span>Read More...</a>
</div>
</section>
</div>
<div class="footer">
<hr class="thin" />
<div class="pure-menu pure-menu-horizontal pure-menu-open">
<ul class="footer-menu">
</ul>
</div>
<p>&copy; 2022. All rights reserved.</p>
</div>
</div>
</div>
<script>
var app = new Vue({
el: '#app',
data: {
fuse: null,
search: "",
result: [],
index: [],
selected: 0
},
mounted() {
let self = this
window.addEventListener("keypress", function(e) {
self.$refs.searchInput.focus()
})
let options = {
shouldSort: true,
threshold: 0.6,
location: 0,
distance: 100,
maxPatternLength: 32,
minMatchCharLength: 1,
keys: [
"title",
"author",
"date",
"content"
]
}
axios.get('/index.json')
.then(function (response) {
self.index = response.data
self.fuse = new Fuse(response.data, options)
})
.catch(function (error) {
})
},
watch: {
result(nval, oval) {
nval.length > 0 ? this.pointer(0) : this.pointer(-1)
},
search(nval, oval) {
this.result = this.fuse.search(nval)
}
},
methods: {
navigate(val) {
switch (val) {
case 1: if (this.selected < this.result.length - 1) { this.selected++ }; break;
case -1: if (this.selected > 0 ) { this.selected-- }; break;
default: window.location.href = val; break;
}
this.pointer(this.selected)
},
pointer(selected) {
let self = this
if (selected >= 0) {
Vue.nextTick().then(function() {
let height = self.$refs.resultItem[selected].clientHeight
let top = self.$refs.resultItem[selected].getBoundingClientRect().top
let left = self.$refs.resultItem[selected].getBoundingClientRect().left
self.$refs.resultPoint.style.top = (top+height/2)+'px'
self.$refs.resultPoint.style.left = (left-20)+'px'
})
} else {
this.$refs.resultPoint.style.left = '-50px'
return
}
}
}
})
</script>
</body>
</html>

29
public/tags/inventory/index.xml

@ -0,0 +1,29 @@
<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom">
<channel>
<title>inventory on Hagfi.sh</title>
<link>https://blog.hagfi.sh/tags/inventory/</link>
<description>Recent content in inventory on Hagfi.sh</description>
<generator>Hugo -- gohugo.io</generator>
<language>en-us</language>
<lastBuildDate>Mon, 05 Nov 2018 22:13:49 +0200</lastBuildDate><atom:link href="https://blog.hagfi.sh/tags/inventory/index.xml" rel="self" type="application/rss+xml" />
<item>
<title>Fatrace: Report system wide file access events</title>
<link>https://blog.hagfi.sh/tools/fatrace/</link>
<pubDate>Mon, 05 Nov 2018 22:13:49 +0200</pubDate>
<guid>https://blog.hagfi.sh/tools/fatrace/</guid>
<description>&lt;p&gt;fatrace watches every file on server (except from itself and other kernel file systems).&lt;/p&gt;</description>
</item>
<item>
<title>NCDU: NCurses Disk Usage</title>
<link>https://blog.hagfi.sh/tools/ncdu/</link>
<pubDate>Mon, 17 Sep 2018 22:18:38 +0200</pubDate>
<guid>https://blog.hagfi.sh/tools/ncdu/</guid>
<description>&lt;p&gt;ncdu is a command line tool to scan and calculate directory and file sizes.&lt;/p&gt;</description>
</item>
</channel>
</rss>

280
public/tags/javascript/index.html

@ -0,0 +1,280 @@
<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en-us">
<head>
<title>
javascript // Hagfi.sh
</title>
<link href="http://gmpg.org/xfn/11" rel="profile">
<meta http-equiv="content-type" content="text/html; charset=utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1">
<meta name="description" content="">
<meta name="keywords" content="">
<meta name="author" content="">
<meta name="generator" content="Hugo 0.92.0" />
<meta property="og:title" content="javascript" />
<meta property="og:description" content="" />
<meta property="og:type" content="website" />
<meta property="og:locale" content="en_US" />
<meta property="og:url" content="https://blog.hagfi.sh/tags/javascript/" />
<link rel="stylesheet" href="//cdnjs.cloudflare.com/ajax/libs/pure/0.5.0/base-min.css">
<link rel="stylesheet" href="//cdnjs.cloudflare.com/ajax/libs/pure/0.5.0/pure-min.css">
<link rel="stylesheet" href="//cdnjs.cloudflare.com/ajax/libs/pure/0.5.0/grids-responsive-min.css">
<link rel="stylesheet" href="https://blog.hagfi.sh//css/redlounge.css">
<link rel="stylesheet" href="https://blog.hagfi.sh//css/prism.css">
<link href="//maxcdn.bootstrapcdn.com/font-awesome/4.5.0/css/font-awesome.min.css" rel="stylesheet">
<link href='//fonts.googleapis.com/css?family=Raleway:400,200,100,700,300,500,600,800' rel='stylesheet' type='text/css'>
<link href='//fonts.googleapis.com/css?family=Libre+Baskerville:400,700,400italic' rel='stylesheet' type='text/css'>
<link rel="apple-touch-icon-precomposed" sizes="144x144" href="/touch-icon-144-precomposed.png">
<link rel="shortcut icon" type="image/x-icon" href="/img/favicon.png">
<link href="https://blog.hagfi.sh/tags/javascript/index.xml" rel="alternate" type="application/rss+xml" title="Hagfi.sh" />
<script src="//cdnjs.cloudflare.com/ajax/libs/moment.js/2.18.1/moment.js"></script>
<script src="//cdnjs.cloudflare.com/ajax/libs/vue/2.5.17/vue.min.js"></script>
<script src="//cdnjs.cloudflare.com/ajax/libs/axios/0.18.0/axios.min.js"></script>
<script src="//cdnjs.cloudflare.com/ajax/libs/fuse.js/3.2.1/fuse.min.js"></script>
<script src="//cdn.jsdelivr.net/npm/vuewordcloud@18.7.11/VueWordCloud.js"></script>
<script src="https://blog.hagfi.sh//js/prism.js"></script>
<script type="application/javascript">
var doNotTrack = false;
if (!doNotTrack) {
(function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){
(i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o),
m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m)
})(window,document,'script','https://www.google-analytics.com/analytics.js','ga');
ga('create', 'UA-124890410-1', 'auto');
ga('send', 'pageview');
}
</script>
</head>
<body>
<div id="layout" class="pure-g">
<div class="sidebar pure-u-1 pure-u-md-1-4" id="app">
<div class="header">
<h1 class="brand-title"><a href="/">Hagfi.sh</a></h1>
<h2 class="brand-tagline">A devops guide to the galaxy</h2>
<div class="counters">
<a class="counter" href="/">13
<div class="counter-sub">Documents</div>
</a>
<a class="counter" href="/tags">29
<div class="counter-sub">Tags</div>
</a>
<a class="counter" href="/categories">3
<div class="counter-sub">Categories</div>
</a>
</div>
<nav class="nav">
</nav>
<div class="search-wrapper">
<input
type="text"
placeholder="Search ..."
v-model="search"
@keydown.down.prevent="navigate(1)"
@keydown.up.prevent="navigate(-1)"
@keyup.enter.prevent="navigate(result[selected].href)"
ref="searchInput"
class="search"
/>
<svg height="100" width="100" ref="resultPoint" class="result-point">
<circle cx="5" cy="5" r="5" fill="#FFF" />
</svg>
<ul class="result-items">
<li v-for="r, i of result" class="result-item" ref="resultItem">
<div class="result-item-wrapper" :class="{ 'result-item-selected': selected === i }">
<div class="result-item-left">
<span class="post-date">
<span class="post-date-day"><sup v-text="moment(r.date).format('D')"></sup></span><span class="post-date-separator" v-text="'/'"></span><span class="post-date-month" v-text="moment(r.date).format('MMM')"></span> <span class="post-date-year" v-text="moment(r.date).format('YYYY')"></span>
</span>
<template v-if="r.author">By <a class="post-author" v-text="r.author"></a></template>
</div>
<div class="result-item-left">
<span class="result-item-separator nav-item-separator" v-text="'//'"></span><a :href="r.href" v-text="r.title" class="result-item-link"></a>
</div>
</div>
</li>
</ul>
</div>
</div>
</div>
<div class="content pure-u-1 pure-u-md-3-4">
<a name="top"></a>
<div class="posts">
<section class="post">
<header class="post-header">
<h1 class="post-title">
<a href="/development/live-search-with-hugo/">Live Search With HUGO</a>
</h1>
</header>
<p class="post-meta">
<span class="post-date">
<span class="post-date-day"><sup>29</sup></span><span class="post-date-separator">/</span><span class="post-date-month">Aug</span> <span class="post-date-year">2018</span>
</span>
By <a class="post-author" >Kristof Vandam</a>
<span class="post-reading-time"><i class="fa fa-clock-o"></i> <em>5 min. read</em></span>
<div class="post-categories">
<a class="post-category post-category-development" href="https://blog.hagfi.sh//categories/development">development</a>
</div>
</p>
<article class="post-summary">
<p>HUGO is static, that&rsquo;s a fact. How can I implement a live search? Searching the internet provided me only solutions
that require a page refresh, this time of age performance is key, so that&rsquo;s why I wanted a fast and fuzzy search implementation.</p>
</article>
<div class="read-more-link">
<a href="/development/live-search-with-hugo/"><span class="read-more-slashes">//</span>Read More...</a>
</div>
</section>
</div>
<div class="footer">
<hr class="thin" />
<div class="pure-menu pure-menu-horizontal pure-menu-open">
<ul class="footer-menu">
</ul>
</div>
<p>&copy; 2022. All rights reserved.</p>
</div>
</div>
</div>
<script>
var app = new Vue({
el: '#app',
data: {
fuse: null,
search: "",
result: [],
index: [],
selected: 0
},
mounted() {
let self = this
window.addEventListener("keypress", function(e) {
self.$refs.searchInput.focus()
})
let options = {
shouldSort: true,
threshold: 0.6,
location: 0,
distance: 100,
maxPatternLength: 32,
minMatchCharLength: 1,
keys: [
"title",
"author",
"date",
"content"
]
}
axios.get('/index.json')
.then(function (response) {
self.index = response.data
self.fuse = new Fuse(response.data, options)
})
.catch(function (error) {
})
},
watch: {
result(nval, oval) {
nval.length > 0 ? this.pointer(0) : this.pointer(-1)
},
search(nval, oval) {
this.result = this.fuse.search(nval)
}
},
methods: {
navigate(val) {
switch (val) {
case 1: if (this.selected < this.result.length - 1) { this.selected++ }; break;
case -1: if (this.selected > 0 ) { this.selected-- }; break;
default: window.location.href = val; break;
}
this.pointer(this.selected)
},
pointer(selected) {
let self = this
if (selected >= 0) {
Vue.nextTick().then(function() {
let height = self.$refs.resultItem[selected].clientHeight
let top = self.$refs.resultItem[selected].getBoundingClientRect().top
let left = self.$refs.resultItem[selected].getBoundingClientRect().left
self.$refs.resultPoint.style.top = (top+height/2)+'px'
self.$refs.resultPoint.style.left = (left-20)+'px'
})
} else {
this.$refs.resultPoint.style.left = '-50px'
return
}
}
}
})
</script>
</body>
</html>

21
public/tags/javascript/index.xml

@ -0,0 +1,21 @@
<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom">
<channel>
<title>javascript on Hagfi.sh</title>
<link>https://blog.hagfi.sh/tags/javascript/</link>
<description>Recent content in javascript on Hagfi.sh</description>
<generator>Hugo -- gohugo.io</generator>
<language>en-us</language>
<lastBuildDate>Wed, 29 Aug 2018 22:44:46 +0200</lastBuildDate><atom:link href="https://blog.hagfi.sh/tags/javascript/index.xml" rel="self" type="application/rss+xml" />
<item>
<title>Live Search With HUGO</title>
<link>https://blog.hagfi.sh/development/live-search-with-hugo/</link>
<pubDate>Wed, 29 Aug 2018 22:44:46 +0200</pubDate>
<guid>https://blog.hagfi.sh/development/live-search-with-hugo/</guid>
<description>&lt;p&gt;HUGO is static, that&amp;rsquo;s a fact. How can I implement a live search? Searching the internet provided me only solutions
that require a page refresh, this time of age performance is key, so that&amp;rsquo;s why I wanted a fast and fuzzy search implementation.&lt;/p&gt;</description>
</item>
</channel>
</rss>

280
public/tags/js/index.html

@ -0,0 +1,280 @@
<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en-us">
<head>
<title>
js // Hagfi.sh
</title>
<link href="http://gmpg.org/xfn/11" rel="profile">
<meta http-equiv="content-type" content="text/html; charset=utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1">
<meta name="description" content="">
<meta name="keywords" content="">
<meta name="author" content="">
<meta name="generator" content="Hugo 0.92.0" />
<meta property="og:title" content="js" />
<meta property="og:description" content="" />
<meta property="og:type" content="website" />
<meta property="og:locale" content="en_US" />
<meta property="og:url" content="https://blog.hagfi.sh/tags/js/" />
<link rel="stylesheet" href="//cdnjs.cloudflare.com/ajax/libs/pure/0.5.0/base-min.css">
<link rel="stylesheet" href="//cdnjs.cloudflare.com/ajax/libs/pure/0.5.0/pure-min.css">
<link rel="stylesheet" href="//cdnjs.cloudflare.com/ajax/libs/pure/0.5.0/grids-responsive-min.css">
<link rel="stylesheet" href="https://blog.hagfi.sh//css/redlounge.css">
<link rel="stylesheet" href="https://blog.hagfi.sh//css/prism.css">
<link href="//maxcdn.bootstrapcdn.com/font-awesome/4.5.0/css/font-awesome.min.css" rel="stylesheet">
<link href='//fonts.googleapis.com/css?family=Raleway:400,200,100,700,300,500,600,800' rel='stylesheet' type='text/css'>
<link href='//fonts.googleapis.com/css?family=Libre+Baskerville:400,700,400italic' rel='stylesheet' type='text/css'>
<link rel="apple-touch-icon-precomposed" sizes="144x144" href="/touch-icon-144-precomposed.png">
<link rel="shortcut icon" type="image/x-icon" href="/img/favicon.png">
<link href="https://blog.hagfi.sh/tags/js/index.xml" rel="alternate" type="application/rss+xml" title="Hagfi.sh" />
<script src="//cdnjs.cloudflare.com/ajax/libs/moment.js/2.18.1/moment.js"></script>
<script src="//cdnjs.cloudflare.com/ajax/libs/vue/2.5.17/vue.min.js"></script>
<script src="//cdnjs.cloudflare.com/ajax/libs/axios/0.18.0/axios.min.js"></script>
<script src="//cdnjs.cloudflare.com/ajax/libs/fuse.js/3.2.1/fuse.min.js"></script>
<script src="//cdn.jsdelivr.net/npm/vuewordcloud@18.7.11/VueWordCloud.js"></script>
<script src="https://blog.hagfi.sh//js/prism.js"></script>
<script type="application/javascript">
var doNotTrack = false;
if (!doNotTrack) {
(function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){
(i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o),
m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m)
})(window,document,'script','https://www.google-analytics.com/analytics.js','ga');
ga('create', 'UA-124890410-1', 'auto');
ga('send', 'pageview');
}
</script>
</head>
<body>
<div id="layout" class="pure-g">
<div class="sidebar pure-u-1 pure-u-md-1-4" id="app">
<div class="header">
<h1 class="brand-title"><a href="/">Hagfi.sh</a></h1>
<h2 class="brand-tagline">A devops guide to the galaxy</h2>
<div class="counters">
<a class="counter" href="/">13
<div class="counter-sub">Documents</div>
</a>
<a class="counter" href="/tags">29
<div class="counter-sub">Tags</div>
</a>
<a class="counter" href="/categories">3
<div class="counter-sub">Categories</div>
</a>
</div>
<nav class="nav">
</nav>
<div class="search-wrapper">
<input
type="text"
placeholder="Search ..."
v-model="search"
@keydown.down.prevent="navigate(1)"
@keydown.up.prevent="navigate(-1)"
@keyup.enter.prevent="navigate(result[selected].href)"
ref="searchInput"
class="search"
/>
<svg height="100" width="100" ref="resultPoint" class="result-point">
<circle cx="5" cy="5" r="5" fill="#FFF" />
</svg>
<ul class="result-items">
<li v-for="r, i of result" class="result-item" ref="resultItem">
<div class="result-item-wrapper" :class="{ 'result-item-selected': selected === i }">
<div class="result-item-left">
<span class="post-date">
<span class="post-date-day"><sup v-text="moment(r.date).format('D')"></sup></span><span class="post-date-separator" v-text="'/'"></span><span class="post-date-month" v-text="moment(r.date).format('MMM')"></span> <span class="post-date-year" v-text="moment(r.date).format('YYYY')"></span>
</span>
<template v-if="r.author">By <a class="post-author" v-text="r.author"></a></template>
</div>
<div class="result-item-left">
<span class="result-item-separator nav-item-separator" v-text="'//'"></span><a :href="r.href" v-text="r.title" class="result-item-link"></a>
</div>
</div>
</li>
</ul>
</div>
</div>
</div>
<div class="content pure-u-1 pure-u-md-3-4">
<a name="top"></a>
<div class="posts">
<section class="post">
<header class="post-header">
<h1 class="post-title">
<a href="/development/live-search-with-hugo/">Live Search With HUGO</a>
</h1>
</header>
<p class="post-meta">
<span class="post-date">
<span class="post-date-day"><sup>29</sup></span><span class="post-date-separator">/</span><span class="post-date-month">Aug</span> <span class="post-date-year">2018</span>
</span>
By <a class="post-author" >Kristof Vandam</a>
<span class="post-reading-time"><i class="fa fa-clock-o"></i> <em>5 min. read</em></span>
<div class="post-categories">
<a class="post-category post-category-development" href="https://blog.hagfi.sh//categories/development">development</a>
</div>
</p>
<article class="post-summary">
<p>HUGO is static, that&rsquo;s a fact. How can I implement a live search? Searching the internet provided me only solutions
that require a page refresh, this time of age performance is key, so that&rsquo;s why I wanted a fast and fuzzy search implementation.</p>
</article>
<div class="read-more-link">
<a href="/development/live-search-with-hugo/"><span class="read-more-slashes">//</span>Read More...</a>
</div>
</section>
</div>
<div class="footer">
<hr class="thin" />
<div class="pure-menu pure-menu-horizontal pure-menu-open">
<ul class="footer-menu">
</ul>
</div>
<p>&copy; 2022. All rights reserved.</p>
</div>
</div>
</div>
<script>
var app = new Vue({
el: '#app',
data: {
fuse: null,
search: "",
result: [],
index: [],
selected: 0
},
mounted() {
let self = this
window.addEventListener("keypress", function(e) {
self.$refs.searchInput.focus()
})
let options = {
shouldSort: true,
threshold: 0.6,
location: 0,
distance: 100,
maxPatternLength: 32,
minMatchCharLength: 1,
keys: [
"title",
"author",
"date",
"content"
]
}
axios.get('/index.json')
.then(function (response) {
self.index = response.data
self.fuse = new Fuse(response.data, options)
})
.catch(function (error) {
})
},
watch: {
result(nval, oval) {
nval.length > 0 ? this.pointer(0) : this.pointer(-1)
},
search(nval, oval) {
this.result = this.fuse.search(nval)
}
},
methods: {
navigate(val) {
switch (val) {
case 1: if (this.selected < this.result.length - 1) { this.selected++ }; break;
case -1: if (this.selected > 0 ) { this.selected-- }; break;
default: window.location.href = val; break;
}
this.pointer(this.selected)
},
pointer(selected) {
let self = this
if (selected >= 0) {
Vue.nextTick().then(function() {
let height = self.$refs.resultItem[selected].clientHeight
let top = self.$refs.resultItem[selected].getBoundingClientRect().top
let left = self.$refs.resultItem[selected].getBoundingClientRect().left
self.$refs.resultPoint.style.top = (top+height/2)+'px'
self.$refs.resultPoint.style.left = (left-20)+'px'
})
} else {
this.$refs.resultPoint.style.left = '-50px'
return
}
}
}
})
</script>
</body>
</html>

21
public/tags/js/index.xml

@ -0,0 +1,21 @@
<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom">
<channel>
<title>js on Hagfi.sh</title>
<link>https://blog.hagfi.sh/tags/js/</link>
<description>Recent content in js on Hagfi.sh</description>
<generator>Hugo -- gohugo.io</generator>
<language>en-us</language>
<lastBuildDate>Wed, 29 Aug 2018 22:44:46 +0200</lastBuildDate><atom:link href="https://blog.hagfi.sh/tags/js/index.xml" rel="self" type="application/rss+xml" />
<item>
<title>Live Search With HUGO</title>
<link>https://blog.hagfi.sh/development/live-search-with-hugo/</link>
<pubDate>Wed, 29 Aug 2018 22:44:46 +0200</pubDate>
<guid>https://blog.hagfi.sh/development/live-search-with-hugo/</guid>
<description>&lt;p&gt;HUGO is static, that&amp;rsquo;s a fact. How can I implement a live search? Searching the internet provided me only solutions
that require a page refresh, this time of age performance is key, so that&amp;rsquo;s why I wanted a fast and fuzzy search implementation.&lt;/p&gt;</description>
</item>
</channel>
</rss>

280
public/tags/json/index.html

@ -0,0 +1,280 @@
<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en-us">
<head>
<title>
json // Hagfi.sh
</title>
<link href="http://gmpg.org/xfn/11" rel="profile">
<meta http-equiv="content-type" content="text/html; charset=utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1">
<meta name="description" content="">
<meta name="keywords" content="">
<meta name="author" content="">
<meta name="generator" content="Hugo 0.92.0" />
<meta property="og:title" content="json" />
<meta property="og:description" content="" />
<meta property="og:type" content="website" />
<meta property="og:locale" content="en_US" />
<meta property="og:url" content="https://blog.hagfi.sh/tags/json/" />
<link rel="stylesheet" href="//cdnjs.cloudflare.com/ajax/libs/pure/0.5.0/base-min.css">
<link rel="stylesheet" href="//cdnjs.cloudflare.com/ajax/libs/pure/0.5.0/pure-min.css">
<link rel="stylesheet" href="//cdnjs.cloudflare.com/ajax/libs/pure/0.5.0/grids-responsive-min.css">
<link rel="stylesheet" href="https://blog.hagfi.sh//css/redlounge.css">
<link rel="stylesheet" href="https://blog.hagfi.sh//css/prism.css">
<link href="//maxcdn.bootstrapcdn.com/font-awesome/4.5.0/css/font-awesome.min.css" rel="stylesheet">
<link href='//fonts.googleapis.com/css?family=Raleway:400,200,100,700,300,500,600,800' rel='stylesheet' type='text/css'>
<link href='//fonts.googleapis.com/css?family=Libre+Baskerville:400,700,400italic' rel='stylesheet' type='text/css'>
<link rel="apple-touch-icon-precomposed" sizes="144x144" href="/touch-icon-144-precomposed.png">
<link rel="shortcut icon" type="image/x-icon" href="/img/favicon.png">
<link href="https://blog.hagfi.sh/tags/json/index.xml" rel="alternate" type="application/rss+xml" title="Hagfi.sh" />
<script src="//cdnjs.cloudflare.com/ajax/libs/moment.js/2.18.1/moment.js"></script>
<script src="//cdnjs.cloudflare.com/ajax/libs/vue/2.5.17/vue.min.js"></script>
<script src="//cdnjs.cloudflare.com/ajax/libs/axios/0.18.0/axios.min.js"></script>
<script src="//cdnjs.cloudflare.com/ajax/libs/fuse.js/3.2.1/fuse.min.js"></script>
<script src="//cdn.jsdelivr.net/npm/vuewordcloud@18.7.11/VueWordCloud.js"></script>
<script src="https://blog.hagfi.sh//js/prism.js"></script>
<script type="application/javascript">
var doNotTrack = false;
if (!doNotTrack) {
(function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){
(i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o),
m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m)
})(window,document,'script','https://www.google-analytics.com/analytics.js','ga');
ga('create', 'UA-124890410-1', 'auto');
ga('send', 'pageview');
}
</script>
</head>
<body>
<div id="layout" class="pure-g">
<div class="sidebar pure-u-1 pure-u-md-1-4" id="app">
<div class="header">
<h1 class="brand-title"><a href="/">Hagfi.sh</a></h1>
<h2 class="brand-tagline">A devops guide to the galaxy</h2>
<div class="counters">
<a class="counter" href="/">13
<div class="counter-sub">Documents</div>
</a>
<a class="counter" href="/tags">29
<div class="counter-sub">Tags</div>
</a>
<a class="counter" href="/categories">3
<div class="counter-sub">Categories</div>
</a>
</div>
<nav class="nav">
</nav>
<div class="search-wrapper">
<input
type="text"
placeholder="Search ..."
v-model="search"
@keydown.down.prevent="navigate(1)"
@keydown.up.prevent="navigate(-1)"
@keyup.enter.prevent="navigate(result[selected].href)"
ref="searchInput"
class="search"
/>
<svg height="100" width="100" ref="resultPoint" class="result-point">
<circle cx="5" cy="5" r="5" fill="#FFF" />
</svg>
<ul class="result-items">
<li v-for="r, i of result" class="result-item" ref="resultItem">
<div class="result-item-wrapper" :class="{ 'result-item-selected': selected === i }">
<div class="result-item-left">
<span class="post-date">
<span class="post-date-day"><sup v-text="moment(r.date).format('D')"></sup></span><span class="post-date-separator" v-text="'/'"></span><span class="post-date-month" v-text="moment(r.date).format('MMM')"></span> <span class="post-date-year" v-text="moment(r.date).format('YYYY')"></span>
</span>
<template v-if="r.author">By <a class="post-author" v-text="r.author"></a></template>
</div>
<div class="result-item-left">
<span class="result-item-separator nav-item-separator" v-text="'//'"></span><a :href="r.href" v-text="r.title" class="result-item-link"></a>
</div>
</div>
</li>
</ul>
</div>
</div>
</div>
<div class="content pure-u-1 pure-u-md-3-4">
<a name="top"></a>
<div class="posts">
<section class="post">
<header class="post-header">
<h1 class="post-title">
<a href="/development/live-search-with-hugo/">Live Search With HUGO</a>
</h1>
</header>
<p class="post-meta">
<span class="post-date">
<span class="post-date-day"><sup>29</sup></span><span class="post-date-separator">/</span><span class="post-date-month">Aug</span> <span class="post-date-year">2018</span>
</span>
By <a class="post-author" >Kristof Vandam</a>
<span class="post-reading-time"><i class="fa fa-clock-o"></i> <em>5 min. read</em></span>
<div class="post-categories">
<a class="post-category post-category-development" href="https://blog.hagfi.sh//categories/development">development</a>
</div>
</p>
<article class="post-summary">
<p>HUGO is static, that&rsquo;s a fact. How can I implement a live search? Searching the internet provided me only solutions
that require a page refresh, this time of age performance is key, so that&rsquo;s why I wanted a fast and fuzzy search implementation.</p>
</article>
<div class="read-more-link">
<a href="/development/live-search-with-hugo/"><span class="read-more-slashes">//</span>Read More...</a>
</div>
</section>
</div>
<div class="footer">
<hr class="thin" />
<div class="pure-menu pure-menu-horizontal pure-menu-open">
<ul class="footer-menu">
</ul>
</div>
<p>&copy; 2022. All rights reserved.</p>
</div>
</div>
</div>
<script>
var app = new Vue({
el: '#app',
data: {
fuse: null,
search: "",
result: [],
index: [],
selected: 0
},
mounted() {
let self = this
window.addEventListener("keypress", function(e) {
self.$refs.searchInput.focus()
})
let options = {
shouldSort: true,
threshold: 0.6,
location: 0,
distance: 100,
maxPatternLength: 32,
minMatchCharLength: 1,
keys: [
"title",
"author",
"date",
"content"
]
}
axios.get('/index.json')
.then(function (response) {
self.index = response.data
self.fuse = new Fuse(response.data, options)
})
.catch(function (error) {
})
},
watch: {
result(nval, oval) {
nval.length > 0 ? this.pointer(0) : this.pointer(-1)
},
search(nval, oval) {
this.result = this.fuse.search(nval)
}
},
methods: {
navigate(val) {
switch (val) {
case 1: if (this.selected < this.result.length - 1) { this.selected++ }; break;
case -1: if (this.selected > 0 ) { this.selected-- }; break;
default: window.location.href = val; break;
}
this.pointer(this.selected)
},
pointer(selected) {
let self = this
if (selected >= 0) {
Vue.nextTick().then(function() {
let height = self.$refs.resultItem[selected].clientHeight
let top = self.$refs.resultItem[selected].getBoundingClientRect().top
let left = self.$refs.resultItem[selected].getBoundingClientRect().left
self.$refs.resultPoint.style.top = (top+height/2)+'px'
self.$refs.resultPoint.style.left = (left-20)+'px'
})
} else {
this.$refs.resultPoint.style.left = '-50px'
return
}
}
}
})
</script>
</body>
</html>

21
public/tags/json/index.xml

@ -0,0 +1,21 @@
<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom">
<channel>
<title>json on Hagfi.sh</title>
<link>https://blog.hagfi.sh/tags/json/</link>
<description>Recent content in json on Hagfi.sh</description>
<generator>Hugo -- gohugo.io</generator>
<language>en-us</language>
<lastBuildDate>Wed, 29 Aug 2018 22:44:46 +0200</lastBuildDate><atom:link href="https://blog.hagfi.sh/tags/json/index.xml" rel="self" type="application/rss+xml" />
<item>
<title>Live Search With HUGO</title>
<link>https://blog.hagfi.sh/development/live-search-with-hugo/</link>
<pubDate>Wed, 29 Aug 2018 22:44:46 +0200</pubDate>
<guid>https://blog.hagfi.sh/development/live-search-with-hugo/</guid>
<description>&lt;p&gt;HUGO is static, that&amp;rsquo;s a fact. How can I implement a live search? Searching the internet provided me only solutions
that require a page refresh, this time of age performance is key, so that&amp;rsquo;s why I wanted a fast and fuzzy search implementation.&lt;/p&gt;</description>
</item>
</channel>
</rss>

317
public/tags/linux/index.html

@ -0,0 +1,317 @@
<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en-us">
<head>
<title>
linux // Hagfi.sh
</title>
<link href="http://gmpg.org/xfn/11" rel="profile">
<meta http-equiv="content-type" content="text/html; charset=utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1">
<meta name="description" content="">
<meta name="keywords" content="">
<meta name="author" content="">
<meta name="generator" content="Hugo 0.92.0" />
<meta property="og:title" content="linux" />
<meta property="og:description" content="" />
<meta property="og:type" content="website" />
<meta property="og:locale" content="en_US" />
<meta property="og:url" content="https://blog.hagfi.sh/tags/linux/" />
<link rel="stylesheet" href="//cdnjs.cloudflare.com/ajax/libs/pure/0.5.0/base-min.css">
<link rel="stylesheet" href="//cdnjs.cloudflare.com/ajax/libs/pure/0.5.0/pure-min.css">
<link rel="stylesheet" href="//cdnjs.cloudflare.com/ajax/libs/pure/0.5.0/grids-responsive-min.css">
<link rel="stylesheet" href="https://blog.hagfi.sh//css/redlounge.css">
<link rel="stylesheet" href="https://blog.hagfi.sh//css/prism.css">
<link href="//maxcdn.bootstrapcdn.com/font-awesome/4.5.0/css/font-awesome.min.css" rel="stylesheet">
<link href='//fonts.googleapis.com/css?family=Raleway:400,200,100,700,300,500,600,800' rel='stylesheet' type='text/css'>
<link href='//fonts.googleapis.com/css?family=Libre+Baskerville:400,700,400italic' rel='stylesheet' type='text/css'>
<link rel="apple-touch-icon-precomposed" sizes="144x144" href="/touch-icon-144-precomposed.png">
<link rel="shortcut icon" type="image/x-icon" href="/img/favicon.png">
<link href="https://blog.hagfi.sh/tags/linux/index.xml" rel="alternate" type="application/rss+xml" title="Hagfi.sh" />
<script src="//cdnjs.cloudflare.com/ajax/libs/moment.js/2.18.1/moment.js"></script>
<script src="//cdnjs.cloudflare.com/ajax/libs/vue/2.5.17/vue.min.js"></script>
<script src="//cdnjs.cloudflare.com/ajax/libs/axios/0.18.0/axios.min.js"></script>
<script src="//cdnjs.cloudflare.com/ajax/libs/fuse.js/3.2.1/fuse.min.js"></script>
<script src="//cdn.jsdelivr.net/npm/vuewordcloud@18.7.11/VueWordCloud.js"></script>
<script src="https://blog.hagfi.sh//js/prism.js"></script>
<script type="application/javascript">
var doNotTrack = false;
if (!doNotTrack) {
(function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){
(i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o),
m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m)
})(window,document,'script','https://www.google-analytics.com/analytics.js','ga');
ga('create', 'UA-124890410-1', 'auto');
ga('send', 'pageview');
}
</script>
</head>
<body>
<div id="layout" class="pure-g">
<div class="sidebar pure-u-1 pure-u-md-1-4" id="app">
<div class="header">
<h1 class="brand-title"><a href="/">Hagfi.sh</a></h1>
<h2 class="brand-tagline">A devops guide to the galaxy</h2>
<div class="counters">
<a class="counter" href="/">13
<div class="counter-sub">Documents</div>
</a>
<a class="counter" href="/tags">29
<div class="counter-sub">Tags</div>
</a>
<a class="counter" href="/categories">3
<div class="counter-sub">Categories</div>
</a>
</div>
<nav class="nav">
</nav>
<div class="search-wrapper">
<input
type="text"
placeholder="Search ..."
v-model="search"
@keydown.down.prevent="navigate(1)"
@keydown.up.prevent="navigate(-1)"
@keyup.enter.prevent="navigate(result[selected].href)"
ref="searchInput"
class="search"
/>
<svg height="100" width="100" ref="resultPoint" class="result-point">
<circle cx="5" cy="5" r="5" fill="#FFF" />
</svg>
<ul class="result-items">
<li v-for="r, i of result" class="result-item" ref="resultItem">
<div class="result-item-wrapper" :class="{ 'result-item-selected': selected === i }">
<div class="result-item-left">
<span class="post-date">
<span class="post-date-day"><sup v-text="moment(r.date).format('D')"></sup></span><span class="post-date-separator" v-text="'/'"></span><span class="post-date-month" v-text="moment(r.date).format('MMM')"></span> <span class="post-date-year" v-text="moment(r.date).format('YYYY')"></span>
</span>
<template v-if="r.author">By <a class="post-author" v-text="r.author"></a></template>
</div>
<div class="result-item-left">
<span class="result-item-separator nav-item-separator" v-text="'//'"></span><a :href="r.href" v-text="r.title" class="result-item-link"></a>
</div>
</div>
</li>
</ul>
</div>
</div>
</div>
<div class="content pure-u-1 pure-u-md-3-4">
<a name="top"></a>
<div class="posts">
<section class="post">
<header class="post-header">
<h1 class="post-title">
<a href="/administration/boot-targets/">Changing boot targets</a>
</h1>
</header>
<p class="post-meta">
<span class="post-date">
<span class="post-date-day"><sup>9</sup></span><span class="post-date-separator">/</span><span class="post-date-month">Nov</span> <span class="post-date-year">2018</span>
</span>
By <a class="post-author" >Kristof Vandam</a>
<span class="post-reading-time"><i class="fa fa-clock-o"></i> <em>1 min. read</em></span>
<div class="post-categories">
<a class="post-category post-category-administration" href="https://blog.hagfi.sh//categories/administration">administration</a>
</div>
</p>
<article class="post-summary">
<p>Switch between run levels / environments.</p>
</article>
<div class="read-more-link">
<a href="/administration/boot-targets/"><span class="read-more-slashes">//</span>Read More...</a>
</div>
</section>
<section class="post">
<header class="post-header">
<h1 class="post-title">
<a href="/administration/autofs/">Mount with automount (autofs)</a>
</h1>
</header>
<p class="post-meta">
<span class="post-date">
<span class="post-date-day"><sup>9</sup></span><span class="post-date-separator">/</span><span class="post-date-month">Nov</span> <span class="post-date-year">2018</span>
</span>
By <a class="post-author" >Kristof Vandam</a>
<span class="post-reading-time"><i class="fa fa-clock-o"></i> <em>2 min. read</em></span>
<div class="post-categories">
<a class="post-category post-category-administration" href="https://blog.hagfi.sh//categories/administration">administration</a>
</div>
</p>
<article class="post-summary">
<p>Automagically mount remote directories on login.</p>
</article>
<div class="read-more-link">
<a href="/administration/autofs/"><span class="read-more-slashes">//</span>Read More...</a>
</div>
</section>
</div>
<div class="footer">
<hr class="thin" />
<div class="pure-menu pure-menu-horizontal pure-menu-open">
<ul class="footer-menu">
</ul>
</div>
<p>&copy; 2022. All rights reserved.</p>
</div>
</div>
</div>
<script>
var app = new Vue({
el: '#app',
data: {
fuse: null,
search: "",
result: [],
index: [],
selected: 0
},
mounted() {
let self = this
window.addEventListener("keypress", function(e) {
self.$refs.searchInput.focus()
})
let options = {
shouldSort: true,
threshold: 0.6,
location: 0,
distance: 100,
maxPatternLength: 32,
minMatchCharLength: 1,
keys: [
"title",
"author",
"date",
"content"
]
}
axios.get('/index.json')
.then(function (response) {
self.index = response.data
self.fuse = new Fuse(response.data, options)
})
.catch(function (error) {
})
},
watch: {
result(nval, oval) {
nval.length > 0 ? this.pointer(0) : this.pointer(-1)
},
search(nval, oval) {
this.result = this.fuse.search(nval)
}
},
methods: {
navigate(val) {
switch (val) {
case 1: if (this.selected < this.result.length - 1) { this.selected++ }; break;
case -1: if (this.selected > 0 ) { this.selected-- }; break;
default: window.location.href = val; break;
}
this.pointer(this.selected)
},
pointer(selected) {
let self = this
if (selected >= 0) {
Vue.nextTick().then(function() {
let height = self.$refs.resultItem[selected].clientHeight
let top = self.$refs.resultItem[selected].getBoundingClientRect().top
let left = self.$refs.resultItem[selected].getBoundingClientRect().left
self.$refs.resultPoint.style.top = (top+height/2)+'px'
self.$refs.resultPoint.style.left = (left-20)+'px'
})
} else {
this.$refs.resultPoint.style.left = '-50px'
return
}
}
}
})
</script>
</body>
</html>

29
public/tags/linux/index.xml

@ -0,0 +1,29 @@
<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom">
<channel>
<title>linux on Hagfi.sh</title>
<link>https://blog.hagfi.sh/tags/linux/</link>
<description>Recent content in linux on Hagfi.sh</description>
<generator>Hugo -- gohugo.io</generator>
<language>en-us</language>
<lastBuildDate>Fri, 09 Nov 2018 10:08:15 +0200</lastBuildDate><atom:link href="https://blog.hagfi.sh/tags/linux/index.xml" rel="self" type="application/rss+xml" />
<item>
<title>Changing boot targets</title>
<link>https://blog.hagfi.sh/administration/boot-targets/</link>
<pubDate>Fri, 09 Nov 2018 10:08:15 +0200</pubDate>
<guid>https://blog.hagfi.sh/administration/boot-targets/</guid>
<description>&lt;p&gt;Switch between run levels / environments.&lt;/p&gt;</description>
</item>
<item>
<title>Mount with automount (autofs)</title>
<link>https://blog.hagfi.sh/administration/autofs/</link>
<pubDate>Fri, 09 Nov 2018 10:08:15 +0200</pubDate>
<guid>https://blog.hagfi.sh/administration/autofs/</guid>
<description>&lt;p&gt;Automagically mount remote directories on login.&lt;/p&gt;</description>
</item>
</channel>
</rss>

279
public/tags/mount/index.html

@ -0,0 +1,279 @@
<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en-us">
<head>
<title>
mount // Hagfi.sh
</title>
<link href="http://gmpg.org/xfn/11" rel="profile">
<meta http-equiv="content-type" content="text/html; charset=utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1">
<meta name="description" content="">
<meta name="keywords" content="">
<meta name="author" content="">
<meta name="generator" content="Hugo 0.92.0" />
<meta property="og:title" content="mount" />
<meta property="og:description" content="" />
<meta property="og:type" content="website" />
<meta property="og:locale" content="en_US" />
<meta property="og:url" content="https://blog.hagfi.sh/tags/mount/" />
<link rel="stylesheet" href="//cdnjs.cloudflare.com/ajax/libs/pure/0.5.0/base-min.css">
<link rel="stylesheet" href="//cdnjs.cloudflare.com/ajax/libs/pure/0.5.0/pure-min.css">
<link rel="stylesheet" href="//cdnjs.cloudflare.com/ajax/libs/pure/0.5.0/grids-responsive-min.css">
<link rel="stylesheet" href="https://blog.hagfi.sh//css/redlounge.css">
<link rel="stylesheet" href="https://blog.hagfi.sh//css/prism.css">
<link href="//maxcdn.bootstrapcdn.com/font-awesome/4.5.0/css/font-awesome.min.css" rel="stylesheet">
<link href='//fonts.googleapis.com/css?family=Raleway:400,200,100,700,300,500,600,800' rel='stylesheet' type='text/css'>
<link href='//fonts.googleapis.com/css?family=Libre+Baskerville:400,700,400italic' rel='stylesheet' type='text/css'>
<link rel="apple-touch-icon-precomposed" sizes="144x144" href="/touch-icon-144-precomposed.png">
<link rel="shortcut icon" type="image/x-icon" href="/img/favicon.png">
<link href="https://blog.hagfi.sh/tags/mount/index.xml" rel="alternate" type="application/rss+xml" title="Hagfi.sh" />
<script src="//cdnjs.cloudflare.com/ajax/libs/moment.js/2.18.1/moment.js"></script>
<script src="//cdnjs.cloudflare.com/ajax/libs/vue/2.5.17/vue.min.js"></script>
<script src="//cdnjs.cloudflare.com/ajax/libs/axios/0.18.0/axios.min.js"></script>
<script src="//cdnjs.cloudflare.com/ajax/libs/fuse.js/3.2.1/fuse.min.js"></script>
<script src="//cdn.jsdelivr.net/npm/vuewordcloud@18.7.11/VueWordCloud.js"></script>
<script src="https://blog.hagfi.sh//js/prism.js"></script>
<script type="application/javascript">
var doNotTrack = false;
if (!doNotTrack) {
(function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){
(i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o),
m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m)
})(window,document,'script','https://www.google-analytics.com/analytics.js','ga');
ga('create', 'UA-124890410-1', 'auto');
ga('send', 'pageview');
}
</script>
</head>
<body>
<div id="layout" class="pure-g">
<div class="sidebar pure-u-1 pure-u-md-1-4" id="app">
<div class="header">
<h1 class="brand-title"><a href="/">Hagfi.sh</a></h1>
<h2 class="brand-tagline">A devops guide to the galaxy</h2>
<div class="counters">
<a class="counter" href="/">13
<div class="counter-sub">Documents</div>
</a>
<a class="counter" href="/tags">29
<div class="counter-sub">Tags</div>
</a>
<a class="counter" href="/categories">3
<div class="counter-sub">Categories</div>
</a>
</div>
<nav class="nav">
</nav>
<div class="search-wrapper">
<input
type="text"
placeholder="Search ..."
v-model="search"
@keydown.down.prevent="navigate(1)"
@keydown.up.prevent="navigate(-1)"
@keyup.enter.prevent="navigate(result[selected].href)"
ref="searchInput"
class="search"
/>
<svg height="100" width="100" ref="resultPoint" class="result-point">
<circle cx="5" cy="5" r="5" fill="#FFF" />
</svg>
<ul class="result-items">
<li v-for="r, i of result" class="result-item" ref="resultItem">
<div class="result-item-wrapper" :class="{ 'result-item-selected': selected === i }">
<div class="result-item-left">
<span class="post-date">
<span class="post-date-day"><sup v-text="moment(r.date).format('D')"></sup></span><span class="post-date-separator" v-text="'/'"></span><span class="post-date-month" v-text="moment(r.date).format('MMM')"></span> <span class="post-date-year" v-text="moment(r.date).format('YYYY')"></span>
</span>
<template v-if="r.author">By <a class="post-author" v-text="r.author"></a></template>
</div>
<div class="result-item-left">
<span class="result-item-separator nav-item-separator" v-text="'//'"></span><a :href="r.href" v-text="r.title" class="result-item-link"></a>
</div>
</div>
</li>
</ul>
</div>
</div>
</div>
<div class="content pure-u-1 pure-u-md-3-4">
<a name="top"></a>
<div class="posts">
<section class="post">
<header class="post-header">
<h1 class="post-title">
<a href="/administration/autofs/">Mount with automount (autofs)</a>
</h1>
</header>
<p class="post-meta">
<span class="post-date">
<span class="post-date-day"><sup>9</sup></span><span class="post-date-separator">/</span><span class="post-date-month">Nov</span> <span class="post-date-year">2018</span>
</span>
By <a class="post-author" >Kristof Vandam</a>
<span class="post-reading-time"><i class="fa fa-clock-o"></i> <em>2 min. read</em></span>
<div class="post-categories">
<a class="post-category post-category-administration" href="https://blog.hagfi.sh//categories/administration">administration</a>
</div>
</p>
<article class="post-summary">
<p>Automagically mount remote directories on login.</p>
</article>
<div class="read-more-link">
<a href="/administration/autofs/"><span class="read-more-slashes">//</span>Read More...</a>
</div>
</section>
</div>
<div class="footer">
<hr class="thin" />
<div class="pure-menu pure-menu-horizontal pure-menu-open">
<ul class="footer-menu">
</ul>
</div>
<p>&copy; 2022. All rights reserved.</p>
</div>
</div>
</div>
<script>
var app = new Vue({
el: '#app',
data: {
fuse: null,
search: "",
result: [],
index: [],
selected: 0
},
mounted() {
let self = this
window.addEventListener("keypress", function(e) {
self.$refs.searchInput.focus()
})
let options = {
shouldSort: true,
threshold: 0.6,
location: 0,
distance: 100,
maxPatternLength: 32,
minMatchCharLength: 1,
keys: [
"title",
"author",
"date",
"content"
]
}
axios.get('/index.json')
.then(function (response) {
self.index = response.data
self.fuse = new Fuse(response.data, options)
})
.catch(function (error) {
})
},
watch: {
result(nval, oval) {
nval.length > 0 ? this.pointer(0) : this.pointer(-1)
},
search(nval, oval) {
this.result = this.fuse.search(nval)
}
},
methods: {
navigate(val) {
switch (val) {
case 1: if (this.selected < this.result.length - 1) { this.selected++ }; break;
case -1: if (this.selected > 0 ) { this.selected-- }; break;
default: window.location.href = val; break;
}
this.pointer(this.selected)
},
pointer(selected) {
let self = this
if (selected >= 0) {
Vue.nextTick().then(function() {
let height = self.$refs.resultItem[selected].clientHeight
let top = self.$refs.resultItem[selected].getBoundingClientRect().top
let left = self.$refs.resultItem[selected].getBoundingClientRect().left
self.$refs.resultPoint.style.top = (top+height/2)+'px'
self.$refs.resultPoint.style.left = (left-20)+'px'
})
} else {
this.$refs.resultPoint.style.left = '-50px'
return
}
}
}
})
</script>
</body>
</html>

20
public/tags/mount/index.xml

@ -0,0 +1,20 @@
<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom">
<channel>
<title>mount on Hagfi.sh</title>
<link>https://blog.hagfi.sh/tags/mount/</link>
<description>Recent content in mount on Hagfi.sh</description>
<generator>Hugo -- gohugo.io</generator>
<language>en-us</language>
<lastBuildDate>Fri, 09 Nov 2018 10:08:15 +0200</lastBuildDate><atom:link href="https://blog.hagfi.sh/tags/mount/index.xml" rel="self" type="application/rss+xml" />
<item>
<title>Mount with automount (autofs)</title>
<link>https://blog.hagfi.sh/administration/autofs/</link>
<pubDate>Fri, 09 Nov 2018 10:08:15 +0200</pubDate>
<guid>https://blog.hagfi.sh/administration/autofs/</guid>
<description>&lt;p&gt;Automagically mount remote directories on login.&lt;/p&gt;</description>
</item>
</channel>
</rss>

281
public/tags/ncdu/index.html

@ -0,0 +1,281 @@
<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en-us">
<head>
<title>
ncdu // Hagfi.sh
</title>
<link href="http://gmpg.org/xfn/11" rel="profile">
<meta http-equiv="content-type" content="text/html; charset=utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1">
<meta name="description" content="">
<meta name="keywords" content="">
<meta name="author" content="">
<meta name="generator" content="Hugo 0.92.0" />
<meta property="og:title" content="ncdu" />
<meta property="og:description" content="" />
<meta property="og:type" content="website" />
<meta property="og:locale" content="en_US" />
<meta property="og:url" content="https://blog.hagfi.sh/tags/ncdu/" />
<link rel="stylesheet" href="//cdnjs.cloudflare.com/ajax/libs/pure/0.5.0/base-min.css">
<link rel="stylesheet" href="//cdnjs.cloudflare.com/ajax/libs/pure/0.5.0/pure-min.css">
<link rel="stylesheet" href="//cdnjs.cloudflare.com/ajax/libs/pure/0.5.0/grids-responsive-min.css">
<link rel="stylesheet" href="https://blog.hagfi.sh//css/redlounge.css">
<link rel="stylesheet" href="https://blog.hagfi.sh//css/prism.css">
<link href="//maxcdn.bootstrapcdn.com/font-awesome/4.5.0/css/font-awesome.min.css" rel="stylesheet">
<link href='//fonts.googleapis.com/css?family=Raleway:400,200,100,700,300,500,600,800' rel='stylesheet' type='text/css'>
<link href='//fonts.googleapis.com/css?family=Libre+Baskerville:400,700,400italic' rel='stylesheet' type='text/css'>
<link rel="apple-touch-icon-precomposed" sizes="144x144" href="/touch-icon-144-precomposed.png">
<link rel="shortcut icon" type="image/x-icon" href="/img/favicon.png">
<link href="https://blog.hagfi.sh/tags/ncdu/index.xml" rel="alternate" type="application/rss+xml" title="Hagfi.sh" />
<script src="//cdnjs.cloudflare.com/ajax/libs/moment.js/2.18.1/moment.js"></script>
<script src="//cdnjs.cloudflare.com/ajax/libs/vue/2.5.17/vue.min.js"></script>
<script src="//cdnjs.cloudflare.com/ajax/libs/axios/0.18.0/axios.min.js"></script>
<script src="//cdnjs.cloudflare.com/ajax/libs/fuse.js/3.2.1/fuse.min.js"></script>
<script src="//cdn.jsdelivr.net/npm/vuewordcloud@18.7.11/VueWordCloud.js"></script>
<script src="https://blog.hagfi.sh//js/prism.js"></script>
<script type="application/javascript">
var doNotTrack = false;
if (!doNotTrack) {
(function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){
(i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o),
m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m)
})(window,document,'script','https://www.google-analytics.com/analytics.js','ga');
ga('create', 'UA-124890410-1', 'auto');
ga('send', 'pageview');
}
</script>
</head>
<body>
<div id="layout" class="pure-g">
<div class="sidebar pure-u-1 pure-u-md-1-4" id="app">
<div class="header">
<h1 class="brand-title"><a href="/">Hagfi.sh</a></h1>
<h2 class="brand-tagline">A devops guide to the galaxy</h2>
<div class="counters">
<a class="counter" href="/">13
<div class="counter-sub">Documents</div>
</a>
<a class="counter" href="/tags">29
<div class="counter-sub">Tags</div>
</a>
<a class="counter" href="/categories">3
<div class="counter-sub">Categories</div>
</a>
</div>
<nav class="nav">
</nav>
<div class="search-wrapper">
<input
type="text"
placeholder="Search ..."
v-model="search"
@keydown.down.prevent="navigate(1)"
@keydown.up.prevent="navigate(-1)"
@keyup.enter.prevent="navigate(result[selected].href)"
ref="searchInput"
class="search"
/>
<svg height="100" width="100" ref="resultPoint" class="result-point">
<circle cx="5" cy="5" r="5" fill="#FFF" />
</svg>
<ul class="result-items">
<li v-for="r, i of result" class="result-item" ref="resultItem">
<div class="result-item-wrapper" :class="{ 'result-item-selected': selected === i }">
<div class="result-item-left">
<span class="post-date">
<span class="post-date-day"><sup v-text="moment(r.date).format('D')"></sup></span><span class="post-date-separator" v-text="'/'"></span><span class="post-date-month" v-text="moment(r.date).format('MMM')"></span> <span class="post-date-year" v-text="moment(r.date).format('YYYY')"></span>
</span>
<template v-if="r.author">By <a class="post-author" v-text="r.author"></a></template>
</div>
<div class="result-item-left">
<span class="result-item-separator nav-item-separator" v-text="'//'"></span><a :href="r.href" v-text="r.title" class="result-item-link"></a>
</div>
</div>
</li>
</ul>
</div>
</div>
</div>
<div class="content pure-u-1 pure-u-md-3-4">
<a name="top"></a>
<div class="posts">
<section class="post">
<header class="post-header">
<h1 class="post-title">
<a href="/tools/ncdu/">NCDU: NCurses Disk Usage</a>
</h1>
</header>
<p class="post-meta">
<span class="post-date">
<span class="post-date-day"><sup>17</sup></span><span class="post-date-separator">/</span><span class="post-date-month">Sep</span> <span class="post-date-year">2018</span>
</span>
By <a class="post-author" >Kristof Vandam</a>
<span class="post-reading-time"><i class="fa fa-clock-o"></i> <em>2 min. read</em></span>
<div class="post-categories">
<a class="post-category post-category-tools" href="https://blog.hagfi.sh//categories/tools">tools</a>
<a class="post-category post-category-administration" href="https://blog.hagfi.sh//categories/administration">administration</a>
</div>
</p>
<article class="post-summary">
<p>ncdu is a command line tool to scan and calculate directory and file sizes.</p>
</article>
<div class="read-more-link">
<a href="/tools/ncdu/"><span class="read-more-slashes">//</span>Read More...</a>
</div>
</section>
</div>
<div class="footer">
<hr class="thin" />
<div class="pure-menu pure-menu-horizontal pure-menu-open">
<ul class="footer-menu">
</ul>
</div>
<p>&copy; 2022. All rights reserved.</p>
</div>
</div>
</div>
<script>
var app = new Vue({
el: '#app',
data: {
fuse: null,
search: "",
result: [],
index: [],
selected: 0
},
mounted() {
let self = this
window.addEventListener("keypress", function(e) {
self.$refs.searchInput.focus()
})
let options = {
shouldSort: true,
threshold: 0.6,
location: 0,
distance: 100,
maxPatternLength: 32,
minMatchCharLength: 1,
keys: [
"title",
"author",
"date",
"content"
]
}
axios.get('/index.json')
.then(function (response) {
self.index = response.data
self.fuse = new Fuse(response.data, options)
})
.catch(function (error) {
})
},
watch: {
result(nval, oval) {
nval.length > 0 ? this.pointer(0) : this.pointer(-1)
},
search(nval, oval) {
this.result = this.fuse.search(nval)
}
},
methods: {
navigate(val) {
switch (val) {
case 1: if (this.selected < this.result.length - 1) { this.selected++ }; break;
case -1: if (this.selected > 0 ) { this.selected-- }; break;
default: window.location.href = val; break;
}
this.pointer(this.selected)
},
pointer(selected) {
let self = this
if (selected >= 0) {
Vue.nextTick().then(function() {
let height = self.$refs.resultItem[selected].clientHeight
let top = self.$refs.resultItem[selected].getBoundingClientRect().top
let left = self.$refs.resultItem[selected].getBoundingClientRect().left
self.$refs.resultPoint.style.top = (top+height/2)+'px'
self.$refs.resultPoint.style.left = (left-20)+'px'
})
} else {
this.$refs.resultPoint.style.left = '-50px'
return
}
}
}
})
</script>
</body>
</html>

20
public/tags/ncdu/index.xml

@ -0,0 +1,20 @@
<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom">
<channel>
<title>ncdu on Hagfi.sh</title>
<link>https://blog.hagfi.sh/tags/ncdu/</link>
<description>Recent content in ncdu on Hagfi.sh</description>
<generator>Hugo -- gohugo.io</generator>
<language>en-us</language>
<lastBuildDate>Mon, 17 Sep 2018 22:18:38 +0200</lastBuildDate><atom:link href="https://blog.hagfi.sh/tags/ncdu/index.xml" rel="self" type="application/rss+xml" />
<item>
<title>NCDU: NCurses Disk Usage</title>
<link>https://blog.hagfi.sh/tools/ncdu/</link>
<pubDate>Mon, 17 Sep 2018 22:18:38 +0200</pubDate>
<guid>https://blog.hagfi.sh/tools/ncdu/</guid>
<description>&lt;p&gt;ncdu is a command line tool to scan and calculate directory and file sizes.&lt;/p&gt;</description>
</item>
</channel>
</rss>

279
public/tags/network/index.html

@ -0,0 +1,279 @@
<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en-us">
<head>
<title>
network // Hagfi.sh
</title>
<link href="http://gmpg.org/xfn/11" rel="profile">
<meta http-equiv="content-type" content="text/html; charset=utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1">
<meta name="description" content="">
<meta name="keywords" content="">
<meta name="author" content="">
<meta name="generator" content="Hugo 0.92.0" />
<meta property="og:title" content="network" />
<meta property="og:description" content="" />
<meta property="og:type" content="website" />
<meta property="og:locale" content="en_US" />
<meta property="og:url" content="https://blog.hagfi.sh/tags/network/" />
<link rel="stylesheet" href="//cdnjs.cloudflare.com/ajax/libs/pure/0.5.0/base-min.css">
<link rel="stylesheet" href="//cdnjs.cloudflare.com/ajax/libs/pure/0.5.0/pure-min.css">
<link rel="stylesheet" href="//cdnjs.cloudflare.com/ajax/libs/pure/0.5.0/grids-responsive-min.css">
<link rel="stylesheet" href="https://blog.hagfi.sh//css/redlounge.css">
<link rel="stylesheet" href="https://blog.hagfi.sh//css/prism.css">
<link href="//maxcdn.bootstrapcdn.com/font-awesome/4.5.0/css/font-awesome.min.css" rel="stylesheet">
<link href='//fonts.googleapis.com/css?family=Raleway:400,200,100,700,300,500,600,800' rel='stylesheet' type='text/css'>
<link href='//fonts.googleapis.com/css?family=Libre+Baskerville:400,700,400italic' rel='stylesheet' type='text/css'>
<link rel="apple-touch-icon-precomposed" sizes="144x144" href="/touch-icon-144-precomposed.png">
<link rel="shortcut icon" type="image/x-icon" href="/img/favicon.png">
<link href="https://blog.hagfi.sh/tags/network/index.xml" rel="alternate" type="application/rss+xml" title="Hagfi.sh" />
<script src="//cdnjs.cloudflare.com/ajax/libs/moment.js/2.18.1/moment.js"></script>
<script src="//cdnjs.cloudflare.com/ajax/libs/vue/2.5.17/vue.min.js"></script>
<script src="//cdnjs.cloudflare.com/ajax/libs/axios/0.18.0/axios.min.js"></script>
<script src="//cdnjs.cloudflare.com/ajax/libs/fuse.js/3.2.1/fuse.min.js"></script>
<script src="//cdn.jsdelivr.net/npm/vuewordcloud@18.7.11/VueWordCloud.js"></script>
<script src="https://blog.hagfi.sh//js/prism.js"></script>
<script type="application/javascript">
var doNotTrack = false;
if (!doNotTrack) {
(function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){
(i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o),
m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m)
})(window,document,'script','https://www.google-analytics.com/analytics.js','ga');
ga('create', 'UA-124890410-1', 'auto');
ga('send', 'pageview');
}
</script>
</head>
<body>
<div id="layout" class="pure-g">
<div class="sidebar pure-u-1 pure-u-md-1-4" id="app">
<div class="header">
<h1 class="brand-title"><a href="/">Hagfi.sh</a></h1>
<h2 class="brand-tagline">A devops guide to the galaxy</h2>
<div class="counters">
<a class="counter" href="/">13
<div class="counter-sub">Documents</div>
</a>
<a class="counter" href="/tags">29
<div class="counter-sub">Tags</div>
</a>
<a class="counter" href="/categories">3
<div class="counter-sub">Categories</div>
</a>
</div>
<nav class="nav">
</nav>
<div class="search-wrapper">
<input
type="text"
placeholder="Search ..."
v-model="search"
@keydown.down.prevent="navigate(1)"
@keydown.up.prevent="navigate(-1)"
@keyup.enter.prevent="navigate(result[selected].href)"
ref="searchInput"
class="search"
/>
<svg height="100" width="100" ref="resultPoint" class="result-point">
<circle cx="5" cy="5" r="5" fill="#FFF" />
</svg>
<ul class="result-items">
<li v-for="r, i of result" class="result-item" ref="resultItem">
<div class="result-item-wrapper" :class="{ 'result-item-selected': selected === i }">
<div class="result-item-left">
<span class="post-date">
<span class="post-date-day"><sup v-text="moment(r.date).format('D')"></sup></span><span class="post-date-separator" v-text="'/'"></span><span class="post-date-month" v-text="moment(r.date).format('MMM')"></span> <span class="post-date-year" v-text="moment(r.date).format('YYYY')"></span>
</span>
<template v-if="r.author">By <a class="post-author" v-text="r.author"></a></template>
</div>
<div class="result-item-left">
<span class="result-item-separator nav-item-separator" v-text="'//'"></span><a :href="r.href" v-text="r.title" class="result-item-link"></a>
</div>
</div>
</li>
</ul>
</div>
</div>
</div>
<div class="content pure-u-1 pure-u-md-3-4">
<a name="top"></a>
<div class="posts">
<section class="post">
<header class="post-header">
<h1 class="post-title">
<a href="/administration/toubles-with-interfaces-after-clone/">Troubles with interfaces after a VM clone</a>
</h1>
</header>
<p class="post-meta">
<span class="post-date">
<span class="post-date-day"><sup>5</sup></span><span class="post-date-separator">/</span><span class="post-date-month">Nov</span> <span class="post-date-year">2018</span>
</span>
By <a class="post-author" >Kristof Vandam</a>
<span class="post-reading-time"><i class="fa fa-clock-o"></i> <em>1 min. read</em></span>
<div class="post-categories">
<a class="post-category post-category-administration" href="https://blog.hagfi.sh//categories/administration">administration</a>
</div>
</p>
<article class="post-summary">
<p>Remapping interfaces and their MAC address.</p>
</article>
<div class="read-more-link">
<a href="/administration/toubles-with-interfaces-after-clone/"><span class="read-more-slashes">//</span>Read More...</a>
</div>
</section>
</div>
<div class="footer">
<hr class="thin" />
<div class="pure-menu pure-menu-horizontal pure-menu-open">
<ul class="footer-menu">
</ul>
</div>
<p>&copy; 2022. All rights reserved.</p>
</div>
</div>
</div>
<script>
var app = new Vue({
el: '#app',
data: {
fuse: null,
search: "",
result: [],
index: [],
selected: 0
},
mounted() {
let self = this
window.addEventListener("keypress", function(e) {
self.$refs.searchInput.focus()
})
let options = {
shouldSort: true,
threshold: 0.6,
location: 0,
distance: 100,
maxPatternLength: 32,
minMatchCharLength: 1,
keys: [
"title",
"author",
"date",
"content"
]
}
axios.get('/index.json')
.then(function (response) {
self.index = response.data
self.fuse = new Fuse(response.data, options)
})
.catch(function (error) {
})
},
watch: {
result(nval, oval) {
nval.length > 0 ? this.pointer(0) : this.pointer(-1)
},
search(nval, oval) {
this.result = this.fuse.search(nval)
}
},
methods: {
navigate(val) {
switch (val) {
case 1: if (this.selected < this.result.length - 1) { this.selected++ }; break;
case -1: if (this.selected > 0 ) { this.selected-- }; break;
default: window.location.href = val; break;
}
this.pointer(this.selected)
},
pointer(selected) {
let self = this
if (selected >= 0) {
Vue.nextTick().then(function() {
let height = self.$refs.resultItem[selected].clientHeight
let top = self.$refs.resultItem[selected].getBoundingClientRect().top
let left = self.$refs.resultItem[selected].getBoundingClientRect().left
self.$refs.resultPoint.style.top = (top+height/2)+'px'
self.$refs.resultPoint.style.left = (left-20)+'px'
})
} else {
this.$refs.resultPoint.style.left = '-50px'
return
}
}
}
})
</script>
</body>
</html>

20
public/tags/network/index.xml

@ -0,0 +1,20 @@
<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom">
<channel>
<title>network on Hagfi.sh</title>
<link>https://blog.hagfi.sh/tags/network/</link>
<description>Recent content in network on Hagfi.sh</description>
<generator>Hugo -- gohugo.io</generator>
<language>en-us</language>
<lastBuildDate>Mon, 05 Nov 2018 22:13:49 +0200</lastBuildDate><atom:link href="https://blog.hagfi.sh/tags/network/index.xml" rel="self" type="application/rss+xml" />
<item>
<title>Troubles with interfaces after a VM clone</title>
<link>https://blog.hagfi.sh/administration/toubles-with-interfaces-after-clone/</link>
<pubDate>Mon, 05 Nov 2018 22:13:49 +0200</pubDate>
<guid>https://blog.hagfi.sh/administration/toubles-with-interfaces-after-clone/</guid>
<description>&lt;p&gt;Remapping interfaces and their MAC address.&lt;/p&gt;</description>
</item>
</channel>
</rss>

279
public/tags/networking/index.html

@ -0,0 +1,279 @@
<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en-us">
<head>
<title>
networking // Hagfi.sh
</title>
<link href="http://gmpg.org/xfn/11" rel="profile">
<meta http-equiv="content-type" content="text/html; charset=utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1">
<meta name="description" content="">
<meta name="keywords" content="">
<meta name="author" content="">
<meta name="generator" content="Hugo 0.92.0" />
<meta property="og:title" content="networking" />
<meta property="og:description" content="" />
<meta property="og:type" content="website" />
<meta property="og:locale" content="en_US" />
<meta property="og:url" content="https://blog.hagfi.sh/tags/networking/" />
<link rel="stylesheet" href="//cdnjs.cloudflare.com/ajax/libs/pure/0.5.0/base-min.css">
<link rel="stylesheet" href="//cdnjs.cloudflare.com/ajax/libs/pure/0.5.0/pure-min.css">
<link rel="stylesheet" href="//cdnjs.cloudflare.com/ajax/libs/pure/0.5.0/grids-responsive-min.css">
<link rel="stylesheet" href="https://blog.hagfi.sh//css/redlounge.css">
<link rel="stylesheet" href="https://blog.hagfi.sh//css/prism.css">
<link href="//maxcdn.bootstrapcdn.com/font-awesome/4.5.0/css/font-awesome.min.css" rel="stylesheet">
<link href='//fonts.googleapis.com/css?family=Raleway:400,200,100,700,300,500,600,800' rel='stylesheet' type='text/css'>
<link href='//fonts.googleapis.com/css?family=Libre+Baskerville:400,700,400italic' rel='stylesheet' type='text/css'>
<link rel="apple-touch-icon-precomposed" sizes="144x144" href="/touch-icon-144-precomposed.png">
<link rel="shortcut icon" type="image/x-icon" href="/img/favicon.png">
<link href="https://blog.hagfi.sh/tags/networking/index.xml" rel="alternate" type="application/rss+xml" title="Hagfi.sh" />
<script src="//cdnjs.cloudflare.com/ajax/libs/moment.js/2.18.1/moment.js"></script>
<script src="//cdnjs.cloudflare.com/ajax/libs/vue/2.5.17/vue.min.js"></script>
<script src="//cdnjs.cloudflare.com/ajax/libs/axios/0.18.0/axios.min.js"></script>
<script src="//cdnjs.cloudflare.com/ajax/libs/fuse.js/3.2.1/fuse.min.js"></script>
<script src="//cdn.jsdelivr.net/npm/vuewordcloud@18.7.11/VueWordCloud.js"></script>
<script src="https://blog.hagfi.sh//js/prism.js"></script>
<script type="application/javascript">
var doNotTrack = false;
if (!doNotTrack) {
(function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){
(i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o),
m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m)
})(window,document,'script','https://www.google-analytics.com/analytics.js','ga');
ga('create', 'UA-124890410-1', 'auto');
ga('send', 'pageview');
}
</script>
</head>
<body>
<div id="layout" class="pure-g">
<div class="sidebar pure-u-1 pure-u-md-1-4" id="app">
<div class="header">
<h1 class="brand-title"><a href="/">Hagfi.sh</a></h1>
<h2 class="brand-tagline">A devops guide to the galaxy</h2>
<div class="counters">
<a class="counter" href="/">13
<div class="counter-sub">Documents</div>
</a>
<a class="counter" href="/tags">29
<div class="counter-sub">Tags</div>
</a>
<a class="counter" href="/categories">3
<div class="counter-sub">Categories</div>
</a>
</div>
<nav class="nav">
</nav>
<div class="search-wrapper">
<input
type="text"
placeholder="Search ..."
v-model="search"
@keydown.down.prevent="navigate(1)"
@keydown.up.prevent="navigate(-1)"
@keyup.enter.prevent="navigate(result[selected].href)"
ref="searchInput"
class="search"
/>
<svg height="100" width="100" ref="resultPoint" class="result-point">
<circle cx="5" cy="5" r="5" fill="#FFF" />
</svg>
<ul class="result-items">
<li v-for="r, i of result" class="result-item" ref="resultItem">
<div class="result-item-wrapper" :class="{ 'result-item-selected': selected === i }">
<div class="result-item-left">
<span class="post-date">
<span class="post-date-day"><sup v-text="moment(r.date).format('D')"></sup></span><span class="post-date-separator" v-text="'/'"></span><span class="post-date-month" v-text="moment(r.date).format('MMM')"></span> <span class="post-date-year" v-text="moment(r.date).format('YYYY')"></span>
</span>
<template v-if="r.author">By <a class="post-author" v-text="r.author"></a></template>
</div>
<div class="result-item-left">
<span class="result-item-separator nav-item-separator" v-text="'//'"></span><a :href="r.href" v-text="r.title" class="result-item-link"></a>
</div>
</div>
</li>
</ul>
</div>
</div>
</div>
<div class="content pure-u-1 pure-u-md-3-4">
<a name="top"></a>
<div class="posts">
<section class="post">
<header class="post-header">
<h1 class="post-title">
<a href="/administration/toubles-with-interfaces-after-clone/">Troubles with interfaces after a VM clone</a>
</h1>
</header>
<p class="post-meta">
<span class="post-date">
<span class="post-date-day"><sup>5</sup></span><span class="post-date-separator">/</span><span class="post-date-month">Nov</span> <span class="post-date-year">2018</span>
</span>
By <a class="post-author" >Kristof Vandam</a>
<span class="post-reading-time"><i class="fa fa-clock-o"></i> <em>1 min. read</em></span>
<div class="post-categories">
<a class="post-category post-category-administration" href="https://blog.hagfi.sh//categories/administration">administration</a>
</div>
</p>
<article class="post-summary">
<p>Remapping interfaces and their MAC address.</p>
</article>
<div class="read-more-link">
<a href="/administration/toubles-with-interfaces-after-clone/"><span class="read-more-slashes">//</span>Read More...</a>
</div>
</section>
</div>
<div class="footer">
<hr class="thin" />
<div class="pure-menu pure-menu-horizontal pure-menu-open">
<ul class="footer-menu">
</ul>
</div>
<p>&copy; 2022. All rights reserved.</p>
</div>
</div>
</div>
<script>
var app = new Vue({
el: '#app',
data: {
fuse: null,
search: "",
result: [],
index: [],
selected: 0
},
mounted() {
let self = this
window.addEventListener("keypress", function(e) {
self.$refs.searchInput.focus()
})
let options = {
shouldSort: true,
threshold: 0.6,
location: 0,
distance: 100,
maxPatternLength: 32,
minMatchCharLength: 1,
keys: [
"title",
"author",
"date",
"content"
]
}
axios.get('/index.json')
.then(function (response) {
self.index = response.data
self.fuse = new Fuse(response.data, options)
})
.catch(function (error) {
})
},
watch: {
result(nval, oval) {
nval.length > 0 ? this.pointer(0) : this.pointer(-1)
},
search(nval, oval) {
this.result = this.fuse.search(nval)
}
},
methods: {
navigate(val) {
switch (val) {
case 1: if (this.selected < this.result.length - 1) { this.selected++ }; break;
case -1: if (this.selected > 0 ) { this.selected-- }; break;
default: window.location.href = val; break;
}
this.pointer(this.selected)
},
pointer(selected) {
let self = this
if (selected >= 0) {
Vue.nextTick().then(function() {
let height = self.$refs.resultItem[selected].clientHeight
let top = self.$refs.resultItem[selected].getBoundingClientRect().top
let left = self.$refs.resultItem[selected].getBoundingClientRect().left
self.$refs.resultPoint.style.top = (top+height/2)+'px'
self.$refs.resultPoint.style.left = (left-20)+'px'
})
} else {
this.$refs.resultPoint.style.left = '-50px'
return
}
}
}
})
</script>
</body>
</html>

20
public/tags/networking/index.xml

@ -0,0 +1,20 @@
<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom">
<channel>
<title>networking on Hagfi.sh</title>
<link>https://blog.hagfi.sh/tags/networking/</link>
<description>Recent content in networking on Hagfi.sh</description>
<generator>Hugo -- gohugo.io</generator>
<language>en-us</language>
<lastBuildDate>Mon, 05 Nov 2018 22:13:49 +0200</lastBuildDate><atom:link href="https://blog.hagfi.sh/tags/networking/index.xml" rel="self" type="application/rss+xml" />
<item>
<title>Troubles with interfaces after a VM clone</title>
<link>https://blog.hagfi.sh/administration/toubles-with-interfaces-after-clone/</link>
<pubDate>Mon, 05 Nov 2018 22:13:49 +0200</pubDate>
<guid>https://blog.hagfi.sh/administration/toubles-with-interfaces-after-clone/</guid>
<description>&lt;p&gt;Remapping interfaces and their MAC address.&lt;/p&gt;</description>
</item>
</channel>
</rss>

279
public/tags/partition/index.html

@ -0,0 +1,279 @@
<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en-us">
<head>
<title>
partition // Hagfi.sh
</title>
<link href="http://gmpg.org/xfn/11" rel="profile">
<meta http-equiv="content-type" content="text/html; charset=utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1">
<meta name="description" content="">
<meta name="keywords" content="">
<meta name="author" content="">
<meta name="generator" content="Hugo 0.92.0" />
<meta property="og:title" content="partition" />
<meta property="og:description" content="" />
<meta property="og:type" content="website" />
<meta property="og:locale" content="en_US" />
<meta property="og:url" content="https://blog.hagfi.sh/tags/partition/" />
<link rel="stylesheet" href="//cdnjs.cloudflare.com/ajax/libs/pure/0.5.0/base-min.css">
<link rel="stylesheet" href="//cdnjs.cloudflare.com/ajax/libs/pure/0.5.0/pure-min.css">
<link rel="stylesheet" href="//cdnjs.cloudflare.com/ajax/libs/pure/0.5.0/grids-responsive-min.css">
<link rel="stylesheet" href="https://blog.hagfi.sh//css/redlounge.css">
<link rel="stylesheet" href="https://blog.hagfi.sh//css/prism.css">
<link href="//maxcdn.bootstrapcdn.com/font-awesome/4.5.0/css/font-awesome.min.css" rel="stylesheet">
<link href='//fonts.googleapis.com/css?family=Raleway:400,200,100,700,300,500,600,800' rel='stylesheet' type='text/css'>
<link href='//fonts.googleapis.com/css?family=Libre+Baskerville:400,700,400italic' rel='stylesheet' type='text/css'>
<link rel="apple-touch-icon-precomposed" sizes="144x144" href="/touch-icon-144-precomposed.png">
<link rel="shortcut icon" type="image/x-icon" href="/img/favicon.png">
<link href="https://blog.hagfi.sh/tags/partition/index.xml" rel="alternate" type="application/rss+xml" title="Hagfi.sh" />
<script src="//cdnjs.cloudflare.com/ajax/libs/moment.js/2.18.1/moment.js"></script>
<script src="//cdnjs.cloudflare.com/ajax/libs/vue/2.5.17/vue.min.js"></script>
<script src="//cdnjs.cloudflare.com/ajax/libs/axios/0.18.0/axios.min.js"></script>
<script src="//cdnjs.cloudflare.com/ajax/libs/fuse.js/3.2.1/fuse.min.js"></script>
<script src="//cdn.jsdelivr.net/npm/vuewordcloud@18.7.11/VueWordCloud.js"></script>
<script src="https://blog.hagfi.sh//js/prism.js"></script>
<script type="application/javascript">
var doNotTrack = false;
if (!doNotTrack) {
(function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){
(i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o),
m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m)
})(window,document,'script','https://www.google-analytics.com/analytics.js','ga');
ga('create', 'UA-124890410-1', 'auto');
ga('send', 'pageview');
}
</script>
</head>
<body>
<div id="layout" class="pure-g">
<div class="sidebar pure-u-1 pure-u-md-1-4" id="app">
<div class="header">
<h1 class="brand-title"><a href="/">Hagfi.sh</a></h1>
<h2 class="brand-tagline">A devops guide to the galaxy</h2>
<div class="counters">
<a class="counter" href="/">13
<div class="counter-sub">Documents</div>
</a>
<a class="counter" href="/tags">29
<div class="counter-sub">Tags</div>
</a>
<a class="counter" href="/categories">3
<div class="counter-sub">Categories</div>
</a>
</div>
<nav class="nav">
</nav>
<div class="search-wrapper">
<input
type="text"
placeholder="Search ..."
v-model="search"
@keydown.down.prevent="navigate(1)"
@keydown.up.prevent="navigate(-1)"
@keyup.enter.prevent="navigate(result[selected].href)"
ref="searchInput"
class="search"
/>
<svg height="100" width="100" ref="resultPoint" class="result-point">
<circle cx="5" cy="5" r="5" fill="#FFF" />
</svg>
<ul class="result-items">
<li v-for="r, i of result" class="result-item" ref="resultItem">
<div class="result-item-wrapper" :class="{ 'result-item-selected': selected === i }">
<div class="result-item-left">
<span class="post-date">
<span class="post-date-day"><sup v-text="moment(r.date).format('D')"></sup></span><span class="post-date-separator" v-text="'/'"></span><span class="post-date-month" v-text="moment(r.date).format('MMM')"></span> <span class="post-date-year" v-text="moment(r.date).format('YYYY')"></span>
</span>
<template v-if="r.author">By <a class="post-author" v-text="r.author"></a></template>
</div>
<div class="result-item-left">
<span class="result-item-separator nav-item-separator" v-text="'//'"></span><a :href="r.href" v-text="r.title" class="result-item-link"></a>
</div>
</div>
</li>
</ul>
</div>
</div>
</div>
<div class="content pure-u-1 pure-u-md-3-4">
<a name="top"></a>
<div class="posts">
<section class="post">
<header class="post-header">
<h1 class="post-title">
<a href="/administration/luks-encryption/">Luks Encryption</a>
</h1>
</header>
<p class="post-meta">
<span class="post-date">
<span class="post-date-day"><sup>23</sup></span><span class="post-date-separator">/</span><span class="post-date-month">Aug</span> <span class="post-date-year">2018</span>
</span>
By <a class="post-author" >Kristof Vandam</a>
<span class="post-reading-time"><i class="fa fa-clock-o"></i> <em>4 min. read</em></span>
<div class="post-categories">
<a class="post-category post-category-administration" href="https://blog.hagfi.sh//categories/administration">administration</a>
</div>
</p>
<article class="post-summary">
<p>Create an encrypted partition that will automatically mount at boot.</p>
</article>
<div class="read-more-link">
<a href="/administration/luks-encryption/"><span class="read-more-slashes">//</span>Read More...</a>
</div>
</section>
</div>
<div class="footer">
<hr class="thin" />
<div class="pure-menu pure-menu-horizontal pure-menu-open">
<ul class="footer-menu">
</ul>
</div>
<p>&copy; 2022. All rights reserved.</p>
</div>
</div>
</div>
<script>
var app = new Vue({
el: '#app',
data: {
fuse: null,
search: "",
result: [],
index: [],
selected: 0
},
mounted() {
let self = this
window.addEventListener("keypress", function(e) {
self.$refs.searchInput.focus()
})
let options = {
shouldSort: true,
threshold: 0.6,
location: 0,
distance: 100,
maxPatternLength: 32,
minMatchCharLength: 1,
keys: [
"title",
"author",
"date",
"content"
]
}
axios.get('/index.json')
.then(function (response) {
self.index = response.data
self.fuse = new Fuse(response.data, options)
})
.catch(function (error) {
})
},
watch: {
result(nval, oval) {
nval.length > 0 ? this.pointer(0) : this.pointer(-1)
},
search(nval, oval) {
this.result = this.fuse.search(nval)
}
},
methods: {
navigate(val) {
switch (val) {
case 1: if (this.selected < this.result.length - 1) { this.selected++ }; break;
case -1: if (this.selected > 0 ) { this.selected-- }; break;
default: window.location.href = val; break;
}
this.pointer(this.selected)
},
pointer(selected) {
let self = this
if (selected >= 0) {
Vue.nextTick().then(function() {
let height = self.$refs.resultItem[selected].clientHeight
let top = self.$refs.resultItem[selected].getBoundingClientRect().top
let left = self.$refs.resultItem[selected].getBoundingClientRect().left
self.$refs.resultPoint.style.top = (top+height/2)+'px'
self.$refs.resultPoint.style.left = (left-20)+'px'
})
} else {
this.$refs.resultPoint.style.left = '-50px'
return
}
}
}
})
</script>
</body>
</html>

20
public/tags/partition/index.xml

@ -0,0 +1,20 @@
<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom">
<channel>
<title>partition on Hagfi.sh</title>
<link>https://blog.hagfi.sh/tags/partition/</link>
<description>Recent content in partition on Hagfi.sh</description>
<generator>Hugo -- gohugo.io</generator>
<language>en-us</language>
<lastBuildDate>Thu, 23 Aug 2018 22:08:15 +0200</lastBuildDate><atom:link href="https://blog.hagfi.sh/tags/partition/index.xml" rel="self" type="application/rss+xml" />
<item>
<title>Luks Encryption</title>
<link>https://blog.hagfi.sh/administration/luks-encryption/</link>
<pubDate>Thu, 23 Aug 2018 22:08:15 +0200</pubDate>
<guid>https://blog.hagfi.sh/administration/luks-encryption/</guid>
<description>&lt;p&gt;Create an encrypted partition that will automatically mount at boot.&lt;/p&gt;</description>
</item>
</channel>
</rss>

280
public/tags/prism/index.html

@ -0,0 +1,280 @@
<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en-us">
<head>
<title>
prism // Hagfi.sh
</title>
<link href="http://gmpg.org/xfn/11" rel="profile">
<meta http-equiv="content-type" content="text/html; charset=utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1">
<meta name="description" content="">
<meta name="keywords" content="">
<meta name="author" content="">
<meta name="generator" content="Hugo 0.92.0" />
<meta property="og:title" content="prism" />
<meta property="og:description" content="" />
<meta property="og:type" content="website" />
<meta property="og:locale" content="en_US" />
<meta property="og:url" content="https://blog.hagfi.sh/tags/prism/" />
<link rel="stylesheet" href="//cdnjs.cloudflare.com/ajax/libs/pure/0.5.0/base-min.css">
<link rel="stylesheet" href="//cdnjs.cloudflare.com/ajax/libs/pure/0.5.0/pure-min.css">
<link rel="stylesheet" href="//cdnjs.cloudflare.com/ajax/libs/pure/0.5.0/grids-responsive-min.css">
<link rel="stylesheet" href="https://blog.hagfi.sh//css/redlounge.css">
<link rel="stylesheet" href="https://blog.hagfi.sh//css/prism.css">
<link href="//maxcdn.bootstrapcdn.com/font-awesome/4.5.0/css/font-awesome.min.css" rel="stylesheet">
<link href='//fonts.googleapis.com/css?family=Raleway:400,200,100,700,300,500,600,800' rel='stylesheet' type='text/css'>
<link href='//fonts.googleapis.com/css?family=Libre+Baskerville:400,700,400italic' rel='stylesheet' type='text/css'>
<link rel="apple-touch-icon-precomposed" sizes="144x144" href="/touch-icon-144-precomposed.png">
<link rel="shortcut icon" type="image/x-icon" href="/img/favicon.png">
<link href="https://blog.hagfi.sh/tags/prism/index.xml" rel="alternate" type="application/rss+xml" title="Hagfi.sh" />
<script src="//cdnjs.cloudflare.com/ajax/libs/moment.js/2.18.1/moment.js"></script>
<script src="//cdnjs.cloudflare.com/ajax/libs/vue/2.5.17/vue.min.js"></script>
<script src="//cdnjs.cloudflare.com/ajax/libs/axios/0.18.0/axios.min.js"></script>
<script src="//cdnjs.cloudflare.com/ajax/libs/fuse.js/3.2.1/fuse.min.js"></script>
<script src="//cdn.jsdelivr.net/npm/vuewordcloud@18.7.11/VueWordCloud.js"></script>
<script src="https://blog.hagfi.sh//js/prism.js"></script>
<script type="application/javascript">
var doNotTrack = false;
if (!doNotTrack) {
(function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){
(i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o),
m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m)
})(window,document,'script','https://www.google-analytics.com/analytics.js','ga');
ga('create', 'UA-124890410-1', 'auto');
ga('send', 'pageview');
}
</script>
</head>
<body>
<div id="layout" class="pure-g">
<div class="sidebar pure-u-1 pure-u-md-1-4" id="app">
<div class="header">
<h1 class="brand-title"><a href="/">Hagfi.sh</a></h1>
<h2 class="brand-tagline">A devops guide to the galaxy</h2>
<div class="counters">
<a class="counter" href="/">13
<div class="counter-sub">Documents</div>
</a>
<a class="counter" href="/tags">29
<div class="counter-sub">Tags</div>
</a>
<a class="counter" href="/categories">3
<div class="counter-sub">Categories</div>
</a>
</div>
<nav class="nav">
</nav>
<div class="search-wrapper">
<input
type="text"
placeholder="Search ..."
v-model="search"
@keydown.down.prevent="navigate(1)"
@keydown.up.prevent="navigate(-1)"
@keyup.enter.prevent="navigate(result[selected].href)"
ref="searchInput"
class="search"
/>
<svg height="100" width="100" ref="resultPoint" class="result-point">
<circle cx="5" cy="5" r="5" fill="#FFF" />
</svg>
<ul class="result-items">
<li v-for="r, i of result" class="result-item" ref="resultItem">
<div class="result-item-wrapper" :class="{ 'result-item-selected': selected === i }">
<div class="result-item-left">
<span class="post-date">
<span class="post-date-day"><sup v-text="moment(r.date).format('D')"></sup></span><span class="post-date-separator" v-text="'/'"></span><span class="post-date-month" v-text="moment(r.date).format('MMM')"></span> <span class="post-date-year" v-text="moment(r.date).format('YYYY')"></span>
</span>
<template v-if="r.author">By <a class="post-author" v-text="r.author"></a></template>
</div>
<div class="result-item-left">
<span class="result-item-separator nav-item-separator" v-text="'//'"></span><a :href="r.href" v-text="r.title" class="result-item-link"></a>
</div>
</div>
</li>
</ul>
</div>
</div>
</div>
<div class="content pure-u-1 pure-u-md-3-4">
<a name="top"></a>
<div class="posts">
<section class="post">
<header class="post-header">
<h1 class="post-title">
<a href="/development/live-search-with-hugo/">Live Search With HUGO</a>
</h1>
</header>
<p class="post-meta">
<span class="post-date">
<span class="post-date-day"><sup>29</sup></span><span class="post-date-separator">/</span><span class="post-date-month">Aug</span> <span class="post-date-year">2018</span>
</span>
By <a class="post-author" >Kristof Vandam</a>
<span class="post-reading-time"><i class="fa fa-clock-o"></i> <em>5 min. read</em></span>
<div class="post-categories">
<a class="post-category post-category-development" href="https://blog.hagfi.sh//categories/development">development</a>
</div>
</p>
<article class="post-summary">
<p>HUGO is static, that&rsquo;s a fact. How can I implement a live search? Searching the internet provided me only solutions
that require a page refresh, this time of age performance is key, so that&rsquo;s why I wanted a fast and fuzzy search implementation.</p>
</article>
<div class="read-more-link">
<a href="/development/live-search-with-hugo/"><span class="read-more-slashes">//</span>Read More...</a>
</div>
</section>
</div>
<div class="footer">
<hr class="thin" />
<div class="pure-menu pure-menu-horizontal pure-menu-open">
<ul class="footer-menu">
</ul>
</div>
<p>&copy; 2022. All rights reserved.</p>
</div>
</div>
</div>
<script>
var app = new Vue({
el: '#app',
data: {
fuse: null,
search: "",
result: [],
index: [],
selected: 0
},
mounted() {
let self = this
window.addEventListener("keypress", function(e) {
self.$refs.searchInput.focus()
})
let options = {
shouldSort: true,
threshold: 0.6,
location: 0,
distance: 100,
maxPatternLength: 32,
minMatchCharLength: 1,
keys: [
"title",
"author",
"date",
"content"
]
}
axios.get('/index.json')
.then(function (response) {
self.index = response.data
self.fuse = new Fuse(response.data, options)
})
.catch(function (error) {
})
},
watch: {
result(nval, oval) {
nval.length > 0 ? this.pointer(0) : this.pointer(-1)
},
search(nval, oval) {
this.result = this.fuse.search(nval)
}
},
methods: {
navigate(val) {
switch (val) {
case 1: if (this.selected < this.result.length - 1) { this.selected++ }; break;
case -1: if (this.selected > 0 ) { this.selected-- }; break;
default: window.location.href = val; break;
}
this.pointer(this.selected)
},
pointer(selected) {
let self = this
if (selected >= 0) {
Vue.nextTick().then(function() {
let height = self.$refs.resultItem[selected].clientHeight
let top = self.$refs.resultItem[selected].getBoundingClientRect().top
let left = self.$refs.resultItem[selected].getBoundingClientRect().left
self.$refs.resultPoint.style.top = (top+height/2)+'px'
self.$refs.resultPoint.style.left = (left-20)+'px'
})
} else {
this.$refs.resultPoint.style.left = '-50px'
return
}
}
}
})
</script>
</body>
</html>

21
public/tags/prism/index.xml

@ -0,0 +1,21 @@
<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom">
<channel>
<title>prism on Hagfi.sh</title>
<link>https://blog.hagfi.sh/tags/prism/</link>
<description>Recent content in prism on Hagfi.sh</description>
<generator>Hugo -- gohugo.io</generator>
<language>en-us</language>
<lastBuildDate>Wed, 29 Aug 2018 22:44:46 +0200</lastBuildDate><atom:link href="https://blog.hagfi.sh/tags/prism/index.xml" rel="self" type="application/rss+xml" />
<item>
<title>Live Search With HUGO</title>
<link>https://blog.hagfi.sh/development/live-search-with-hugo/</link>
<pubDate>Wed, 29 Aug 2018 22:44:46 +0200</pubDate>
<guid>https://blog.hagfi.sh/development/live-search-with-hugo/</guid>
<description>&lt;p&gt;HUGO is static, that&amp;rsquo;s a fact. How can I implement a live search? Searching the internet provided me only solutions
that require a page refresh, this time of age performance is key, so that&amp;rsquo;s why I wanted a fast and fuzzy search implementation.&lt;/p&gt;</description>
</item>
</channel>
</rss>

280
public/tags/prismjs/index.html

@ -0,0 +1,280 @@
<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en-us">
<head>
<title>
prismjs // Hagfi.sh
</title>
<link href="http://gmpg.org/xfn/11" rel="profile">
<meta http-equiv="content-type" content="text/html; charset=utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1">
<meta name="description" content="">
<meta name="keywords" content="">
<meta name="author" content="">
<meta name="generator" content="Hugo 0.92.0" />
<meta property="og:title" content="prismjs" />
<meta property="og:description" content="" />
<meta property="og:type" content="website" />
<meta property="og:locale" content="en_US" />
<meta property="og:url" content="https://blog.hagfi.sh/tags/prismjs/" />
<link rel="stylesheet" href="//cdnjs.cloudflare.com/ajax/libs/pure/0.5.0/base-min.css">
<link rel="stylesheet" href="//cdnjs.cloudflare.com/ajax/libs/pure/0.5.0/pure-min.css">
<link rel="stylesheet" href="//cdnjs.cloudflare.com/ajax/libs/pure/0.5.0/grids-responsive-min.css">
<link rel="stylesheet" href="https://blog.hagfi.sh//css/redlounge.css">
<link rel="stylesheet" href="https://blog.hagfi.sh//css/prism.css">
<link href="//maxcdn.bootstrapcdn.com/font-awesome/4.5.0/css/font-awesome.min.css" rel="stylesheet">
<link href='//fonts.googleapis.com/css?family=Raleway:400,200,100,700,300,500,600,800' rel='stylesheet' type='text/css'>
<link href='//fonts.googleapis.com/css?family=Libre+Baskerville:400,700,400italic' rel='stylesheet' type='text/css'>
<link rel="apple-touch-icon-precomposed" sizes="144x144" href="/touch-icon-144-precomposed.png">
<link rel="shortcut icon" type="image/x-icon" href="/img/favicon.png">
<link href="https://blog.hagfi.sh/tags/prismjs/index.xml" rel="alternate" type="application/rss+xml" title="Hagfi.sh" />
<script src="//cdnjs.cloudflare.com/ajax/libs/moment.js/2.18.1/moment.js"></script>
<script src="//cdnjs.cloudflare.com/ajax/libs/vue/2.5.17/vue.min.js"></script>
<script src="//cdnjs.cloudflare.com/ajax/libs/axios/0.18.0/axios.min.js"></script>
<script src="//cdnjs.cloudflare.com/ajax/libs/fuse.js/3.2.1/fuse.min.js"></script>
<script src="//cdn.jsdelivr.net/npm/vuewordcloud@18.7.11/VueWordCloud.js"></script>
<script src="https://blog.hagfi.sh//js/prism.js"></script>
<script type="application/javascript">
var doNotTrack = false;
if (!doNotTrack) {
(function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){
(i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o),
m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m)
})(window,document,'script','https://www.google-analytics.com/analytics.js','ga');
ga('create', 'UA-124890410-1', 'auto');
ga('send', 'pageview');
}
</script>
</head>
<body>
<div id="layout" class="pure-g">
<div class="sidebar pure-u-1 pure-u-md-1-4" id="app">
<div class="header">
<h1 class="brand-title"><a href="/">Hagfi.sh</a></h1>
<h2 class="brand-tagline">A devops guide to the galaxy</h2>
<div class="counters">
<a class="counter" href="/">13
<div class="counter-sub">Documents</div>
</a>
<a class="counter" href="/tags">29
<div class="counter-sub">Tags</div>
</a>
<a class="counter" href="/categories">3
<div class="counter-sub">Categories</div>
</a>
</div>
<nav class="nav">
</nav>
<div class="search-wrapper">
<input
type="text"
placeholder="Search ..."
v-model="search"
@keydown.down.prevent="navigate(1)"
@keydown.up.prevent="navigate(-1)"
@keyup.enter.prevent="navigate(result[selected].href)"
ref="searchInput"
class="search"
/>
<svg height="100" width="100" ref="resultPoint" class="result-point">
<circle cx="5" cy="5" r="5" fill="#FFF" />
</svg>
<ul class="result-items">
<li v-for="r, i of result" class="result-item" ref="resultItem">
<div class="result-item-wrapper" :class="{ 'result-item-selected': selected === i }">
<div class="result-item-left">
<span class="post-date">
<span class="post-date-day"><sup v-text="moment(r.date).format('D')"></sup></span><span class="post-date-separator" v-text="'/'"></span><span class="post-date-month" v-text="moment(r.date).format('MMM')"></span> <span class="post-date-year" v-text="moment(r.date).format('YYYY')"></span>
</span>
<template v-if="r.author">By <a class="post-author" v-text="r.author"></a></template>
</div>
<div class="result-item-left">
<span class="result-item-separator nav-item-separator" v-text="'//'"></span><a :href="r.href" v-text="r.title" class="result-item-link"></a>
</div>
</div>
</li>
</ul>
</div>
</div>
</div>
<div class="content pure-u-1 pure-u-md-3-4">
<a name="top"></a>
<div class="posts">
<section class="post">
<header class="post-header">
<h1 class="post-title">
<a href="/development/live-search-with-hugo/">Live Search With HUGO</a>
</h1>
</header>
<p class="post-meta">
<span class="post-date">
<span class="post-date-day"><sup>29</sup></span><span class="post-date-separator">/</span><span class="post-date-month">Aug</span> <span class="post-date-year">2018</span>
</span>
By <a class="post-author" >Kristof Vandam</a>
<span class="post-reading-time"><i class="fa fa-clock-o"></i> <em>5 min. read</em></span>
<div class="post-categories">
<a class="post-category post-category-development" href="https://blog.hagfi.sh//categories/development">development</a>
</div>
</p>
<article class="post-summary">
<p>HUGO is static, that&rsquo;s a fact. How can I implement a live search? Searching the internet provided me only solutions
that require a page refresh, this time of age performance is key, so that&rsquo;s why I wanted a fast and fuzzy search implementation.</p>
</article>
<div class="read-more-link">
<a href="/development/live-search-with-hugo/"><span class="read-more-slashes">//</span>Read More...</a>
</div>
</section>
</div>
<div class="footer">
<hr class="thin" />
<div class="pure-menu pure-menu-horizontal pure-menu-open">
<ul class="footer-menu">
</ul>
</div>
<p>&copy; 2022. All rights reserved.</p>
</div>
</div>
</div>
<script>
var app = new Vue({
el: '#app',
data: {
fuse: null,
search: "",
result: [],
index: [],
selected: 0
},
mounted() {
let self = this
window.addEventListener("keypress", function(e) {
self.$refs.searchInput.focus()
})
let options = {
shouldSort: true,
threshold: 0.6,
location: 0,
distance: 100,
maxPatternLength: 32,
minMatchCharLength: 1,
keys: [
"title",
"author",
"date",
"content"
]
}
axios.get('/index.json')
.then(function (response) {
self.index = response.data
self.fuse = new Fuse(response.data, options)
})
.catch(function (error) {
})
},
watch: {
result(nval, oval) {
nval.length > 0 ? this.pointer(0) : this.pointer(-1)
},
search(nval, oval) {
this.result = this.fuse.search(nval)
}
},
methods: {
navigate(val) {
switch (val) {
case 1: if (this.selected < this.result.length - 1) { this.selected++ }; break;
case -1: if (this.selected > 0 ) { this.selected-- }; break;
default: window.location.href = val; break;
}
this.pointer(this.selected)
},
pointer(selected) {
let self = this
if (selected >= 0) {
Vue.nextTick().then(function() {
let height = self.$refs.resultItem[selected].clientHeight
let top = self.$refs.resultItem[selected].getBoundingClientRect().top
let left = self.$refs.resultItem[selected].getBoundingClientRect().left
self.$refs.resultPoint.style.top = (top+height/2)+'px'
self.$refs.resultPoint.style.left = (left-20)+'px'
})
} else {
this.$refs.resultPoint.style.left = '-50px'
return
}
}
}
})
</script>
</body>
</html>

21
public/tags/prismjs/index.xml

@ -0,0 +1,21 @@
<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom">
<channel>
<title>prismjs on Hagfi.sh</title>
<link>https://blog.hagfi.sh/tags/prismjs/</link>
<description>Recent content in prismjs on Hagfi.sh</description>
<generator>Hugo -- gohugo.io</generator>
<language>en-us</language>
<lastBuildDate>Wed, 29 Aug 2018 22:44:46 +0200</lastBuildDate><atom:link href="https://blog.hagfi.sh/tags/prismjs/index.xml" rel="self" type="application/rss+xml" />
<item>
<title>Live Search With HUGO</title>
<link>https://blog.hagfi.sh/development/live-search-with-hugo/</link>
<pubDate>Wed, 29 Aug 2018 22:44:46 +0200</pubDate>
<guid>https://blog.hagfi.sh/development/live-search-with-hugo/</guid>
<description>&lt;p&gt;HUGO is static, that&amp;rsquo;s a fact. How can I implement a live search? Searching the internet provided me only solutions
that require a page refresh, this time of age performance is key, so that&amp;rsquo;s why I wanted a fast and fuzzy search implementation.&lt;/p&gt;</description>
</item>
</channel>
</rss>

281
public/tags/script/index.html

@ -0,0 +1,281 @@
<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en-us">
<head>
<title>
script // Hagfi.sh
</title>
<link href="http://gmpg.org/xfn/11" rel="profile">
<meta http-equiv="content-type" content="text/html; charset=utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1">
<meta name="description" content="">
<meta name="keywords" content="">
<meta name="author" content="">
<meta name="generator" content="Hugo 0.92.0" />
<meta property="og:title" content="script" />
<meta property="og:description" content="" />
<meta property="og:type" content="website" />
<meta property="og:locale" content="en_US" />
<meta property="og:url" content="https://blog.hagfi.sh/tags/script/" />
<link rel="stylesheet" href="//cdnjs.cloudflare.com/ajax/libs/pure/0.5.0/base-min.css">
<link rel="stylesheet" href="//cdnjs.cloudflare.com/ajax/libs/pure/0.5.0/pure-min.css">
<link rel="stylesheet" href="//cdnjs.cloudflare.com/ajax/libs/pure/0.5.0/grids-responsive-min.css">
<link rel="stylesheet" href="https://blog.hagfi.sh//css/redlounge.css">
<link rel="stylesheet" href="https://blog.hagfi.sh//css/prism.css">
<link href="//maxcdn.bootstrapcdn.com/font-awesome/4.5.0/css/font-awesome.min.css" rel="stylesheet">
<link href='//fonts.googleapis.com/css?family=Raleway:400,200,100,700,300,500,600,800' rel='stylesheet' type='text/css'>
<link href='//fonts.googleapis.com/css?family=Libre+Baskerville:400,700,400italic' rel='stylesheet' type='text/css'>
<link rel="apple-touch-icon-precomposed" sizes="144x144" href="/touch-icon-144-precomposed.png">
<link rel="shortcut icon" type="image/x-icon" href="/img/favicon.png">
<link href="https://blog.hagfi.sh/tags/script/index.xml" rel="alternate" type="application/rss+xml" title="Hagfi.sh" />
<script src="//cdnjs.cloudflare.com/ajax/libs/moment.js/2.18.1/moment.js"></script>
<script src="//cdnjs.cloudflare.com/ajax/libs/vue/2.5.17/vue.min.js"></script>
<script src="//cdnjs.cloudflare.com/ajax/libs/axios/0.18.0/axios.min.js"></script>
<script src="//cdnjs.cloudflare.com/ajax/libs/fuse.js/3.2.1/fuse.min.js"></script>
<script src="//cdn.jsdelivr.net/npm/vuewordcloud@18.7.11/VueWordCloud.js"></script>
<script src="https://blog.hagfi.sh//js/prism.js"></script>
<script type="application/javascript">
var doNotTrack = false;
if (!doNotTrack) {
(function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){
(i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o),
m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m)
})(window,document,'script','https://www.google-analytics.com/analytics.js','ga');
ga('create', 'UA-124890410-1', 'auto');
ga('send', 'pageview');
}
</script>
</head>
<body>
<div id="layout" class="pure-g">
<div class="sidebar pure-u-1 pure-u-md-1-4" id="app">
<div class="header">
<h1 class="brand-title"><a href="/">Hagfi.sh</a></h1>
<h2 class="brand-tagline">A devops guide to the galaxy</h2>
<div class="counters">
<a class="counter" href="/">13
<div class="counter-sub">Documents</div>
</a>
<a class="counter" href="/tags">29
<div class="counter-sub">Tags</div>
</a>
<a class="counter" href="/categories">3
<div class="counter-sub">Categories</div>
</a>
</div>
<nav class="nav">
</nav>
<div class="search-wrapper">
<input
type="text"
placeholder="Search ..."
v-model="search"
@keydown.down.prevent="navigate(1)"
@keydown.up.prevent="navigate(-1)"
@keyup.enter.prevent="navigate(result[selected].href)"
ref="searchInput"
class="search"
/>
<svg height="100" width="100" ref="resultPoint" class="result-point">
<circle cx="5" cy="5" r="5" fill="#FFF" />
</svg>
<ul class="result-items">
<li v-for="r, i of result" class="result-item" ref="resultItem">
<div class="result-item-wrapper" :class="{ 'result-item-selected': selected === i }">
<div class="result-item-left">
<span class="post-date">
<span class="post-date-day"><sup v-text="moment(r.date).format('D')"></sup></span><span class="post-date-separator" v-text="'/'"></span><span class="post-date-month" v-text="moment(r.date).format('MMM')"></span> <span class="post-date-year" v-text="moment(r.date).format('YYYY')"></span>
</span>
<template v-if="r.author">By <a class="post-author" v-text="r.author"></a></template>
</div>
<div class="result-item-left">
<span class="result-item-separator nav-item-separator" v-text="'//'"></span><a :href="r.href" v-text="r.title" class="result-item-link"></a>
</div>
</div>
</li>
</ul>
</div>
</div>
</div>
<div class="content pure-u-1 pure-u-md-3-4">
<a name="top"></a>
<div class="posts">
<section class="post">
<header class="post-header">
<h1 class="post-title">
<a href="/administration/bash/">Bash Tips &amp; Tricks</a>
</h1>
</header>
<p class="post-meta">
<span class="post-date">
<span class="post-date-day"><sup>11</sup></span><span class="post-date-separator">/</span><span class="post-date-month">Nov</span> <span class="post-date-year">2018</span>
</span>
By <a class="post-author" >Olivier De Ram</a>
<span class="post-reading-time"><i class="fa fa-clock-o"></i> <em>2 min. read</em></span>
<div class="post-categories">
<a class="post-category post-category-administration" href="https://blog.hagfi.sh//categories/administration">administration</a>
<a class="post-category post-category-development" href="https://blog.hagfi.sh//categories/development">development</a>
</div>
</p>
<article class="post-summary">
<p>Usefull bash tips &amp; tricks</p>
</article>
<div class="read-more-link">
<a href="/administration/bash/"><span class="read-more-slashes">//</span>Read More...</a>
</div>
</section>
</div>
<div class="footer">
<hr class="thin" />
<div class="pure-menu pure-menu-horizontal pure-menu-open">
<ul class="footer-menu">
</ul>
</div>
<p>&copy; 2022. All rights reserved.</p>
</div>
</div>
</div>
<script>
var app = new Vue({
el: '#app',
data: {
fuse: null,
search: "",
result: [],
index: [],
selected: 0
},
mounted() {
let self = this
window.addEventListener("keypress", function(e) {
self.$refs.searchInput.focus()
})
let options = {
shouldSort: true,
threshold: 0.6,
location: 0,
distance: 100,
maxPatternLength: 32,
minMatchCharLength: 1,
keys: [
"title",
"author",
"date",
"content"
]
}
axios.get('/index.json')
.then(function (response) {
self.index = response.data
self.fuse = new Fuse(response.data, options)
})
.catch(function (error) {
})
},
watch: {
result(nval, oval) {
nval.length > 0 ? this.pointer(0) : this.pointer(-1)
},
search(nval, oval) {
this.result = this.fuse.search(nval)
}
},
methods: {
navigate(val) {
switch (val) {
case 1: if (this.selected < this.result.length - 1) { this.selected++ }; break;
case -1: if (this.selected > 0 ) { this.selected-- }; break;
default: window.location.href = val; break;
}
this.pointer(this.selected)
},
pointer(selected) {
let self = this
if (selected >= 0) {
Vue.nextTick().then(function() {
let height = self.$refs.resultItem[selected].clientHeight
let top = self.$refs.resultItem[selected].getBoundingClientRect().top
let left = self.$refs.resultItem[selected].getBoundingClientRect().left
self.$refs.resultPoint.style.top = (top+height/2)+'px'
self.$refs.resultPoint.style.left = (left-20)+'px'
})
} else {
this.$refs.resultPoint.style.left = '-50px'
return
}
}
}
})
</script>
</body>
</html>

20
public/tags/script/index.xml

@ -0,0 +1,20 @@
<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom">
<channel>
<title>script on Hagfi.sh</title>
<link>https://blog.hagfi.sh/tags/script/</link>
<description>Recent content in script on Hagfi.sh</description>
<generator>Hugo -- gohugo.io</generator>
<language>en-us</language>
<lastBuildDate>Sun, 11 Nov 2018 16:01:15 +0100</lastBuildDate><atom:link href="https://blog.hagfi.sh/tags/script/index.xml" rel="self" type="application/rss+xml" />
<item>
<title>Bash Tips &amp; Tricks</title>
<link>https://blog.hagfi.sh/administration/bash/</link>
<pubDate>Sun, 11 Nov 2018 16:01:15 +0100</pubDate>
<guid>https://blog.hagfi.sh/administration/bash/</guid>
<description>&lt;p&gt;Usefull bash tips &amp;amp; tricks&lt;/p&gt;</description>
</item>
</channel>
</rss>

317
public/tags/security/index.html

@ -0,0 +1,317 @@
<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en-us">
<head>
<title>
security // Hagfi.sh
</title>
<link href="http://gmpg.org/xfn/11" rel="profile">
<meta http-equiv="content-type" content="text/html; charset=utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1">
<meta name="description" content="">
<meta name="keywords" content="">
<meta name="author" content="">
<meta name="generator" content="Hugo 0.92.0" />
<meta property="og:title" content="security" />
<meta property="og:description" content="" />
<meta property="og:type" content="website" />
<meta property="og:locale" content="en_US" />
<meta property="og:url" content="https://blog.hagfi.sh/tags/security/" />
<link rel="stylesheet" href="//cdnjs.cloudflare.com/ajax/libs/pure/0.5.0/base-min.css">
<link rel="stylesheet" href="//cdnjs.cloudflare.com/ajax/libs/pure/0.5.0/pure-min.css">
<link rel="stylesheet" href="//cdnjs.cloudflare.com/ajax/libs/pure/0.5.0/grids-responsive-min.css">
<link rel="stylesheet" href="https://blog.hagfi.sh//css/redlounge.css">
<link rel="stylesheet" href="https://blog.hagfi.sh//css/prism.css">
<link href="//maxcdn.bootstrapcdn.com/font-awesome/4.5.0/css/font-awesome.min.css" rel="stylesheet">
<link href='//fonts.googleapis.com/css?family=Raleway:400,200,100,700,300,500,600,800' rel='stylesheet' type='text/css'>
<link href='//fonts.googleapis.com/css?family=Libre+Baskerville:400,700,400italic' rel='stylesheet' type='text/css'>
<link rel="apple-touch-icon-precomposed" sizes="144x144" href="/touch-icon-144-precomposed.png">
<link rel="shortcut icon" type="image/x-icon" href="/img/favicon.png">
<link href="https://blog.hagfi.sh/tags/security/index.xml" rel="alternate" type="application/rss+xml" title="Hagfi.sh" />
<script src="//cdnjs.cloudflare.com/ajax/libs/moment.js/2.18.1/moment.js"></script>
<script src="//cdnjs.cloudflare.com/ajax/libs/vue/2.5.17/vue.min.js"></script>
<script src="//cdnjs.cloudflare.com/ajax/libs/axios/0.18.0/axios.min.js"></script>
<script src="//cdnjs.cloudflare.com/ajax/libs/fuse.js/3.2.1/fuse.min.js"></script>
<script src="//cdn.jsdelivr.net/npm/vuewordcloud@18.7.11/VueWordCloud.js"></script>
<script src="https://blog.hagfi.sh//js/prism.js"></script>
<script type="application/javascript">
var doNotTrack = false;
if (!doNotTrack) {
(function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){
(i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o),
m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m)
})(window,document,'script','https://www.google-analytics.com/analytics.js','ga');
ga('create', 'UA-124890410-1', 'auto');
ga('send', 'pageview');
}
</script>
</head>
<body>
<div id="layout" class="pure-g">
<div class="sidebar pure-u-1 pure-u-md-1-4" id="app">
<div class="header">
<h1 class="brand-title"><a href="/">Hagfi.sh</a></h1>
<h2 class="brand-tagline">A devops guide to the galaxy</h2>
<div class="counters">
<a class="counter" href="/">13
<div class="counter-sub">Documents</div>
</a>
<a class="counter" href="/tags">29
<div class="counter-sub">Tags</div>
</a>
<a class="counter" href="/categories">3
<div class="counter-sub">Categories</div>
</a>
</div>
<nav class="nav">
</nav>
<div class="search-wrapper">
<input
type="text"
placeholder="Search ..."
v-model="search"
@keydown.down.prevent="navigate(1)"
@keydown.up.prevent="navigate(-1)"
@keyup.enter.prevent="navigate(result[selected].href)"
ref="searchInput"
class="search"
/>
<svg height="100" width="100" ref="resultPoint" class="result-point">
<circle cx="5" cy="5" r="5" fill="#FFF" />
</svg>
<ul class="result-items">
<li v-for="r, i of result" class="result-item" ref="resultItem">
<div class="result-item-wrapper" :class="{ 'result-item-selected': selected === i }">
<div class="result-item-left">
<span class="post-date">
<span class="post-date-day"><sup v-text="moment(r.date).format('D')"></sup></span><span class="post-date-separator" v-text="'/'"></span><span class="post-date-month" v-text="moment(r.date).format('MMM')"></span> <span class="post-date-year" v-text="moment(r.date).format('YYYY')"></span>
</span>
<template v-if="r.author">By <a class="post-author" v-text="r.author"></a></template>
</div>
<div class="result-item-left">
<span class="result-item-separator nav-item-separator" v-text="'//'"></span><a :href="r.href" v-text="r.title" class="result-item-link"></a>
</div>
</div>
</li>
</ul>
</div>
</div>
</div>
<div class="content pure-u-1 pure-u-md-3-4">
<a name="top"></a>
<div class="posts">
<section class="post">
<header class="post-header">
<h1 class="post-title">
<a href="/administration/boot-targets/">Changing boot targets</a>
</h1>
</header>
<p class="post-meta">
<span class="post-date">
<span class="post-date-day"><sup>9</sup></span><span class="post-date-separator">/</span><span class="post-date-month">Nov</span> <span class="post-date-year">2018</span>
</span>
By <a class="post-author" >Kristof Vandam</a>
<span class="post-reading-time"><i class="fa fa-clock-o"></i> <em>1 min. read</em></span>
<div class="post-categories">
<a class="post-category post-category-administration" href="https://blog.hagfi.sh//categories/administration">administration</a>
</div>
</p>
<article class="post-summary">
<p>Switch between run levels / environments.</p>
</article>
<div class="read-more-link">
<a href="/administration/boot-targets/"><span class="read-more-slashes">//</span>Read More...</a>
</div>
</section>
<section class="post">
<header class="post-header">
<h1 class="post-title">
<a href="/administration/luks-encryption/">Luks Encryption</a>
</h1>
</header>
<p class="post-meta">
<span class="post-date">
<span class="post-date-day"><sup>23</sup></span><span class="post-date-separator">/</span><span class="post-date-month">Aug</span> <span class="post-date-year">2018</span>
</span>
By <a class="post-author" >Kristof Vandam</a>
<span class="post-reading-time"><i class="fa fa-clock-o"></i> <em>4 min. read</em></span>
<div class="post-categories">
<a class="post-category post-category-administration" href="https://blog.hagfi.sh//categories/administration">administration</a>
</div>
</p>
<article class="post-summary">
<p>Create an encrypted partition that will automatically mount at boot.</p>
</article>
<div class="read-more-link">
<a href="/administration/luks-encryption/"><span class="read-more-slashes">//</span>Read More...</a>
</div>
</section>
</div>
<div class="footer">
<hr class="thin" />
<div class="pure-menu pure-menu-horizontal pure-menu-open">
<ul class="footer-menu">
</ul>
</div>
<p>&copy; 2022. All rights reserved.</p>
</div>
</div>
</div>
<script>
var app = new Vue({
el: '#app',
data: {
fuse: null,
search: "",
result: [],
index: [],
selected: 0
},
mounted() {
let self = this
window.addEventListener("keypress", function(e) {
self.$refs.searchInput.focus()
})
let options = {
shouldSort: true,
threshold: 0.6,
location: 0,
distance: 100,
maxPatternLength: 32,
minMatchCharLength: 1,
keys: [
"title",
"author",
"date",
"content"
]
}
axios.get('/index.json')
.then(function (response) {
self.index = response.data
self.fuse = new Fuse(response.data, options)
})
.catch(function (error) {
})
},
watch: {
result(nval, oval) {
nval.length > 0 ? this.pointer(0) : this.pointer(-1)
},
search(nval, oval) {
this.result = this.fuse.search(nval)
}
},
methods: {
navigate(val) {
switch (val) {
case 1: if (this.selected < this.result.length - 1) { this.selected++ }; break;
case -1: if (this.selected > 0 ) { this.selected-- }; break;
default: window.location.href = val; break;
}
this.pointer(this.selected)
},
pointer(selected) {
let self = this
if (selected >= 0) {
Vue.nextTick().then(function() {
let height = self.$refs.resultItem[selected].clientHeight
let top = self.$refs.resultItem[selected].getBoundingClientRect().top
let left = self.$refs.resultItem[selected].getBoundingClientRect().left
self.$refs.resultPoint.style.top = (top+height/2)+'px'
self.$refs.resultPoint.style.left = (left-20)+'px'
})
} else {
this.$refs.resultPoint.style.left = '-50px'
return
}
}
}
})
</script>
</body>
</html>

29
public/tags/security/index.xml

@ -0,0 +1,29 @@
<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom">
<channel>
<title>security on Hagfi.sh</title>
<link>https://blog.hagfi.sh/tags/security/</link>
<description>Recent content in security on Hagfi.sh</description>
<generator>Hugo -- gohugo.io</generator>
<language>en-us</language>
<lastBuildDate>Fri, 09 Nov 2018 10:08:15 +0200</lastBuildDate><atom:link href="https://blog.hagfi.sh/tags/security/index.xml" rel="self" type="application/rss+xml" />
<item>
<title>Changing boot targets</title>
<link>https://blog.hagfi.sh/administration/boot-targets/</link>
<pubDate>Fri, 09 Nov 2018 10:08:15 +0200</pubDate>
<guid>https://blog.hagfi.sh/administration/boot-targets/</guid>
<description>&lt;p&gt;Switch between run levels / environments.&lt;/p&gt;</description>
</item>
<item>
<title>Luks Encryption</title>
<link>https://blog.hagfi.sh/administration/luks-encryption/</link>
<pubDate>Thu, 23 Aug 2018 22:08:15 +0200</pubDate>
<guid>https://blog.hagfi.sh/administration/luks-encryption/</guid>
<description>&lt;p&gt;Create an encrypted partition that will automatically mount at boot.&lt;/p&gt;</description>
</item>
</channel>
</rss>

279
public/tags/shares/index.html

@ -0,0 +1,279 @@
<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en-us">
<head>
<title>
shares // Hagfi.sh
</title>
<link href="http://gmpg.org/xfn/11" rel="profile">
<meta http-equiv="content-type" content="text/html; charset=utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1">
<meta name="description" content="">
<meta name="keywords" content="">
<meta name="author" content="">
<meta name="generator" content="Hugo 0.92.0" />
<meta property="og:title" content="shares" />
<meta property="og:description" content="" />
<meta property="og:type" content="website" />
<meta property="og:locale" content="en_US" />
<meta property="og:url" content="https://blog.hagfi.sh/tags/shares/" />
<link rel="stylesheet" href="//cdnjs.cloudflare.com/ajax/libs/pure/0.5.0/base-min.css">
<link rel="stylesheet" href="//cdnjs.cloudflare.com/ajax/libs/pure/0.5.0/pure-min.css">
<link rel="stylesheet" href="//cdnjs.cloudflare.com/ajax/libs/pure/0.5.0/grids-responsive-min.css">
<link rel="stylesheet" href="https://blog.hagfi.sh//css/redlounge.css">
<link rel="stylesheet" href="https://blog.hagfi.sh//css/prism.css">
<link href="//maxcdn.bootstrapcdn.com/font-awesome/4.5.0/css/font-awesome.min.css" rel="stylesheet">
<link href='//fonts.googleapis.com/css?family=Raleway:400,200,100,700,300,500,600,800' rel='stylesheet' type='text/css'>
<link href='//fonts.googleapis.com/css?family=Libre+Baskerville:400,700,400italic' rel='stylesheet' type='text/css'>
<link rel="apple-touch-icon-precomposed" sizes="144x144" href="/touch-icon-144-precomposed.png">
<link rel="shortcut icon" type="image/x-icon" href="/img/favicon.png">
<link href="https://blog.hagfi.sh/tags/shares/index.xml" rel="alternate" type="application/rss+xml" title="Hagfi.sh" />
<script src="//cdnjs.cloudflare.com/ajax/libs/moment.js/2.18.1/moment.js"></script>
<script src="//cdnjs.cloudflare.com/ajax/libs/vue/2.5.17/vue.min.js"></script>
<script src="//cdnjs.cloudflare.com/ajax/libs/axios/0.18.0/axios.min.js"></script>
<script src="//cdnjs.cloudflare.com/ajax/libs/fuse.js/3.2.1/fuse.min.js"></script>
<script src="//cdn.jsdelivr.net/npm/vuewordcloud@18.7.11/VueWordCloud.js"></script>
<script src="https://blog.hagfi.sh//js/prism.js"></script>
<script type="application/javascript">
var doNotTrack = false;
if (!doNotTrack) {
(function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){
(i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o),
m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m)
})(window,document,'script','https://www.google-analytics.com/analytics.js','ga');
ga('create', 'UA-124890410-1', 'auto');
ga('send', 'pageview');
}
</script>
</head>
<body>
<div id="layout" class="pure-g">
<div class="sidebar pure-u-1 pure-u-md-1-4" id="app">
<div class="header">
<h1 class="brand-title"><a href="/">Hagfi.sh</a></h1>
<h2 class="brand-tagline">A devops guide to the galaxy</h2>
<div class="counters">
<a class="counter" href="/">13
<div class="counter-sub">Documents</div>
</a>
<a class="counter" href="/tags">29
<div class="counter-sub">Tags</div>
</a>
<a class="counter" href="/categories">3
<div class="counter-sub">Categories</div>
</a>
</div>
<nav class="nav">
</nav>
<div class="search-wrapper">
<input
type="text"
placeholder="Search ..."
v-model="search"
@keydown.down.prevent="navigate(1)"
@keydown.up.prevent="navigate(-1)"
@keyup.enter.prevent="navigate(result[selected].href)"
ref="searchInput"
class="search"
/>
<svg height="100" width="100" ref="resultPoint" class="result-point">
<circle cx="5" cy="5" r="5" fill="#FFF" />
</svg>
<ul class="result-items">
<li v-for="r, i of result" class="result-item" ref="resultItem">
<div class="result-item-wrapper" :class="{ 'result-item-selected': selected === i }">
<div class="result-item-left">
<span class="post-date">
<span class="post-date-day"><sup v-text="moment(r.date).format('D')"></sup></span><span class="post-date-separator" v-text="'/'"></span><span class="post-date-month" v-text="moment(r.date).format('MMM')"></span> <span class="post-date-year" v-text="moment(r.date).format('YYYY')"></span>
</span>
<template v-if="r.author">By <a class="post-author" v-text="r.author"></a></template>
</div>
<div class="result-item-left">
<span class="result-item-separator nav-item-separator" v-text="'//'"></span><a :href="r.href" v-text="r.title" class="result-item-link"></a>
</div>
</div>
</li>
</ul>
</div>
</div>
</div>
<div class="content pure-u-1 pure-u-md-3-4">
<a name="top"></a>
<div class="posts">
<section class="post">
<header class="post-header">
<h1 class="post-title">
<a href="/administration/autofs/">Mount with automount (autofs)</a>
</h1>
</header>
<p class="post-meta">
<span class="post-date">
<span class="post-date-day"><sup>9</sup></span><span class="post-date-separator">/</span><span class="post-date-month">Nov</span> <span class="post-date-year">2018</span>
</span>
By <a class="post-author" >Kristof Vandam</a>
<span class="post-reading-time"><i class="fa fa-clock-o"></i> <em>2 min. read</em></span>
<div class="post-categories">
<a class="post-category post-category-administration" href="https://blog.hagfi.sh//categories/administration">administration</a>
</div>
</p>
<article class="post-summary">
<p>Automagically mount remote directories on login.</p>
</article>
<div class="read-more-link">
<a href="/administration/autofs/"><span class="read-more-slashes">//</span>Read More...</a>
</div>
</section>
</div>
<div class="footer">
<hr class="thin" />
<div class="pure-menu pure-menu-horizontal pure-menu-open">
<ul class="footer-menu">
</ul>
</div>
<p>&copy; 2022. All rights reserved.</p>
</div>
</div>
</div>
<script>
var app = new Vue({
el: '#app',
data: {
fuse: null,
search: "",
result: [],
index: [],
selected: 0
},
mounted() {
let self = this
window.addEventListener("keypress", function(e) {
self.$refs.searchInput.focus()
})
let options = {
shouldSort: true,
threshold: 0.6,
location: 0,
distance: 100,
maxPatternLength: 32,
minMatchCharLength: 1,
keys: [
"title",
"author",
"date",
"content"
]
}
axios.get('/index.json')
.then(function (response) {
self.index = response.data
self.fuse = new Fuse(response.data, options)
})
.catch(function (error) {
})
},
watch: {
result(nval, oval) {
nval.length > 0 ? this.pointer(0) : this.pointer(-1)
},
search(nval, oval) {
this.result = this.fuse.search(nval)
}
},
methods: {
navigate(val) {
switch (val) {
case 1: if (this.selected < this.result.length - 1) { this.selected++ }; break;
case -1: if (this.selected > 0 ) { this.selected-- }; break;
default: window.location.href = val; break;
}
this.pointer(this.selected)
},
pointer(selected) {
let self = this
if (selected >= 0) {
Vue.nextTick().then(function() {
let height = self.$refs.resultItem[selected].clientHeight
let top = self.$refs.resultItem[selected].getBoundingClientRect().top
let left = self.$refs.resultItem[selected].getBoundingClientRect().left
self.$refs.resultPoint.style.top = (top+height/2)+'px'
self.$refs.resultPoint.style.left = (left-20)+'px'
})
} else {
this.$refs.resultPoint.style.left = '-50px'
return
}
}
}
})
</script>
</body>
</html>

20
public/tags/shares/index.xml

@ -0,0 +1,20 @@
<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom">
<channel>
<title>shares on Hagfi.sh</title>
<link>https://blog.hagfi.sh/tags/shares/</link>
<description>Recent content in shares on Hagfi.sh</description>
<generator>Hugo -- gohugo.io</generator>
<language>en-us</language>
<lastBuildDate>Fri, 09 Nov 2018 10:08:15 +0200</lastBuildDate><atom:link href="https://blog.hagfi.sh/tags/shares/index.xml" rel="self" type="application/rss+xml" />
<item>
<title>Mount with automount (autofs)</title>
<link>https://blog.hagfi.sh/administration/autofs/</link>
<pubDate>Fri, 09 Nov 2018 10:08:15 +0200</pubDate>
<guid>https://blog.hagfi.sh/administration/autofs/</guid>
<description>&lt;p&gt;Automagically mount remote directories on login.&lt;/p&gt;</description>
</item>
</channel>
</rss>

321
public/tags/size/index.html

@ -0,0 +1,321 @@
<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en-us">
<head>
<title>
size // Hagfi.sh
</title>
<link href="http://gmpg.org/xfn/11" rel="profile">
<meta http-equiv="content-type" content="text/html; charset=utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1">
<meta name="description" content="">
<meta name="keywords" content="">
<meta name="author" content="">
<meta name="generator" content="Hugo 0.92.0" />
<meta property="og:title" content="size" />
<meta property="og:description" content="" />
<meta property="og:type" content="website" />
<meta property="og:locale" content="en_US" />
<meta property="og:url" content="https://blog.hagfi.sh/tags/size/" />
<link rel="stylesheet" href="//cdnjs.cloudflare.com/ajax/libs/pure/0.5.0/base-min.css">
<link rel="stylesheet" href="//cdnjs.cloudflare.com/ajax/libs/pure/0.5.0/pure-min.css">
<link rel="stylesheet" href="//cdnjs.cloudflare.com/ajax/libs/pure/0.5.0/grids-responsive-min.css">
<link rel="stylesheet" href="https://blog.hagfi.sh//css/redlounge.css">
<link rel="stylesheet" href="https://blog.hagfi.sh//css/prism.css">
<link href="//maxcdn.bootstrapcdn.com/font-awesome/4.5.0/css/font-awesome.min.css" rel="stylesheet">
<link href='//fonts.googleapis.com/css?family=Raleway:400,200,100,700,300,500,600,800' rel='stylesheet' type='text/css'>
<link href='//fonts.googleapis.com/css?family=Libre+Baskerville:400,700,400italic' rel='stylesheet' type='text/css'>
<link rel="apple-touch-icon-precomposed" sizes="144x144" href="/touch-icon-144-precomposed.png">
<link rel="shortcut icon" type="image/x-icon" href="/img/favicon.png">
<link href="https://blog.hagfi.sh/tags/size/index.xml" rel="alternate" type="application/rss+xml" title="Hagfi.sh" />
<script src="//cdnjs.cloudflare.com/ajax/libs/moment.js/2.18.1/moment.js"></script>
<script src="//cdnjs.cloudflare.com/ajax/libs/vue/2.5.17/vue.min.js"></script>
<script src="//cdnjs.cloudflare.com/ajax/libs/axios/0.18.0/axios.min.js"></script>
<script src="//cdnjs.cloudflare.com/ajax/libs/fuse.js/3.2.1/fuse.min.js"></script>
<script src="//cdn.jsdelivr.net/npm/vuewordcloud@18.7.11/VueWordCloud.js"></script>
<script src="https://blog.hagfi.sh//js/prism.js"></script>
<script type="application/javascript">
var doNotTrack = false;
if (!doNotTrack) {
(function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){
(i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o),
m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m)
})(window,document,'script','https://www.google-analytics.com/analytics.js','ga');
ga('create', 'UA-124890410-1', 'auto');
ga('send', 'pageview');
}
</script>
</head>
<body>
<div id="layout" class="pure-g">
<div class="sidebar pure-u-1 pure-u-md-1-4" id="app">
<div class="header">
<h1 class="brand-title"><a href="/">Hagfi.sh</a></h1>
<h2 class="brand-tagline">A devops guide to the galaxy</h2>
<div class="counters">
<a class="counter" href="/">13
<div class="counter-sub">Documents</div>
</a>
<a class="counter" href="/tags">29
<div class="counter-sub">Tags</div>
</a>
<a class="counter" href="/categories">3
<div class="counter-sub">Categories</div>
</a>
</div>
<nav class="nav">
</nav>
<div class="search-wrapper">
<input
type="text"
placeholder="Search ..."
v-model="search"
@keydown.down.prevent="navigate(1)"
@keydown.up.prevent="navigate(-1)"
@keyup.enter.prevent="navigate(result[selected].href)"
ref="searchInput"
class="search"
/>
<svg height="100" width="100" ref="resultPoint" class="result-point">
<circle cx="5" cy="5" r="5" fill="#FFF" />
</svg>
<ul class="result-items">
<li v-for="r, i of result" class="result-item" ref="resultItem">
<div class="result-item-wrapper" :class="{ 'result-item-selected': selected === i }">
<div class="result-item-left">
<span class="post-date">
<span class="post-date-day"><sup v-text="moment(r.date).format('D')"></sup></span><span class="post-date-separator" v-text="'/'"></span><span class="post-date-month" v-text="moment(r.date).format('MMM')"></span> <span class="post-date-year" v-text="moment(r.date).format('YYYY')"></span>
</span>
<template v-if="r.author">By <a class="post-author" v-text="r.author"></a></template>
</div>
<div class="result-item-left">
<span class="result-item-separator nav-item-separator" v-text="'//'"></span><a :href="r.href" v-text="r.title" class="result-item-link"></a>
</div>
</div>
</li>
</ul>
</div>
</div>
</div>
<div class="content pure-u-1 pure-u-md-3-4">
<a name="top"></a>
<div class="posts">
<section class="post">
<header class="post-header">
<h1 class="post-title">
<a href="/tools/fatrace/">Fatrace: Report system wide file access events</a>
</h1>
</header>
<p class="post-meta">
<span class="post-date">
<span class="post-date-day"><sup>5</sup></span><span class="post-date-separator">/</span><span class="post-date-month">Nov</span> <span class="post-date-year">2018</span>
</span>
By <a class="post-author" >Kristof Vandam</a>
<span class="post-reading-time"><i class="fa fa-clock-o"></i> <em>1 min. read</em></span>
<div class="post-categories">
<a class="post-category post-category-tools" href="https://blog.hagfi.sh//categories/tools">tools</a>
<a class="post-category post-category-administration" href="https://blog.hagfi.sh//categories/administration">administration</a>
</div>
</p>
<article class="post-summary">
<p>fatrace watches every file on server (except from itself and other kernel file systems).</p>
</article>
<div class="read-more-link">
<a href="/tools/fatrace/"><span class="read-more-slashes">//</span>Read More...</a>
</div>
</section>
<section class="post">
<header class="post-header">
<h1 class="post-title">
<a href="/tools/ncdu/">NCDU: NCurses Disk Usage</a>
</h1>
</header>
<p class="post-meta">
<span class="post-date">
<span class="post-date-day"><sup>17</sup></span><span class="post-date-separator">/</span><span class="post-date-month">Sep</span> <span class="post-date-year">2018</span>
</span>
By <a class="post-author" >Kristof Vandam</a>
<span class="post-reading-time"><i class="fa fa-clock-o"></i> <em>2 min. read</em></span>
<div class="post-categories">
<a class="post-category post-category-tools" href="https://blog.hagfi.sh//categories/tools">tools</a>
<a class="post-category post-category-administration" href="https://blog.hagfi.sh//categories/administration">administration</a>
</div>
</p>
<article class="post-summary">
<p>ncdu is a command line tool to scan and calculate directory and file sizes.</p>
</article>
<div class="read-more-link">
<a href="/tools/ncdu/"><span class="read-more-slashes">//</span>Read More...</a>
</div>
</section>
</div>
<div class="footer">
<hr class="thin" />
<div class="pure-menu pure-menu-horizontal pure-menu-open">
<ul class="footer-menu">
</ul>
</div>
<p>&copy; 2022. All rights reserved.</p>
</div>
</div>
</div>
<script>
var app = new Vue({
el: '#app',
data: {
fuse: null,
search: "",
result: [],
index: [],
selected: 0
},
mounted() {
let self = this
window.addEventListener("keypress", function(e) {
self.$refs.searchInput.focus()
})
let options = {
shouldSort: true,
threshold: 0.6,
location: 0,
distance: 100,
maxPatternLength: 32,
minMatchCharLength: 1,
keys: [
"title",
"author",
"date",
"content"
]
}
axios.get('/index.json')
.then(function (response) {
self.index = response.data
self.fuse = new Fuse(response.data, options)
})
.catch(function (error) {
})
},
watch: {
result(nval, oval) {
nval.length > 0 ? this.pointer(0) : this.pointer(-1)
},
search(nval, oval) {
this.result = this.fuse.search(nval)
}
},
methods: {
navigate(val) {
switch (val) {
case 1: if (this.selected < this.result.length - 1) { this.selected++ }; break;
case -1: if (this.selected > 0 ) { this.selected-- }; break;
default: window.location.href = val; break;
}
this.pointer(this.selected)
},
pointer(selected) {
let self = this
if (selected >= 0) {
Vue.nextTick().then(function() {
let height = self.$refs.resultItem[selected].clientHeight
let top = self.$refs.resultItem[selected].getBoundingClientRect().top
let left = self.$refs.resultItem[selected].getBoundingClientRect().left
self.$refs.resultPoint.style.top = (top+height/2)+'px'
self.$refs.resultPoint.style.left = (left-20)+'px'
})
} else {
this.$refs.resultPoint.style.left = '-50px'
return
}
}
}
})
</script>
</body>
</html>

29
public/tags/size/index.xml

@ -0,0 +1,29 @@
<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom">
<channel>
<title>size on Hagfi.sh</title>
<link>https://blog.hagfi.sh/tags/size/</link>
<description>Recent content in size on Hagfi.sh</description>
<generator>Hugo -- gohugo.io</generator>
<language>en-us</language>
<lastBuildDate>Mon, 05 Nov 2018 22:13:49 +0200</lastBuildDate><atom:link href="https://blog.hagfi.sh/tags/size/index.xml" rel="self" type="application/rss+xml" />
<item>
<title>Fatrace: Report system wide file access events</title>
<link>https://blog.hagfi.sh/tools/fatrace/</link>
<pubDate>Mon, 05 Nov 2018 22:13:49 +0200</pubDate>
<guid>https://blog.hagfi.sh/tools/fatrace/</guid>
<description>&lt;p&gt;fatrace watches every file on server (except from itself and other kernel file systems).&lt;/p&gt;</description>
</item>
<item>
<title>NCDU: NCurses Disk Usage</title>
<link>https://blog.hagfi.sh/tools/ncdu/</link>
<pubDate>Mon, 17 Sep 2018 22:18:38 +0200</pubDate>
<guid>https://blog.hagfi.sh/tools/ncdu/</guid>
<description>&lt;p&gt;ncdu is a command line tool to scan and calculate directory and file sizes.&lt;/p&gt;</description>
</item>
</channel>
</rss>

280
public/tags/vue/index.html

@ -0,0 +1,280 @@
<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en-us">
<head>
<title>
vue // Hagfi.sh
</title>
<link href="http://gmpg.org/xfn/11" rel="profile">
<meta http-equiv="content-type" content="text/html; charset=utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1">
<meta name="description" content="">
<meta name="keywords" content="">
<meta name="author" content="">
<meta name="generator" content="Hugo 0.92.0" />
<meta property="og:title" content="vue" />
<meta property="og:description" content="" />
<meta property="og:type" content="website" />
<meta property="og:locale" content="en_US" />
<meta property="og:url" content="https://blog.hagfi.sh/tags/vue/" />
<link rel="stylesheet" href="//cdnjs.cloudflare.com/ajax/libs/pure/0.5.0/base-min.css">
<link rel="stylesheet" href="//cdnjs.cloudflare.com/ajax/libs/pure/0.5.0/pure-min.css">
<link rel="stylesheet" href="//cdnjs.cloudflare.com/ajax/libs/pure/0.5.0/grids-responsive-min.css">
<link rel="stylesheet" href="https://blog.hagfi.sh//css/redlounge.css">
<link rel="stylesheet" href="https://blog.hagfi.sh//css/prism.css">
<link href="//maxcdn.bootstrapcdn.com/font-awesome/4.5.0/css/font-awesome.min.css" rel="stylesheet">
<link href='//fonts.googleapis.com/css?family=Raleway:400,200,100,700,300,500,600,800' rel='stylesheet' type='text/css'>
<link href='//fonts.googleapis.com/css?family=Libre+Baskerville:400,700,400italic' rel='stylesheet' type='text/css'>
<link rel="apple-touch-icon-precomposed" sizes="144x144" href="/touch-icon-144-precomposed.png">
<link rel="shortcut icon" type="image/x-icon" href="/img/favicon.png">
<link href="https://blog.hagfi.sh/tags/vue/index.xml" rel="alternate" type="application/rss+xml" title="Hagfi.sh" />
<script src="//cdnjs.cloudflare.com/ajax/libs/moment.js/2.18.1/moment.js"></script>
<script src="//cdnjs.cloudflare.com/ajax/libs/vue/2.5.17/vue.min.js"></script>
<script src="//cdnjs.cloudflare.com/ajax/libs/axios/0.18.0/axios.min.js"></script>
<script src="//cdnjs.cloudflare.com/ajax/libs/fuse.js/3.2.1/fuse.min.js"></script>
<script src="//cdn.jsdelivr.net/npm/vuewordcloud@18.7.11/VueWordCloud.js"></script>
<script src="https://blog.hagfi.sh//js/prism.js"></script>
<script type="application/javascript">
var doNotTrack = false;
if (!doNotTrack) {
(function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){
(i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o),
m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m)
})(window,document,'script','https://www.google-analytics.com/analytics.js','ga');
ga('create', 'UA-124890410-1', 'auto');
ga('send', 'pageview');
}
</script>
</head>
<body>
<div id="layout" class="pure-g">
<div class="sidebar pure-u-1 pure-u-md-1-4" id="app">
<div class="header">
<h1 class="brand-title"><a href="/">Hagfi.sh</a></h1>
<h2 class="brand-tagline">A devops guide to the galaxy</h2>
<div class="counters">
<a class="counter" href="/">13
<div class="counter-sub">Documents</div>
</a>
<a class="counter" href="/tags">29
<div class="counter-sub">Tags</div>
</a>
<a class="counter" href="/categories">3
<div class="counter-sub">Categories</div>
</a>
</div>
<nav class="nav">
</nav>
<div class="search-wrapper">
<input
type="text"
placeholder="Search ..."
v-model="search"
@keydown.down.prevent="navigate(1)"
@keydown.up.prevent="navigate(-1)"
@keyup.enter.prevent="navigate(result[selected].href)"
ref="searchInput"
class="search"
/>
<svg height="100" width="100" ref="resultPoint" class="result-point">
<circle cx="5" cy="5" r="5" fill="#FFF" />
</svg>
<ul class="result-items">
<li v-for="r, i of result" class="result-item" ref="resultItem">
<div class="result-item-wrapper" :class="{ 'result-item-selected': selected === i }">
<div class="result-item-left">
<span class="post-date">
<span class="post-date-day"><sup v-text="moment(r.date).format('D')"></sup></span><span class="post-date-separator" v-text="'/'"></span><span class="post-date-month" v-text="moment(r.date).format('MMM')"></span> <span class="post-date-year" v-text="moment(r.date).format('YYYY')"></span>
</span>
<template v-if="r.author">By <a class="post-author" v-text="r.author"></a></template>
</div>
<div class="result-item-left">
<span class="result-item-separator nav-item-separator" v-text="'//'"></span><a :href="r.href" v-text="r.title" class="result-item-link"></a>
</div>
</div>
</li>
</ul>
</div>
</div>
</div>
<div class="content pure-u-1 pure-u-md-3-4">
<a name="top"></a>
<div class="posts">
<section class="post">
<header class="post-header">
<h1 class="post-title">
<a href="/development/live-search-with-hugo/">Live Search With HUGO</a>
</h1>
</header>
<p class="post-meta">
<span class="post-date">
<span class="post-date-day"><sup>29</sup></span><span class="post-date-separator">/</span><span class="post-date-month">Aug</span> <span class="post-date-year">2018</span>
</span>
By <a class="post-author" >Kristof Vandam</a>
<span class="post-reading-time"><i class="fa fa-clock-o"></i> <em>5 min. read</em></span>
<div class="post-categories">
<a class="post-category post-category-development" href="https://blog.hagfi.sh//categories/development">development</a>
</div>
</p>
<article class="post-summary">
<p>HUGO is static, that&rsquo;s a fact. How can I implement a live search? Searching the internet provided me only solutions
that require a page refresh, this time of age performance is key, so that&rsquo;s why I wanted a fast and fuzzy search implementation.</p>
</article>
<div class="read-more-link">
<a href="/development/live-search-with-hugo/"><span class="read-more-slashes">//</span>Read More...</a>
</div>
</section>
</div>
<div class="footer">
<hr class="thin" />
<div class="pure-menu pure-menu-horizontal pure-menu-open">
<ul class="footer-menu">
</ul>
</div>
<p>&copy; 2022. All rights reserved.</p>
</div>
</div>
</div>
<script>
var app = new Vue({
el: '#app',
data: {
fuse: null,
search: "",
result: [],
index: [],
selected: 0
},
mounted() {
let self = this
window.addEventListener("keypress", function(e) {
self.$refs.searchInput.focus()
})
let options = {
shouldSort: true,
threshold: 0.6,
location: 0,
distance: 100,
maxPatternLength: 32,
minMatchCharLength: 1,
keys: [
"title",
"author",
"date",
"content"
]
}
axios.get('/index.json')
.then(function (response) {
self.index = response.data
self.fuse = new Fuse(response.data, options)
})
.catch(function (error) {
})
},
watch: {
result(nval, oval) {
nval.length > 0 ? this.pointer(0) : this.pointer(-1)
},
search(nval, oval) {
this.result = this.fuse.search(nval)
}
},
methods: {
navigate(val) {
switch (val) {
case 1: if (this.selected < this.result.length - 1) { this.selected++ }; break;
case -1: if (this.selected > 0 ) { this.selected-- }; break;
default: window.location.href = val; break;
}
this.pointer(this.selected)
},
pointer(selected) {
let self = this
if (selected >= 0) {
Vue.nextTick().then(function() {
let height = self.$refs.resultItem[selected].clientHeight
let top = self.$refs.resultItem[selected].getBoundingClientRect().top
let left = self.$refs.resultItem[selected].getBoundingClientRect().left
self.$refs.resultPoint.style.top = (top+height/2)+'px'
self.$refs.resultPoint.style.left = (left-20)+'px'
})
} else {
this.$refs.resultPoint.style.left = '-50px'
return
}
}
}
})
</script>
</body>
</html>

21
public/tags/vue/index.xml

@ -0,0 +1,21 @@
<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom">
<channel>
<title>vue on Hagfi.sh</title>
<link>https://blog.hagfi.sh/tags/vue/</link>
<description>Recent content in vue on Hagfi.sh</description>
<generator>Hugo -- gohugo.io</generator>
<language>en-us</language>
<lastBuildDate>Wed, 29 Aug 2018 22:44:46 +0200</lastBuildDate><atom:link href="https://blog.hagfi.sh/tags/vue/index.xml" rel="self" type="application/rss+xml" />
<item>
<title>Live Search With HUGO</title>
<link>https://blog.hagfi.sh/development/live-search-with-hugo/</link>
<pubDate>Wed, 29 Aug 2018 22:44:46 +0200</pubDate>
<guid>https://blog.hagfi.sh/development/live-search-with-hugo/</guid>
<description>&lt;p&gt;HUGO is static, that&amp;rsquo;s a fact. How can I implement a live search? Searching the internet provided me only solutions
that require a page refresh, this time of age performance is key, so that&amp;rsquo;s why I wanted a fast and fuzzy search implementation.&lt;/p&gt;</description>
</item>
</channel>
</rss>

280
public/tags/vuejs/index.html

@ -0,0 +1,280 @@
<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en-us">
<head>
<title>
vuejs // Hagfi.sh
</title>
<link href="http://gmpg.org/xfn/11" rel="profile">
<meta http-equiv="content-type" content="text/html; charset=utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1">
<meta name="description" content="">
<meta name="keywords" content="">
<meta name="author" content="">
<meta name="generator" content="Hugo 0.92.0" />
<meta property="og:title" content="vuejs" />
<meta property="og:description" content="" />
<meta property="og:type" content="website" />
<meta property="og:locale" content="en_US" />
<meta property="og:url" content="https://blog.hagfi.sh/tags/vuejs/" />
<link rel="stylesheet" href="//cdnjs.cloudflare.com/ajax/libs/pure/0.5.0/base-min.css">
<link rel="stylesheet" href="//cdnjs.cloudflare.com/ajax/libs/pure/0.5.0/pure-min.css">
<link rel="stylesheet" href="//cdnjs.cloudflare.com/ajax/libs/pure/0.5.0/grids-responsive-min.css">
<link rel="stylesheet" href="https://blog.hagfi.sh//css/redlounge.css">
<link rel="stylesheet" href="https://blog.hagfi.sh//css/prism.css">
<link href="//maxcdn.bootstrapcdn.com/font-awesome/4.5.0/css/font-awesome.min.css" rel="stylesheet">
<link href='//fonts.googleapis.com/css?family=Raleway:400,200,100,700,300,500,600,800' rel='stylesheet' type='text/css'>
<link href='//fonts.googleapis.com/css?family=Libre+Baskerville:400,700,400italic' rel='stylesheet' type='text/css'>
<link rel="apple-touch-icon-precomposed" sizes="144x144" href="/touch-icon-144-precomposed.png">
<link rel="shortcut icon" type="image/x-icon" href="/img/favicon.png">
<link href="https://blog.hagfi.sh/tags/vuejs/index.xml" rel="alternate" type="application/rss+xml" title="Hagfi.sh" />
<script src="//cdnjs.cloudflare.com/ajax/libs/moment.js/2.18.1/moment.js"></script>
<script src="//cdnjs.cloudflare.com/ajax/libs/vue/2.5.17/vue.min.js"></script>
<script src="//cdnjs.cloudflare.com/ajax/libs/axios/0.18.0/axios.min.js"></script>
<script src="//cdnjs.cloudflare.com/ajax/libs/fuse.js/3.2.1/fuse.min.js"></script>
<script src="//cdn.jsdelivr.net/npm/vuewordcloud@18.7.11/VueWordCloud.js"></script>
<script src="https://blog.hagfi.sh//js/prism.js"></script>
<script type="application/javascript">
var doNotTrack = false;
if (!doNotTrack) {
(function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){
(i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o),
m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m)
})(window,document,'script','https://www.google-analytics.com/analytics.js','ga');
ga('create', 'UA-124890410-1', 'auto');
ga('send', 'pageview');
}
</script>
</head>
<body>
<div id="layout" class="pure-g">
<div class="sidebar pure-u-1 pure-u-md-1-4" id="app">
<div class="header">
<h1 class="brand-title"><a href="/">Hagfi.sh</a></h1>
<h2 class="brand-tagline">A devops guide to the galaxy</h2>
<div class="counters">
<a class="counter" href="/">13
<div class="counter-sub">Documents</div>
</a>
<a class="counter" href="/tags">29
<div class="counter-sub">Tags</div>
</a>
<a class="counter" href="/categories">3
<div class="counter-sub">Categories</div>
</a>
</div>
<nav class="nav">
</nav>
<div class="search-wrapper">
<input
type="text"
placeholder="Search ..."
v-model="search"
@keydown.down.prevent="navigate(1)"
@keydown.up.prevent="navigate(-1)"
@keyup.enter.prevent="navigate(result[selected].href)"
ref="searchInput"
class="search"
/>
<svg height="100" width="100" ref="resultPoint" class="result-point">
<circle cx="5" cy="5" r="5" fill="#FFF" />
</svg>
<ul class="result-items">
<li v-for="r, i of result" class="result-item" ref="resultItem">
<div class="result-item-wrapper" :class="{ 'result-item-selected': selected === i }">
<div class="result-item-left">
<span class="post-date">
<span class="post-date-day"><sup v-text="moment(r.date).format('D')"></sup></span><span class="post-date-separator" v-text="'/'"></span><span class="post-date-month" v-text="moment(r.date).format('MMM')"></span> <span class="post-date-year" v-text="moment(r.date).format('YYYY')"></span>
</span>
<template v-if="r.author">By <a class="post-author" v-text="r.author"></a></template>
</div>
<div class="result-item-left">
<span class="result-item-separator nav-item-separator" v-text="'//'"></span><a :href="r.href" v-text="r.title" class="result-item-link"></a>
</div>
</div>
</li>
</ul>
</div>
</div>
</div>
<div class="content pure-u-1 pure-u-md-3-4">
<a name="top"></a>
<div class="posts">
<section class="post">
<header class="post-header">
<h1 class="post-title">
<a href="/development/live-search-with-hugo/">Live Search With HUGO</a>
</h1>
</header>
<p class="post-meta">
<span class="post-date">
<span class="post-date-day"><sup>29</sup></span><span class="post-date-separator">/</span><span class="post-date-month">Aug</span> <span class="post-date-year">2018</span>
</span>
By <a class="post-author" >Kristof Vandam</a>
<span class="post-reading-time"><i class="fa fa-clock-o"></i> <em>5 min. read</em></span>
<div class="post-categories">
<a class="post-category post-category-development" href="https://blog.hagfi.sh//categories/development">development</a>
</div>
</p>
<article class="post-summary">
<p>HUGO is static, that&rsquo;s a fact. How can I implement a live search? Searching the internet provided me only solutions
that require a page refresh, this time of age performance is key, so that&rsquo;s why I wanted a fast and fuzzy search implementation.</p>
</article>
<div class="read-more-link">
<a href="/development/live-search-with-hugo/"><span class="read-more-slashes">//</span>Read More...</a>
</div>
</section>
</div>
<div class="footer">
<hr class="thin" />
<div class="pure-menu pure-menu-horizontal pure-menu-open">
<ul class="footer-menu">
</ul>
</div>
<p>&copy; 2022. All rights reserved.</p>
</div>
</div>
</div>
<script>
var app = new Vue({
el: '#app',
data: {
fuse: null,
search: "",
result: [],
index: [],
selected: 0
},
mounted() {
let self = this
window.addEventListener("keypress", function(e) {
self.$refs.searchInput.focus()
})
let options = {
shouldSort: true,
threshold: 0.6,
location: 0,
distance: 100,
maxPatternLength: 32,
minMatchCharLength: 1,
keys: [
"title",
"author",
"date",
"content"
]
}
axios.get('/index.json')
.then(function (response) {
self.index = response.data
self.fuse = new Fuse(response.data, options)
})
.catch(function (error) {
})
},
watch: {
result(nval, oval) {
nval.length > 0 ? this.pointer(0) : this.pointer(-1)
},
search(nval, oval) {
this.result = this.fuse.search(nval)
}
},
methods: {
navigate(val) {
switch (val) {
case 1: if (this.selected < this.result.length - 1) { this.selected++ }; break;
case -1: if (this.selected > 0 ) { this.selected-- }; break;
default: window.location.href = val; break;
}
this.pointer(this.selected)
},
pointer(selected) {
let self = this
if (selected >= 0) {
Vue.nextTick().then(function() {
let height = self.$refs.resultItem[selected].clientHeight
let top = self.$refs.resultItem[selected].getBoundingClientRect().top
let left = self.$refs.resultItem[selected].getBoundingClientRect().left
self.$refs.resultPoint.style.top = (top+height/2)+'px'
self.$refs.resultPoint.style.left = (left-20)+'px'
})
} else {
this.$refs.resultPoint.style.left = '-50px'
return
}
}
}
})
</script>
</body>
</html>

21
public/tags/vuejs/index.xml

@ -0,0 +1,21 @@
<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom">
<channel>
<title>vuejs on Hagfi.sh</title>
<link>https://blog.hagfi.sh/tags/vuejs/</link>
<description>Recent content in vuejs on Hagfi.sh</description>
<generator>Hugo -- gohugo.io</generator>
<language>en-us</language>
<lastBuildDate>Wed, 29 Aug 2018 22:44:46 +0200</lastBuildDate><atom:link href="https://blog.hagfi.sh/tags/vuejs/index.xml" rel="self" type="application/rss+xml" />
<item>
<title>Live Search With HUGO</title>
<link>https://blog.hagfi.sh/development/live-search-with-hugo/</link>
<pubDate>Wed, 29 Aug 2018 22:44:46 +0200</pubDate>
<guid>https://blog.hagfi.sh/development/live-search-with-hugo/</guid>
<description>&lt;p&gt;HUGO is static, that&amp;rsquo;s a fact. How can I implement a live search? Searching the internet provided me only solutions
that require a page refresh, this time of age performance is key, so that&amp;rsquo;s why I wanted a fast and fuzzy search implementation.&lt;/p&gt;</description>
</item>
</channel>
</rss>

439
public/tools/fatrace/index.html

@ -0,0 +1,439 @@
<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en-us">
<head>
<title>
Fatrace: Report system wide file access events // Hagfi.sh
</title>
<link href="http://gmpg.org/xfn/11" rel="profile">
<meta http-equiv="content-type" content="text/html; charset=utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1">
<meta name="description" content="">
<meta name="keywords" content="">
<meta name="author" content="Kristof Vandam">
<meta name="generator" content="Hugo 0.92.0" />
<meta property="og:title" content="Fatrace: Report system wide file access events" />
<meta property="og:description" content="" />
<meta property="og:type" content="website" />
<meta property="og:locale" content="en_US" />
<meta property="og:url" content="https://blog.hagfi.sh/tools/fatrace/" />
<link rel="stylesheet" href="//cdnjs.cloudflare.com/ajax/libs/pure/0.5.0/base-min.css">
<link rel="stylesheet" href="//cdnjs.cloudflare.com/ajax/libs/pure/0.5.0/pure-min.css">
<link rel="stylesheet" href="//cdnjs.cloudflare.com/ajax/libs/pure/0.5.0/grids-responsive-min.css">
<link rel="stylesheet" href="https://blog.hagfi.sh//css/redlounge.css">
<link rel="stylesheet" href="https://blog.hagfi.sh//css/prism.css">
<link href="//maxcdn.bootstrapcdn.com/font-awesome/4.5.0/css/font-awesome.min.css" rel="stylesheet">
<link href='//fonts.googleapis.com/css?family=Raleway:400,200,100,700,300,500,600,800' rel='stylesheet' type='text/css'>
<link href='//fonts.googleapis.com/css?family=Libre+Baskerville:400,700,400italic' rel='stylesheet' type='text/css'>
<link rel="apple-touch-icon-precomposed" sizes="144x144" href="/touch-icon-144-precomposed.png">
<link rel="shortcut icon" type="image/x-icon" href="/img/favicon.png">
<link href="" rel="alternate" type="application/rss+xml" title="Hagfi.sh" />
<script src="//cdnjs.cloudflare.com/ajax/libs/moment.js/2.18.1/moment.js"></script>
<script src="//cdnjs.cloudflare.com/ajax/libs/vue/2.5.17/vue.min.js"></script>
<script src="//cdnjs.cloudflare.com/ajax/libs/axios/0.18.0/axios.min.js"></script>
<script src="//cdnjs.cloudflare.com/ajax/libs/fuse.js/3.2.1/fuse.min.js"></script>
<script src="//cdn.jsdelivr.net/npm/vuewordcloud@18.7.11/VueWordCloud.js"></script>
<script src="https://blog.hagfi.sh//js/prism.js"></script>
<script type="application/javascript">
var doNotTrack = false;
if (!doNotTrack) {
(function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){
(i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o),
m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m)
})(window,document,'script','https://www.google-analytics.com/analytics.js','ga');
ga('create', 'UA-124890410-1', 'auto');
ga('send', 'pageview');
}
</script>
</head>
<body>
<div id="layout" class="pure-g">
<div class="sidebar pure-u-1 pure-u-md-1-4" id="app">
<div class="header">
<h1 class="brand-title"><a href="/">Hagfi.sh</a></h1>
<h2 class="brand-tagline">A devops guide to the galaxy</h2>
<div class="counters">
<a class="counter" href="/">13
<div class="counter-sub">Documents</div>
</a>
<a class="counter" href="/tags">29
<div class="counter-sub">Tags</div>
</a>
<a class="counter" href="/categories">3
<div class="counter-sub">Categories</div>
</a>
</div>
<nav class="nav">
</nav>
<div class="search-wrapper">
<input
type="text"
placeholder="Search ..."
v-model="search"
@keydown.down.prevent="navigate(1)"
@keydown.up.prevent="navigate(-1)"
@keyup.enter.prevent="navigate(result[selected].href)"
ref="searchInput"
class="search"
/>
<svg height="100" width="100" ref="resultPoint" class="result-point">
<circle cx="5" cy="5" r="5" fill="#FFF" />
</svg>
<ul class="result-items">
<li v-for="r, i of result" class="result-item" ref="resultItem">
<div class="result-item-wrapper" :class="{ 'result-item-selected': selected === i }">
<div class="result-item-left">
<span class="post-date">
<span class="post-date-day"><sup v-text="moment(r.date).format('D')"></sup></span><span class="post-date-separator" v-text="'/'"></span><span class="post-date-month" v-text="moment(r.date).format('MMM')"></span> <span class="post-date-year" v-text="moment(r.date).format('YYYY')"></span>
</span>
<template v-if="r.author">By <a class="post-author" v-text="r.author"></a></template>
</div>
<div class="result-item-left">
<span class="result-item-separator nav-item-separator" v-text="'//'"></span><a :href="r.href" v-text="r.title" class="result-item-link"></a>
</div>
</div>
</li>
</ul>
</div>
</div>
</div>
<div class="content pure-u-1 pure-u-md-3-4">
<a name="top"></a>
<div id="toc" class="pure-u-1 pure-u-md-1-4">
<small class="toc-label">Contents</small>
<nav id="TableOfContents">
<ul>
<li><a href="#install-on-centos7">Install on Centos7</a></li>
<li><a href="#usage">Usage</a>
<ul>
<li><a href="#output">Output</a></li>
</ul>
</li>
<li><a href="#usecases">Usecases</a></li>
<li><a href="#references">References</a></li>
</ul>
</nav>
</div>
<section class="post">
<h1 class="post-title">
<a href="/tools/fatrace/">Fatrace: Report system wide file access events</a>
</h1>
<h3 class="post-subtitle">
</h3>
<span class="post-date">
<span class="post-date-day"><sup>5</sup></span><span class="post-date-separator">/</span><span class="post-date-month">Nov</span> <span class="post-date-year">2018</span>
</span>
<span class="post-author-single">By <a class="post-author" target="">Kristof Vandam</a></span>
<div class="post-categories">
<a class="post-category post-category-tools" href="https://blog.hagfi.sh//categories/tools">tools</a>
<a class="post-category post-category-administration" href="https://blog.hagfi.sh//categories/administration">administration</a>
</div>
<p>fatrace watches every file on server (except from itself and other kernel file systems).</p>
<p><em>fatrace</em> watches every file on server (except from itself and other kernel file systems).</p>
<h2 id="install-on-centos7">Install on Centos7</h2>
<p>Download the repo file from <em>fedorainfracloud.org</em></p>
<pre tabindex="0"><code class="language-.language-command" data-lang=".language-command">sudo curl https://copr.fedorainfracloud.org/coprs/ifas/fatrace/repo/epel-7/ifas-fatrace-epel-7.repo &gt; /etc/yum.repos.d/ifas.repo
sudo yum install fatrace -y
</code></pre><h2 id="usage">Usage</h2>
<table>
<thead>
<tr>
<th>Option</th>
<th>Description</th>
</tr>
</thead>
<tbody>
<tr>
<td>-c, &ndash;current-mount</td>
<td>Only record events on partition/mount of current directory. Without this option, all (real) partitions/mount points are being watched.</td>
</tr>
<tr>
<td>-o FILE, &ndash;output=FILE</td>
<td>Write events to given file instead of standard output.</td>
</tr>
<tr>
<td>-s SECONDS, &ndash;seconds=SECONDS</td>
<td>Stop after the given number of seconds.</td>
</tr>
<tr>
<td>-t, &ndash;timestamp</td>
<td>Add timestamp to events. When this option is given once, the format will be a humanreadable</td>
</tr>
<tr>
<td>-p PID, &ndash;ignore-pid=PID</td>
<td>Ignore events for this process ID. Can be specified multiple times.</td>
</tr>
</tbody>
</table>
<h3 id="output">Output</h3>
<p>The output should look something like the following. My action was reloading this page while watching with fatrace.</p>
<pre tabindex="0"><code class="language-.language-command" data-lang=".language-command">$ fatrace -t
12:58:20.859174 pickup(7666): CO /var/spool/postfix/maildrop
12:58:21.017572 caddy(7472): CO /var/www/vhosts/blog/tools/fatrace
12:58:21.017572 caddy(7472): CO /var/www/vhosts/blog/tools/fatrace/index.html
12:58:21.017572 caddy(7472): W /var/log/caddy/blog.log
12:58:21.213908 caddy(7472): CO /var/www/vhosts/blog/index.json
12:58:21.213908 caddy(7472): W /var/log/caddy/blog.log
12:58:21.305848 caddy(7472): RCO /var/www/vhosts/blog/img/favicon.png
12:58:21.305848 caddy(7472): W /var/log/caddy/blog.log
</code></pre><table>
<thead>
<tr>
<th>Letter</th>
<th>Description</th>
</tr>
</thead>
<tbody>
<tr>
<td>R</td>
<td>Read</td>
</tr>
<tr>
<td>W</td>
<td>Write</td>
</tr>
<tr>
<td>O</td>
<td>Open</td>
</tr>
<tr>
<td>C</td>
<td>Close</td>
</tr>
</tbody>
</table>
<p>Action identifiers can be combined</p>
<h2 id="usecases">Usecases</h2>
<p>identifying which files are accessed by a process.</p>
<h2 id="references">References</h2>
<p><a href="http://manpages.ubuntu.com/manpages/trusty/man1/fatrace.1.html">Manpage fatrace</a></p>
<div class="tags-list">
<span class="dark-red">Tags</span><span class="decorative-marker">//</span>
<a class="post-tag post-tag-directory" href="https://blog.hagfi.sh//tags/directory">directory</a>,
<a class="post-tag post-tag-size" href="https://blog.hagfi.sh//tags/size">size</a>,
<a class="post-tag post-tag-inventory" href="https://blog.hagfi.sh//tags/inventory">inventory</a>,
</div>
<div class="paging">
<span class="paging-label">More Reading</span>
<div class="paging-newer">
<span class="dark-red">Newer</span><span class="decorative-marker">//</span>
<a class="paging-link" href="/administration/toubles-with-interfaces-after-clone/">Troubles with interfaces after a VM clone</a>
</div>
<div class="paging-older">
<span class="dark-red">Older</span><span class="decorative-marker">//</span>
<a class="paging-link" href="/administration/autofs/">Mount with automount (autofs)</a>
</div>
</div>
</section>
<div id="disqus_thread"></div>
<script type="application/javascript">
var disqus_config = function () {
};
(function() {
if (["localhost", "127.0.0.1"].indexOf(window.location.hostname) != -1) {
document.getElementById('disqus_thread').innerHTML = 'Disqus comments not available by default when the website is previewed locally.';
return;
}
var d = document, s = d.createElement('script'); s.async = true;
s.src = '//' + "hagfish" + '.disqus.com/embed.js';
s.setAttribute('data-timestamp', +new Date());
(d.head || d.body).appendChild(s);
})();
</script>
<noscript>Please enable JavaScript to view the <a href="https://disqus.com/?ref_noscript">comments powered by Disqus.</a></noscript>
<a href="https://disqus.com" class="dsq-brlink">comments powered by <span class="logo-disqus">Disqus</span></a>
<div class="footer">
<hr class="thin" />
<div class="pure-menu pure-menu-horizontal pure-menu-open">
<ul class="footer-menu">
</ul>
</div>
<p>&copy; 2022. All rights reserved.</p>
</div>
</div>
</div>
<script>
var app = new Vue({
el: '#app',
data: {
fuse: null,
search: "",
result: [],
index: [],
selected: 0
},
mounted() {
let self = this
window.addEventListener("keypress", function(e) {
self.$refs.searchInput.focus()
})
let options = {
shouldSort: true,
threshold: 0.6,
location: 0,
distance: 100,
maxPatternLength: 32,
minMatchCharLength: 1,
keys: [
"title",
"author",
"date",
"content"
]
}
axios.get('/index.json')
.then(function (response) {
self.index = response.data
self.fuse = new Fuse(response.data, options)
})
.catch(function (error) {
})
},
watch: {
result(nval, oval) {
nval.length > 0 ? this.pointer(0) : this.pointer(-1)
},
search(nval, oval) {
this.result = this.fuse.search(nval)
}
},
methods: {
navigate(val) {
switch (val) {
case 1: if (this.selected < this.result.length - 1) { this.selected++ }; break;
case -1: if (this.selected > 0 ) { this.selected-- }; break;
default: window.location.href = val; break;
}
this.pointer(this.selected)
},
pointer(selected) {
let self = this
if (selected >= 0) {
Vue.nextTick().then(function() {
let height = self.$refs.resultItem[selected].clientHeight
let top = self.$refs.resultItem[selected].getBoundingClientRect().top
let left = self.$refs.resultItem[selected].getBoundingClientRect().left
self.$refs.resultPoint.style.top = (top+height/2)+'px'
self.$refs.resultPoint.style.left = (left-20)+'px'
})
} else {
this.$refs.resultPoint.style.left = '-50px'
return
}
}
}
})
</script>
</body>
</html>

Some files were not shown because too many files have changed in this diff Show More

Loading…
Cancel
Save