Skip to content

Instantly share code, notes, and snippets.

View yoonbae81's full-sized avatar

Yoonbae Cho yoonbae81

View GitHub Profile
@yoonbae81
yoonbae81 / MButton.ahk
Created April 19, 2020 04:22
마우스 휠버튼 활용하기 (브라우저 뒤로가기, 탭 닫기)
MButton::
if (A_ThisHotkey = A_PriorHotkey and A_TimeSincePriorHotkey < 200)
Send, ^w
else
Send, {Browser_Back}
Return
@yoonbae81
yoonbae81 / rename_movies_using_pictures.py
Created April 4, 2020 05:47
파일명이 유사한 사진파일을 활용해 동영상 촬영일시를 추론하고 파일명 바꾸기
from datetime import datetime
from os import rename, walk
from os.path import join, splitext, basename
import exiftool
def get_files(dir):
files = []
for d, _, fs in walk(dir):
@yoonbae81
yoonbae81 / nyt.py
Last active March 28, 2020 15:22
Send the first page of New York Times to Kindle
#!/usr/bin/env python3
import urllib.request
import smtplib
from email.mime.application import MIMEApplication
from email.mime.multipart import MIMEMultipart
from datetime import datetime, timedelta
KINDLE_ID = '__________@kindle.com'
GMAIL_ID = '__________@gmail.com'
@yoonbae81
yoonbae81 / price-day.clj
Created August 25, 2019 09:13
네이버에서 전종목 일별 OHLC 가져오기
(ns price-day
(:require [clj-http.client :as client]
[clojure.string :as s]
[clojure.core.async :as a :refer [>!! >! <! <!!]]
[environ.core :refer [env]]
[taoensso.timbre :as log]
[taoensso.carmine :as r]
[clojure.string :as str]))
(def redis-uri (or (env :redis-uri) "redis://localhost:6379"))
@yoonbae81
yoonbae81 / price-minute.clj
Created August 25, 2019 09:13
네이버에서 전종목 분단위 체결가 가져오기
(ns price-minute
(:require [clojure.string :as s]
[clojure.java.io :as io]
[environ.core :refer [env]]
[clj-http.client :as client]
[clojure.core.async :as a :refer [>!! >! <! <!!]]
[taoensso.timbre :as log]
[taoensso.carmine :as r]))
(def date (java.time.LocalDate/now))
@yoonbae81
yoonbae81 / keymap.cson
Created August 25, 2019 02:45
Atom vim-mode-plus keymap for overriding ctrl-a,x,c,w
'atom-text-editor.vim-mode-plus:not(.insert-mode)':
'ctrl-a': 'core:select-all'
'ctrl-x': 'core:cut'
'atom-text-editor.ex-mode-editor':
'ctrl-c': 'core:copy'
'atom-text-editor.vim-mode-plus':
'ctrl-c': 'core:copy'
'atom-text-editor.vim-mode-plus-input':
'ctrl-c': 'core:copy'
@yoonbae81
yoonbae81 / clien.py
Last active August 31, 2020 18:07
클리앙 중고장터 모니터링
#!/usr/bin/env python3
### Configuration ################################################
CLIEN_USERID = 'XXXXXXXX'
CLIEN_PASSWD = 'XXXXXXXX'
TELEGRAM_TOKEN = '000000000:XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX'
TELEGRAM_CHAT_ID = '000000000'
### End of Configuration #########################################
import argparse
@yoonbae81
yoonbae81 / slrclub.py
Last active August 25, 2019 02:46
SLRCLUB 중고장터 모니터링
#!/usr/bin/env python3
### Configuration ################################################
SLRCLUB_USERID = 'XXXXXXXX'
SLRCLUB_PASSWD = 'XXXXXXXX'
TELEGRAM_TOKEN = '000000000:XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX'
TELEGRAM_CHAT_ID = '000000000'
### End of Configuration #########################################
import argparse
@yoonbae81
yoonbae81 / telegram.sh
Created December 26, 2018 03:22
텔레그램 메시지 발송
#!/bin/bash
TOKEN=*********************************************
CHAT_ID=********
MESSAGE=$*
URL="https://api.telegram.org/bot$TOKEN/sendMessage"
curl -s -X POST $URL -d chat_id=$CHAT_ID -d text="$MESSAGE"
@yoonbae81
yoonbae81 / ebs.sh
Created December 26, 2018 03:21
EBS 녹음
#!/bin/bash
URL="rtmp://ebsandroid.ebs.co.kr:1935/fmradiofamilypc/familypc1m"
PROGRAM=$1
RECORD_MINS=$(($2 * 60))
DATE=`date +%Y%m%d`
FLV_FILE=`mktemp -u`
M4A_FILE=$DATE"_"$PROGRAM.m4a