Skip to content

Instantly share code, notes, and snippets.

<html>
<body>
<div id="app"></div>
<script src="https://unpkg.com/react/dist/react.min.js" type="text/javascript"></script>
<script src="https://unpkg.com/react-dom/dist/react-dom.min.js" type="text/javascript"></script>
<script type="text/javascript">
(function() {
var h = React.createElement;
var Hello = React.createClass({
render: function() {
@ybonnel
ybonnel / elemjsx.es6
Created August 11, 2015 12:03 — forked from anonymous/elemjsx.es6
Use jsx with Elem.js
const Elem = require('elemjs');
Elem.jsx = (type, attributes, ...children) => {
if (attributes === null) {
return Elem.sel(type, children);
}
return Elem.el(type, attributes, children);
};
export default Elem;
@ybonnel
ybonnel / twitter_say.sh
Created May 28, 2012 18:42 — forked from dgageot/twitter_say.sh
Say each tweet when it arrives
#!/bin/bash
lines_to_skip=`t timeline | wc -l | sed 's/^ *//g'`
i=0
echo Skipping [$lines_to_skip] lines in the timeline
echo From now on, say each tweet as soon as it arrives...
t stream timeline | while read -r line; do