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
server { | |
listen 443 http2 ssl; | |
server_name konesola.22.fi; | |
ssl_certificate /etc/letsencrypt/live/somedomain.com/fullchain.pem; | |
ssl_certificate_key /etc/letsencrypt/live/somedomain.com/privkey.pem; | |
add_header Strict-Transport-Security "max-age=31536000; includeSubDomains; preload" always; | |
add_header X-XSS-Protection 0 always; | |
add_header X-Content-Type-Options nosniff always; |
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
"Instructions" | |
1) Install index.php to some webserver, and run "latlongudp.pl" on the same server. | |
2) Then feed IPs to the latlongudp.pl server with something like this: | |
tail -F /var/log/nginx/access_log|perl -e '$|=1;while(<>){print "someidentifier,$1\n" if/(\d+\.\d+\.\d+\.\d+)/}'|nc -u somenode.example.com 5001 | |
Modify someidentifier to to fit your needs. |
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; | |
use Net::Amazon::Glacier; | |
use File::Find; | |
use Digest::SHA qw/sha256_hex/; | |
use File::Slurp; | |
use Net::Amazon::TreeHash; |
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 | |
# Efficient script to remove all files from MogileFS for defined domain | |
# Use with extreme caution... | |
use warnings; | |
use strict; | |
use MogileFS::Server; | |
MogileFS::Config->load_config; |
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 | |
# Efficient script to remove all files from some storage nodes | |
# Use with caution... | |
# Replicates status=="drain": | |
# UPDATE device SET status="drain" WHERE hostid IN(1,2,3,4) AND status="alive"; | |
# file_to_queue: | |
#| fid | devid | type | nexttry | failcount | flags | arg | |
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
package MogileFS::Plugin::DeprioritizeHosts; | |
use strict; | |
use warnings; | |
our $VERSION = '0.01'; | |
$VERSION = eval $VERSION; | |
use MogileFS::Util qw(error); |
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
location /dev1 { | |
client_body_temp_path /var/mogdata/dev1; | |
} | |
location /dev2 { | |
client_body_temp_path /var/mogdata/dev2; | |
} | |
location /dev3 { | |
client_body_temp_path /var/mogdata/dev3; | |
} | |
location /dev4 { |
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
May 27 08:18:46 storage1 mogilefsd[6920]: [monitor(6941)] Timeout contacting 10.1.26.130 dev 28 (http://10.1.26.130:47074/dev28/usage): took 2.00 seconds out of 2 allowed | |
May 27 08:19:06 storage1 mogilefsd[6943]: crash log: No answer in 4 seconds from parent to child MogileFS::Worker::Fsck=HASH(0x24cb038) [6943], dying at /usr/local/share/perl/5.10.0/MogileFS/Worker.pm line 186. | |
May 27 08:19:06 storage1 mogilefsd[6925]: crash log: No answer in 4 seconds from parent to child MogileFS::Worker::Replicate=HASH(0x24b8690) [6925], dying at /usr/local/share/perl/5.10.0/MogileFS/Worker.pm line 186. | |
May 27 08:19:06 storage1 mogilefsd[6928]: crash log: No answer in 4 seconds from parent to child MogileFS::Worker::Replicate=HASH(0x130c0c0) [6928], dying at /usr/local/share/perl/5.10.0/MogileFS/Worker.pm line 186. | |
May 27 08:19:06 storage1 mogilefsd[6942]: crash log: No answer in 4 seconds from parent to child MogileFS::Worker::JobMaster=HASH(0x24cae88) [6942], dying at /usr/local/share/perl/5.10.0/MogileFS/Worker.pm li |
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
worker_processes 1; | |
error_log /var/log/nginx/error.log notice; | |
events { | |
worker_connections 1024; | |
} | |
http { | |
include mime.types; |