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
find . -type f -exec chmod 644 {} \; // 644 permission for files | |
find . -type d -exec chmod 755 {} \; // 755 permission for directory | |
find ./var -type d -exec chmod 777 {} \; // 777 permission for var folder | |
find ./pub/media -type d -exec chmod 777 {} \; | |
find ./pub/static -type d -exec chmod 777 {} \; | |
chmod 777 ./app/etc | |
chmod 644 ./app/etc/*.xml | |
chmod -R g+w * |
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
nc -u -w 2 -v 159.89.213.212 13543 |
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
sudo ufw status | |
sudo ufw disable | |
sudo ufw default deny incoming | |
sudo ufw default allow outgoing | |
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
sudo iptables -L -n -v | |
sudo netstat -plutn |
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
Problem description: | |
Write a method that takes in 2 parameters: | |
A string containing either "A" or "B" indicating the recipient of a bank transfer. | |
An integer array containing the amount for each of those transfers. So for instance, if the String is BA and the array is [1,2], it means A transfers 1 to B, then B transfers 2 to A. | |
This method should return what the initial balance for each bank account A and B need to be so that they never go into negative balance. | |
In the example above, it should return [1, 1]. | |
Initial balance [1, 1]. | |
A transfers 1 to B [0, 2]. | |
B transfers 2 to A [2, 0]. |
OlderNewer