Attention: the list was moved to
https://github.com/dypsilon/frontend-dev-bookmarks
This page is not maintained anymore, please update your bookmarks.
| import re | |
| from hashlib import md5 | |
| def gfm(text): | |
| # Extract pre blocks. | |
| extractions = {} | |
| def pre_extraction_callback(matchobj): | |
| digest = md5(matchobj.group(0)).hexdigest() | |
| extractions[digest] = matchobj.group(0) | |
| return "{gfm-extraction-%s}" % digest |
| /** | |
| * express 처음에 init 하시면 app.js 를 비롯하여 여러 디렉토리가 생기는데 | |
| * logs 디렉토리에 아무것도 안남는다고 의문을 가지신 분에게 도움이 될거 같습니다. | |
| * connect의 middleware logger 는 기본이 stdout 으로 출력하고 있었네요. | |
| * http://senchalabs.github.com/connect/middleware-logger.html | |
| * manual을 살펴보니 stream options 이 있었군요. | |
| * 한번 생각나서 fs core module의 createWriteStream 을 사용하여 해봤더니 잘되네요. | |
| * 다른 방법도 있으신분은 알려주세요 | |
| */ | |
| var fs = require('fs'), |
| //Came across this in the es-discuss list, on the "clean scope" thread: | |
| https://mail.mozilla.org/pipermail/es-discuss/2011-August/thread.html#16294 | |
| //I do not understand what the "null," part buys. | |
| //Has to do something with scope(?), but at least in Firebug, | |
| //I can see foo inside the string being evaled. | |
| var foo = 'foo'; | |
| (null,eval)('(function(){console.log(foo);}())'); |
| function func(a, f) { | |
| return function (args) { | |
| args.__proto__ = a; | |
| f.call(this, args); | |
| }; | |
| }; | |
| var f = func({foo : 10, bar : 20}, function (args) { | |
| print(args.foo, args.bar); |
| var parser = document.createElement('a'); | |
| parser.href = "http://example.com:3000/pathname/?search=test#hash"; | |
| parser.protocol; // => "http:" | |
| parser.hostname; // => "example.com" | |
| parser.port; // => "3000" | |
| parser.pathname; // => "/pathname/" | |
| parser.search; // => "?search=test" | |
| parser.hash; // => "#hash" | |
| parser.host; // => "example.com:3000" |
| <!-- This code is public domain, share and enjoy. --> | |
| <html> | |
| <style type="text/css" media="screen"> | |
| #table { | |
| position: absolute; | |
| top: 30px; | |
| bottom: 0; | |
| left: 10px; | |
| right: 10px; | |
| } |
Attention: the list was moved to
https://github.com/dypsilon/frontend-dev-bookmarks
This page is not maintained anymore, please update your bookmarks.
| // array utils | |
| // ================================================================================================= | |
| const combine = (...arrays) => [].concat(...arrays); | |
| const compact = arr => arr.filter(Boolean); | |
| const contains = (() => Array.prototype.includes | |
| ? (arr, value) => arr.includes(value) | |
| : (arr, value) => arr.some(el => el === value) |
| * { | |
| font-size: 12pt; | |
| font-family: monospace; | |
| font-weight: normal; | |
| font-style: normal; | |
| text-decoration: none; | |
| color: black; | |
| cursor: default; | |
| } |