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: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
@kevinhooke
kevinhooke / gist:1a4319cb6a27502deff21f55db7ecbd2
Created Jul 20, 2019
Run JUnit methods sequentially in a fixed order
View gist:1a4319cb6a27502deff21f55db7ecbd2
@FixMethodOrder(MethodSorters.NAME_ASCENDING)
@kevinhooke
kevinhooke / gist:d767b7214607b648fe3bbcdcc0cb256d
Created Jul 19, 2019
Spring Boot / Spring Data schema init options
View gist:d767b7214607b648fe3bbcdcc0cb256d
#schema init: set spring.jpa.hibernate.ddl-auto=none to use this script
src/main/resources/schema.sql
#data init
src/main/resources/data.sql
#db specific data init script:
#application.properties:
spring.datasource.platform=derby
#init script
@kevinhooke
kevinhooke / gist:80556f31fa4ef7ae1ffb44fab8b7cdbd
Created Jul 18, 2019
Eclipse workspace Weblogic temp server deploy dir
View gist:80556f31fa4ef7ae1ffb44fab8b7cdbd
rm -rf [name]_workspace/.metadata/.plugins/org.eclipse.wst.server.core/tmp*
View gist:a6edcfaf0142823c3640636b2812f6a0
#ignore .sql init files
spring.datasource.initialize=false
#specify which datasource init files to use, e.g. for Derby
spring.datasource.platform=derby
spring.jpa.hibernate.ddl-auto=create-drop
#init file examples:
#generic ddl file
data.sql
View gist:0e80848f01b09099929da25da5f37dcc
#using as and ld
as example.s -o example.o
ld example.o -o example
#using gcc
gcc example.s -o example
@kevinhooke
kevinhooke / smile.s
Created Jun 1, 2019
ARM ASM nested loop hello world
View smile.s
.global main
main:
MOV R4, #3 @ init outer line counter =3
_outerloop:
MOV R3, R4 @ init word loop counter with current value of outer counter
_wordloop:
MOV R7, #4 @ syscall 4: output to stdout
MOV R0, #1 @ stdout
@kevinhooke
kevinhooke / gist:d98445a85e456ba181e2da70cc4dfd40
Created May 28, 2019
git update last x commit messages
View gist:d98445a85e456ba181e2da70cc4dfd40
git rebase -i HEAD~x #where x = last x commits to update
# change pick to e, e=edit to indicate which to update
#for each commit to update:
git commit --amend
git rebase --continue
#repeat above 2 steps until all seelcted with e are updated
You can’t perform that action at this time.