https://github.com/mustache/emacs
In your shell:
cd ~/.emacs.d/vendor
curl -O https://github.com/mustache/emacs/raw/master/mustache-mode.el
In your Emacs config:
(add-to-list 'load-path "~/.emacs.d/vendor/mustache-mode.el")
#!/usr/bin/env python | |
__copyright__ = 'Yuanxuan Wang <zellux at gmail dot com>' | |
from calibre.web.feeds.news import BasicNewsRecipe | |
from calibre.ebooks.BeautifulSoup import Tag, NavigableString | |
from collections import OrderedDict | |
from contextlib import nested, closing | |
import json |
ace.require("ace/lib/net").loadScript("https://raw.github.com/ajaxorg/ace-builds/master/src-min-noconflict/keybinding-vim.js", function() { | |
e = document.getElementById("ace-editor").env.editor; | |
e.setKeyboardHandler(ace.require("ace/keyboard/vim").handler); | |
}) | |
// for gist | |
ace.require("ace/lib/net").loadScript("https://rawgithub.com/ajaxorg/ace-builds/master/src-min-noconflict/keybinding-vim.js", | |
function() { | |
e = document.querySelector(".ace_editor.ace-github").env.editor; |
#!/usr/bin/env python | |
# -*- coding: utf-8 -*- | |
def create_shift_table(pattern): | |
ascii_table = {} | |
len_pattern = len(pattern) | |
for i in range(0, 128): # 初始化表 | |
ascii_table[chr(i)]=len_pattern | |
for i in range(0, len_pattern-1): # 构造移动表,排除模式的最后一个字符 | |
p = pattern[i:i+1] |
function memorize(f) { | |
var cache = {}; | |
// 这个函数是什么意思呢 | |
// 就是使用闭包的特性,保留了cache的值 | |
// 这值将间接使用上次调用时产生的值。下面例子中会详细讲解。 | |
return function() { | |
console.log(cache); // 打印缓存值 | |
// 这里的key就是一个签名档意思,也就是被缓存函数的参数 | |
var key = Array.prototype.join.call(arguments, ','); | |
// console.log(key) |
#!/usr/bin/env python | |
def move(origin, dest): | |
print "%s -> %s" % (origin, dest) | |
def hanoi(n, origin, assist, dest): | |
if n is 1: | |
move(origin, dest) | |
else: | |
hanoi(n - 1, 'A', 'C', 'B') |
#include <stdio.h> | |
void print(int a, int b) { | |
printf("a=%d, b=%d\n", a, b); | |
} | |
int v1(int a, int b) { | |
int c; | |
c = a; |
#!/usr/bin/env python | |
# -*- coding: utf-8 -*- | |
# 字典法 | |
global counter | |
counter = 0 | |
def gem(a, k): | |
""" | |
k是用来表明这次递归从那个固定的数开始 | |
""" | |
n = len(a) |
def addListener(self, listener, msgClass): | |
if listener not in self.listeners: | |
self.listeners[listener] = {} | |
amTypes = self.listeners[listener] | |
amTypes[msgClass.get_amType()] = msgClass | |
def dispatchPacket(self, source, packet): | |
... | |
for l in self.listeners: |
"use strict" | |
( ($) -> | |
loadImage = ($image, src, callback) -> | |
$image.bind "load", (e) -> | |
$image.unbind "load" | |
callback $image | |
.each -> | |
if $image[0].complete | |
$image.trigger "load" |
https://github.com/mustache/emacs
In your shell:
cd ~/.emacs.d/vendor
curl -O https://github.com/mustache/emacs/raw/master/mustache-mode.el
In your Emacs config:
(add-to-list 'load-path "~/.emacs.d/vendor/mustache-mode.el")