This file contains 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
When I run: | |
$ jasmine-node --verbose . | |
I get absolutely no output. | |
Same with: | |
$ jasmine-node --verbose frisby.spec.js | |
This file contains 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 static com.codahale.metrics.MetricRegistry.name; | |
import java.lang.management.ManagementFactory; | |
import java.util.Collections; | |
import java.util.Date; | |
import java.util.HashMap; | |
import java.util.Iterator; | |
import java.util.Map; | |
import javax.management.AttributeNotFoundException; |
This file contains 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 | |
cd "`dirname "$0"`" | |
jmxOpts="-Dcom.sun.management.jmxremote.port=1099 -Dcom.sun.management.jmxremote.ssl=false -Dcom.sun.management.jmxremote.password.file=config/jmxremote.password" | |
nohup java $jmxOpts -Djava.security.egd=file:/dev/./urandom -jar my-app-1.0.0.jar 1>/dev/null 2>stderr.log & |
This file contains 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 requests, sys, getopt | |
try: | |
opts, args = getopt.getopt(sys.argv[1:], "p:", ["port="]) | |
except getopt.GetoptError: | |
print('springboot.py -p <port>') | |
sys.exit(2) |
This file contains 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
@When("^an Adjustment of \\+?(-?\\d+) is received$") | |
public void an_Adjustment_of_x_is_received(int qty) throws Throwable { | |
//send "qty" as input | |
} |
This file contains 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 javax.jms.ConnectionFactory; | |
import javax.sql.DataSource; | |
import org.apache.activemq.ActiveMQConnectionFactory; | |
import org.apache.activemq.RedeliveryPolicy; | |
import org.apache.activemq.camel.component.ActiveMQComponent; | |
import org.apache.activemq.pool.PooledConnectionFactory; | |
import org.apache.camel.builder.RouteBuilder; | |
import org.apache.camel.spring.spi.SpringTransactionPolicy; | |
import org.springframework.boot.SpringApplication; |
This file contains 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 static final DateTimeFormatter TIME_FORMATTER = new DateTimeFormatterBuilder().appendPattern("yyyy-MM-dd HH:mm:ss") | |
.appendFraction(ChronoField.MICRO_OF_SECOND, 0, 6, true).appendPattern("X").toFormatter(); |
This file contains 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 com.boohoo.esbdefused.metrics; | |
import java.util.Arrays; | |
import java.util.concurrent.TimeUnit; | |
import com.codahale.metrics.Counter; | |
import com.codahale.metrics.Gauge; | |
import com.codahale.metrics.Histogram; | |
import com.codahale.metrics.Meter; | |
import com.codahale.metrics.MetricRegistry; |
This file contains 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
set -e | |
for dir in ../* | |
do | |
echo | |
echo "==============" | |
echo "$dir" | |
echo "==============" | |
git --git-dir=$dir/.git --work-tree=$PWD/$dir checkout master | |
git --git-dir=$dir/.git --work-tree=$PWD/$dir pull | |
git --git-dir=$dir/.git --work-tree=$PWD/$dir status -s |
This file contains 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 static <T extends SpecificRecord> T getSpecificRecord( | |
String json, Schema writersSchema, Class<T> recordClass) | |
throws IOException, NoSuchMethodException, InvocationTargetException, IllegalAccessException { | |
Schema readersSchema = (Schema) recordClass.getMethod("getClassSchema").invoke(null); | |
Decoder jsonDecoder = DecoderFactory.get().jsonDecoder(writersSchema, json); | |
ResolvingDecoder resolvingDecoder = DecoderFactory.get().resolvingDecoder(writersSchema, readersSchema, jsonDecoder); | |
DatumReader<T> reader = new SpecificDatumReader<>(recordClass); | |
return reader.read(null, resolvingDecoder); | |
} |