Skip to content

Instantly share code, notes, and snippets.

@ari
ari / complex_salt_orchestrate.sls
Created August 21, 2017 00:30 — forked from whiteinge/complex_salt_orchestrate.sls
An example of a complex, multi-host Salt Orchestrate state that performs status checks as it goes
{% set backends = [ 'colo.dash', 'colo.flash' ] %}
{% set applications = [ 'willow_api', 'willow_services' ] %}
####
# Loop through the applications, and for each loop through the backends
####
{% for application in applications %}
{% for backend in backends %}
import java.time.*;
import java.time.format.DateTimeFormatter;
import java.time.format.FormatStyle;
import java.time.temporal.ChronoUnit;
import java.time.temporal.TemporalAdjusters;
import java.util.*;
import static java.time.temporal.TemporalAdjusters.*;
public class Java8DateTimeExamples {
https://github.com/jenkinsci/svnkit/commit/1b5bdd882c3b0f6ff9292fc98b852c899496c211
SVNKit has a weird error handling abstraction. It has 'SVNErrorMessage',
which can form a chain (just like exceptions can), and it has most of
the details of the errors. This object is also the one that's created at
the point of an error (thus its stack trace would be of great interest
although it doesn't keep it.)
Then it has SVNException, which is used to wrap SVNErrorMessage into an
Exception.
@ari
ari / Syns2Syms.java
Created August 29, 2011 22:43 — forked from bradfordcp/Syns2Syms.java
Converts a WordNet prolog file into a flat file useful for Solr synonym matching.
/**
* Based off of the Lucene prolog parser in the wordnet contrib package within the
* main Lucene project. It has been modified to remove the Lucene bits and generate
* a synonyms.txt file suitable for consumption by Solr. The idea was mentioned in
* a sidebar of the book Solr 1.4 Enterprise Search Server by Eric Pugh.
*
* @see <a href="http://lucene.apache.org/java/2_3_2/lucene-sandbox/index.html#WordNet/Synonyms">Lucene Sandbox WordNet page</a>
* @see <a href="http://svn.apache.org/repos/asf/lucene/dev/trunk/lucene/contrib/wordnet/">SVN Repository of the WordNet contrib</a>
* @see <a href="https://www.packtpub.com/solr-1-4-enterprise-search-server/book">Solr 1.4 Enterprise Search Server Book</a>
*/