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
# let's dig the server | |
dig example.com | |
# from the DNS answer we are interested in the authority section | |
#;; AUTHORITY SECTION: | |
#example.com. 79275 IN NS a.iana-servers.net. | |
#example.com. 79275 IN NS b.iana-servers.net. | |
# now we find out all subdomains | |
dig @a.iana-servers.net example.com axfr |
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
# flush file system buffers (cache > disk) | |
sudo sync | |
# free page cache | |
sudo -s "echo 1 > /proc/sys/vm/drop_caches" | |
# free inodes and dentries cache | |
sudo -s "echo 2 > /proc/sys/vm/drop_caches" | |
# free page cache, inodes and dentries cache |
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
# do not forget to escape % to \% in date's parameter | |
* * * * * /usr/bin/php /path/script.php > /var/log/output-`date +\%Y\%m\%d\%H\%M`.log 2>&1 |
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
javascript:el=document.createElement('script');el.src='http://code.jquery.com/jquery-latest.min.js';document.body.appendChild(el); |
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
sudo /etc/init.d/mysql stop | |
# we have to --skip-networking to prevent connections out of localhost because mysql will now run absolutely unprotected | |
sudo /usr/sbin/mysqld --skip-grant-tables --skip-networking & | |
mysql -u root | |
# reload privileges from grant tables (free cached memory) | |
FLUSH PRIVILEGES; | |
USE mysql; | |
# set your new password | |
UPDATE user SET Password = PASSWORD('new password') WHERE Host = 'localhost' AND User = 'root'; | |
# reload the privileges again |
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
# APPLICABLE FOR UBUNTU/DEBIAN | |
# install encfs and fuse | |
sudo apt-get install fuse-utils encfs | |
# add fuse module to Linux Kernel | |
sudo modprobe fuse | |
# add fuse to end of /etc/modules to autoload fuse module | |
sudo nano /etc/modules |