Make this file executable and add it to your path
grco [some-text]
#!/bin/bash | |
git branch --merged develop | grep -v 'develop$' | xargs git branch -d |
function quickSort(data) { | |
if (data.length < 1) { | |
return []; | |
} | |
var left = []; | |
var right = []; | |
var pivot = data[0]; | |
for (var i=1; i<data.length; i++) { |
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); |
#!/bin/bash | |
if [[ "$1" != "" ]]; then | |
BASEBRANCH="$1" | |
else | |
BASEBRANCH="development" | |
fi | |
git remote prune origin | |
echo "Base Branch: ${BASEBRANCH}" |
hello world!
<script>alert("this should be escaped")</script>
`
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
// 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 ( |