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
wget -q https://www.dan.me.uk/torlist/ -O - |sort -u > tor-ips.txt | |
cat /var/log/apache2/other_vhosts_access.log | awk '{print $2}' |sort -u > all-ips | |
comm -12 tor-ips.txt all-ips > tor-hits | |
grep -f tor-hits /var/log/apache2/other_vhosts_access.log | |
`note www.dan.me.uk limits 1 pull every 30 minutes` |
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
First, you’ll need to install support for Python virtualenvs. Although some folks have said not to use sudo when installing via Pip, I found it necessary: | |
sudo -H pip install virtualenv | |
Note that you might need to install Pip first, which—fortunately—is pretty straightforward (easy_install pip). | |
Once you have virtualenv support installed, then create a virtualenv into which you’ll install the Ansible dependencies: | |
virtualenv --system-site-packages ansible | |
This will create a virtualenv called “ansible” in a directory named “ansible” in the current working directory. I used the --system-site-packages flag to allow this virtualenv to have access to the system site packages. I saw various recommendations both for and against this approach; my line of thinking was that this would help prevent some duplication of modules. |
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 /home/ -name 'version.php' -path '*wp-includes/*' -print -exec grep '$wp_version =' {} \; -exec echo '' \; > all-wp-versions-2.txt |
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
Mounting a s3ql file system to the S3 compatible file system at Softlayer on an Ubuntu 16 Xenial VSI | |
apt install s3ql | |
nano /etc/s3ql.authinfo | |
[softlayer-s3] | |
backend-login: somelogin |
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
SELECT node_counter.totalcount as count, node.title, DATE_FORMAT(FROM_UNIXTIME(node.created), '%e %b %Y') | |
FROM node_counter, node WHERE node.nid = node_counter.nid and | |
FROM_UNIXTIME(node.created, '%Y') = 1999 order by count desc limit 20 |
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
Don't Actually Run All The Commands At Once!!! | |
update accession set system_mtime = NOW(); | |
update active_edit set system_mtime = NOW(); | |
update agent_contact set system_mtime = NOW(); | |
update agent_corporate_entity set system_mtime = NOW(); | |
update agent_family set system_mtime = NOW(); | |
update agent_person set system_mtime = NOW(); | |
update agent_software set system_mtime = NOW(); | |
update archival_object set system_mtime = NOW(); |
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
SELECT * FROM accession WHERE system_mtime LIKE '2020-03-08 02:00%' | |
SELECT * FROM active_edit WHERE system_mtime LIKE '2020-03-08 02:00%' | |
SELECT * FROM agent_contact WHERE system_mtime LIKE '2020-03-08 02:00%' | |
SELECT * FROM agent_corporate_entity WHERE system_mtime LIKE '2020-03-08 02:00%' | |
SELECT * FROM agent_family WHERE system_mtime LIKE '2020-03-08 02:00%' | |
SELECT * FROM agent_person WHERE system_mtime LIKE '2020-03-08 02:00%' | |
SELECT * FROM agent_software WHERE system_mtime LIKE '2020-03-08 02:00%' | |
SELECT * FROM archival_object WHERE system_mtime LIKE '2020-03-08 02:00%' | |
SELECT * FROM aspace-dts_schema_info WHERE system_mtime LIKE '2020-03-08 02:00%' | |
SELECT * FROM assessment WHERE system_mtime LIKE '2020-03-08 02:00%' |
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
SELECT * FROM accession WHERE user_mtime LIKE '2020-03-08 02:00%' | |
SELECT * FROM active_edit WHERE user_mtime LIKE '2020-03-08 02:00%' | |
SELECT * FROM agent_contact WHERE user_mtime LIKE '2020-03-08 02:00%' | |
SELECT * FROM agent_corporate_entity WHERE user_mtime LIKE '2020-03-08 02:00%' | |
SELECT * FROM agent_family WHERE user_mtime LIKE '2020-03-08 02:00%' | |
SELECT * FROM agent_person WHERE user_mtime LIKE '2020-03-08 02:00%' | |
SELECT * FROM agent_software WHERE user_mtime LIKE '2020-03-08 02:00%' | |
SELECT * FROM archival_object WHERE user_mtime LIKE '2020-03-08 02:00%' | |
SELECT * FROM aspace-dts_schema_info WHERE user_mtime LIKE '2020-03-08 02:00%' | |
SELECT * FROM assessment WHERE user_mtime LIKE '2020-03-08 02:00%' |
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
UPDATE accession set publish = 1; | |
UPDATE agent_corporate_entity set publish = 1; | |
UPDATE agent_family set publish = 1; | |
UPDATE agent_person set publish = 1; | |
UPDATE agent_software set publish = 1; | |
update archival_object set publish = 1; | |
update classification set publish = 1; | |
update classification_term set publish = 1; | |
update digital_object set publish = 1; |
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
A bunch of ec2s are created with disable_api_termination true which makes it really hard to kill them all when the time comes. | |
This just changes all the disable_api_termination vars from true to false so they can easily `terraform destroy` | |
``` | |
find . -type f -name "app[[:digit:]]*.tf" | xargs sed -i '' 's/disable_api_termination = true/disable_api_termination = false/g' | |
terraform apply | |
``` |
OlderNewer