Browse Source

Update

keycloak-part-2
Hannes Körber 3 years ago
parent
commit
2423777ded
Signed by: hannes GPG Key ID: CD28A7CC31318017
  1. 1
      .gitignore
  2. 2
      content/about.md
  3. 4
      content/blog/2018-07-01-rabbithole-proc-self-mountstats.md
  4. 2
      content/blog/_index.md
  5. 10
      layouts/_default/list.html
  6. 17
      layouts/_default/single.html
  7. 54
      layouts/partials/pagelist-default.html
  8. 2
      layouts/partials/related.html
  9. 6
      layouts/partials/taglist.html
  10. 0
      layouts/partials/tags.html
  11. 25
      layouts/shortcodes/imgproc.html
  12. 7
      layouts/static/single.html
  13. 160
      static/css/main.css

1
.gitignore

@ -1,2 +1,3 @@
/public
/themes
/resources

2
content/about.md

@ -6,7 +6,7 @@ type: static
menu: main
---
<img class="center" src="/assets/images/me.jpg" style="width:25%;">
<img class="image-center" src="/assets/images/me.jpg">
I'm Hannes Körber, currently working as a system operator at [Tradebyte Software GmbH](https://www.tradebyte.com/) in Ansbach, Germany.

4
content/blog/2018-07-01-rabbithole-proc-self-mountstats.md

