In the index.js or the root file of your cypress/support folder,
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 changeMac() { | |
| local mac=$(openssl rand -hex 6 | sed 's/\(..\)/\1:/g; s/.$//') | |
| sudo ifconfig en0 ether $mac | |
| sudo ifconfig en0 down | |
| sudo ifconfig en0 up | |
| echo "Your new physical address is $mac" | |
| } |
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 filterInPlace(array, condition) { | |
| let iOut = 0; | |
| for (let i = 0; i < array.length; i++) { | |
| if (condition(array[i])) { | |
| array[iOut++] = array[i]; | |
| } | |
| } | |
| array.length = iOut; | |
| } |
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
| # Backup | |
| docker exec CONTAINER /usr/bin/mysqldump -u root --password=root DATABASE > backup.sql | |
| # Restore | |
| cat backup.sql | docker exec -i CONTAINER /usr/bin/mysql -u root --password=root DATABASE | |
This guide to install SSL cert on Nginx as a reverse proxy, and forward the request to a node app
https://www.nginx.com/blog/using-free-ssltls-certificates-from-lets-encrypt-with-nginx/
$ apt-get update
$ sudo apt-get install certbot
$ apt-get install python-certbot-nginxOlderNewer