Skip to content

Instantly share code, notes, and snippets.

View 6220119's full-sized avatar
🌴

Nguyen Vu Cuong (Ralph) 6220119

🌴
View GitHub Profile
@6220119
6220119 / regex_html_tag.md
Created June 10, 2023 00:08 — forked from gavin-asay/regex_html_tag.md
Regex and You: Matching an HTML Tag

Regex and You: Matching an HTML Tag

Regular expressions, ever versatile, will help up locate HTML tags in a string today.

Summary

Pattern matching HTML strings serves at least one crucial function in web dev: sanitizing user input. Allowing user-submitted strings opens one's application to significant vulnerability. Supposing, for example, some ne'er-do-well on the internet submitted a comment that includes <script src="[path]/stealYourData.js"></script>. Regular expressions allow us to match HTML tags in a string, because HTML tags conform to a certain pattern:

  • begin and end with brackets (<>)
  • contain a string name consisting of one or more lowercase letters, like p, a, div, strong, script
@6220119
6220119 / p4merge4git.md
Created August 15, 2023 12:06 — forked from tony4d/p4merge4git.md
Setup p4merge as a visual diff and merge tool for git
@6220119
6220119 / explainer.md
Created October 11, 2023 23:58 — forked from xiaochengh/explainer.md
Explainer: Font Metrics Override Descriptors

Explainer: Font Metrics Override Descriptors

** Not standardized yet!! **

Spec

This doc explains descriptors ascent-override, descent-override, line-gap-override and advance-override for CSS @font-face rule.

Usage:

@6220119
6220119 / outbound-email-with-cloudflare.md
Created November 13, 2023 05:36 — forked from irazasyed/outbound-email-with-cloudflare.md
Using Gmail SMTP with Cloudflare Email Routing: A Step-by-Step Guide

Using Gmail SMTP with Cloudflare Email Routing: Step-by-Step Guide

Learn how to send emails through Gmail SMTP with Cloudflare Email Routing in this comprehensive guide.

Step 1: Enable 2-Factor Authentication

To proceed with this method, ensure that you have enabled two-factor authentication for your Google account. If you haven't done so already, you can follow the link to set it up β†’ Enable 2FA in your Google account.

Step 2: Create an App Password for Mail

{
"Bad": {
"Bored": ["Indifferent", "Apathetic"],
"Busy": ["Pressured", "Rushed"],
"Stressed": ["Overwhelmed", "Out of control"],
"Tired": ["Sleepy", "Unfocussed"]
},
"Fearful": {
"Scared": ["Helpless", "Frightened"],
"Anxious": ["Overwhelmed", "Worried"],