Skip to content

Instantly share code, notes, and snippets.

View yanfeng42's full-sized avatar
💌
I may be slow to respond.

Macro yanfeng42

💌
I may be slow to respond.
View GitHub Profile
@yanfeng42
yanfeng42 / count-change-gv.scm
Created December 28, 2020 18:49
SICP练习1.14. 使用 GrapViz 可视化 零钱问题的 递归计算步骤.
(define (count-change amount)
(cc amount 5 0)
)
(define (cc amount kinds-of-coins depth)
(define from-node (cc-node-depth amount kinds-of-coins depth))
(display (cc-node-depth-label amount kinds-of-coins depth))
(cond
((= amount 0) 1)
((or (< amount 0) (= kinds-of-coins 0)) 0)
@yanfeng42
yanfeng42 / nodejs_port_forward_by_http.js
Created July 14, 2016 14:53
http port forward for nodejs,ie access jenkins by http://yourhostname/jenkins,which located at http://yourhostname:8080/jenkins
'use strict';
/* Sample
forward :8087/jenkins to :8080/jenkins.
In product,the entityPort can be 80,so u can access jenkins
by http://yourhostname/jenkins
Good Luck! All Done Just By NodeJS!
*/