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
static def parseOptions(args) { | |
cli = new CliBuilder(usage: 'slide') | |
cli.t(args: 1, argName: 'type', "type ('pdf', 'deck' or 'both')", required: true) | |
cli.f(args: 1, argName: 'file', 'file to convert', required: true) | |
def options = cli.parse(args) | |
options || System.exit(1) | |
inputFile = new File(options.f) | |
['deck', 'pdf', 'both'].contains(options.t) || exitWithMessage('Unknown type ' + options.t) | |
inputFile.exists() || exitWithMessage("File not found ${inputFile} ") |
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 | |
@Grapes( | |
@Grab('log4j:log4j:1.2.17') | |
) | |
import org.apache.log4j.Level | |
import org.apache.log4j.Logger | |
abstract class DefaultAppendable implements Appendable { | |
@Override |
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 org.openqa.selenium.firefox.FirefoxDriver | |
import org.openqa.selenium.firefox.FirefoxProfile | |
driver = { | |
FirefoxProfile firefoxProfile = new FirefoxProfile(); | |
firefoxProfile.setPreference("browser.download.folderList", 2); | |
firefoxProfile.setPreference("browser.download.manager.showWhenStarting", false); | |
firefoxProfile.setPreference("browser.download.dir", System.getProperty("user.home") + '/icons'); | |
firefoxProfile.setPreference("browser.helperApps.neverAsk.saveToDisk", "image/png"); | |
def firefoxDriver = new FirefoxDriver(firefoxProfile) |
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 | |
/** | |
* slides2png plays a dzslides presentation using WebDriver, captures each | |
* slide to a PNG and generates a shell script to collate the PNGs together | |
* into a PDF using convert (from ImageMagick). | |
* | |
* The URL of the presentation is passed as the sole argument to the script. | |
* If the presentation is local, specify the absolute path prefixed with the | |
* file:// protocol. |
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 fr.xebia; | |
import org.apache.catalina.Context; | |
import org.apache.catalina.LifecycleException; | |
import org.apache.catalina.Wrapper; | |
import org.apache.catalina.startup.Tomcat; | |
import org.apache.naming.resources.VirtualDirContext; | |
import org.junit.rules.ExternalResource; | |
import java.io.File; |
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 geowarin | |
import java.util.regex.Matcher | |
/** | |
* | |
* Date: 27/06/2014 | |
* Time: 22:40 | |
* @author Geoffroy Warin (http://geowarin.github.io) | |
*/ |
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.nio.file.FileSystems | |
import java.nio.file.FileVisitResult | |
import java.nio.file.Files | |
import java.nio.file.Path | |
import java.nio.file.PathMatcher | |
import java.nio.file.Paths | |
import java.nio.file.SimpleFileVisitor | |
import java.nio.file.attribute.BasicFileAttributes | |
import java.util.zip.ZipEntry | |
import java.util.zip.ZipOutputStream |
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
/* | |
* See the NOTICE file distributed with this work for additional | |
* information regarding copyright ownership. | |
* | |
* This is free software; you can redistribute it and/or modify it | |
* under the terms of the GNU Lesser General Public License as | |
* published by the Free Software Foundation; either version 2.1 of | |
* the License, or (at your option) any later version. | |
* | |
* This software is distributed in the hope that it will be useful, |
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"?> | |
<configuration> | |
<include resource="org/springframework/boot/logging/logback/base.xml"/> | |
<logger name="org.springframework.boot" level="INFO"/> | |
<logger name="org.springframework.security" level="ERROR"/> | |
<logger name="org.glassfish.jersey" level="INFO"/> | |
</configuration> |
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
web: java $JAVA_OPTS -jar target/*.jar |