Skip to content

Instantly share code, notes, and snippets.

View jeonguk's full-sized avatar
🎯
Focusing

jeonguk jeonguk

🎯
Focusing
View GitHub Profile
@jeonguk
jeonguk / RedisConfig.java
Last active January 10, 2018 06:54
Spring - Embeded Redis configuration
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;
@jeonguk
jeonguk / gist:1f816e89fb8db8d61c4fa71e9c6afc70
Created January 9, 2018 08:31
github repository languages change
reference url :
- https://github.com/github/linguist#troubleshooting
@jeonguk
jeonguk / SimplParallelStreamFindWordLine.java
Created January 10, 2018 06:51
java 8 parallel stream file read
package com.jeonguk;
import java.nio.file.Files;
import java.nio.file.Path;
import java.nio.file.Paths;
import java.time.Instant;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
@jeonguk
jeonguk / ScannerReadTest.java
Created January 10, 2018 06:53
java scanner file read
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;
@jeonguk
jeonguk / git_remote_url_change.txt
Last active January 12, 2018 06:34
git remote url change
기존 원격 저장소 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
@jeonguk
jeonguk / nodejs_gitignore.txt
Created January 12, 2018 14:07
nodejs .gitignore file
lib-cov
*.seed
*.log
*.csv
*.dat
*.out
*.pid
*.gz
pids
@jeonguk
jeonguk / .bash_profile
Created January 15, 2018 04:56
bash_profile
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'
@jeonguk
jeonguk / docker-compose.yml
Created January 15, 2018 12:32
docker-compose.yml
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:
@jeonguk
jeonguk / spring-security-session-with-redis.txt
Created January 17, 2018 01:21
spring security session with redis
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
@jeonguk
jeonguk / clear-all-images-container-volume.sh
Created January 19, 2018 00:55
clean docker all images container volume
#!/bin/bash
###################################################
#
# Simple Shell script to clean/remove all container/images
#
# The script will
# - first stop all running containers (if any),
# - remove containers
# - remove images
# - remove volumes