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
ctrl + t | |
alt + n | |
~ | |
http://austringer.net/wp/index.php/2008/06/07/mac-os-x-and-midnight-commander-the-missing-insert-key/ | |
Mac OS X and Midnight Commander: The Missing “Insert” Key | |
By Wesley R. Elsberry | 2008/06/07 83 Comments |
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 | |
if ($a > $b) { | |
echo "a est plus grand que b"; | |
} elseif ($a == $b) { | |
echo "a est égal à b"; | |
} else { | |
echo "a est plus petit que b"; | |
} | |
?> |
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
Via windows | |
NBTSTAT -A IP | |
Via Macos / tools prévu pour le netbios | |
smbutil status IP |
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
You should be able to add the following line to the /etc/cloud/cloud.cfg near the top: | |
preserve_hostname: true | |
Then set the hostname in the /etc/hostname | |
The hostname should now persist after reboots. |
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 | |
echo "Votre base est en cours de restauration.......<br>"; | |
system("mysqldump -h localhost -u user -pPASSWORD DB > dump.sql"); | |
echo "C'est dumpé"; | |
?> |
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
iptables -A INPUT -p tcp --dport 80 -m state --state NEW -m recent --name BLACKLIST --set | |
iptables -A INPUT -p tcp --dport 80 -m state --state NEW -m recent --name BLACKLIST --update --seconds 10 --hitcount 10 --rttl -j DROP | |
SUPPRESSION | |
iptables -D INPUT -p tcp --dport 80 -m state --state NEW -m recent --name BLACKLIST --update --seconds 10 --hitcount 10 --rttl -j DROP | |
SUPPRESSION DE MA LISTE | |
iptables -L --line-numbers |
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
pkill -HUP -t pts/6 |
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
Install PIP | |
download file : | |
wget https://bootstrap.pypa.io/get-pip.py | |
install pip | |
python get-pip.py | |
install AWS | |
pip install awscli |
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
You can add a 1 GB swap to your instance with these commands: | |
sudo dd if=/dev/zero of=/swapfile bs=1M count=1024 | |
sudo mkswap /swapfile | |
sudo swapon /swapfile | |
To enable it by default after reboot, add this line to /etc/fstab: | |
/swapfile swap swap defaults 0 0 | |
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
ExtendedStatus on | |
<Location /server-status> | |
SetHandler server-status | |
Require all denied | |
Require ip xxx.xxx.xxx.xxx xxx.xxx.xxx.xxx | |
Require host domaine.ltd | |
</Location> | |