Skip to content

Instantly share code, notes, and snippets.

View scriptfans's full-sized avatar

Jerry Chen scriptfans

View GitHub Profile
0x1eb70C7B4EEDE396ee651E63d75322915D51a676
@scriptfans
scriptfans / class.clj
Last active March 19, 2018 04:08
聚会分享,示例代码——OO模拟
(ns oo.core)
;========================辅助函数=========================
;获取对象的类
(defn class-of [object]
(let [
metadata (meta object)
class (:class metadata)
] class)
@scriptfans
scriptfans / factorial.clj
Created March 16, 2018 16:53
聚会分享,示例代码——计算阶乘
(ns oo.core)
(defn factorial-1 [n]
(if (or (= n 0) (= n 1))
1
(*' n (factorial-1 (dec n)))))
(println (factorial-1 100))
(defn factorial-2
@scriptfans
scriptfans / gist:4974ecb52cea02dcb152
Last active July 3, 2016 10:24
Karabiner配置文件,将Minila的App键变成Option,以及对调Delete键跟右侧的Shift。(注意自行修改vendorid,可以在Karabiner的Misc设置——EventView——Devices界面查看)
<?xml version="1.0"?>
<root>
<devicevendordef>
<vendorname>FILCO_MINILA</vendorname>
<vendorid>0x0a5c</vendorid>
</devicevendordef>
<item>
<name>[FILCO_MINILA] Map app to option</name>
<identifier>private.devicevendordef1</identifier>