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
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
View gist:3b4eb8347b02c5f569a1b332d7fdd726
#run with maven 3.x and java 8+
mvn sonar:sonar \
-Dsonar.host.url=http://localhost:9000 \
-Dsonar.login=access-key-here \
-Dsonar.inclusions=**/patterns-here/* \
-Dsonar.exclusions=**/pattern-here/*
@kevinhooke
kevinhooke / gist:3a7b7accbdf0488ccffc9ea4a9396df3
Created Jul 22, 2019
bash iterate through all dirs and execute some action in that dir
View gist:3a7b7accbdf0488ccffc9ea4a9396df3
#/bin/bash
for d in *; do
if [ -d ${d} ]; then
echo $d
cd $d
// do something with $d here
cd ..
fi
done
You can’t perform that action at this time.