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
public static void main(String[] args) { | |
System.out.println( "Wildfly Version: "+ getWildflyVersion() ); | |
} |
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 com.sumzerotrading.data.StockTicker; | |
import com.zerosumtrading.interactive.brokers.client.InteractiveBrokersClient; | |
import com.sumzerotrading.marketdata.ILevel1Quote; | |
import com.sumzerotrading.marketdata.QuoteType; | |
public class MarketDataStocksExample { | |
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
public void placeEquityOrder() { | |
InteractiveBrokersClientInterface ibClient = InteractiveBrokersClient.getInstance("localhost", 7999, 1); | |
ibClient.connect(); | |
StockTicker amazonTicker = new StockTicker("AMZN"); | |
String orderId = ibClient.getNextOrderId(); | |
int shares = 500; | |
TradeOrder order = new TradeOrder(orderId, amazonTicker, shares, TradeDirection.SELL); | |
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
public void placeFuturesOrder() { | |
InteractiveBrokersClientInterface ibClient = InteractiveBrokersClient.getInstance("localhost", 7999, 1); | |
ibClient.connect(); | |
//Create a crude oil futures ticker | |
FuturesTicker futuresTicker = new FuturesTicker(); | |
futuresTicker.setSymbol("CL"); | |
futuresTicker.setExpiryMonth(4); | |
futuresTicker.setExpiryYear(2016); | |
futuresTicker.setExchange(Exchange.NYMEX); |
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
public void placeCurrencyOrder() { | |
InteractiveBrokersClientInterface ibClient = InteractiveBrokersClient.getInstance("localhost", 7999, 1); | |
ibClient.connect(); | |
CurrencyTicker eurTicker = new CurrencyTicker(); | |
eurTicker.setSymbol("EUR"); | |
eurTicker.setCurrency("USD"); | |
eurTicker.setExchange(Exchange.IDEALPRO); | |
String orderId = ibClient.getNextOrderId(); | |
int amount = 50000; |
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
{ | |
"type": "file", | |
"enabled": true, | |
"connection": "file:///", | |
"config": null, | |
"workspaces": { | |
"root": { | |
"location": "/var/log/jms-jmx/output-jms-jmx", | |
"writable": false, | |
"defaultInputFormat": null |
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
require 'net/http' | |
require 'json' | |
url = 'http://lweb.lynden.com/WildflyRegistry/registry/services' | |
webapps = [] | |
resp = Net::HTTP.get_response(URI.parse(url)) | |
resp_text = resp.body | |
data =JSON.parse(resp_text) | |
servers = data | |
# Loop through each Wildfly server that was found |
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
webapps.each do |app| | |
url = "http://nexus.lynden.com/repo/com/lynden/" + app[:name] + "/" + app[:version] + "/" + app[:name] + "-" + app[:version] + ".war" | |
puts "deploying " + app[:name] + "-" + app[:version] | |
fullFileNameNew = app[:name] + "-" + app[:version] | |
fullPath = "/tmp/" + app[:name] + "-" + app[:version] | |
fullPath = fullPath + ".war" | |
puts "Full path to apps " + fullPath | |
remote_file fullPath do |
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 | |
FILENAME=$1 | |
PATH=$PATH:/usr/local/java/bin | |
cd /usr/local/wildfly/bin | |
./jboss-cli.sh -c --user=myUser --password=myPassword --command="deploy $FILENAME" |
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
GeocodingService gs = new GeocodingService(); | |
GeocoderRequest geocoderRequest = new GeocoderRequest("Sao Paulo"); | |
gs.getGeocoding(geocoderRequest, (GeocodingResult[] results, GeocoderStatus status) -> { | |
System.out.println("Geocoding Results: " + results.length); | |
System.out.println("Lat long" + results[0].getGeometry().getLocation() ); | |
}); |