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
| import java.net.http.*; | |
| var client = HttpClient.newHttpClient(); | |
| var uri = new URI("https://riimusolutions.com"); | |
| var request = HttpRequest.newBuilder().uri(uri).build(); | |
| var response = client.send(request, HttpResponse.BodyHandlers.ofString()); | |
| System.out.println(response.body()); | |
| /exit |
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
| #!/bin/bash | |
| # thanks to Niels de Vos (https://gist.github.com/nixpanic/5460521), this script | |
| # is based on his one | |
| RED='\033[1;31m' | |
| GREEN='\033[1;32m' | |
| NC='\033[0m' # No Color |
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
| def versions = [] | |
| def f = new File('mock-version-tags.txt') | |
| f.eachLine { versions << it } | |
| def versionComparator = { a, b -> | |
| def VALID_TOKENS = /._/ | |
| a = a.tokenize(VALID_TOKENS) | |
| b = b.tokenize(VALID_TOKENS) | |
| for (i in 0..<Math.max(a.size(), b.size())) { |
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
| # check if job exists | |
| curl -XGET 'http://jenkins/checkJobName?value=yourJobFolderName' --user user.name:YourAPIToken | |
| # with folder plugin | |
| curl -s -XPOST 'http://jenkins/job/FolderName/createItem?name=yourJobName' --data-binary @config.xml -H "Content-Type:text/xml" --user user.name:YourAPIToken | |
| # without folder plugin | |
| curl -s -XPOST 'http://jenkins/createItem?name=yourJobName' --data-binary @config.xml -H "Content-Type:text/xml" --user user.name:YourAPIToken | |
| # create folder |
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
| # Docker Machine for Consul | |
| docker-machine \ | |
| create \ | |
| -d virtualbox \ | |
| consul-machine | |
| # Start Consul | |
| docker $(docker-machine config consul-machine) run -d --restart=always \ | |
| -p "8500:8500" \ | |
| -h "consul" \ |
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
| def writer = new FileWriter('sample2.xml') | |
| // Define 2 tables | |
| def tables =[] | |
| def dept = new Table(tableName:'departments') | |
| dept.columns << new Column(name:'id', type:'number(4,0)', nullable:false) | |
| dept.columns << new Column(name:'dname', type:'varchar2(14)', remarks:'Department name') | |
| tables << dept | |
| def emp = new Table(tableName:'employees', remarks:'All employees known in HR system') |
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
| #!/bin/bash | |
| # Bash shell script for generating self-signed certs. Run this in a folder, as it | |
| # generates a few files. Large portions of this script were taken from the | |
| # following artcile: | |
| # | |
| # http://usrportage.de/archives/919-Batch-generating-SSL-certificates.html | |
| # | |
| # Additional alterations by: Brad Landers | |
| # Date: 2012-01-27 |
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
| #!/bin/sh | |
| # Sublime Text 3 install with Package Control | |
| # http://simonewebdesign.it/install-sublime-text-3-on-linux/ | |
| # Run this script with: | |
| # $ curl -L git.io/sublimetext | sh | |
| # Detect the architecture |
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
| input { | |
| file { | |
| type => "rodslog" | |
| start_position => beginning | |
| debug => true | |
| sincedb_path => "/root/logstash/.sincedb" | |
| path => [ "/root/logstash/logs/eu/var/log/irods/rodsLog.*" ] | |
| } | |
| } |
NewerOlder