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
| <plugin> | |
| <groupId>org.apache.tomcat.maven</groupId> | |
| <artifactId>tomcat7-maven-plugin</artifactId> | |
| <version>2.2</version> | |
| </plugin> |
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
| <plugin> | |
| <groupId>org.codehaus.gmavenplus</groupId> | |
| <artifactId>gmavenplus-plugin</artifactId> | |
| <version>1.5</version> | |
| <executions> | |
| <execution> | |
| <goals> | |
| <goal>compile</goal> | |
| <goal>testCompile</goal> | |
| </goals> |
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
| curl -i --header "content-type: text/xml" -d @src/test/resources/bks-b64-corporatetoken-request.xml http://localhost:8080/phoenix-sample-soapcorptoken/public/soap |
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
| /** | |
| * Util to get a soapmessage from a string. | |
| */ | |
| private SOAPMessage getSoapMessageFromString(String xml) throws SOAPException, IOException { | |
| MessageFactory factory = MessageFactory.newInstance() | |
| factory.createMessage(new MimeHeaders(), new ByteArrayInputStream(xml.getBytes('UTF-8'))) | |
| } |
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
| buildscript { | |
| repositories { | |
| mavenCentral() | |
| } | |
| dependencies { | |
| classpath 'org.junit:junit-gradle:5.0.0-ALPHA' | |
| } | |
| } | |
| apply plugin: 'java' |
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
| http = require("http"); | |
| function sleep(milliSeconds, callback) { | |
| var startTime = new Date().getTime(); | |
| while (new Date().getTime() < startTime + milliSeconds); | |
| } | |
| server = http.createServer(function (request, response) { | |
| console.log(request); | |
| console.log('a request'); |
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 groovy | |
| def cli = new CliBuilder(usage: 'cli', stopAtNonOption: false) | |
| cli.n('Force numeric on property set') | |
| cli.h(longOpt: 'help', 'Show usage information') | |
| cli.c(longOpt: 'config-server', args:1, argName:'server', 'Config server url') | |
| cli.p(longOpt: 'profile', args:1, argName:'profile', 'Profile') | |
| cli.l(longOpt: 'label', args:1, argName:'label', 'Label') | |
| cli.u(longOpt: 'credentials', args:1, argName:'user:pass', 'Basic credentials') |
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 main | |
| import ( | |
| "flag" | |
| "fmt" | |
| ) | |
| func main() { | |
| var cmd string | |
| var i bool |
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 main | |
| import "fmt" | |
| import "net/http" | |
| func main() { | |
| resp, error := http.Get("https://www.google.com/") | |
| fmt.Println(resp) | |
| fmt.Println(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
| #!/usr/bin/env groovy | |
| def proxyParams = "" | |
| def jsonUri = "https://api.gopro.com/v2/channels/feed/playlists/photo-of-the-day.json?platform=web" | |
| //def data = get(jsonUri) | |
| def commandJson = "wget -q -O - " + jsonUri + proxyParams | |
| def data = commandJson.execute().text | |
| json = new groovy.json.JsonSlurper().parseText(data) |