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:
# alias to edit commit messages without using rebase interactive | |
# example: git reword commithash message | |
reword = "!f() {\n GIT_SEQUENCE_EDITOR=\"sed -i 1s/^pick/reword/\" GIT_EDITOR=\"printf \\\"%s\\n\\\" \\\"$2\\\" >\" git rebase -i \"$1^\";\n git push -f;\n}; f" | |
# count total commits in a repo | |
git rev-list --all --count | |
# edit all commit messages | |
git rebase -i --root |
# Terminal Cheat Sheet | |
pwd # print working directory | |
ls # list files in directory | |
cd # change directory | |
~ # home directory | |
.. # up one directory | |
- # previous working directory | |
help # get help | |
-h # get help |
# BEGIN WordPress | |
<IfModule mod_rewrite.c> | |
RewriteEngine On | |
RewriteBase / | |
RewriteCond %{REQUEST_URI} !/wp-admin | |
RewriteCond %{REQUEST_URI} !/wp-includes | |
RewriteCond %{REQUEST_URI} !/wp-login\.php$ | |
RewriteCond %{REQUEST_URI} !/wp-content | |
RewriteCond %{REQUEST_URI} !/feed |
// MIT Licensed | |
// Author: jwilson8767 | |
/** | |
* Waits for an element satisfying selector to exist, then resolves promise with the element. | |
* Useful for resolving race conditions. | |
* | |
* @param selector | |
* @returns {Promise} | |
*/ |
#!/bin/sh | |
# This script will fetch the Googlevideo ad domains and append them to the Pi-hole block list. | |
# Run this script daily with a cron job (don't forget to chmod +x) | |
# More info here: https://discourse.pi-hole.net/t/how-do-i-block-ads-on-youtube/253/136 | |
# File to store the YT ad domains | |
FILE=/etc/pihole/youtube.hosts | |
# Fetch the list of domains, remove the ip's and save them | |
curl 'https://api.hackertarget.com/hostsearch/?q=googlevideo.com' \ |
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:
{% if permalink == "/" %} | |
{% set canonicalUrl = metadata.canonicalUrl %} | |
{% else %} | |
{% set canonicalUrl = metadata.canonicalUrl + page.url %} | |
{% endif %} | |
<link rel="canonical" href="{{ canonicalUrl }}"> | |
{# Social meta #} | |
{% if section == "articles" %} | |
<meta property="og:type" content="blog"> | |
{% else %} |
// please check https://docs.netlify.com/configure-builds/environment-variables/#declare-variables for most up to date info | |
// this was created before those docs existed | |
process.env = { | |
/** | |
* | |
* AUTOMATICALLY SET BY NETLIFY. IMMUTABLE! | |
* docs: https://www.netlify.com/docs/continuous-deployment/#environment-variables | |
* | |
*/ |