Skip to content

Instantly share code, notes, and snippets.

@kael
kael / collectd-fail2ban
Created October 29, 2018 10:02 — forked from alexalouit/collectd-fail2ban
Collectd: Fail2ban
LoadPlugin tail
<Plugin "tail">
<File "/var/log/fail2ban.log">
Instance "fail2ban"
<Match>
Regex "Ban"
DSType "CounterInc"
Type "counter"
Instance "fail2ban-ban"
</Match>
@kael
kael / csrf-lua.conf
Created October 26, 2018 18:17 — forked from shrikeh/csrf-lua.conf
A simple nginx host file that, using the lua module, handles CSRF, rather than the backend having to (and thus generally breaking caching by having to use Set-Cookie). Here, the front end takes care of CSRF, and sends an X-CSRF-Valid header to the backend regarding the validity of the POST, so that it is advisory (the backend then choose whether…
server {
listen 80;
root /root/to/your/docroot;
proxy_redirect off;
proxy_intercept_errors on;
proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
@kael
kael / metadata-basic.json
Created October 5, 2018 07:27 — forked from HadrienGardeur/metadata-basic.json
JSON-LD for application/webpub+json
{
"@context": "http://readium.org/webpub/default.jsonld",
"metadata": {
"@type": "http://schema.org/Book",
"identifier": "urn:isbn:9780000000001",
"title": "Moby-Dick",
"author": "Herman Melville",
"language": "en",
"publisher": "Whale Publishing Ltd.",
"modified": "2016-02-18T10:32:18Z",
@kael
kael / context-vocab-array-combined-iri-coerce.json
Created September 23, 2018 16:51 — forked from niklasl/context-vocab-array-combined-iri-coerce.json
JSON-LD context array with different vocabs using combined iri-coerce objects
{
"@context": [
{
"@vocab": "http://www.w3.org",
"label": "/2000/01/rdf-schema#label",
"comment": "/2000/01/rdf-schema#comment",
"prefLabel": "/2004/02/skos/core#prefLabel",
"altLabel": "/2004/02/skos/core#altLabel",
"prev": {"/1999/xhtml/vocab#prev": "@iri"},
@kael
kael / hypothesis.md
Created September 9, 2018 16:46 — forked from BigBlueHat/hypothesis.md
Hypothes.is API Blueprint [DRAFT]
@kael
kael / meta-tags.md
Created September 7, 2018 23:11 — forked from kevinSuttle/meta-tags.md
List of Usable HTML Meta and Link Tags

Copied from http://code.lancepollard.com/complete-list-of-html-meta-tags/

Basic HTML Meta Tags

<meta charset='UTF-8'>
<meta name='keywords' content='your, tags'>
<meta name='description' content='150 words'>
<meta name='subject' content='your website's subject'>
<meta name='copyright' content='company name'>