This file contains hidden or 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
Show hidden characters
{ | |
"presets": [ | |
[ | |
"@babel/env", | |
{ | |
"targets": { | |
"node": "current" | |
}, | |
"shippedProposals": true | |
} |
This file contains hidden or 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
// Match function declarations for converting to function expressions | |
const regex = /^(export\s?)?(async\s?)?function ([^(]+)(\([^)]*\))(\s*:[^{]+)? {/ | |
// replace: $1const $3 = $2$4$5 => { | |
// class methods... caution! this also replaces if statements | |
const regex2 = /([^(]+)\((.+)\) {/ | |
// replace $1 = ($2) => { |
This file contains hidden or 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/zsh | |
# | |
# Checks local branches to see if the branch is on remote and tracking remote that is still there. | |
# | |
# Does not delete branches automatically, but will provide a command in cases where you have a local | |
# branch that is not on remote and is tracking a now-gone remote branch. | |
# | |
main() { |
This file contains hidden or 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 copyItem(text) { | |
const tempElement = document.createElement('div'); | |
tempElement.innerHTML = text; | |
const copy = (event) => { | |
if (event.clipboardData) { | |
event.clipboardData.setData('text/html', tempElement.innerHTML); | |
event.clipboardData.setData('text/plain', tempElement.innerHTML); | |
event.preventDefault(); | |
} |
This file contains hidden or 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/zsh | |
# Script that tests if a TEST_BRANCH can be merged successfully into | |
# a TARGET_BRANCH. | |
# | |
# Usage: git_merge_test.sh [-i] [TARGET_BRANCH] [TEST_BRANCH] | |
# | |
# Example: git_merge_test.sh dev feature-new-stuff | |
# | |
# Inspect conflicts: the script will clean up automatically unless you |
OlderNewer