A list of the most common functionalities in Jekyll (Liquid). You can use Jekyll with GitHub Pages, just make sure you are using the proper version.
Running a local server for testing purposes:
A list of the most common functionalities in Jekyll (Liquid). You can use Jekyll with GitHub Pages, just make sure you are using the proper version.
Running a local server for testing purposes:
<?php | |
/* | |
--------------------------------------- | |
HTTP Security headers | |
--------------------------------------- | |
*/ | |
// Generating CSP nonce & defining CSP header | |
$csp_nonce = base64_encode(random_bytes(20)); |
#!/usr/bin/env ruby | |
`gem list -d`.split(/\n\n^(?=\w)/).each do |data| | |
match = data.match(/(?<name>([^\s]+)) \((?<versions>.*)\)/) | |
name = match[:name] | |
versions = match[:versions].split(', ') | |
if match = data.match(/^.*\(([\d\.]*),? ?default\): .*$/) | |
next if match[1].empty? # it's the only version if this match is empty | |
versions.delete(match[1] || versions[0]) |
# Older Git versions | |
git submodule foreach 'git fetch origin --tags; git checkout master; git pull' && git pull && git submodule update --init --recursive | |
# Newer Git versions | |
git submodule update --remote --merge |
#!/bin/bash | |
# https://hackernoon.com/how-to-use-yarn-in-a-project-without-installing-yarn-f946815ddb4e | |
# Choose which version of yarn you want to use | |
EXPECTED_YARN_VERSION="0.16.1" | |
function install_yarn { | |
mkdir -p .yarn | |
DOWNLOAD_URL="https://github.com/yarnpkg/yarn/releases/download/v$EXPECTED_YARN_VERSION/yarn-v$EXPECTED_YARN_VERSION.tar.gz" | |
echo "Downloading from $DOWNLOAD_URL" |
/* | |
* Replacing SVG strings in data-uri style situations | |
* by Jakob Erikson -- https://github.com/jakob-e | |
* | |
* http://codepen.io/jakob-e/pen/doMoML | |
*/ | |
// Function to replace characters in a string | |
@function str-replace($string, $search, $replace: '') { | |
$index: str-index($string, $search); |
<?php | |
// CSV files > CSV file | |
function mergeCSV(array $input = [], string $output = '') | |
{ | |
$count = 0; | |
foreach (glob($input) as $file) { | |
if (($handle = fopen($file, 'r')) !== false) { |
<?php | |
require_once('vendor/autoload.php'); | |
$currentIssue = '2019_01'; | |
function generateIssue($issue) | |
{ | |
$src = './src/' . $issue; |
################## | |
# DIRMNGR CONF # | |
################## | |
## | |
# SKS keyserver running as Tor hidden service | |
# See https://sks-keyservers.net/overview-of-pools.php#pool_tor | |
keyserver hkp://jirk5u4osbsr34t5.onion | |
## |