Skip to content

Instantly share code, notes, and snippets.

View yayyz's full-sized avatar
👩‍💻

Yeji Im yayyz

👩‍💻
View GitHub Profile
@yayyz
yayyz / maintenance.py
Created September 29, 2019 13:19
maintenance.py
'''
$> python3 maintenance.py [app_name] [on/off]
status = [on, off]
app_name = [서비스명]
@author yeji im
'''
import sys, os, time, os.path
CONSTRUCTION_BASE="[maintenance file path]"
@yayyz
yayyz / LocalDateTime_CompareTo.java
Created April 17, 2019 09:47
그냥 leftDate.compareTo(rightDate) 하면 되지만, 내부는 이런식으로 되어있음.
/**
* 날짜 비교 compareTo
*/
public static int compareTo(LocalDateTime leftDate, LocalDateTime rightDate) {
int cmp = compareDate(leftDate, rightDate); //compare date
if (cmp == 0) {
// compare time
cmp = compareTime(leftDate.toLocalTime(), rightDate.toLocalTime());
}
return cmp;