Skip to content

Instantly share code, notes, and snippets.

@jdmedeiros
jdmedeiros / regexCheatsheet.js
Created January 10, 2019 23:44 — forked from sarthology/regexCheatsheet.js
A regex cheatsheet 👩🏻‍💻 (by Catherine)
let regex;
/* matching a specific string */
regex = /hello/; // looks for the string between the forward slashes (case-sensitive)... matches "hello", "hello123", "123hello123", "123hello"; doesn't match for "hell0", "Hello"
regex = /hello/i; // looks for the string between the forward slashes (case-insensitive)... matches "hello", "HelLo", "123HelLO"
regex = /hello/g; // looks for multiple occurrences of string between the forward slashes...
/* wildcards */
regex = /h.llo/; // the "." matches any one character other than a new line character... matches "hello", "hallo" but not "h\nllo"
regex = /h.*llo/; // the "*" matches any character(s) zero or more times... matches "hello", "heeeeeello", "hllo", "hwarwareallo"
const URL = 'https://letsrevolutionizetesting.com/challenge.json';
function makeCall(url) {
return fetch(url).then(response => response.json());
}
function startChallenge(url) {
return makeCall(url)
.then(response => {
const {follow} = response;
@jdmedeiros
jdmedeiros / 00. tutorial.md
Created May 6, 2021 00:54 — forked from maxivak/00. tutorial.md
Importing/Indexing database (MySQL or SQL Server) in Solr using Data Import Handler
@jdmedeiros
jdmedeiros / postgresql_install.sh
Created November 4, 2022 22:16 — forked from coder4web/postgresql_install.sh
PostgreSQL install and setup
:'SET PASSWORD
sudo -i -u postgres
psql
\password postgres
'
# RHEL / CentOS 8
# https://www.postgresql.org/download/linux/redhat/
# https://www.postgresql.org/docs/current/runtime.html
dnf list installed |grep postgresql