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
| /* | |
| DevDependencies: | |
| stylelint | |
| stylelint-processor-styled-components | |
| stylelint-config-styled-components | |
| stylelint-config-standard | |
| */ | |
| { | |
| "processors": ["stylelint-processor-styled-components"], | |
| "extends": [ |
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
| # Package manager files | |
| **/node_modules/* | |
| **/package-lock.json | |
| **/yarn.lock | |
| # Build/executable files | |
| **/build/* | |
| **/bundles/* | |
| **/dist/* | |
| **/bin/* |
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
| # Package manager files | |
| **/node_modules/* | |
| **/package-lock.json | |
| **/yarn.lock | |
| # Build/executable files | |
| **/build/* | |
| **/bundles/* | |
| **/dist/* |
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
| const fs = require('fs') | |
| const path = require('path') | |
| const { BundleAnalyzerPlugin } = require('webpack-bundle-analyzer') | |
| const DEFAULT_ANALYZER_PORT = 8888 | |
| const createBundleAnalyzerPlugin = (reportTitle, portOffset = 0) => new BundleAnalyzerPlugin({ | |
| // Avoid CI crash issue | |
| analyzerMode: 'static', | |
| openAnalyzer: false, | |
| reportTitle, |
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
| #### Git branch on terminal | |
| # Reference: https://stackoverflow.com/questions/17333531/how-can-i-display-the-current-branch-and-folder-path-in-terminal | |
| parse_git_branch() { | |
| git branch 2> /dev/null | sed -n -e 's/^\* \(.*\)/[\1]/p' | |
| } | |
| COLOR_DEF=$'\e[0m' | |
| COLOR_USR=$'\e[38;5;243m' | |
| COLOR_DIR=$'\e[38;5;197m' | |
| COLOR_GIT=$'\e[38;5;39m' |
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
| # Open Chrome chrome with CORS disabled | |
| # (!!CAUTION: This will remove all history/plugins/preferences) | |
| open -n -a /Applications/Google\ Chrome.app/Contents/MacOS/Google\ Chrome --args --user-data-dir="/tmp/chrome_dev_test" --disable-web-security |
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
| [alias] | |
| aliases = "!f() { git config --global -l | grep alias | sort; }; f" | |
| br = branch | |
| cl = clone | |
| st = status | |
| a = add | |
| cm = commit -m | |
| cmn = commit -m --no-verify | |
| cam = commit -am | |
| co = checkout |
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
| // Place your key bindings in this file to override the defaults | |
| [ | |
| { | |
| "key": "shift+cmd+n", | |
| "command": "explorer.newFolder" | |
| }, | |
| { | |
| "key": "cmd+n", | |
| "command": "explorer.newFile" | |
| } |
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
| { | |
| "eslint.workingDirectories": ["./src"], | |
| "typescript.tsdk": "src/node_modules/typescript/lib" | |
| } |
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
| import React from 'react' | |
| import {Prompt} from 'react-router-dom' | |
| import {CustomModal} from './CustomModal' | |
| export class RouteLeavingGuard extends React.Component { | |
| state = { | |
| modalVisible: false, | |
| lastLocation: null, | |
| confirmedNavigation: false, | |
| } |