This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(define (add1 x) (+ 1 x)) | |
(define l3 '(1 2 3)) | |
(define length | |
(lambda (l) | |
(cond ((null? l) 0) | |
(else (add1 (length (cdr l))))))) | |
(lambda (length) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
printf SYS_eventfd2 | gcc -include sys/syscall.h -E - | |
or check out ia32 syscall number: | |
printf SYS_eventfd2 | gcc -include sys/syscall.h -E -m32 - |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
repo所在的机器A不能访问外网,可以通过中间机器B使用github(clone,push,pull) | |
1.建立A到B的ssh 隧道。 | |
2.分别修改~/.ssh/config 与 repo下面的 .git/config 文件 | |
参考http://www.ibm.com/developerworks/cn/linux/l-cn-sshforward/ 这篇文档。 | |
使用文档中图4的‘多主机转发应用‘ 方法。建立 A到B的通道: | |
ssh -g -L 7001:github.com:22 middle-host |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
GFW 第一定律:只要是“用户产生内容”(User-generated content, UGC) 的国外网站都会被和谐。 | |
GFW 第二定律:只要是被和谐的网站,国内一定会至少有一个克隆版。 | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
1. C 程序员对于内存管理,计算机体系的理解能力; | |
2. C++ 程序员对元编程的理解能力; | |
3. Java程序员对于OO和设计模式的理解,对规模项目掌控的能力, 对虚拟机实现理解的能力; | |
4. Ruby程序员创造Web应用的能力; | |
5. Python 程序员在小中型Startup中应对各种问题的能力; | |
6. Javascript 程序员研究颠覆同行对Web交互认知的技术的能力; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
类似各种平铺式窗口管理器,tmux使用键盘操作,常用快捷键包括: | |
Ctrl+b 激活控制台;此时以下按键生效 | |
系统操作 ? 列出所有快捷键;按q返回 | |
d 脱离当前会话;这样可以暂时返回Shell界面,输入tmux attach能够重新进入之前的会话 | |
D 选择要脱离的会话;在同时开启了多个会话时使用 | |
Ctrl+z 挂起当前会话 | |
r 强制重绘未脱离的会话 | |
s 选择并切换会话;在同时开启了多个会话时使用 | |
: 进入命令行模式;此时可以输入支持的命令,例如kill-server可以关闭服务器 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
by default,openwrt do not allow ssh access from wan, here are two method to change that: | |
1.login into your wrt from a lan host.issue the following command: | |
iptables -F | |
the command "flush away" all the firewall rules,including the one that rejects ssh request from wan. | |
now you can try ssh from anywhere. | |
aware that the firewall deactivation leads to highly security risk.and after the wrt restarts ,all default firewall configuration comes back.you hava to "flush" the rules once again. |