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
{#color:bg_color|value:"#FFA"} | |
{#color:link_color|value:"#FFA"} | |
{#color:font_color|value:"#FFA"} | |
{#color:date_color|value:"#FFA"} | |
{#color:tag_color|value:"#FFA"} | |
{#color:paper_color|value:"#FFA"} | |
{#color:current_tag_color|value:"#FFA"} | |
<!DOCTYPE html> | |
<html> | |
<head> |
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
''' | |
想做对于 Lisp-like 的括号自动补全, 用 py 脚本处理 | |
先做了测试看(虽然我没学会 clj 没的测), 默认读取 file 输出 new_file | |
现在的定义的规则如下(其中空行被排除) | |
每行代码开头添加 '(' | |
每行代码结尾, 判断缩进个数比下一行多 n 个 | |
当 (n >= 0), 在当前行末尾添加 (n+1) 个 ')' | |
每行代码结尾, 如果 '(' 数 a, ')' 数 b, 下一行多 c 个缩进 | |
若 (a-b-c) 为正, 在该行末尾添加对应个 ')' | |
可以有多层的缩进, 对应手动添加一次括号 '(' |
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
#!/usr/bin/env coffee | |
# 需要`showdown`脚本, 最后加上`xports.converter = new Showdown.converter()`导出为模块 | |
# http://github.github.com/github-flavored-markdown/scripts/showdown.js | |
# 然后在该目录用`$ coffee #{这个文件的名字}.coffee #{需要编译的文件名}.gfm`来运行 | |
# 我将用作常用的工具, 但这个不知道怎么高亮语法, 没办法了, 先这样用着 | |
style = """ | |
body{ | |
background: hsl(0,96%,96%); | |
font-size: 13px; | |
line-height: 26px; |
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
<html><head><title>Genie Notes</title> | |
<link rel="stylesheet" href="../global.css"/> | |
</head><body><pre> | |
不知道学 Genie 什么用场, 也许学后 C 阴影可以小些 | |
教程地址 https://live.gnome.org/Genie | |
粗略的翻译可以看这里: | |
http://www.minghao.hk/bbs/read.php?tid=433 | |
编写 Gtk 图形界面的教程这里: | |
https://live.gnome.org/GtkGuiTutorial |
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
在线版本: | |
http://docview.cnodejs.net/leaf/notes/scheme/scheme.lx?lx | |
打算学`Scheme`, 搜了不少尝试去理解, 中文资源不如`JS`多 | |
`IBM`社区`5+`篇文章, 下面两篇介绍语法方面比较清晰 | |
http://www.ibm.com/developerworks/cn/linux/l-schm/index1.html | |
http://www.ibm.com/developerworks/cn/linux/l-schm/index2.html | |
关于历史掌故可以看下面这篇了解下, 比较乱, 我没有细看 | |
http://blog.chinaunix.net/space.php?uid=20106293&do=blog&id=142113 | |
`scm`的规范简介有力, 真的很短, 入门后去看下 |
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
<html> | |
<head> | |
<title>Node.js Guide CoffeeScript</title> | |
<link rel="stylesheet" href="m.css"/> | |
</head> | |
<body> | |
<pre><code> | |
Node.Js 入门以及中文翻译: | |
http://nodebeginner.org/index.html | |
http://nodebeginner.org/index-zh-cn.html |
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
image = document.getElementById 'login' | |
ll = (v...) -> | |
console.log v | |
socket = io.connect window.location.hostname | |
socket.on 'ready', (data) -> | |
ll data | |
image.onclick = -> |
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
# code from https://github.com/jbr/sibilant/blob/a5d43850eeb86d7859b04016e955a02690246f20/speech_therapist.js | |
ll = console.log | |
plat = (arr) -> | |
str = '' | |
arr = arr.map (x) -> | |
if typeof x is 'object' | |
return plat x | |
else return x | |
return "[#{arr.join ' '}]" |
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
<html> | |
<head> | |
<script type='text/coffeescript'> | |
console.log 'loaded!' | |
</script> | |
<script src='file:/home/chen/code/home/git/docview/libs/coffee-script.js'></script> | |
</head> | |
<body></body> | |
</html> |
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
# this is a CoffeeScript file | |
# put this file at the top level of file tree | |
# run with 'coffee ugo_reset.coffee' | |
fs = require 'fs' | |
path = require 'path' | |
ll = console.log | |
list_files = (dir_name) -> | |
files = fs.readdirSync dir_name |
OlderNewer