Skip to content

Instantly share code, notes, and snippets.

View chrisvfritz's full-sized avatar

Chris Fritz chrisvfritz

  • Durham, NC, USA
  • 08:40 (UTC -04:00)
View GitHub Profile
@chrisvfritz
chrisvfritz / docverter_error_20130918.html
Created September 18, 2013 23:36
Docverter error while trying to convert from Markdown to MOBI
<!DOCTYPE html>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
<title>RuntimeError at &#x2F;convert</title>
<script type="text/javascript">
//<!--
function toggle(id) {
var pre = document.getElementById("pre-" + id);
@chrisvfritz
chrisvfritz / simple_trending_example.rb
Last active December 22, 2015 06:39
This is an example implementation of a really simple algorithm in Ruby to identify trending words and phrases in a collection of posts. This was written in a single sitting, late at night, without research, so it's definitely not the most efficient way to tackle this problem. I haven't even tested it with real data to make sure that it works as …
@chrisvfritz
chrisvfritz / keybase.md
Created October 13, 2015 15:12
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:

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) ->
$ 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'
]
@chrisvfritz
chrisvfritz / improved-createElement-interface.js
Last active August 29, 2015 14:23
An improved interface to React.DOM elements and React.createElement
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);
@chrisvfritz
chrisvfritz / test_file.md
Created December 2, 2014 16:55
test description

Test

@chrisvfritz
chrisvfritz / test_file.md
Created December 2, 2014 16:50
test description

Test