Life is Struggle

PostgreSQL Sql 筆記

1. 查看執行中 sql 的方法

1
select * from pg_stat_activity

2. base64 encode 欄位 – encode()

1
2
3
select encode(convert_to(fname,'utf-8'), 'base64') as url
  from media
 where media_type in(1,2)

使用 Octopress 建立 Github Blog

1. 安裝 git & ruby – 以下是我用的版本

1
2
3
4
ruby --version
ruby 2.0.0p247 (2013-06-27 revision 41674) [universal.x86_64-darwin13]
git --version
git version 1.8.3.4 (Apple Git-47)

First Article

this is my first article @ github by octopress 你好

  • line1
  • line2
  • line3
  • line4

code test

1
$ git clone git@github.com:imathis/octopress.git # fork octopress
php test
1
2
phpinfo();
echo "test";
javascript test
1
2
alert('haha');
var aa = "hello";
html test
1
2
3
<form action="">
    <input type="text" name="userid" id="userid"/>
</form>
java tset
1
2
3
import sun.java.util.*;
String[] ary = null;
System.out.println("haha");
1
[rectangle setX: 10 y: 10 width: 20 height: 20];