Skip to content

Instantly share code, notes, and snippets.

View johntbush's full-sized avatar

john bush johntbush

View GitHub Profile
@johntbush
johntbush / sample.scala
Last active November 22, 2016 22:24
sample tree
package com.trax.platform.parse
import scala.annotation.tailrec
import org.json4s._
import org.json4s.native.Serialization
import org.json4s.native.Serialization.{read, write}
import org.json4s.FieldSerializer._
import JsonDSL._
import org.junit.Test
[ "074ebffd-11d4-42b5-b011-dd2b5353cb10", "0c1dba17-1af5-4353-9adf-3b7937b98793", "0d45321f-4d5d-42f1-83ac-9fc23eacaf74", "0e9a6a84-6484-4529-a399-ff694117718d", "11392a1b-780b-4638-b63e-d351a563ac9d", "14de3aa5-1d44-4d65-8646-5db5deb8d20e", "1639da42-a63e-4635-852b-880c7ba5ff51", "1653c97c-1f9f-4102-96dc-374ca80500c9", "1ad0ac56-e6f4-4bcb-aa0e-53ff3fbd9a02", "1b2a75e3-48ac-4554-b835-7885f747a3a1", "2466dd15-00ee-49d2-9eee-e777209e59a7", "2949424e-3f55-475e-be4f-633648d7721f", "4014c099-25a9-42e8-a1e6-4474769c6031", "43a2146f-e05e-4ac4-a5fd-a61a4a14a3ba", "4763f50f-f61a-4def-994d-fe6d34288517", "4797f27f-9a0c-4a32-a76a-e1c837f2d383", "4a4f918a-cae2-44e9-bcfe-0af9908b2a1e", "54b05f78-86d4-427b-83de-483fa63c4c11", "55c12416-41ee-4552-ac9d-81dd5fae6516", "5852460f-d629-4059-a3e0-04f7dc77e546", "595dc771-250c-4c35-b0d3-43d32dcfd701", "5a97c419-d86c-4f39-945b-08db325a8308", "5b88d548-c284-4765-b9e8-598129f18d9d", "5c620988-460a-4447-8cc2-7e3a09ae2c87", "5fe67ca6-e762-4936-9b89-f5b0d74719e0", "63df0e39-2421-4903-80
#!/usr/bin/env scalas
/***
scalaVersion := "2.11.8"
resolvers += Resolver.url("typesafe-ivy-repo", url("http://repo.typesafe.com/typesafe/releases"))(Resolver.ivyStylePatterns)
resolvers += "Trax Artifactory" at "http://artifactory.s03.filex.com/artifactory/repo"
resolvers += "mandubian maven bintray" at "http://dl.bintray.com/mandubian/maven"
@johntbush
johntbush / gist:87995437f454a436066097fb370d2aa9
Created September 24, 2016 16:24
orgs missing from cassandra side of central config
69865A8D-0C7B-495D-9779-8EAA16912BF6
1B315012-32F9-422B-8FD3-E3E8100C2AA7
D85C4787-7B15-40E1-B3D1-682415428EC6
6E0743A7-720A-4B86-AAFC-F8E9E7D5CEBC
A2E1BB61-1FB4-4AF2-BA1B-265859E8831D
28E6638A-B87E-4BFC-8A08-DC2261F33D3A
8D7E8EB2-C64F-499A-80F1-27C362E6A84B
F9BC1D25-124E-452B-8816-63123A8572A8
21C9D166-C8EC-4207-95EB-1820D5C6E967
72CBCCF1-A281-43F9-9B34-EF3612F9157F
#!/bin/bash
# manually create a heap dump file for tomcat using jmap
. /etc/profile.d/common_shell_functions
get_tomcat_pid() {
PID=$(service tomcat status | awk {'print $3'} | sed 's/)//g')
[[ -z $PID ]] && die "Unable to determine tocat pid; does not appear to be running"
}
## see https://github.com/pywinauto/pywinauto
import pywinauto
app = pywinauto.Application().Start(r'\\filex.com\customers\MultiClientTest\Test\TraxFPS')
fps = app['Trax Data Refinery Launcher']
#fps.PrintControlIdentifiers()
fps.ComboBox2.Select('Apple AMR Prod Snap 160726')
fps.Ok.Click()
@johntbush
johntbush / .diff
Created July 22, 2016 19:30
address_norm.diff
diff --git a/addressNorm/pom.xml b/addressNorm/pom.xml
index 6a7e46a..0aa8835 100644
--- a/addressNorm/pom.xml
+++ b/addressNorm/pom.xml
@@ -1,10 +1,12 @@
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<parent>
- <artifactId>trax-platform</artifactId>
+ <artifactId>trax-platform-parent</artifactId>
<groupId>com.trax.platform</groupId>
@johntbush
johntbush / sample_fb.json
Created July 13, 2016 21:05
sample_fb.json
{
"Invrootid" : "INVC0000293000177930001",
"FbCreatDtm" : "2016-01-18T00:00:00.000",
"AcctNumVendBlng" : "961913760",
"VendFbType" : "Original",
"FbAdjmCnt" : 0,
"TxFbRptFactor" : 1.0,
"TxLmDist" : 0,
"T019" : "CA:CC_from_Arc_Purpose_Loc_Service_Matrix, GL:GL_from_Arc_Purpose_Loc_Service_Matrix",
"T012" : "[[NL003432518B01]]",
@johntbush
johntbush / fb.json
Created July 13, 2016 20:00
sample_fb
{
"Invrootid" : "INVC0000416022038880002",
"FbCreatDtm" : "2016-07-10T00:00:00.000",
"VendFbType" : "Manual Bill",
"FbAdjmCnt" : 0,
"FbAppDscntAmt" : 0,
"FbAppFrghtAmt" : 0,
"FbAccAmt" : 379.58,
"FbDscntAmt" : -1017.69,
"FbAppAccAmt" : 526.29,
@johntbush
johntbush / LogbackUtils.java
Last active June 12, 2016 20:18
LogbackUtils.java
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import java.lang.reflect.Field;
import java.lang.reflect.Method;
/**
* Contains methods to access and manipulate logback framework dynamically at run-time. Here 'dynamically' means without
* referencing the logback JAR, but using it if found in the classpath.