Markdown
// Prettify Runkit HTML | |
// (Not relevant for demo) | |
const html = '<div id="a">asdf</div>'; | |
const prettier = require("prettier"); | |
'<pre>' + | |
prettier | |
.format(html, {parser: 'html', htmlWhitespaceSensitivity: 'ignore'}) | |
.replace(/</g, '<') + | |
'</pre>'; |
import React from 'react'; | |
export function findReactChildRecursively(children, findFunction) { | |
const found = React.Children.toArray(children).find(findFunction); | |
if (found) { | |
return true; | |
} else if (children?.props?.children) { | |
findReactChildRecursively(children.props.children); | |
} |
alias ...=../.. | |
alias ....=../../.. | |
alias .....=../../../.. | |
alias ......=../../../../.. | |
alias 1='cd -' | |
alias 2='cd -2' | |
alias 3='cd -3' | |
alias 4='cd -4' | |
alias 5='cd -5' | |
alias 6='cd -6' |
#!/usr/bin/env bash | |
# TODO: | |
# - DRY relevant parts | |
singlequotes=`find -type f \( -iname \*.js -o -iname \*.ts \) -not -path '*node_modules/*' -exec cat \{\} \; | tr -cd \' | wc -c` | |
doublequotes=`find -type f \( -iname \*.js -o -iname \*.ts \) -not -path '*node_modules/*' -exec cat \{\} \; | tr -cd '"' | wc -c` | |
total=$(($singlequotes + $doublequotes)) |
-
Set up a
docker-compose.yaml
file (file content at the bottom of this page). -
Also create a
data/mysql
folder in your project. -
In order to set up a volume for MySQL in Docker Toolbox, we will need a VirtualBox Shared Folder, just like mentioned in Fixing Volumes in Docker Toolbox.
VirtualBox by default has a
c/Users
Shared Folder that we can use for this (as long as your project is withinC:\Users
. Verify that this shared folder is set up properly:
-
Add a new volume to the
mydatabase
service in thedocker-compose.yaml
for the database files. Because we are using docker-toolbox and VirtualBox, we need an absolute path, starting with//c/
:volumes:
- //c/Users/your_username/projects/wordpress-docker-stack/data/mysql:/var/lib/mysql
Test of defined widths as per https://stackoverflow.com/questions/36121672/set-table-column-width-via-markdown/57420043#57420043
property |
description |
---|---|
border-bottom-right-radius |
Defines the shape of the bottom-right |
# Git Aliases (sorted alphabetically with some inculsive functions) | |
# Adapted from oh-my-zsh git alias plugin. "compdef" is a Z shell autocompletion function, disabled throughout where applicable. | |
alias g='git' | |
alias ga='git add' | |
alias gaa='git add --all' | |
alias gapa='git add --patch' | |
alias gb='git branch' |