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
<!DOCTYPE html> | |
<html> | |
<head> | |
<title>Demo</title> | |
<link href="lib/codemirror.css" rel="stylesheet"> | |
<style type="text/css"> | |
html, body { height: 100%; margin: 0; padding: 0; } | |
.wrap { | |
position: relative; | |
height: 100%; |
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
Index: src/http/modules/ngx_http_dav_module.c | |
=================================================================== | |
--- src/http/modules/ngx_http_dav_module.c (revision 4898) | |
+++ src/http/modules/ngx_http_dav_module.c (working copy) | |
@@ -55,6 +55,9 @@ | |
static ngx_int_t ngx_http_dav_copy_tree_file(ngx_tree_ctx_t *ctx, | |
ngx_str_t *path); | |
+static ngx_int_t ngx_http_dav_check_unmodified(ngx_http_request_t *r, | |
+ ngx_file_info_t *fi); |
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
function indentOnBrace(cm) { | |
var cursor = cm.getCursor(), line = cm.getLine(cursor.line); | |
var indent = cursor.ch == 0 || /^\s*$/.test(line.slice(0, cursor.ch)); | |
cm.replaceSelection("}", "end"); | |
if (indent) cm.indentLine(cursor.line); | |
} | |
instance.setOption("electricChars", false); | |
instance.setOption("extraKeys", {"'}'": indentOnBrace}); |
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
0 info it worked if it ends with ok | |
1 verbose cli [ '/usr/bin/node', '/usr/bin/npm', 'install', 'js-yaml' ] | |
2 info using [email protected] | |
3 info using [email protected] | |
4 verbose read json /home/marijn/src/js/heckle/package.json | |
5 verbose read json /home/marijn/src/js/heckle/node_modules/rimraf/package.json | |
6 verbose read json /home/marijn/src/js/heckle/node_modules/dateformat/package.json | |
7 verbose read json /home/marijn/src/js/heckle/node_modules/marked/package.json | |
8 verbose from cache /home/marijn/src/js/heckle/package.json | |
9 verbose readDependencies using package.json deps |
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
CodeMirror.defineExtension("centerOnCursor", function() { | |
var coords = this.cursorCoords(null, "local"); | |
this.scrollTo(null, (coords.y + coords.yBot) / 2 - | |
(this.getScrollerElement().clientHeight / 2)); | |
}); |
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
<h2> Hello </h2> | |
<p>Here is some content...</p> |
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
<!doctype html> | |
<html> | |
<head> | |
<title>HTML&CSS SANDBOX</title> | |
<meta charset=utf-8> | |
<script src=lib/codemirror.js></script> | |
<script src=mode/xml/xml.js></script> | |
<script src=mode/javascript/javascript.js></script> | |
<script src=mode/css/css.js></script> | |
<script src=mode/htmlmixed/htmlmixed.js></script> |
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
for vec::iter2(arr1, arr2) {|elt1, elt2| | |
if elt1 == "" { cont; } | |
if elt2 == "stop" { break; } | |
} | |
fn find_key(map: map<key, thing>, x: thing) -> key { | |
for map.items {|key, val| | |
if val == x { ret key; } | |
} | |
fail "not found"; |
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
fn main() { | |
let x = vec::init_elt(5000u, 20), y = 0; | |
int::range(0, 10000, {|_i| | |
y += vec::foldl(1, x, {|a, b| a + b}); | |
vec::iteri(x, {|i, e| y += i as int + e;}); | |
y += vec::map(x, {|x| x + 2}).len() as int; | |
}); | |
log(error, y); | |
} |
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
impl util for uint { | |
fn str() -> str { uint::str(self) } | |
fn times(f: block(uint)) { | |
let c = 0u; | |
while c < self { f(c); c += 1u; } | |
} | |
} | |
impl util<T> for [T] { | |
fn len() -> uint { vec::len(self) } |