Skip to content

Instantly share code, notes, and snippets.

@clkao
clkao / discourse.patch
Created December 30, 2017 07:32
discourse sso auto
diff --git a/app/controllers/session_controller.rb b/app/controllers/session_controller.rb
index e96566f..f5f63be 100644
--- a/app/controllers/session_controller.rb
+++ b/app/controllers/session_controller.rb
@@ -9,7 +9,7 @@ class SessionController < ApplicationController
before_action :check_local_login_allowed, only: %i(create forgot_password)
skip_before_action :redirect_to_login_if_required
- skip_before_action :preload_json, :check_xhr, only: ['sso', 'sso_login', 'become', 'sso_provider', 'destroy']
+ skip_before_action :preload_json, :check_xhr, only: ['sso', 'sso_dry', 'sso_login', 'become', 'sso_provider', 'destroy']
var JSFtp = require('jsftp');
var ndjson = require('ndjson')
var path = require("path");
var async = require("async");
var URL = require('url');
var FTP_DIR_TYPE = 1;
var base = process.argv[2];//"ftp://ftp02.portlandoregon.gov/Parks"
if (!base) throw "must have ftp url"
@clkao
clkao / g0v-rainbow.svg
Created November 27, 2016 15:30
g0v-rainbow.svg
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@clkao
clkao / README.md
Last active January 18, 2016 17:41 — forked from nitaku/README.md
Custom hex projection

An example of some random hexagons from an integer-coordinates hexagonal tiling, rendered with a custom projection that makes hexagons appear regular.

The technique is taken from this Mike Bostock's example, and it makes use of 3x2 hexagons like this one:

   -1 0 1   X
 2    *
 1  *   *
 0  * O *
-1 *
Dear Sir or Madam,
It seems your web service is using the country list with the ISO3166-2 list.
It is advised to use country names in the GENC[1] standard (formly known as FIPS 10-4) to avoid controversy of Taiwan and to be able to include Kosovo.
[1] https://www.fgdc.gov/standards/news/GENC
@clkao
clkao / cec.lsc
Last active August 29, 2015 14:13
中選會回應產生器
#!/usr/bin/lsc
#
# Usage:
# % npm i -g LiveScript
# % lsc cec.ls 2
# (stdout)
# 中選會:分享「
# 分享「
# 分享「不能宣傳 2/14 罷免蔡正元」難判定有無違法,盡量不要分享「不能宣傳 2/14 罷免蔡正元」,以免觸法。
# 」難判定有無違法,盡量不要分享「
### Keybase proof
I hereby claim:
* I am clkao on github.
* I am clkao (https://keybase.io/clkao) on keybase.
* I have a public key whose fingerprint is 8048 10B9 41A6 749E 8AE5 5187 1660 A7D4 0109 3F56
To claim this, I am signing this object:
@clkao
clkao / gist:8caab7465405ae3560f7
Created October 5, 2014 03:55
2009 縣市議員選舉政治獻金會計報告書 (廉政專刊第7,8期)
98 年縣(市)議員選舉擬參選人
基隆市
丁玉玲
丁玉玲政治獻金收支結算表
98 年 10 月 16 日至 98 年 12 月 05 日
金額
收支科目 備註
(新台幣:元)
個人捐贈收入 0
營利事業捐贈收入 0
@clkao
clkao / gist:8731bfaa9b4fc86e0afd
Created October 5, 2014 03:17
2009 縣市長、鄉鎮市長選舉政治獻金會計報告書 (廉政專刊第6期)
一、 98 年縣(市)長選舉擬參選人
基隆市
林右昌
林右昌政治獻金收支結算表
98 年 06 月 21 日至 99 年 01 月 04 日
金額
收支科目 備註
(新台幣:元)
"個人捐贈收入 2,715,900 "
"營利事業捐贈收入 60,000 "
@clkao
clkao / gist:e89bb1a635887f3ea2e3
Created October 5, 2014 02:44
2010 直轄市長、議員選舉政治獻金會計報告書 (廉 政 專 刊 第26期)
一、 99 年直轄市市長選舉擬參選人
臺北市
吳武明
吳武明政治獻金收支結算表
99 年 08 月 06 日至 99 年 11 月 26 日
金額
收支科目 備註
(新台幣〆元)
"個人捐贈收入 46,200 "
營利事業捐贈收入 0