How To Clear All iptables Rules
1 2 3 4 5 6 7 |
iptables -P INPUT ACCEPT iptables -P FORWARD ACCEPT iptables -P OUTPUT ACCEPT iptables -t nat -F iptables -t mangle -F iptables -F iptables -X |
1 2 3 4 5 6 7 |
iptables -P INPUT ACCEPT iptables -P FORWARD ACCEPT iptables -P OUTPUT ACCEPT iptables -t nat -F iptables -t mangle -F iptables -F iptables -X |
Had an old server, needed to get root.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 |
service mysql stop ~OR~ service mysqld stop cd /etc/init.d; ./mysql<tab> start --skip-grant-tables mysql> update mysql.user set Password=PASSWORD('secret') where user='root'; mysql> flush privileges; mysql> ^D service mysql stop service mysql start ~OR~ service mysqld stop service mysqld start |
For MySQL 5.7: https://dev.mysql.com/doc/refman/5.7/en/resetting-permissions.html For some other v5.7 nodes, I had admin access via a different user’s login, so all I needed was this:
1 2 |
ALTER USER 'root'@'localhost' IDENTIFIED BY 'secret'; ALTER USER 'root'@'%' IDENTIFIED BY 'secret'; |
To revert the local branch:
1 |
$ git reset --hard HEAD~1 |
To revert the remote branch AFTER the previous step has been performed:
1 |
$ git push origin HEAD --force |
I was running out of memory constantly on Yosemite 10.10.5 and found the following article: https://discussions.apple.com/message/26929324?start=555&tstart=0 Edited and reposted without permission below… Disconnect any external or secondary monitors, if any is present. The video memory allocation leak can also happen if you have a system with an integrated card, like Intel, with no external monitors […]
Every once in a while there is a hiccup in my internet service and every host that Nagios monitors shows DOWN. In those situations, I do not need the hundreds of the emails and text messages generated by Nagios. Here is the procedure for resetting Nagios v3.5.0 running on MacOSX 10.6.8 via a MacPorts install: […]
update mysql.user set password=PASSWORD(‘Your New Password Here’) where user=’root’;
Quit Safari. Open Keychain Access (Applications / Utilities) Select Passwords on the left. Delete the keychain for that site. Relaunch Safari. From the Safari menu bar click Safari / Preferences then select the Autofill tab. Make sure: User names and passwords is selected. Navigate to that site. You should be prompted to save your login […]
1 2 |
UPDATE wp_users SET user_pass = MD5('new_password_here') WHERE user_login = "login_to_change_here"; |
Power off the unit fully. On the LEFT side of the keyboard, hold down CTL-OPT-SHIFT while pressing and holding the power button on the right side for 5 seconds. All four keys must be released AT THE SAME TIME. Nothing should happen. Then power back up…