Skip to content

Instantly share code, notes, and snippets.

View rkdgusrnrlrl's full-sized avatar

Kang Hyeon Ku rkdgusrnrlrl

View GitHub Profile
@rkdgusrnrlrl
rkdgusrnrlrl / backup.sh
Created June 21, 2016 03:52
๋ฐฑ์—… ์‰˜ ์Šคํฌ๋ฆฝํŠธ
#!/bin/bash
# ๋งŒ๋“ ์ด : ๊ฐ•ํ˜„๊ตฌ(rkdgusrnrlrl@gmail.com)
# ์ œ์ž‘์ผ : 2016-03-01
# ์‚ฌ์šฉ๋ฐฉ๋ฒ• : backup {๋ฐฑ์—…ํ• ํŒŒ์ผ๋ช…} => ํ•ด๋‹น ํด๋”์— ํ•ด๋‹น ํŒŒ์ผ๋ช… ๋’ค์— ๋‚ ์งœ๊ฐ€ ๋ถ™์–ด์„œ ๋ฐฑ์—…๋จ
# ex : member.db.20160301.back
# ๊ฐœ์„  ์‚ฌํ•ญ
# - ์˜ต์…˜์„ ํ†ตํ•ด ๋ฐฑ์—… ํด๋” ์„ค์ •
#
echo "backup start"
@rkdgusrnrlrl
rkdgusrnrlrl / typing_clear_code.py
Last active June 17, 2016 00:39
http://typing.tyle.io/ ์˜ ๊ฒŒ์ž„์„ ๊นจ์ง€ ์œ„ํ•ด selenium ๋ผ์ด๋ธŒ๋Ÿฌ๋ฆฌ๋ฅผ ์จ์„œ ์ž‘์„ฑํ•œ ์ฝ”๋“œ
# -*- coding: utf-8 -*-
from selenium import webdriver
from selenium.webdriver.common.by import By
from selenium.webdriver.support.ui import WebDriverWait
from selenium.webdriver.support import expected_conditions as EC
#pip install selenium ํ•„์š”, ํŒŒ์ด์–ดํญ์Šค ํ•„์š”(๋ธŒ๋ผ์šฐ์ €๋Š” ๋ณ€๊ฒฝ ๊ฐ€๋Šฅ)
driver = webdriver.Firefox()
driver.get('http://typing.tyle.io/')
class ToInt{
//InputStream ๊ตฌํ˜„์‹œ read() ๋ฉ”์„œ๋“œ๋Š” byte ๊ฐ’์ด ์•„๋‹Œ int ๊ฐ’์„ ๋ฐ˜ํ™˜ ํ•˜๋Š”๋ฐ
//Stream ์ด ๋์ผ ๊ฒฝ์šฐ -1์„ ๋ฐ˜ํ™˜ํ•˜๋Š” ๊ทœ์•ฝ์ด ์žˆ์–ด ์Œ์ˆ˜๋ฅผ ์‚ฌ์šฉ ํ•˜์ง€ ๋ชปํ•ด
//byte ๋ณด๋‹ค ํฐ int ๋กœ ๋ฆฌํ„ดํ•˜๋Š” ๊ฒƒ์ด๊ณ  0 ~ 255(128 + 127) ๊นŒ์ง€ ์˜ ์ˆซ์ž๋ฅผ ๋ฆฌํ„ดํ•œ๋‹ค
public static int toInt(byte b) {
return (-(b-127)/128)*256+b;
}
public static void main(String[] args){
# -*- coding: utf-8 -*-
from selenium import webdriver
from selenium.webdriver.common.keys import Keys
import os
# selenium ๊ณผ PhantomJS ์„ค์น˜๋˜ ์žˆ์–ด์•ผํ•จ
id = "naver" #๋„ค์ด๋ฒ„ ์•„์ด๋””
passwd = "pass" #๋„ค์ด๋ฒ„ ์•„์ด๋””
<input type="button" id="<%=rs.getString("title")%>" value="MV" onclick="javascript:mvf(<%=rs.getString("title")%>);">
<form name="go_page" method="post">
<input name="title" value="">
</form>
<script>
function mvf(id){
var from = document.go_page;