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
| #!/usr/bin/env bash | |
| # | |
| # This was commented on the following page: | |
| # https://dev.mysql.com/doc/refman/8.0/en/converting-tables-to-innodb.html | |
| # | |
| # This script/command was tested and found to be harmless/non-destructive, surprisingly. ;-P | |
| # | |
| DBNAME="exampledb"; | |
| DBHOST="localhost"; | |
| DBUSER="someguy"; |
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
| mailq | |
| postsuper -d $(mail_queue_id) |
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
| sed -i 's/\/\*[^*]*DEFINER=[^*]*\*\///' dump2rds.sql |
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
| #!/usr/bin/perl | |
| use strict; | |
| use warnings; | |
| # install pQuery: | |
| # sudo cpanm pQuery; | |
| use pQuery; | |
| my $url = "https://github.com/sodonnell/plowbot/"; |
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
| yum -y install python34 python34-pip | |
| pip3 install --upgrade pip | |
| pip3 install awscli |
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
| echo -e "<FilesMatch \\.php$>\n\tSetHandler \"proxy:fcgi://127.0.0.1:9000\"\n</FilesMatch>\n\n" >> /etc/httpd/conf/httpd.conf; |
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
| sed -i 's/MyISAM/InnoDB/g' ./mydump.sql |
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
| #!/bin/bash | |
| sudo mkdir /mnt/iso | |
| sudo mount -o loop disk.image.iso /mnt/iso |
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
| # This assumes you're using the 192.168.0. class-C subnet. | |
| # Modify according to your specific subnet. | |
| # default http/https ports | |
| nmap 192.168.0.0/24 -P0 -p 80,443 | grep -B 4 "open" | |
| # commonly used http, proxy and other related ports | |
| nmap 192.168.0.0/24 -P0 -p 80,443,8000,8080,9000,9090 | grep -B 4 "open" |
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 perl -pi -e 's/Defaults requiretty//' /etc/sudoers |