Skip to content

Instantly share code, notes, and snippets.

# https://github.com/serithemage/python_exercise/blob/master/downloader/downloader.py
# 이 python2으로 작성되어 있어, 참조하여 python3으로 재작성하였습니다.
# beautifulsoup4가 없는 분들은 아래처럼 pip로 통해 설치하세요.
# pip install beautifulsoup4
import urllib
import threading
import urllib.request
import time
@daejinseok
daejinseok / test_set.java
Last active June 13, 2017 21:24
Java Strong into HashSet
package test_daejin;
import java.util.Arrays;
import java.util.HashSet;
import java.util.Iterator;
public class test_set {
// Java 1.4버전 String을 HashSet으로 변환
public static HashSet strToSet( String s){
@daejinseok
daejinseok / fold.py
Created April 20, 2016 15:44
fold.py in sublime text
import sublime, sublime_plugin
def fold_region_from_indent(view, r):
if r.b == view.size():
return sublime.Region(r.a - 1, r.b)
else:
return sublime.Region(r.a - 1, r.b - 1)
class FoldUnfoldCommand(sublime_plugin.TextCommand):
def run(self, edit):
@daejinseok
daejinseok / _vimrc
Last active December 14, 2018 11:05
" set the runtime path to include Vundle and initialize
set rtp+=~/.vim/bundle/Vundle.vim
call vundle#begin()
" alternatively, pass a path where Vundle should install plugins
"call vundle#begin('~/some/path/here')
" let Vundle manage Vundle, required
Plugin 'VundleVim/Vundle.vim'
" 추가하고 싶은 플러그인을 아래에 나열하면 됩니다.
:e $userprofile\_gvimrc
@daejinseok
daejinseok / EgovUserManageController.java
Created November 16, 2015 15:47
EgovUserManageController.java 서버단 이메일 오류시 포워딩 되었을 때 콤보값이 나오도록 수정
@RequestMapping("/uss/umt/EgovUserInsert.do")
public String insertUser(@ModelAttribute("userManageVO") UserManageVO userManageVO, BindingResult bindingResult, Model model) throws Exception {
// 미인증 사용자에 대한 보안처리
Boolean isAuthenticated = EgovUserDetailsHelper.isAuthenticated();
if (!isAuthenticated) {
return "index";
}
beanValidator.validate(userManageVO, bindingResult);
@daejinseok
daejinseok / makeBind.js
Last active October 6, 2015 07:19
dynamic scoping 예제
function makeBindFun(resolver){
return function(k, v){
var stack = globals[k] || [];
globals[k] = resolver(stack, v);
return globals;
}
}
var stackBinder = makeBindFun(function(stack, v){
stack.push(v);
@daejinseok
daejinseok / Default.sublime-keymap
Created October 2, 2015 07:49
sublime text에서 command palette 키 설정
{ "keys": ["z", "z"],
"command": "show_overlay",
"args": {"overlay": "command_palette"}
}
@daejinseok
daejinseok / Default.sublime-keymap
Last active October 2, 2015 07:54
sublime text에서 command_moe 키 변경
{ "keys" : ["j", "j"],
"command" : "exit_insert_mode",
"context" : [
{ "key" : "setting.command_mode", "operand" : false },
{ "key" : "setting.is_widget", "operand" : false }
]
}
@daejinseok
daejinseok / Preferences.sublime-settings
Created October 2, 2015 07:45
Sublime Text에서 Vintage 활성화
"ignored_packages":
[
// "Vintage" 이 줄을 삭제하거나, 주석 처리하면 활성화됩니다.
],