Copy the prism.js
file under examples/prism/
in Draft.js repository.
Run npm install prismjs
Then open it in your browser.
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
/* @flow */ | |
import * as React from 'react'; | |
type ReactContext = Object; | |
/* | |
* Walk a react element. | |
*/ | |
async function walkTree( | |
element: React.Element<*>, |
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 fs = require("fs"); | |
var path = require("path"); | |
var _ = require("lodash"); | |
var utf8 = require('utf8'); | |
require("natural-compare-lite"); | |
var IGNORE = [ | |
"node_modules", | |
".git", | |
"SUMMARY.md", |
Hello from git
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 AutoEscapeExtension(_env) { | |
this.tags = ['autoescape']; | |
this.parse = function(parser, nodes, lexer) { | |
// get the tag token | |
var tok = parser.nextToken(); | |
// parse the args and move after the block end. passing true | |
// as the second arg is required if there are no parentheses | |
var args = parser.parseSignature(null, true); |
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
define([ | |
'hr/utils', | |
'hr/hr', | |
'hr/dom' | |
], function (_, hr, $) { | |
// Evnts for tablet and desktop | |
var events = { | |
'start': "mousedown", | |
'stop': "mouseup", | |
'move': "mousemove", |
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
# Find the rpeortr.py in examples/python | |
from reportr import Reportr | |
# Create a Reportr Client | |
client = Reportr( | |
host="http://www.reportr.io", | |
token="--token--") | |
# Define model for our event | |
client.model("like", "cigarette", |
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
from gittle import Gittle | |
path = '/tmp/gittle_bare' | |
# Clone repository | |
repo = Gittle.clone('git://github.com/FriendCode/gittle.git', path) | |
# Information | |
print "Branches :" | |
print repo.branches |