Skip to content

Instantly share code, notes, and snippets.

[공통] 마크다운 markdown 작성법

1. 마크다운에 관하여

1.1. 마크다운이란?

**Markdown**은 텍스트 기반의 마크업언어로 2004년 존그루버에 의해 만들어졌으며 쉽게 쓰고 읽을 수 있으며 HTML로 변환이 가능하다. 특수기호와 문자를 이용한 매우 간단한 구조의 문법을 사용하여 웹에서도 보다 빠르게 컨텐츠를 작성하고 보다 직관적으로 인식할 수 있다. 마크다운이 최근 각광받기 시작한 이유는 깃헙(https://github.com) 덕분이다. 깃헙의 저장소Repository에 관한 정보를 기록하는 README.md는 깃헙을 사용하는 사람이라면 누구나 가장 먼저 접하게 되는 마크다운 문서였다. 마크다운을 통해서 설치방법, 소스코드 설명, 이슈 등을 간단하게 기록하고 가독성을 높일 수 있다는 강점이 부각되면서 점점 여러 곳으로 퍼져가게 된다.

1.2. 마크다운의 장-단점

1.2.1. 장점

int randomInt(int min, int max) {
return (int)(Math.random() * (max - min + 1)) + min;
}
#include <iostream>
using namespace std;
void swap(int arr[], int a, int b) {
int tmp = arr[a];
arr[a] = arr[b];
arr[b] = tmp;
}
@recoverlee
recoverlee / combination.c
Created October 15, 2015 10:34
combination
// nPr = n! / (n-r)!
// nCr = nPr / r! = n! / ((n-r)! * r!)
int combination(int n, int r)
{
int ret = 1;
for (int i = 1; i <= r; i++)
{
ret = ret*(n - i + 1) / i;
}
#include <iostream>
using namespace std;
void swap(int arr[], int a, int b) {
int tmp = arr[a];
arr[a] = arr[b];
arr[b] = tmp;
}
#include <time.h>
#include <stdio.h>
clock_t before;
void start() {
before = clock();
}
void end(char* title) {
printf("%s - time %5.5f \n", title, (double)(clock() - before) / CLOCKS_PER_SEC);
@recoverlee
recoverlee / ubuntu-dev.md
Last active August 28, 2015 08:00
우분투 14.04에서 개발환경

GIT 사용환경 ( zshell + scm_breeze )

git, gitk

sudo apt-get install git gitk

zshell

curl -L http://install.ohmyz.sh | sh
@recoverlee
recoverlee / gist:fb5ce6a76757ee5d9cd6
Last active August 29, 2015 14:28
Get Local Time
/*
기존의 획득한 시간 정보를 timezone이 변경이 되더라도 동일하게 표기하기 위해 사용되는 함수
long beforeTime = System.currentTimeMillis();
long beforeOffSet = TimeZone.getDefault().getOffset(beforeTime);
// 중간에 TimeZone이 변경되더라도 beforeTime과 beforeOffSet을 알고 있으면 변경된 timezone에서의 동일하게 표기되는 년/월/일/시/분/초 정보인 epoch time을 획득할 수 있다.
long afterTime = getCurrentLocalTime(beforeTime, beforeOffSet);
*/
public static long getCurrentLocalTime(long localTime, long timeOffset) {
Calendar calendar = Calendar.getInstance(TimeZone.getTimeZone("UTC"));