Syslogd

$ cat life >/dev/null 2>&1

CodeRay Code Block

default 4 space code block

#include <stdio.h>
#include <stdlib.h>     /*malloc()*/

void int2str(int, char *);

int main()
{
    int i=123;
    char *s = (char *)malloc(sizeof(char));     //remember cast malloc output (char *)
    int2str(i, s);
    printf("%s\n", s);
    return 0;
}

void int2str(int i, char *s){
    sprintf(s, "%d", i);
}

fency code block

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
#include <stdio.h>
#include <stdlib.h>     /*malloc()*/

void int2str(int, char *);

int main()
{
    int i=123;
    char *s = (char *)malloc(sizeof(char));     //remember cast malloc output (char *)
    int2str(i, s);
    printf("%s\n", s);
    return 0;
}

void int2str(int i, char *s){
    sprintf(s, "%d", i);
}

Math Support

  • edit source/_includes/custom/head.html and add below code piece
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
<!-- MathJax -->
<script type="text/x-mathjax-config">
  MathJax.Hub.Config({
    tex2jax: {
      inlineMath: [ ['$','$'], ["\\(","\\)"] ],
      processEscapes: true
    }
  });
</script>
<script type="text/x-mathjax-config">
    MathJax.Hub.Config({
      tex2jax: {
        skipTags: ['script', 'noscript', 'style', 'textarea', 'pre', 'code']
      }
    });
</script>
<script type="text/x-mathjax-config">
    MathJax.Hub.Queue(function() {
        var all = MathJax.Hub.getAllJax(), i;
        for(i=0; i < all.length; i += 1) {
            all[i].SourceElement().parentNode.className += ' has-jax';
        }
    });
</script>
<script type="text/javascript"
   src="http://cdn.mathjax.org/mathjax/latest/MathJax.js?config=TeX-AMS-MML_HTMLorMML">
</script>

Jekyll Tutorial

介紹Jekyll的安裝, 工作流程以及調整方式

摘要

  • 建立環境
    • 安裝Jekyll
    • 開通GitHub blog
    • 上傳公鑰
    • 調整編輯環境

Octopress Tutorial

Octopress安裝流程

  • 選定~/Dropbox/blog作為blog內容的存放點
  • GitHub “GitHub"上註冊帳號後新增一個repository,
    名稱為username.github.io
    這邊username要換成申請到的帳號名稱,
    新增成功後頁面會有一個ssh link像這樣

    git@github.com:[username]/[username].github.io.git