This file contains 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
// | |
// ViewController.swift | |
// DragTable | |
// | |
// Created by Anna Kim on 2017. 2. 9.. | |
// Copyright © 2017년 Anna Kim. All rights reserved. | |
// | |
import Cocoa |
This file contains 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
import Foundation | |
class StreamReader { | |
let encoding: String.Encoding | |
let chunkSize: Int | |
let fileHandle: FileHandle | |
var buffer: Data | |
let delimPattern : Data | |
var isAtEOF: Bool = false | |
This file contains 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
/* | |
모나드는 특정한 타입을 감싸는 타입이며, | |
raw한 값을 감싸는 함수와 | |
raw한 값을 모나드 값으로 바꾸는 어떤 함수에 바인딩된다. | |
이를 바탕으로 모나드 프로토콜을 정의하면 다음과 같다. | |
*/ | |
protocol Monad { |
This file contains 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
// Adobe Illustrator Javascript to save multiple ai files into JPEG file. | |
// code by sooop | |
var defaultFolder = new Folder('C:/'); // 폴더 선택창에서 디폴트 폴더 | |
var targetFolder = new Folder(); | |
var sourceFiles; | |
This file contains 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
{ | |
"cmd": ["gcc", "${file}", "-o", "${file_path}/${file_base_name}"], | |
"file_regex": "^(..[^:]*):([0-9]+):?([0-9]+)?:? (.*)$", | |
"working_dir": "${file_path}", | |
"selector": "source.c", | |
"variants": | |
[ | |
{ | |
"name": "Run", |
This file contains 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
import re | |
from hashlib import md5 | |
def gfm(text): | |
# Extract pre blocks. | |
extractions = {} | |
def pre_extraction_callback(matchobj): | |
digest = md5(matchobj.group(0)).hexdigest() | |
extractions[digest] = matchobj.group(0) | |
return "{gfm-extraction-%s}" % digest |