git fetch origin && git reset --hard origin/master && git clean -f -d
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
let elements = document.querySelectorAll('.selector'); | |
<!-- LEGACY --> | |
for (i = 0; i < elements.length; i++) { | |
console.log(elements[i]); | |
} | |
<!-- New --> | |
elements.forEach(function(element) { | |
console.log(element); |
stop all containers: docker kill $(docker ps -q)
remove all containers docker rm $(docker ps -a -q)
remove all docker images docker rmi $(docker images -q)
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 | |
REPONAME=$1 | |
BRANCH=$2 | |
stream_directory=/home/deployment_user/stream_$BRANCH/ | |
deploy_directory=/var/www/qa/$REPONAME/$BRANCH/ | |
if [ $BRANCH == "master" ] | |
then |
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
<?php | |
$host = "https://www.example.com"; | |
$target_dir = './download'; | |
$urls = [ | |
'/img/header.png', | |
'/js/example.js', | |
'/styles/global.css', | |
]; |
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
<?php | |
$cols = [ | |
'col1', | |
'col2', | |
'col3', | |
'col4', | |
'col5', | |
'col6', | |
'col7', |
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
Exporting From DB | |
mysqldump -u root -ppassword databasename | pv --progress --size 10g -t -e -r -a > databasedump.sql | |
Importing | |
pv sqlfile.sql | mysql -uxxx -pxxxx dbname |