Skip to content

Instantly share code, notes, and snippets.

View not-for-me's full-sized avatar
☺️
Fun coding time!

Woojin.joe not-for-me

☺️
Fun coding time!
View GitHub Profile

Mac OS X 터미널에서 Sublime Text 2 실행하기

Sublime Text 2는 subl(왜 sublime이 아닌지는 의문)이라는 CLI(Command-lime interface)을 갖고있다. 이 유틸리티는 디폴트로 설치되는 다음과 같은 폴더에 위치한다.

open /Applications/Sublime\ Text\ 2.app/Contents/SharedSupport/bin/subl

설치

물론 저 폴터에 있는 subl을 바로 사용하면 되겠지만 편리하게 사용할 수 있는 두가지 방법을 적어본다.

#Gist를 이용한 코드조각관리 이번 글에서는 Code Snippet이라 불리는 코드조각을 효과적으로 어떻게 관리할 수 있을까에 대한 하나의 방법을 논하고자 한다. 개발을 진행하다보면 무수히 많은 코드를 작성하게 된다. 때때로 작성한 코드 중의 일부를 나중에도 활용해보기 위해 코드를 분류한다. 대체로 이런 경우 자신만의 메모장을 활용하거나, 자주 사용하는 에디터를 활용해서 이를 관리하는 경향이 있다. 하지만 이런 방법은 코드가 많아질수록 검색하기가 쉽지 않고, 개발언어에 따라 효율적으로 코드를 관리하기도 어렵다. 또한 개발하는 IDE환경에서도 손쉽게 사용할 수 없으며, 사무실/집 등, 여러 장소에서 동일하게 사용하는 것도 불가능하다. (물론 Dropbox)와 같은 클라우드 서비스를 활용하면 어느정도 다양한 환경에서 활용가능하지만 이 방법은 회사와 같이 보안 상의 이유로 서비스가 막혀 있는 곳에서는 제대로 적용이 불가능한 문제가 발생한다.

많은 웹사이트 조사를 통해 다양한 Snippet관리 서비스를 찾아봤지만, 그 중에서 개발에 가장 유용한 방식은 GitHub에서 제공하는 Gist라는 서비스를 이용하는 것이었다. 따라서 본 세션에서는 Gist를 이용한 Snippet관리 방식을 알아보고자 한다. 또한 최근 각광받고 있는 Sublime Text에서 Gist플러그인을 활용하여 어떻게 효율적으로 개발Editor와 함께 사용할 수 있는지도 알아보고자 한다.

#Gist환경 셋팅

Github 회원가입

Gist 사용을 위해서는 GitHub 회원가입을 한다. Github는 매우 유명하고 널리 퍼져있는 서비스이므로 서비스가 중단될 걱정을 하지 않고 사용할 수 있다. 외국사이트이니만큼 회원정보도 과도하게 요구하지 않는다.

Sublime에 Gist 플러그인 설치

@not-for-me
not-for-me / gist:9976730
Last active August 29, 2015 13:58
Personal Study Archive

Personal Study Archive Platform

Requirements

  • URL을 갖고 있기
  • 검색 편이성
  • Embed HTML 허용 등
@not-for-me
not-for-me / .vimrc
Created April 15, 2014 03:04
Vim Configuration
set autoindent
set cindent
set smartindent
set nocompatible
set visualbell
set backspace=indent,eol,start
set history=50
set ruler
set showcmd
set incsearch
import org.eclipse.paho.client.mqttv3.MqttCallback;
import org.eclipse.paho.client.mqttv3.MqttClient;
import org.eclipse.paho.client.mqttv3.MqttConnectOptions;
import org.eclipse.paho.client.mqttv3.MqttDeliveryToken;
import org.eclipse.paho.client.mqttv3.MqttException;
import org.eclipse.paho.client.mqttv3.MqttMessage;
import org.eclipse.paho.client.mqttv3.MqttTopic;
public class SimpleMqttClient implements MqttCallback {
@not-for-me
not-for-me / classification_with_selected_term.r
Last active August 29, 2015 14:02
Document Classification with selected Term
# Library Load
library(tm)
library(party)
library(rpart)
library(nnet)
library(randomForest)
# Current R environment session Info
sessionInfo()
@not-for-me
not-for-me / classification_with_whole_term.r
Created June 17, 2014 07:22
Document Classification with whole Term
# Load Library
library(tm)
library(party)
library(rpart)
library(nnet)
library(randomForest)
# Current R environment session Info
sessionInfo()
@not-for-me
not-for-me / clustering_bible.r
Last active August 29, 2015 14:03
Clustering text(bibile) wirh R
# Library Load
library(tm)
# Set file Paths
otFilePath <- "~/Documents/mining/project/old"
ntFilePath <- "~/Documents/mining/project/new"
# Import txt to TextCorpus
oldTextCorpus <- Corpus(DirSource(otFilePath), readerControl = list(reader = readPlain, language = "en"))
newTextCorpus <- Corpus(DirSource(ntFilePath), readerControl = list(reader = readPlain, language = "en"))
@not-for-me
not-for-me / topicmodel.r
Last active August 29, 2015 14:03
topicmodel_with_r
# Library Load
library(tm)
# Set file Paths
otFilePath <- "~/Documents/mining/project/old"
ntFilePath <- "~/Documents/mining/project/new"
# Import txt to TextCorpus
oldTextCorpus <- Corpus(DirSource(otFilePath), readerControl = list(reader = readPlain, language = "en"))
newTextCorpus <- Corpus(DirSource(ntFilePath), readerControl = list(reader = readPlain, language = "en"))