git branch | grep -v "master" | xargs git branch -D
- will delete all branches except master
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
# dump | |
/Applications/MySQLWorkbench.app/Contents/MacOS/mysqldump --host=your_host --port=3306 --default-character-set=utf8mb4 --user=your_user --protocol=tcp -p your_database > dump.sql | |
# restore | |
/Applications/MySQLWorkbench.app/Contents/MacOS/mysql --host=your_host --port=3306 --default-character-set=utf8mb4 --user=your_user --protocol=tcp -p your_database < dump.sql | |
# when you see error "ERROR 1227 (42000) at line 18: Access denied; you need (at least one of) the SUPER, SYSTEM_VARIABLES_ADMIN or SESSION_VARIABLES_ADMIN privilege(s) for this operation" | |
From dump.sql file remove following lines: | |
-- SET @@SESSION.SQL_LOG_BIN= 0; | |
-- SET @@GLOBAL.GTID_PURGED=/*!80000 '+'*/ ''; |
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 App = props => { | |
const didMountRef = useRef(false) | |
useEffect(() => { | |
if (didMountRef.current) { | |
doStuff() | |
} else didMountRef.current = 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
npm install -g win-node-env |
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
.container { | |
display: flex; | |
} | |
.box { | |
flex: 1; | |
display: flex; | |
justify-content: center; | |
} |
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
if (!global._babelPolyfill) { | |
import 'babel-polyfill'; | |
} |
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
docker stop $(docker container ls -a -q) && docker system prune -a -f --volumes |
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
- Start reindex | |
php bin/magento indexer:reindex |
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
@mixin close($color, $size: 30px) { | |
position: relative; | |
display: inline-block; | |
width: $size; | |
height: $size; | |
border: 0; | |
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
1.Install | |
sudo add-apt-repository ppa:gophers/archive | |
sudo apt update | |
sudo apt-get install golang-go | |
2. Insert path to ~/.bashrc | |
#Golang variables | |
export GOROOT=/usr/lib/go | |
export GOPATH=$HOME/go | |
export PATH=$PATH:$GOROOT/bin:$GOPATH/bin | |
3. Apply changes |
NewerOlder