Skip to content

Instantly share code, notes, and snippets.

View rqbanerjee's full-sized avatar

Rajat Banerjee rqbanerjee

View GitHub Profile
# RubyEncoder v2.4.1.1
if not self.respond_to?(:RGLoader_load,:include_private) then _d = _d0 = File.expand_path(File.dirname(__FILE__)); while 1 do _f = _d + '/rgloader/loader.rb'; break if File.exist?(_f); _d1 = File.dirname(_d); if _d1 == _d then raise "Ruby script '"+__FILE__+"' is protected by RubyEncoder and requires a RubyEncoder loader to be installed. Please visit the http://www.rubyencoder.com/loaders/ RubyEncoder web site to download the required loader and unpack it into '"+_d0+"/rgloader/' directory in order to run this protected file."; exit; else _d = _d1; end; end; require _f; end; RGLoader_load('AAQAAAAEgAAAAIAAAAAA/xV8pvcQqzuFVks4HH7hERq+nhOKlxT6z2ZwoisJLS/MvVgSzv3fGP/dqKEV6MvV2/7byE5XckAqiXRxNUGLVvFuy+dSNvVG9l5RL+aU9XSkwgeuTRk8d8haQLAy4kIFU4J+MoqoAlbdbzJdAscfC2lp1QN35GoyOUBA0XCsG5zuFwAAAAQAAAAoPgAAFi9JMpQ5tZYsqIEJfq0OXqnvUeJ/QVe2COhP3RvRlsqNeHkz3lLYLM3ByrkDcSYevx5K8K5oLVTDyWOgc9FQe1poAPC17bL7ZEzv+h/FtCe0EaCwgWs+qPWjQtp8pgr9e4mFVVKgVvgpnRN7aIzLIAD5fIGTznrEmKrzacCo1c3bqLx6UtQWV2rluTM5qiI+6WSP
@rqbanerjee
rqbanerjee / CloudFormationTemplate-PiaSoftware-sso-beta.json
Created September 14, 2018 17:45
PiaSoft Flow Logs Viewer v1.11 Beta for SSO
{
"AWSTemplateFormatVersion": "2010-09-09",
"Description": "PiaSoft Flow Logs Viewer v1.11 SSO Beta Setup Template",
"Mappings": {
"RegionMap": {
"us-east-1": {
"AMI": "ami-0a5d147fcb0c91f2c"
},
"us-east-2": {
"AMI": ""
@rqbanerjee
rqbanerjee / piasoft_iam_role.json
Created December 18, 2017 03:22
PiaSoftware Flow Log Viewer IAM Role
{
"Version": "2012-10-17",
"Statement": [
{
"Action": [
"ec2:DescribeFlowLogs",
"ec2:DescribeNetworkInterfaces",
"ec2:DescribeRegions",
"ec2:DescribeSecurityGroups",
"ec2:DescribeInstances",
@rqbanerjee
rqbanerjee / newrelic_post_rabbit_stats.rb
Created August 17, 2017 20:04
Post metrics to New Relic
def collect_rabbit_data
queues = {}
regex = "/#{INTERESTING_QUEUES.join('|')}/"
raw_output = `/sbin/rabbitmqctl list_queues`
lines = raw_output.split("\n")
lines.each do |l|
if l.match(regex)
parts = l.split("\t")
queues[parts[0]] = parts[1].to_i
end
@rqbanerjee
rqbanerjee / gist:11298809
Created April 25, 2014 18:28
vayama stack trace
HTTP Status 500 -
type Exception report
message
description The server encountered an internal error () that prevented it from fulfilling this request.
exception