> ## Content Index
> Fetch the complete content index at: https://sudormrf.run/llms.txt
> Use this file to discover other available public pages before exploring further.

# Code 공유할 때 Gist 사용해보기
- URL: https://sudormrf.run/2016/11/06/use-gist/
- Published: 2016-11-06T10:58:47.000Z
- Updated: 2018-04-02T06:47:31.000Z
- Author: Junho Cho
- Tags: dev, ghost, #Import 2026-10-24 03:36

Blog 또는 code 공유에 있어서 Syntax highlight는 가독성때문에 중요하다고 생각한다.  
현재 사용하고 있는 Ghost의 MarkDown을 사용하여 code를 공유하면 아래와 같고.

```bash
#!/bin/bash
PATH="$PATH:/usr/bin/"
export USER="junho"  #Current unbuntu id
DISPLAY="3" #이것도 새로만들어줌.
DEPTH="16"
GEOMETRY="1280x800"
OPTIONS="-depth ${DEPTH} -geometry ${GEOMETRY} :${DISPLAY} -localhost"
. /lib/lsb/init-functions

case "$1" in
start)
log_action_begin_msg "Starting vncserver for user '${USER}' on localhost:${DISPLAY}"
su ${USER} -c "/usr/bin/vncserver ${OPTIONS}"
;;

stop)
log_action_begin_msg "Stopping vncserver for user '${USER}' on localhost:${DISPLAY}"
su ${USER} -c "/usr/bin/vncserver -kill :${DISPLAY}"
;;

restart)
$0 stop
$0 start
;;
esac
exit 0

```

[Gist](https://gist.github.com/?ref=sudormrf.run) 란 서비스로 code를 작성한후 post에 임베딩해서 넣으면 아래와 같다.

앞으로 더 애용해야될 서비스 같다.