- Support Standard Markdown / CommonMark and GFM(GitHub Flavored Markdown);
- Full-featured: Real-time Preview, Image (cross-domain) upload, Preformatted text/Code blocks/Tables insert, Code fold, Search replace, Read only, Themes, Multi-languages, L18n, HTML entities, Code syntax highlighting...;
- Markdown Extras : Support ToC (Table of Contents), Emoji, Task lists, @Links...;
- Compatible with all major browsers (IE8+), compatible Zepto.js and iPad;
- Support identification, interpretation, fliter of the HTML tags;
- Support TeX (LaTeX expressions, Based on KaTeX), Flowchart and Sequence Diagram of Markdown extended syntax;
- Support AMD/CMD (Require.js & Sea.js) Module Loader, and Custom/define editor plugins;
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
var Redis = require('ioredis'); | |
var redis = new Redis({ | |
host: "nodesydney.wiftycloud.com", | |
password: "7884b8baaa49fbcb48f17ad2a146" | |
}); | |
async function main() { | |
// write an event to stream 'events', setting 'key1' to 'value1' | |
await redis.sendCommand( |
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 lang="en"> | |
<head> | |
<meta charset="UTF-8"> | |
<title>Content-Security-Policy</title> | |
<meta name="viewport" content="width=device-width"> | |
<meta http-equiv="Content-Security-Policy" | |
content="default-src 'self' data: gap: 'unsafe-eval' ws: ; | |
style-src 'self' 'unsafe-inline'; | |
script-src https: *.example.com ; |
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
{ | |
"name": "project-name", | |
"description": "Template for static sites", | |
"version": "1.0.0", | |
"homepage": "http://www.project-name.com", | |
"author": { | |
"name": "Adam Reis", | |
"url": "http://adam.reis.nz" | |
}, | |
"license": "UNLICENSED", |
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
/* | |
NOTES: | |
- source: https://github.com/thi-ng/umbrella/blob/develop/examples/hdom-local-render/src/index.ts | |
- demo: https://demo.thi.ng/umbrella/hdom-local-render/ | |
- docs on lifecycle: https://github.com/thi-ng/umbrella/tree/master/packages/hdom#component-objects-with-life-cycle-methods | |
- docs on state MGMT/HOF components: https://github.com/thi-ng/umbrella/wiki/Higher-order-components | |
*/ | |
import { DEFAULT_IMPL, normalizeTree, replaceChild } from "@thi.ng/hdom"; | |
import { memoize1 } from "@thi.ng/memoize"; |
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
clear=cls | |
grep=grep -nRi $* | |
ga=git add -A $* | |
gac=git add -A :/ $T git commit -e | |
gacm=git add -A :/ $T git commit -m $* | |
gau=git add -u | |
gb=git branch -v $* |
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
// Lack of tail call optimization in JS | |
var sum = function(x, y) { | |
return y > 0 ? sum(x + 1, y - 1) : | |
y < 0 ? sum(x - 1, y + 1) : | |
x | |
} | |
sum(20, 100000) // => RangeError: Maximum call stack size exceeded | |
// Using workaround |
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 lang="en"> | |
<body> | |
<span id="output"></span> | |
</body> | |
<script> | |
(function () { | |
var workerBlob = new Blob( | |
[workerRunner.toString().replace(/^function .+\{?|\}$/g, '')], | |
{ type:'text/javascript' } |
CouchDB is a NoSQL database for storing JSON documents. It comes with a REST API out of the box so your client applications can persist data while requiring you to write little or no server-side code. CouchDB's killer feature is its ability to easily replicate, which allows for horizontal scaling, easy backup, and for client adapters to synchronize documents. This is perfect if you want to write an application that is offline-first. It's become my go-to database when creating new