@ -28,10 +28,12 @@ The problem lies in the `xprt` line in `/proc/self/mountstats`, which contains t
xprt: tcp 695 1 1 0 16 96099368 96091328 6383 341933213458 1504192
```
All fields are explained in the link above. The crux is the following part:
All fields are explained in the link above. The crux is the following part[^quote1]:
> For the udp RPC transport there is no connection count, connect idle time, or idle time (fields #3, #4, and #5); all other fields are the same.
[^quote1]: [Link](https://utcc.utoronto.ca/%7Ecks/space/blog/linux/NFSMountstatsXprt) --- retrieved 2018-12-10
This means that for UDP, the line contains three fewer fields than for TCP. The mountstats exporter always expects the same number of fields and therefore breaks for UDP.
Another tricky thing is the `statvers` variable in `/proc/self/mountpoints` that specifies which version the statistics refer to. `statvers=1.1` added three more fields to the end, 11, 12 and 13 in the link above. I was not sure how this was handled for UDP, but after digging through kernel code and git logs, I found [this commit](https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=15a4520621824a3c2eb2de2d1f3984bc1663d3c8), which shows that the three fields were added for both UDP and TCP.

2
content/blog/_index.md

@ -1,3 +1,3 @@
---
title: This is an overview over all posts
---
This is an overview over all posts

10
layouts/_default/list.html

@ -1,5 +1,11 @@
{{ define "main" }}
{{- .Content -}}
<div class="content-prefix">
<h2 class="heading">
{{- title .Title -}}
</h1>
</div>
<div class="content">
{{- .Content -}}
</div>
{{- partial "pagelist-default.html" . -}}
{{- partial "taglist.html" . -}}
{{ end }}

17
layouts/_default/single.html

@ -4,18 +4,19 @@
<h1 class="heading">
{{- title .Title -}}
</h1>
<time class="date" datetime="{{- .Date.Format "2006-01-02" -}}">
{{- .Date.Format "2006-01-02" -}}
</time>
</div>
{{- if .Params.toc -}}
<div class="toc">
<div id="toc">
<aside>
<h3>Content</h2>
<h3 id="toc-heading">Content</h2>
{{ .TableOfContents }}
</aside>
</div>
{{- end -}}
<time class="date" datetime="{{- .Date.Format "2006-01-02" -}}">
{{- .Date.Format "2006-01-02" -}}
</time>
</div>
<div class="content">
{{- .Content -}}
@ -23,12 +24,10 @@
<div class="content-postfix">
<div class="tags">
<h3>Tags</h3>
{{- partial "tags.html" . -}}
{{- partial "taglist.html" . -}}
</div>
<div class="related">
<h3>See also</h3>
{{- partial "related.html" . -}}
</div>
</div>
</article>
{{ end }}

54
layouts/partials/pagelist-default.html

@ -1,27 +1,29 @@
<table class="list">
{{ if isset .Params "infos" }}
<thead>
<tr>
{{ range .Params.infos }}
<th>{{ title . }}</th>
{{ end }}
</tr>
</thead>
{{ end }}
<tbody>
<tr>
{{ range .Paginator.Pages }}
<td>
<time datetime="{{- .Date.Format "2006-01-02" -}}">
{{- .Date.Format "2006-01-02" -}}
</time>
</td>
<td>
<a href="{{ .URL }}">
{{ .Title }}
</a>
</td>
</tr>
<div class="pagelist">
<table>
{{ if isset .Params "infos" }}
<thead>
<tr>
{{ range .Params.infos }}
<th>{{ title . }}</th>
{{ end }}
</tr>
</thead>
{{ end }}
</tbody>
</table>
<tbody>
<tr>
{{ range .Paginator.Pages }}
<td>
<time class="list-time" datetime="{{- .Date.Format "2006-01-02" -}}">
{{- .Date.Format "2006-01-02" -}}
</time>
</td>
<td>
<a href="{{ .URL }}">
{{ .Title }}
</a>
</td>
</tr>
{{ end }}
</tbody>
</table>
</div>

2
layouts/partials/related.html

@ -1,7 +1,6 @@
{{ $related := .Site.RegularPages.Related . | first 3 }}
{{ with $related }}
<div class="related">
<ul>
{{ range . }}
<li >
@ -11,5 +10,4 @@
</li>
{{ end }}
</ul>
</div>
{{ end }}

6
layouts/partials/taglist.html

@ -1,3 +1,7 @@
<ul class="tags">
{{ range .Params.tags }}
<a href="{{ "/tags/" }}{{ . | urlize }}"> {{ . }} </a>
<li>
<a href="{{ "/tags/" }}{{ . | urlize }}"> {{ title . }} </a>
</li>
{{ end }}
</ul>

0
layouts/partials/tags.html

25
layouts/shortcodes/imgproc.html

@ -0,0 +1,25 @@
{{ $original := .Page.Resources.GetMatch (printf "*%s*" (.Get 0)) }}
{{ $command := .Get 1 }}
{{ $options := .Get 2 }}
{{ if eq $command "Fit"}}
{{ .Scratch.Set "image" ($original.Fit $options) }}
{{ else if eq $command "Resize"}}
{{ .Scratch.Set "image" ($original.Resize $options) }}
{{ else if eq $command "Fill"}}
{{ .Scratch.Set "image" ($original.Fill $options) }}
{{ else }}
{{ errorf "Invalid image processing command: Must be one of Fit, Fill or Resize."}}
{{ end }}
{{ $image := .Scratch.Get "image" }}
<figure style="padding: 0.25rem; margin: 2rem 0; background-color: #cccc">
<img style="max-width: 100%; height: auto;" src="{{ $image.RelPermalink }}" width="{{ $image.Width }}" height="{{ $image.Height }}">
<figcaption>
<small>
{{ with .Inner }}
{{ . }}
{{ else }}
.{{ $command }} "{{ $options }}"
{{ end }}
</small>
</figcaption>
</figure>

7
layouts/static/single.html

@ -1,6 +1,7 @@
{{ define "main" }}
<article>
<h1>
<div class="content-prefix">
<h1 class="heading">
{{- title .Title -}}
</h1>
{{- if .Params.toc -}}
@ -11,7 +12,9 @@
</aside>
</div>
{{- end -}}
</div>
<div class="content">
{{- .Content -}}
</div>
</article>
{{ end }}

160
static/css/main.css

@ -21,17 +21,13 @@ body {
}
.navigation .list-horizontal-item {
margin-right: 20px;
}
.social .list-horizontal-item {
margin-right: 10px;
}
blockquote {
border-left: black;
border-left-style: solid;
border-left-width: 2px;
font-style: oblique;
padding-left: 10px;
margin-left: 30px;
}
@ -72,7 +68,7 @@ pre {
flex-wrap: wrap;
}
.header a:hover, .footer a:hover {
.header a:hover, .footer a:hover, .tags a:hover {
text-decoration: none;
color: dimgray;
}
@ -82,13 +78,13 @@ ul {
}
.header a, .footer a, .tags a {
text-decoration: pone;
text-decoration: none;
color: black
}
.tags ul {
list-style: none;
padding-left: 20px;
/* list-style: none; */
/* padding-left: 20px; */
}
.tags .list-bullet {
@ -113,7 +109,31 @@ ul {
/* border-style: solid; */
/* border-width: 2px; */
font-size: 20px;
margin-right: 30px;
margin-right: 20px;
}
.navigation li, .social {
/* background-color: red; */
border: silver;
border-style: solid;
background-color: silver;
padding: 5px;
border-width: 2px;
border-radius: 4px;
}
.navigation li:hover, .social li:hover {
/* background-color: red; */
/* opacity: 0.7; */
/* border-color: red; */
}
.navigation li:not(:last-child) {
margin-right: 20px;
}
.social .list-horizontal-item:not(:last-child) {
margin-right: 10px;
}
@media (max-width: 1000px) {
@ -175,12 +195,21 @@ ul {
margin-right: auto;
}
.title, .copyright {
margin-left: 15px;
}
main {
width: 50%;
text-align: justify;
margin: auto;
}
.footnotes {
margin-top: 45px;
text-align: left;
}
h1, h2, h3, h4, h5 {
}
@ -192,11 +221,17 @@ h1, h2, h3, h4, h5 {
/* text-indent:0 20px; */
}
.content p:not(:last-child) {
margin-bottom: 25px;
}
.content p code {
font-family: monospace;
background-color: lightgray;
}
.content-prefix {
text-align: center;
}
@ -209,6 +244,10 @@ h1, h2, h3, h4, h5 {
font-size: 0.85em;
}
.content {
margin-bottom: 45px;
}
.content-prefix,
.content-postfix {
/* border: green; */
@ -218,9 +257,35 @@ h1, h2, h3, h4, h5 {
}
.related {
/* border: orange; */
/* border-style: solid; */
/* border-width: 2px; */
margin-top: 45px;
}
.image-center {
float: right;
margin-left: 40px;
margin-bottom: 40px;
width: 25%;
}
#toc {
/* padding: 10px; */
margin-left: 50px;
margin-bottom: 50px;
margin-top: 50px;
border: gray;
border-style: solid;
border-width: 1px;
text-align: initial;
width: 45%;
float: right;
}
#toc-heading {
text-align: center;
}
#TableOfContents ul {
/* background-color: red; */
}
.tags {
@ -235,12 +300,6 @@ h1, h2, h3, h4, h5 {
/* border-width: 2px; */
}
.list {
/* border: purple; */
/* border-style: solid; */
/* border-width: 2px; */
}
a:link {
/* text-decoration: none; */
}
@ -250,3 +309,66 @@ a:link {
background-color: lightgray;
color: black;
}
.pagelist table {
border-collapse: collapse;
width: 100%;
}
.pagelist th, td {
border-bottom: 1px solid #ddd;
}
.pagelist {
font-family: sans;
}
.pagelist .list-time {
font-family: monospace;
}
.pagelist tr:hover {
background-color: #f5f5f5;
}
.pagelist tr:nth-child(even) {
background-color: #f2f2f2;
}
.pagelist th, td {
padding-left: 10px;
padding-right: 10px;
padding-top: 7px;
padding-bottom: 7px;
}
.pagelist a {
text-decoration: none;
}
.brown {
border: brown;
border-style: solid;
border-width: 2px;
}
.orange {
border: orange;
border-style: solid;
border-width: 2px;
}
.red {
border: red;
border-style: solid;
border-width: 2px;
}
.green {
border: green;
border-style: solid;
border-width: 2px;
}
.blue {
border: blue;
border-style: solid;
border-width: 2px;
}
Loading…
Cancel
Save