Skip to content

Instantly share code, notes, and snippets.

Kevin Hooke kevinhooke

Block or report user

Report or block kevinhooke

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
@kevinhooke
kevinhooke / gist:a1a2e01af791ee2e3f012e5777efbe72
Created Feb 2, 2020
Maven assembly - package with jar dependencies
View gist:a1a2e01af791ee2e3f012e5777efbe72
<build>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-assembly-plugin</artifactId>
<executions>
<execution>
<phase>package</phase>
<goals>
View gist:24e5458844d8041a08cb94db076fca2c
~pre~ / ~/pre~ : preformatted, monospaced text, keeps inline wiki formatting
~pp~ / ~/pp~ : as pre, but with no inline formatting
View gist:d5af7351f9e5f32c78d469b7fdd42c7d
repostories{
maven {
url "url to repo"
}
}
View gist:0c5bc0b0e6effc9d3febb2cba33958ad
gradle dependencies
#for module
gradle :modulename:dependencies
View gist:60cf4f7222f50ac97edeb2a6a52a7aee
git config --global --unset user.password
@kevinhooke
kevinhooke / gist:19554473f9815baa0f01bf0c0d686818
Created Sep 20, 2019
JsonMappingException: No serializer found for class xyz
View gist:19554473f9815baa0f01bf0c0d686818
Class being serialized doesn't have public getters for a member property of a custom type.
Fix:
objectMapper.setVisibility(PropertyAccessor.FIELD, Visibility.ANY);
From:
https://www.baeldung.com/jackson-jsonmappingexception
@kevinhooke
kevinhooke / gist:8b6e990bf2f1a8a60ac7da598eaedbb2
Created Sep 16, 2019
MacOS and Perl Compatible Regular Expressions (PCRE)
View gist:8b6e990bf2f1a8a60ac7da598eaedbb2
See https://www.unix.com/unix-for-advanced-and-expert-users/131088-grep-character-classes-w-d.html
Perl character classes like \w, \d are not supported by default in MacOS BSD style utils like grep, use POSIX classes
instead:
\w == [:alpha:]
[\w\d] == [:alnum:]
\d == [:digit:]
[\s\t] == [:blank:]
Also see: https://www.regular-expressions.info/posixbrackets.html
View gist:bc2ba9b1d4bc060be41b5bb337209dc0
#from https://stackoverflow.com/questions/14352290/listing-only-directories-using-ls-in-bash-an-examination
ls -d */ | cut -f1 -d'/'
@kevinhooke
kevinhooke / gist:d0364c2d5d63e436f27db4ac2b84aaf2
Created Sep 5, 2019
jax-ws dump network traffic to system out
View gist:d0364c2d5d63e436f27db4ac2b84aaf2
-Dcom.sun.xml.ws.transport.http.client.HttpTransportPipe.dump=true
-Dcom.sun.xml.internal.ws.transport.http.client.HttpTransportPipe.dump=true
-Dcom.sun.xml.ws.transport.http.HttpAdapter.dump=true
-Dcom.sun.xml.internal.ws.transport.http.HttpAdapter.dump=true
-Dcom.sun.xml.internal.ws.transport.http.HttpAdapter.dumpTreshold=999999
View gist:b13a64407b5a22da1163f99f42f32679
#cli set/get entry in hash
hmset hash-name key value
hmget hash-name key
#keys in hash
hkeys hash-name
#values in hash
hvals hash-name
You can’t perform that action at this time.