This file contains hidden or 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
mvn test -Dtest=package.testname -pl subprojectname -am -Dsurefire.failIfNoSpecifiedTests=false | |
// -pl module name containing test | |
// -am = also modules, to build dependent modules | |
// -Dsurefire.failIfNoSpecifiedTests=false = don't fail if dependent modules don't contain any tests |
This file contains hidden or 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
SELECT version FROM PRODUCT_COMPONENT_VERSION | |
WHERE product LIKE 'Oracle Database%'; |
This file contains hidden or 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
Ctrl-a : jump to start of line | |
Ctrl-e : jump to end of line |
This file contains hidden or 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
If you've already staged changes ready to commit but want to view the diff, use: | |
git diff --cached |
This file contains hidden or 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
To review changes stashed (git stash push) without retrieving from stash: | |
What files have changed: | |
- git stash show | |
View diffs on stashed changes (patch): | |
- git stash show -p | |
To checkout a single file from the latest {0} stash (change number to reference other stashes if not latest) |
This file contains hidden or 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
\dt # describe all tables | |
\d tablename # describe table tablename |
This file contains hidden or 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
terraform { | |
required_providers { | |
local = { | |
source = "hashicorp/local" | |
} | |
} | |
# Provider functions require Terraform 1.8 and later. | |
required_version = ">= 1.8.0" | |
} |
This file contains hidden or 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
//Last H2 version compatible with Java 8 | |
<dependency> | |
<groupId>com.h2database</groupId> | |
<artifactId>h2</artifactId> | |
<version>2.0.206</version> | |
<scope>test</scope> | |
</dependency> | |
//Setup server to interact with in-mem db | |
@BeforeClass |
This file contains hidden or 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
#find files from here owned by root:root | |
find . -user root -group root | |
#find files from here not owned by tomcat | |
find . -not -user tomcat |
This file contains hidden or 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
# No longer need to use Powermock to mock statics, this is now supported in Mockito with .mockStatic() | |
# Alternative approach to https://gist.github.com/kevinhooke/b4035faa5f2c215e8166936a44db4fa3 | |
# Requires mockito-inline dependency instead of mockito-core | |
try (MockedStatic<ClassToMock> mock = Mockito.mockStatic(ClassToMock.class)) { | |
mock.when(ClassToMock::staticMethod).thenReturn(mockedReturn); | |
} |
NewerOlder