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
require 'json' | |
require 'ipaddr' | |
class IPAddr | |
def to_cidr_string | |
mask = @mask_addr.to_s(2).count('1') | |
"#{self.to_s}/#{mask}" | |
end | |
def aws_region=(region) | |
@aws_region = region |
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
# | |
# Usage exampe: `cut -f5 access.log | ruby ./is_aws_addr.rb` | |
# | |
AWS_IP_RANGES_PATH = '/tmp/aws-ip-ranges.json' | |
require 'json' | |
require 'ipaddr' | |
class IPAddr |
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
filter { | |
ruby { | |
code => " | |
if event['request_header_cf_ray'] and not event['geoip'] | |
iata = event['request_header_cf_ray'].split('-')[1] | |
event['request_header_cf_ray_datacenter'] = iata | |
event['request_header_cf_ray_geolocation'] = @location[iata] | |
event['geoip'] = { | |
'location' => [@location[iata].split(',')[1].to_f, @location[iata].split(',')[0].to_f], |
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
(salt)[root@master1-salt1 salt]# PYTHONPATH=/vagrant/salt/:/vagrant/salt/src/salttesting/ pylint --rcfile=/vagrant/salt/.pylintrc /vagrant/salt/ | |
No handlers could be found for logger "salttesting.pylintplugins.pep8" | |
Traceback (most recent call last): | |
File "/usr/bin/pylint", line 4, in <module> | |
lint.Run(sys.argv[1:]) | |
File "/usr/lib/python2.6/site-packages/pylint/lint.py", line 829, in __init__ | |
linter.load_plugin_modules(plugins) | |
File "/usr/lib/python2.6/site-packages/pylint/lint.py", line 275, in load_plugin_modules | |
module.register(self) | |
File "/vagrant/salt/src/salttesting/salttesting/pylintplugins/pep263.py", line 92, in register |
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
% ACM Transactions bibliography style (24-Jan-88 version) | |
% A lot like abbrv.bst, but names come out "Last, initials", and in \sc. | |
% Some dates are parenthesized. | |
% | |
% History | |
% 2/ 6/86 (HWT) Original version, by Howard Trickey. | |
% 3/ 5/86 (HWT) Put in pp. everywhere but articles, as per ACM style. | |
% 1/24/88 (OP&HWT) Updated for BibTeX version 0.99a, Oren Patashnik; | |
% corrected the abbreviations to "Mar." and "Sept."; | |
% 10/12/2013 (Marvin Frick) replaced " and " with german " und ". |
This file has been truncated, but you can view the full file.
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
[31m/Users/marv/.rvm/scripts/base:11 [32m/Users/marv/.rvm/scripts/base:11[37m then if[[ -z 5.0.0 ]] | |
[31m/Users/marv/.rvm/scripts/base:21 [32m/Users/marv/.rvm/scripts/base:21[37m export __array_start rvm_path | |
[31m/Users/marv/.rvm/scripts/base:26 [32m/Users/marv/.rvm/scripts/base:26[37m if[[ -n 5.0.0 ]] | |
[31m/Users/marv/.rvm/scripts/base:11 [32m/Users/marv/.rvm/scripts/base:11[37m then if[[ -z 5.0.0 ]] | |
[31m/Users/marv/.rvm/scripts/base:21 [32m/Users/marv/.rvm/scripts/base:21[37m export __array_start rvm_path | |
[31m/Users/marv/.rvm/scripts/base:26 [32m/Users/marv/.rvm/scripts/base:26[37m if[[ -n 5.0.0 ]] | |
[31m/Users/marv/.rvm/scripts/base:28 [32m/Users/marv/.rvm/scripts/base:28[37m then__array_start=1 | |
[31m/Users/marv/.rvm/scripts/base:28 [32m/Users/marv/.rvm/scripts/base:28[37m then__array_start=1 | |
[31m/Users/marv/.rvm/scripts/base:33 [32m/Users/marv/.rvm/scripts/base:33[37m if(( 0 == 0 )) | |
[31m/Users/marv/.rvm/scripts/base:35 [32m/Users/marv/.rvm/scripts/base:35[37m then[[ -n 022 ]] |