-
This is a numbered list.
-
I'm going to include a fenced code block as part of this bullet:
Code More Code
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Highlight search string matches in results | |
const HighlightedResults = (): JSX.Element | null => { | |
if (inputValue) { | |
const match = item.name.match(new RegExp(inputValue, 'i')) | |
const MatchEl = (): ReactElement | null => { | |
if (match && match.length) { | |
return <strong>{match[0]}</strong> | |
} else { | |
return null | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// EmailInput wraps an HTML `input` and adds some app-specific styling. | |
const EmailInput = React.forwardRef((props, ref) => ( | |
<input ref={ref} {...props} type="email" className="AppEmailInput" /> | |
)); | |
class App extends Component { | |
emailRef = React.createRef(); | |
render() { | |
return ( |
There are certain files created by particular editors, IDEs, operating systems, etc., that do not belong in a repository. But adding system-specific files to the repo's .gitignore
is considered a poor practice. This file should only exclude files and directories that are a part of the package that should not be versioned (such as the node_modules
directory) as well as files that are generated (and regenerated) as artifacts of a build process.
All other files should be in your own global gitignore file. Create a file called .gitignore
in your home directory and add anything you want to ignore. You then need to tell git where your global gitignore file is.
git config --global core.excludesfile ~/.gitignore
git config --global core.excludesfile %USERPROFILE%\.gitignore
hello world!
<script>alert("this should be escaped")</script>
`
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
if [[ "$1" != "" ]]; then | |
BASEBRANCH="$1" | |
else | |
BASEBRANCH="development" | |
fi | |
git remote prune origin | |
echo "Base Branch: ${BASEBRANCH}" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function binarySearch(data, value) { | |
while (true) { | |
var mid = parseInt(data.length/2); | |
if (value === data[mid]) { | |
return data[mid]; | |
} else if (value > data[mid]) { | |
data = data.slice(mid); | |
} else if (value < data[mid]) { | |
data = data.slice(0, mid); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function quickSort(data) { | |
if (data.length < 1) { | |
return []; | |
} | |
var left = []; | |
var right = []; | |
var pivot = data[0]; | |
for (var i=1; i<data.length; i++) { |
NewerOlder