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
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
| $sourceFolder = "C:\path\to\pngs" | |
| $sumSavedKb = 0 | |
| # Get all PNG files recursively | |
| Get-ChildItem -Path $sourceFolder -Recurse -Filter *.png | ForEach-Object { | |
| $file = $_.FullName | |
| $jpgFile = [System.IO.Path]::ChangeExtension($file, "jpg") | |
| # Get the old file size (in kB) | |
| $oldfilesize = [Math]::Round((Get-Item -LiteralPath $file).Length / 1KB, 2) |
| 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; |
| 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; |
| 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';" | |
| /> |