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.util.logging.Logger; | |
import javax.servlet.http.HttpServletRequest; | |
import javax.ws.rs.GET; | |
import javax.ws.rs.Path; | |
import javax.ws.rs.Produces; | |
import javax.ws.rs.QueryParam; | |
import javax.ws.rs.core.Context; | |
import javax.ws.rs.core.Response; |
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.io.IOException; | |
import java.net.URISyntaxException; | |
import java.nio.file.Files; | |
import java.nio.file.Paths; | |
import java.security.KeyFactory; | |
import java.security.NoSuchAlgorithmException; | |
import java.security.PrivateKey; | |
import java.security.interfaces.RSAPublicKey; | |
import java.security.spec.InvalidKeySpecException; | |
import java.security.spec.PKCS8EncodedKeySpec; |
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
node { | |
echo 'Results included as an inline comment exactly how they are returned as of Jenkins 2.121, with $BUILD_NUMBER = 1' | |
echo 'No quotes, pipeline command in single quotes' | |
sh 'echo $BUILD_NUMBER' // 1 | |
echo 'Double quotes are silently dropped' | |
sh 'echo "$BUILD_NUMBER"' // 1 | |
echo 'Even escaped with a single backslash they are dropped' | |
sh 'echo \"$BUILD_NUMBER\"' // 1 | |
echo 'Using two backslashes, the quotes are preserved' | |
sh 'echo \\"$BUILD_NUMBER\\"' // "1" |
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.image('cloudbees/java-build-tools:0.0.6').inside { | |
sshagent(['github-ssh-credentials']) { | |
sh """ | |
git version | |
git config --local user.email \\"[email protected]\\" | |
git config --local user.name \\"Cyrille Le Clerc\\" | |
git clone [email protected]:cyrille-leclerc/a-test-repo.git | |
date &> now.txt |
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 python | |
import networkx as nx | |
import matplotlib.pyplot as plt | |
import math | |
from random import random | |
from numpy import arange | |
N = 1000 | |
K = 5 |
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
<xsl:call-template name="dateTimeToEpoch"> | |
<xsl:with-param name="dateTimeValue" select="$value"/> | |
</xsl:call-template> | |
<xsl:template name="dateTimeToEpoch"> | |
<xsl:param name="dateTimeValue"/> | |
<xsl:value-of select="( dateTime($dateTimeValue) - xsd:dateTime('1970-01-01T00:00:00') ) div xsd:dayTimeDuration('PT1S')"/> | |
</xsl:template> | |
<xsl:template name="epochToDateTime"> |
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
<?xml version='1.0' encoding='iso-8859-1'?> | |
<!-- XHTML-to-Markdown converter by Andrew Green, Article Seven, http://www.article7.co.uk/ --> | |
<!-- This work is licensed under the Creative Commons Attribution-ShareAlike License. To view a copy of this license, visit http://creativecommons.org/licenses/by-sa/2.0/ or send a letter to Creative Commons, 559 Nathan Abbott Way, Stanford, California 94305, USA. --> | |
<xsl:stylesheet version='1.0' xmlns:h="http://www.w3.org/1999/xhtml" xmlns:xsl='http://www.w3.org/1999/XSL/Transform'> | |
<xsl:output method='text' encoding='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
<html> | |
<body> | |
<h1>Our Navigation</h1> | |
<p>I'm writing an example xhtml document to get converted into markdown!</p> | |
<h2>Examples</h2> | |
<h3>Text formatting</h3> | |
<p>Sometimes with longer <em>paragraphs</em><br/>we just want a new line <strong>immediately</strong>.</p> | |
<div>Divs are block elements too, and people don't always put their text in p tags.</div> | |
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
<?xml version="1.0" encoding="UTF-8" ?> | |
<!-- | |
Name: RSS feed date format to Symphony date format | |
Version: 1.0 | |
Author: Brian Zerangue <[email protected]> | |
URL: http://symphony21.com/downloads/xslt/file/20457/ | |
Description: | |
Convert RSS feed date format to Symphony date format | |
Convert RFC 2822 timestamp format to ISO date format minus the time info (Symphony CMS date format) |