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
| ### Keybase proof | |
| I hereby claim: | |
| * I am awaterma on github. | |
| * I am awaterma (https://keybase.io/awaterma) on keybase. | |
| * I have a public key ASAGbQ3xU72avPIK4rFLCzDZLX8nIB9rAJ8i41_shjpMWwo | |
| To claim this, I am signing this object: |
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
| var domain = require('domain'); | |
| module.exports = function domainifier(req, res, next) { | |
| var d = domain.create(); | |
| d.on("error", function(error) { | |
| console.log("Found an error!", error); | |
| }); | |
| d.add(req); | |
| d.add(res); | |
| d.add(next); |
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
| "use strict"; | |
| var concatStream = require("concat-stream"); | |
| var domain = require("domain"); | |
| var fs = require("fs"); | |
| var http = require("http"); | |
| var url = require("url"); | |
| http.createServer(function (req, res) { | |
| var parsedUrl = url.parse(req.url, true); |
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
| private void addCustomMetadata(Context context, Deposit deposit, Item item) throws SwordServerException { | |
| Entry entry = deposit.getSwordEntry().getEntry(); | |
| try { | |
| /* Load all custom namespaces */ | |
| MetadataSchema[] schemas = MetadataSchema.findAll(context); | |
| TreeMap<String,Integer> map = new TreeMap<String,Integer>(); | |
| for (int i = 0; i < schemas.length; i++) { | |
| map.put(schemas[i].getNamespace(), i); |