Skip to content

Instantly share code, notes, and snippets.

Siva Prasad 2013techsmarts

Block or report user

Report or block 2013techsmarts

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
@2013techsmarts
2013techsmarts / application.properties
Last active Mar 23, 2019
GraphQL servlet configuration in Springboot application.properties
View application.properties
graphql.servlet.mapping=/graphql
graphql.servlet.enabled=true
graphql.servlet.corsEnabled=true
View Logstash_Configuration
input {
file {
path => "/Users/sjana/Documents/POC/ELK/APIGEE_LOG.log"
start_position => "beginning"
sincedb_path => "/dev/null"
}
}
filter {
csv {
separator => "|"
View MessageLoggingPolicy_Syslog_Configuration
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<MessageLogging async="false" continueOnError="false" enabled="true" name="TestEnv-Message-Logging">
<DisplayName>TestEnv Message Logging</DisplayName>
<Syslog>
<Message>{messageId}|{apiproxy.name}|{response.status.code}|{target.received.start.timestamp}|{target.received.end.timestamp}|{environment.name}|{client.received.start.timestamp}|{client.sent.end.timestamp}</Message>
<Host>127.0.0.1</Host>
<Port>514</Port>
</Syslog>
</MessageLogging>
View ProdEnvMessageLogging policy
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<MessageLogging async="false" continueOnError="false" enabled="true" name="ProdEnv-Message-Logging">
<DisplayName>ProdEnv Message Logging</DisplayName>
<Syslog>
<Message>{environment.name}</Message>
<Host>10.0.0.2</Host>
<Port>448</Port>
</Syslog>
</MessageLogging>
View TestEnvMessageLogging policy
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<MessageLogging async="false" continueOnError="false" enabled="true" name="TestEnv-Message-Logging">
<DisplayName>TestEnv Message Logging</DisplayName>
<Syslog>
<Message>{environment.name}</Message>
<Host>10.0.0.1</Host>
<Port>556</Port>
</Syslog>
</MessageLogging>
View MessageLoggingPolicyProxy
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<ProxyEndpoint name="default">
<Description/>
<FaultRules/>
<PreFlow name="PreFlow">
<Request/>
<Response/>
</PreFlow>
<PostFlow name="PostFlow">
<Request/>
View Base64EncodeDecode
var Base64={_keyStr:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=",encode:function(r){var e,t,a,o,n,c,d,h="",C=0;for(r=Base64._utf8_encode(r);C<r.length;)o=(e=r.charCodeAt(C++))>>2,n=(3&e)<<4|(t=r.charCodeAt(C++))>>4,c=(15&t)<<2|(a=r.charCodeAt(C++))>>6,d=63&a,isNaN(t)?c=d=64:isNaN(a)&&(d=64),h=h+Base64._keyStr.charAt(o)+Base64._keyStr.charAt(n)+Base64._keyStr.charAt(c)+Base64._keyStr.charAt(d);return h},decode:function(r){var e,t,a,o,n,c,d="",h=0;for(r=r.replace(/[^A-Za-z0-9\+\/\=]/g,"");h<r.length;)e=Base64._keyStr.indexOf(r.charAt(h++))<<2|(o=Base64._keyStr.indexOf(r.charAt(h++)))>>4,t=(15&o)<<4|(n=Base64._keyStr.indexOf(r.charAt(h++)))>>2,a=(3&n)<<6|(c=Base64._keyStr.indexOf(r.charAt(h++))),d+=String.fromCharCode(e),64!=n&&(d+=String.fromCharCode(t)),64!=c&&(d+=String.fromCharCode(a));return d=Base64._utf8_decode(d)},_utf8_encode:function(r){r=r.replace(/\r\n/g,"\n");for(var e="",t=0;t<r.length;t++){var a=r.charCodeAt(t);a<128?e+=String.fromCharCode(a):a>127&&a<2048?(e+=String.fromCha
View DecodeBase64Encoded String
var base64EncodedKey = context.getVariable("request.queryparam.key");
var key = Base64.decode(base64EncodedKey);
print(key);
View JS Base64 Encode Decode Policy
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<Javascript async="false" continueOnError="false" enabled="true" timeLimit="200" name="JS-Base64EncodeDecode">
<DisplayName>JS-Base64EncodeDecode</DisplayName>
<IncludeURL>jsc://Base64EncodeDecode.js</IncludeURL>
<ResourceURL>jsc://DecodeBase64String.js</ResourceURL>
</Javascript>
View Continuous with dump on exit
java -XX:StartFlightRecording=settings=default -XX:FlightRecorderOptions=dumponexit=true,dumponexitpath=C:\tmp
You can’t perform that action at this time.