View MyRegexTest.java
This file contains 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.junit.jupiter.api.Test; | |
import java.util.regex.Matcher; | |
import java.util.regex.Pattern; | |
import static org.junit.jupiter.api.Assertions.fail; | |
class MyRegexTest { | |
@Test |
View Vagrantfile
This file contains 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
# -*- mode: ruby -*- | |
# vi: set ft=ruby : | |
# All Vagrant configuration is done below. The "2" in Vagrant.configure | |
# configures the configuration version (we support older styles for | |
# backwards compatibility). Please don't change it unless you know what | |
# you're doing. | |
Vagrant.configure("2") do |config| | |
# The most common configuration options are documented and commented below. | |
# For a complete reference, please see the online documentation at |
View test.jsp
This file contains 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
<%@ page language="java" contentType="text/html; UTF-8; charset=UTF-8" pageEncoding="UTF-8" trimDirectiveWhitespaces="true" %> | |
<% | |
response.setStatus(403); | |
%> | |
<!DOCTYPE html> | |
<html lang="en"> | |
... | |
</html> |
View TransactionalCustom.java
This file contains 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.core.annotation.AliasFor; | |
import org.springframework.transaction.annotation.Transactional; | |
import java.lang.annotation.ElementType; | |
import java.lang.annotation.Retention; | |
import java.lang.annotation.RetentionPolicy; | |
import java.lang.annotation.Target; | |
/** | |
* Meta-annotation Spring. |
View Dockerfile
This file contains 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
FROM postgres:latest | |
RUN apt-get update && \ | |
apt-get install -y vim |
View make_docker_cli_for_windows.sh
This file contains 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
git clone https://github.com/docker/docker-ce.git | |
# List all tags (exclude the rc) | |
git tag --list 'v*-ce' | |
# Checkout desired version (tag) | |
git checkout 18.05.0-ce | |
# Build docker.exe CLI for Windows | |
cd components/cli |
View index.jsp
This file contains 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
<%@ page contentType="text/html; charset=UTF-8" trimDirectiveWhitespaces="true" %> | |
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %> | |
<c:redirect url="/login.jsp"> | |
<c:forEach items="${param}" var="entry"> | |
<c:param name="${entry.key}" value="${entry.value}" /> | |
</c:forEach> | |
</c:redirect> |
View create_machine_docker-dev.cmd
This file contains 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
rem set MACHINE_STORAGE_PATH=D:\Dev\Docker\.docker\machine | |
docker-machine version | |
docker-machine ls | |
echo creation VM VirtualBox : Docker Machine (Help : docker-machine create --help) | |
rem var env (ex : proxy) : --engine-env | |
set VM_NAME=docker-dev | |
mkdir d:\Dev\Docker\.docker\machine\SharedFolders\%VM_NAME% | |
docker-machine create -d "virtualbox" --virtualbox-cpu-count "2" --virtualbox-disk-size "50000" --virtualbox-memory "2048" --virtualbox-share-folder "\\?\d:\Dev\Docker\.docker\machine\SharedFolders\%VM_NAME%:host-shared" %VM_NAME% |
View JacksonDeserializationSnakeCase.java
This file contains 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
ObjectMapper specificObjectMapper = new ObjectMapper(); | |
specificObjectMapper.setPropertyNamingStrategy(PropertyNamingStrategy.SNAKE_CASE); | |
specificObjectMapper.configure(DeserializationFeature.FAIL_ON_IGNORED_PROPERTIES, false); | |
specificObjectMapper.configure(DeserializationFeature.FAIL_ON_UNKNOWN_PROPERTIES, false); |
View JodaTimeLocaleTest.java
This file contains 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.joda.time.DateTime; | |
import org.joda.time.LocalDateTime; | |
import org.joda.time.format.DateTimeFormat; | |
import org.joda.time.format.DateTimeFormatter; | |
import org.junit.Before; | |
import org.junit.Test; | |
import java.util.Locale; | |
/** |
NewerOlder