In Jekyll set a variable for the mail, e.g. in the _config.yml
email: name@mail.com
then use it in your page
Reach me under: {{ site.email | mailObfuscate }}
which will generate the following HTML
package at.favre.lib.bytes.otherPackage; | |
import org.junit.Test; | |
import javax.crypto.Cipher; | |
import javax.crypto.SecretKey; | |
import javax.crypto.spec.GCMParameterSpec; | |
import javax.crypto.spec.SecretKeySpec; | |
import java.nio.ByteBuffer; | |
import java.nio.charset.StandardCharsets; |
In Jekyll set a variable for the mail, e.g. in the _config.yml
email: name@mail.com
then use it in your page
Reach me under: {{ site.email | mailObfuscate }}
which will generate the following HTML
package at.favre.lib.armadillo; | |
import org.junit.Test; | |
import java.nio.ByteBuffer; | |
import java.nio.charset.StandardCharsets; | |
import java.security.MessageDigest; | |
import java.security.SecureRandom; | |
import java.util.Arrays; |
import TurndownService from "turndown"; | |
export const stackOverflowHighlightedCodeBlock = function (service: TurndownService): void { | |
const highlightRegExp = /lang-([a-z0-9]+)/ | |
service.addRule('stackOverflowHighlightedCodeBlock', { | |
filter: function (node: HTMLElement, options: Options): boolean | null { | |
const firstChild = node.firstChild | |
return ( | |
node.nodeName === 'PRE' && |
/* | |
* Copyright 2017 Patrick Favre-Bulle | |
* | |
* Licensed under the Apache License, Version 2.0 (the "License"); | |
* you may not use this file except in compliance with the License. | |
* You may obtain a copy of the License at | |
* | |
* http://www.apache.org/licenses/LICENSE-2.0 | |
* | |
* Unless required by applicable law or agreed to in writing, software |
#!/bin/sh | |
# This is part of my blog about AES: https://medium.com/p/7616beaaade9 | |
# Inspired by https://blog.filippo.io/the-ecb-penguin/ | |
# Convert your image to .ppm with Gimp or Photoshop | |
# | |
# Usage: ./ecb_img <image file as ppm> <password> | |
# extract header and body |
export const figureCaption = function (service: TurndownService): void { | |
service.addRule('stackOverflowHighlightedCodeBlock', { | |
filter: function (node: HTMLElement, options: Options): boolean | null { | |
const firstChild = node.firstChild | |
const lastChild = node.lastChild | |
return ( | |
node.nodeName === 'FIGURE' && | |
firstChild && firstChild.nodeName === 'IMG' && | |
lastChild && lastChild.nodeName === 'FIGCAPTION' | |
) |
{{/* If you are using a CSP header this is how you can whitelist the inline-script */}} | |
{{/* its not optimal since it only changes every day and only if you regenerate the site */}} | |
{{ $currentDayNonce := now | time.Format "2006-01-02" | md5 }} | |
<meta http-equiv="Content-Security-Policy" | |
content="default-src 'self'; | |
script-src 'self' 'nonce-{{ $currentDayNonce }}'; | |
img-src 'self';" | |
/> |
## Random Data | |
Original size: 1024 byte | |
Compressed size (raw): 1047 byte | |
Name enc diff % enc-comp diff | |
------------------------------------------------------------------ | |
base85 1280 256 23% 1076 29 2% | |
base64 1366 342 31% 1073 26 2% | |
base36 1585 561 51% 1082 35 3% |