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
package com.jeonguk; | |
import java.io.File; | |
import java.io.FileNotFoundException; | |
import java.util.Scanner; | |
import java.util.concurrent.TimeUnit; | |
import org.slf4j.Logger; | |
import org.slf4j.LoggerFactory; |
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
package com.jeonguk.web.config; | |
import static java.util.stream.Collectors.joining; | |
import javax.annotation.PostConstruct; | |
import javax.annotation.PreDestroy; | |
import org.springframework.context.annotation.Bean; | |
import org.springframework.context.annotation.Configuration; | |
import org.springframework.data.redis.connection.jedis.JedisConnectionFactory; |
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
기존 원격 저장소 URL을 변경하기 위해 git remote set-url 명령어를 사용 | |
$ git remote -v | |
# View existing remotes | |
origin https://github.com/user/repo.git (fetch) | |
origin https://github.com/user/repo.git (push) | |
$ git remote set-url origin https://github.com/user/repo2.git | |
# Change the 'origin' remote's URL |
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
lib-cov | |
*.seed | |
*.log | |
*.csv | |
*.dat | |
*.out | |
*.pid | |
*.gz | |
pids |
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
alias ll='ls -al' | |
alias ls='ls -FG' | |
alias cls='clear' | |
# Tell ls to be colourful | |
export CLICOLOR=1 | |
export LSCOLORS=Exfxcxdxbxegedabagacad | |
# Tell grep to highlight matches | |
export GREP_OPTIONS='--color=auto' |
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
version: '2.1' | |
services: | |
book-search-mysql: | |
image: mysql:5.7 | |
command: mysqld --character-set-server=utf8mb4 --collation-server=utf8mb4_unicode_ci | |
container_name: book-search-mysql | |
healthcheck: | |
test: "exit 0" | |
ports: |
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
1. pom.xml | |
<dependency> | |
<groupId>org.springframework.session</groupId> | |
<artifactId>spring-session-data-redis</artifactId> | |
<version>1.3.1.RELEASE</version> | |
</dependency> | |
2. SessionConfig.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
#!/bin/bash | |
REPOSITORY=/home/ec2-user/app/git | |
cd $REPOSITORY/springboot-webservice/ | |
echo "> Git Pull" | |
git pull |
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
pull 로컬 변경 사항을 덮어 쓰게하고 작업 트리가 깨끗한 것처럼 병합하려면 작업 트리를 정리. | |
git reset --hard | |
git pull |
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 java.util.stream.IntStream; | |
import java.util.stream.Stream; | |
public class FibonaciSequenceTest { | |
public static void main(String[] args) { | |
IntStream fibonacciStream = Stream.iterate( | |
new int[] { 1, 1 }, | |
fib -> new int[] { fib[1], fib[0] + fib[1] } |