Skip to content

Instantly share code, notes, and snippets.

View rieckpil's full-sized avatar
🏝️
Working remotely

Philip Riecks rieckpil

🏝️
Working remotely
View GitHub Profile
ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAACAQDIwL4flKehVqPOueQDOj6dRUemxX5k79foJ+excRW0uPCSlLrqQEfSbpdiXc+CMVdU0qUahsYu93aWM14WCVbNq/9naM1fEP8/Wow+5pHGq4CJqur9gDXQG5pHQgEMFHJOZl9ljBP/k1HNnODXvXirnJfsREjQPNt06K0wYaD8EASdt+k0RQtaX5YVtWAxmr48tGrx67GEXQIYtC1XYQ61odXueLKRDYVwwC8Obe+0AFWzoSNQ/6PtD8ClTBWF23V+9UeydgBGQqpSANgIxkRxTShX3783Uuq6EfQGCi52YtNezS33zZO4mEVd4C7rn3wXAKhtdSZDoO5oq3mbzbqgTZJL3LG5/BYrpoGVgWwnwGvdoTuJ4pnJbix1pAU1xvtzX1F287Stx8ntim7yw5r+lMFpwsEjBSpAvZAA+4iqnChJuxs0vY1ouDDdVJ6x5YhyXM6jEfVkUlZ0lk/TWv0pRmWtvSXJZ+O/7bMsiZ3f44MKe/6apaXBN7rMgN8hY31Iwx9ypLBNlbQPRrT6ML7GWxfi1sQ3sScVUMvuH16FpBjEAWsqiUQipneC/SGqxRfZnGqlPcwBgX9Xj9B84+h920Z+BwS488R0Dc2Bw3MYsJP/AaenpA7UE1Sju1/Vc7C1ANuPyiRfjWavEW8XZm8qyvEbVbf8i09FOAKJ7FXOew== mail@philipriecks.de
@rieckpil
rieckpil / info.txt
Created July 31, 2023 10:24
Testing Livetemplates for IntelliJ IDEA
# mockMvcGet
org.springframework.test.web.servlet.MvcResult result = this.mockMvc
.perform(org.springframework.test.web.servlet.request.MockMvcRequestBuilders.get($url$)
.header(org.springframework.http.HttpHeaders.ACCEPT, org.springframework.http.MediaType.APPLICATION_JSON))
.andExpect(org.springframework.test.web.servlet.result.MockMvcResultMatchers.status().is(200))
.andExpect(org.springframework.test.web.servlet.result.MockMvcResultMatchers.content().contentType(org.springframework.http.MediaType.APPLICATION_JSON))
.andExpect(org.springframework.test.web.servlet.result.MockMvcResultMatchers.jsonPath("$.size()", org.hamcrest.Matchers.is(0)))
.andDo(org.springframework.test.web.servlet.result.MockMvcResultHandlers.print())
.andReturn();
@rieckpil
rieckpil / pom.xml
Created March 19, 2022 10:01
Selenide Maven Pom Include
<dependency>
<groupId>com.codeborne</groupId>
<artifactId>selenide</artifactId>
<version>5.22.0</version>
<scope>test</scope>
</dependency>
@rieckpil
rieckpil / SpringBootIT.java
Created March 19, 2022 09:59
Sample Spring Boot Testcontainers Integration Test
@Testcontainers
class SpringBootIT {
@Container
static PostgreSQLContainer<?> postgreSQLContainer =
new PostgreSQLContainer<>(DockerImageName.parse("postgres:13"))
.withPassword("inmemory")
.withUsername("inmemory");
}
@rieckpil
rieckpil / pom.xml
Created March 19, 2022 09:57
Spring Boot Starter Test Maven Include
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-test</artifactId>
<scope>test</scope>
</dependency>
@rieckpil
rieckpil / create.sh
Last active February 15, 2024 07:02
Create Spring Boot Project Skeleton
curl https://start.spring.io/starter.zip \
-d dependencies=web,actuator,data-jpa,h2 \
-d javaVersion=21 \
-d name=spring-boot-testing-primer \
-d artifactId=spring-boot-testing-primer \
-d groupId=de.rieckpil.blog \
-d packageName=de.rieckpil.blog \
-d type=maven-project \
-o spring-boot-testing-primer.zip
@rieckpil
rieckpil / idea-live-template-examples.md
Last active April 30, 2022 15:33
Intellij IDEA Live Template Examples

Live Template Examples for Testing Java Applications

Create new Live Templates within your IDEA's Preferences -> Editor -> Live Templates

mockMvcGET: Peform a MockMvc HTTP GET request.

org.springframework.test.web.servlet.MvcResult result = this.mockMvc
  .perform(org.springframework.test.web.servlet.request.MockMvcRequestBuilders.get($url$)
  .header(org.springframework.http.HttpHeaders.ACCEPT, org.springframework.http.MediaType.APPLICATION_JSON))
@rieckpil
rieckpil / rieckpil.css
Last active October 14, 2021 18:52
Custom Crayon Theme (Inspired by the IntelliJ IDEA Light Theme)
.crayon-theme-rieckpil {
border-width: 0px !important;
border-color: #999 !important;
border-style: solid !important;
text-shadow: none !important;
background: #fdfdfd !important;
}
.crayon-theme-rieckpil-inline {
border-width: 1px !important;
border-color: #ddd !important;
@rieckpil
rieckpil / sendowl.js
Created December 30, 2020 20:37
Trigger Cart Abandonment when Email is pre-filled on SendOwl's Checkout Page
<script>
Page.checkoutCallback = function () {
var email = document.getElementById("order_buyer_email").value;
if (email) {
$("#order_buyer_email").blur();
}
}
</script>
@rieckpil
rieckpil / application.yml
Created April 15, 2020 17:16
Debugging Hibernate - Settings for Spring application
spring:
jpa:
show-sql: false
hibernate:
ddl-auto: none
properties:
hibernate.generate_statistics: true
logging:
level: