View test_file.md
Test
View improved-createElement-interface.js
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
window.$ = function(element, propsOrChildren, childrenIfProps){ | |
var props, children; | |
if ((propsOrChildren != null && propsOrChildren instanceof Array) || !(propsOrChildren instanceof Object)) { | |
props = null; | |
children = propsOrChildren; | |
} else { | |
props = propsOrChildren; | |
children = childrenIfProps; | |
} | |
return React.createElement(element, props, children); |
View jsx-alternative-example.coffee
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
$ Jumbotron, style: styles.welcome.base, [ | |
$h2 'this is a catchy tagline' | |
$p 'here is a short mission statement, expanding on the tagline' | |
$hr() | |
$a href: '/demo', [ | |
$ Button, | |
bsStyle: 'primary' | |
bsSize: 'large' | |
'Try the demo' | |
] |
View improved-createElement-interface.coffee
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
window.$ = (element, propsOrChildren, childrenIfProps) -> | |
if (propsOrChildren? and propsOrChildren instanceof Array) or not (propsOrChildren instanceof Object) | |
props = null | |
children = propsOrChildren | |
else | |
props = propsOrChildren | |
children = childrenIfProps | |
React.createElement element, props, children | |
Object.keys(React.DOM).forEach (elementName) -> |
View keybase.md
Keybase proof
I hereby claim:
- I am chrisvfritz on github.
- I am chrisvfritz (https://keybase.io/chrisvfritz) on keybase.
- I have a public key whose fingerprint is 6FC1 8F2B 9215 8472 0B80 D5FF AFB9 EFE0 F2BF 46CA
To claim this, I am signing this object:
View simple_trending_example.rb
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
# constant array with the 100 most common words in English | |
COMMON_WORDS = ["the","be","to","of","and","a","in","that","have","i","it","for","not","on","with","he","as","you","do","at","this","but","his","by","from","they","we","say","hew","she","or","an","will","my","one","all","would","there","their","what","so","up","out","if","about","who","get","which","go","me","when","make","can","like","time","no","just","him","know","take","people","into","year","your","good","some","could","them","see","other","than","then","now","look","only","come","its","over","think","also","back","after","use","two","how","our","work","first","well","way","even","new","want","because","any","these","give","day","most","us"] | |
# these numbers are totally made up, so you'll probably want to tweak them | |
MINIMUM_FREQUENCY_FOR_THREE_WORD_PHRASES = 10 | |
MINIMUM_FREQUENCY_FOR_TWO_WORD_PHRASES = 20 | |
MINIMUM_FREQUENCY_FOR_SINGLE_WORDS = 30 | |
three_word_phrases = Array.new | |
two_word_phrases = Array.new |
View docverter_error_20130918.html
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> | |
<meta http-equiv="Content-Type" content="text/html; charset=utf-8"/> | |
<title>RuntimeError at /convert</title> | |
<script type="text/javascript"> | |
//<!-- | |
function toggle(id) { | |
var pre = document.getElementById("pre-" + id); |
View livescript-react-without-jsx.ls
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
# Since React has made jQuery obsolete for me, I use $ to replace JSX. | |
window.$ = React.create-element | |
for key, value of React.DOM | |
window."$#key" = value | |
# And here's an example of a render function using this syntax. | |
render: -> | |
$ Jumbotron, style: styles.welcome.base, [ | |
$h2 key: \tagline, 'this is a catchy tagline' | |
$p key: \mission, 'here is a short mission statement, expanding on the tagline' |
View get-players.js
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 getPlayers () { | |
var players = [ | |
{ name: 'Alice', score: 99 }, | |
{ name: 'Billy', score: 83 }, | |
{ name: 'Cindy', score: 91 }, | |
{ name: 'David', score: 96 }, | |
{ name: 'Emily', score: 88 } | |
] | |
function randomIndex () { |
OlderNewer