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
import org.springframework.format.FormatterRegistry; | |
import org.springframework.format.datetime.standard.DateTimeFormatterRegistrar; | |
import org.springframework.stereotype.Component; | |
import org.springframework.web.servlet.config.annotation.WebMvcConfigurer; | |
/** | |
* Override date/time formatters with ones using ISO-8601. | |
*/ | |
@Component | |
public class DateTimeFormatConfigurer implements WebMvcConfigurer { |
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
package io.github.bcalmac.scratch; | |
import com.fasterxml.jackson.annotation.JsonFormat; | |
import com.fasterxml.jackson.core.JsonProcessingException; | |
import com.fasterxml.jackson.databind.ObjectMapper; | |
import com.fasterxml.jackson.databind.SerializationFeature; | |
import com.fasterxml.jackson.datatype.jsr310.JavaTimeModule; | |
import lombok.Data; | |
import org.junit.jupiter.api.Test; |
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
package io.github.bcalmac.overtime.server.utils; | |
import java.io.IOException; | |
import java.net.URISyntaxException; | |
import java.net.URL; | |
import java.nio.file.Files; | |
import java.nio.file.Paths; | |
public class OvertimeTestUtils { |
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
function sleep(ms) { | |
return new Promise(resolve => setTimeout(resolve, ms)); | |
} |
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
// What films does planet Tatooine shows up in? | |
// http://swapi.dev/api/planets/1/ | |
// Functional-style friendly functions | |
function get(url) { | |
return axios.get(url).then(r => r.data) | |
} | |
function getAll(urls) { | |
return Promise.all(urls.map(get)) |
OlderNewer