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
| cat > /etc/logrotate.d/redis <<__EOF__ | |
| /var/log/redis/*.log { | |
| weekly | |
| rotate 10 | |
| copytruncate | |
| delaycompress | |
| compress | |
| notifempty | |
| missingok | |
| } |
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
| <?xml version="1.0"?> | |
| <root> | |
| <item> | |
| <name>Filco Multimedia Profile</name> | |
| <!-- https://github.com/tekezo/Karabiner/blob/version_10.11.0/src/bridge/generator/keycode/data/KeyCode.data --> | |
| <identifier>private.switch_profile</identifier> | |
| <autogen>__KeyToKey__ KeyCode::PC_PRINTSCREEN, KeyCode::VK_CONSUMERKEY_MUSIC_PREV</autogen> | |
| <autogen>__KeyToKey__ KeyCode::PC_SCROLLLOCK, KeyCode::VK_CONSUMERKEY_MUSIC_PLAY</autogen> | |
| <autogen>__KeyToKey__ KeyCode::PC_PAUSE, KeyCode::VK_CONSUMERKEY_MUSIC_NEXT</autogen> |
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
| require 'ipaddr' | |
| ref_ip = IPAddr.new("255.0.0.1/8") | |
| Ip.all.each { |ip| | |
| puts [ ip.ip, ref_ip.to_s ].join(', ') | |
| ip.update_attribute('reference_ip', ref_ip.to_s) | |
| ref_ip = IPAddr.new(ref_ip.to_i + 1,Socket::AF_INET ) | |
| }; nil |
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
| start_rule=1000 | |
| 1.upto(251) { |e| | |
| puts "ipfw add %s pipe %s from any to 172.20.1.%s out xmit lan1" % [ start_rule, start_rule, e ] | |
| puts "ipfw add %s pipe %s from 172.20.1.%s to any in recv lan1" % [ start_rule, start_rule, e ] | |
| puts "ipfw pipe %s config bw 10Mbit/s" % [ start_rule ] | |
| start_rule += 1 | |
| } | |
| start_rule=2000 | |
| 1.upto(251) { |e| |
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
| data=<<__EOF__ | |
| 127.0.0.1 | iptraf | |
| 127.0.0.1 | root | |
| 195.138.138.0/255.255.255.192 | iptraf | |
| 94.190.186.125 | statista | |
| 94.190.192.0/255.255.255.192 | iptraf | |
| 94.190.192.10 | gatekeeper | |
| localhost | builder | |
| localhost | callcenter | |
| localhost | goonet |
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
| a = %w( | |
| 10.55.2.150 94.190.178.98 | |
| 10.30.200.9 94.190.183.152/29 | |
| 10.30.54.24 94.190.183.13 | |
| 10.32.100.131 94.190.178.114 | |
| 10.16.77.100 94.190.178.66) | |
| a.each_slice(2) { |k,v| | |
| puts "#{k} -> #{v}" | |
| puts "update ip_list set ip = '#{v}', ip_old = '#{k}' where ip = '#{k}';" |
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
| /var/log/rsync-backupninja.log { | |
| weekly | |
| missingok | |
| rotate 4 | |
| compress | |
| delaycompress | |
| notifempty | |
| create 640 root adm | |
| } |
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 ruby | |
| # encoding: utf-8 | |
| c = %w( 101 102 103 104 105 106 107 108 201 202 205 206 207 209 301 302 303 304 | |
| 305 306 308 401 402 403 405 406 407 408 501 502 503 504 505 506 507 508 601 602 | |
| 603 604 605 607 608 801 802 803 805 806 807 808 809 901 902 903 904 905 906 908 | |
| 909 910 917 919 1001 1002 1003 1004 1005 1006 1009 1101 1102 1104 1105 1106 | |
| 1107 1108 1109 1110 1111 1112 1201 1202 1203 1204 1205 1206 1301 1302 1303 1305 | |
| 1306 1307 1308 1309 1401 1402 1403 1404 1405 1406 1407 1408 1409 1410 1501 1502 | |
| 1503 1504 1505 1506 1507 1508 1509 1510 1511 1512 1514 1515 1517 1518 1520 1523 |
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 ruby | |
| # encoding: utf-8 | |
| # simple script to extract IP addresses for specific sites | |
| # http://www.dkh.minfin.bg/bg/pubs/4/546 | |
| require 'socket' | |
| hosts = <<__EOF__ | |
| www.bet365.com |
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 DBI; | |
| use CGI; | |
| use Sys::Hostname; | |
| use warning; | |
| use strict; | |
| my $database = 'to be set'; | |
| my $dbserevr = 'server ip/host'; | |
| my $dbusername = 'username'; |