Skip to content

Instantly share code, notes, and snippets.

@clkao
clkao / ntuh.ls
Last active Aug 29, 2015
parse ntuh live ER status board
View ntuh.ls
require! <[cheerio request fs moment-timezone]>
mapping = do
等候掛號人數: \pending_register
等候看診人數: \pending_doctor
等候住院人數: \pending_ward
等候ICU人數: \pending_icu
等候推床人數: \pending_bed
data = {}
View boot2docker-fwd
#!/bin/bash
usage ()
{
cat <<UsageHERE
boot2docker-fwd -- Helper function to quickly manage port forwards between the boot2docker-vm and the host
Usage: boot2docker-fwd [ -n RULE_NAME ] [ -h HOST_PORT ] [ -p {tcp|udp} ] [ -i HOST_IP ] GUEST_PORT
or boot2docker-fwd -d RULE_NAME
or boot2docker-fwd -l
or boot2docker-fwd -A
@clkao
clkao / README.md
Last active Aug 29, 2015
g0v.tw campaign finance digitization project
View README.md
@clkao
clkao / gist:9786195
Created Mar 26, 2014
服貿公聽會文字紀錄
View gist:9786195
[
{
"gazette": "4053",
"book": "01",
"seq": "1",
"type": "委員會紀錄",
"summary": "內政委員會會議邀請行政院大陸委員會主任委員王郁琦、財團法人海峽交流基金會董事長林中森、經濟部次長、財政部次長就「兩岸服務貿易協議洽簽進度、實質效益,及兩岸電子商務市場競爭關係之現況-以淘寶網為例」提出專題報告並備質詢;另請內政部、行政院海岸巡防署、交通部、文化部、行政院衛生署、行政院環境保護署、金融監督管理委員會、行政院農業委員會、公平交易委員會、行政院公共工程委員會、國家通訊傳播委員會、行政院消費者保護處派員列席並備質詢",
"files": [
"http://lci.ly.gov.tw/LyLCEW/communique1/work/102/28/LCIDC01_1022801_00002.doc"
]
@clkao
clkao / gist:8826939
Created Feb 5, 2014
irc log #poplus 2014-02-05
View gist:8826939
21:58 [Users #poplus]
21:58 [ chris ] [ ETBlue] [ Jen ] [ matthew] [ tkirby ]
21:58 [ clkao ] [ hakim ] [ Lee1092] [ myf ] [ yhsiang]
21:58 [ dave_w] [ ipa ] [ mark ] [ poga ]
21:58 -!- Irssi: #poplus: Total of 14 nicks [0 ops, 0 halfops, 0 voices, 14 normal]
21:58 < clkao> wow quite a crowd here!
21:58 < Jen> For those that have just joined, Clkao shared this earlier: http://g0v.asia/tw
21:59 * hakim reads
22:00 -!- falvarez [~falvarez@pc-103-113-101-190.cm.vtr.net] has joined #poplus
22:00 < Jen> So from mySociety we have Hakim, who you know already :), matthew who's been working on SayIt a lot, mark, who's working on Pombola (our parliamentary monitoring platform), Chris, who's working on popit, myf who does comms for mySoc and dave_w who works with the international team on a lot of different things
View gist:8655960
jwt = new googleapis.auth.JWT do
SERVICE_ACCOUNT_EMAIL
KEYFILE_PEM
null
['https://www.googleapis.com/auth/analytics.readonly']
err, client <- googleapis.discover 'analytics', 'v3' .execute
err, result <- jwt.authorize
console.log result
View gist:7432906
行政院及所屬各級機關
政府資料開放使用授權規範條款
The Terms of Use of Open Government Data
for the Executive Yuan and Other Government Agencies Under Its Supervision
目的
為便利民眾共享及應用政府資料,促進政府資料加值應用,結合民間創意提升政府資料價值,活化政府資料應用,優化政府服務品質。
Purpose
The purpose of the Terms of Use of Open Government Data (hereinafter referred to as the “Terms of Use”) is to facilitate the general public to have access to and make use of Open Government Data, which in turn inspires creativity of the private sector, creates more value on the Open Government Data and enhances the quality of services of the public sector.
View index.html
<html>
<head>
<title>Cyclic Sankeys</title>
<style type="text/css">
#chart {
height: 500px;
}
.node rect {
cursor: move;
View README.md

This simple force-directed graph shows character co-occurence in Les Misérables. A physical simulation of charged particles and springs places related characters in closer proximity, while unrelated characters are farther apart. Layout algorithm inspired by Tim Dwyer and Thomas Jakobsen. Data based on character coappearence in Victor Hugo's Les Misérables, compiled by Donald Knuth.

View gist:5895659
19:06 < DaPonte> hi folk
19:46 <@clkao> howdy!
19:46 <@DaPonte> hi folk
19:46 <@entropy_> hi
19:47 <@entropy_> afk
19:47 <@clkao> back in 10 ;)
19:59 <@entropy_> FYI the pirate feedback developer cmrcx is on holidays
20:00 <@clkao> ah ok ;)
20:00 <@entropy_> and I'm afraid I'll have to leave soon
20:01 <@clkao> *nod* we shall keep logs