Web Notes
2016.08.20
Using Liquid in Jekyll - Live with Demos
Liquid is a simple template language that Jekyll uses to process pages for your site. With Liquid you can output complex contents without additional plugins.
Summary of the egrep
metacharacters1:
Metacharacter | Matches | |
---|---|---|
. | dot | Matches any one character |
[. . .] | character class | Matches any one character listed |
[^. . .] | negated character class | Matches any one character not listed |
\char | escaped character | When char is a metacharacter, or the escaped combination is not otherwise special, matches the literal char |
? | question | One allowed, but it is optional |
* | star | Any number allowed, but all are optional |
+ | plus | At least one required; additional are optional |
{min, max} | specified range† | Min required, max allowed |
^ | caret | Matches the position at the start of the line |
$ | dollar | Matches the position at the end of the line |
\< | word boundary† | Matches the position at the start of a word |
\> | word boundary† | Matches the position at the end of a word |
| | alternation | Matches either expression it separates |
(. . .) | parentheses | Limits scope of alternation, provides grouping for the quantifiers, and “captures” for backreferences |
\1, \2, ... | backreference† | Matches text previously matched within first, second, etc., set of parentheses |
†not supported by all versions of egrep
There’re three types of escaped items:
\
and a metacharacter is a metasequence to match the literal character (for example, \*
matches a literal asterisk).\
and selected non-metacharacters becomes a metasequence with an implementation-defined meaning (for example, \<
often means “start of word”).\
and any other character defaults to simply matching the charater literal (that is, the backslash is ignored).Friedl, Jeffrey E. F. Mastering Regular Expressions. 3rd ed. Sebastapol, CA: O’Reilly, 2006. ↩
Frank Lin
Web Notes
2016.08.20
Liquid is a simple template language that Jekyll uses to process pages for your site. With Liquid you can output complex contents without additional plugins.
Tools
2020.09.12
Location directives are essential when working with Nginx. They can be located within server blocks or other location blocks. Understanding how location directives are used to process the URI of client request can help make the request handling less unpredictable.
Tutorials
2020.01.09
IKEv2, or Internet Key Exchange v2, is a protocol that allows for direct IPSec tunnelling between networks. It is developed by Microsoft and Cisco (primarily) for mobile users, and introduced as an updated version of IKEv1 in 2005. The IKEv2 MOBIKE (Mobility and Multihoming) protocol allows the client to main secure connection despite network switches, such as when leaving a WiFi area for a mobile data area. IKEv2 works on most platforms, and natively supported on some platforms (OS X 10.11+, iOS 9.1+, and Windows 10) with no additional applications necessary.