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
# GC downtime sum | |
$ cat gc.log | grep secs | awk '{sum+=$(NF-1)} END{print sum}' | |
# gc.log | |
2019-03-07T11:31:54.324+0900: 54686.842: [GC pause (G1 Humongous Allocation) (young) (initial-mark) 1022M->934M(2048M), 0.0423201 secs] | |
2019-03-07T11:31:54.366+0900: 54686.884: [GC concurrent-root-region-scan-start] | |
2019-03-07T11:31:54.403+0900: 54686.921: [GC concurrent-root-region-scan-end, 0.0368224 secs] | |
2019-03-07T11:31:54.403+0900: 54686.921: [GC concurrent-mark-start] |
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
interface ProductDesc { | |
String getTitle(); | |
long getPrice(); | |
String getContent(); | |
boolean isDiscountable(); | |
} | |
@Entity | |
@Getter | |
@EqualsAndHashCode |
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
requests==2.18.4 | |
BeautifulSoup4==4.6.0 | |
lxml==3.8.0 |
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
nohup ./gradlew run > /dev/null 2>&1 & |
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
@Slf4j | |
public class NotThreadSafeTest { | |
Map<Integer, Integer> resourceMap; | |
Map<String, Integer> resourceMap2; | |
@Test | |
public void testNotThreadSafe_HashMapPut() throws Exception { | |
// given | |
final int size = 1_000_000; | |
resourceMap = new HashMap<>(); |
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
#!/bin/bash | |
cd ~/blog/redutan.github.io | |
bundle exec jekyll serve -D |
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
echo " | |
rdr pass inet proto tcp from any to any port 80 -> 127.0.0.1 port 8080 | |
" | sudo pfctl -ef - |
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
from openpyxl import load_workbook | |
import cx_Oracle | |
ROWID_NO = 0 | |
ROWID_LAST_ACCESS = 1 | |
DB_USER = 'user' | |
DB_PASSWD = 'password' | |
DB_URL = '1.1.1.1:1111' | |
DB_SID = 'SID' |
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
#!/usr/bin/python | |
# usage python resizeimgs.py PATH WIDTH | |
import sys | |
from os import listdir, path | |
from PIL import Image | |
def getpath(): | |
try: | |
inpath = sys.argv[1] | |
except: |