Skip to content

Instantly share code, notes, and snippets.

View kevinw's full-sized avatar

Kevin Watters kevinw

View GitHub Profile
@petehunt
petehunt / React sortable
Created December 9, 2013 22:30
Here's an example of React + jQuery UI sortable. The key thing to note is that we have the render() method do absolutely nothing and use componentDidUpdate() + React.renderComponent() to proxy updates through to the children. This lets us manage the DOM manually but still be able to use all the React goodies you know and love.
<html>
<head>
<title>Test</title>
<script src="http://code.jquery.com/jquery-1.9.1.js"></script>
<script src="http://code.jquery.com/ui/1.10.3/jquery-ui.js"></script>
<link rel="stylesheet" href="http://code.jquery.com/ui/1.10.3/themes/smoothness/jquery-ui.css" />
<script src="http://fb.me/react-0.5.1.js"></script>
<script src="http://fb.me/JSXTransformer-0.5.1.js"></script>
</head>
Where to Live (Du Fu)
West of the Flower Washing Stream,
not far downstream from the bridge,
the master has chosen a quiet spot
here in the woods by the river.
Living apart from the city crowds,
the world loosens its grip;
murmuring of this clear water dissolves
@kevinw
kevinw / gist:3549855
Created August 31, 2012 07:22
Paul Graham on copyright and how "files move around like smells"

Paul Graham on copyright and how "files move around like smells"

from his PyCon 2012 Keynote video at http://www.youtube.com/watch?v=R9ITLdmfdLI&t=33m43s

Questioner:

"In one of your recent things online, you said "The answer for the music industry, for example, is probably to give up insisting on payment for recorded music, and focus on licensing and live shows.

Alright I've been talking to Vint Cerf and some people about this--licensing exactly WHAT when copyrights mean NOTHING? You know the internet and software are on a viable business train only because software enjoys these copyrights. So HOW can you just sort of throw away the music industries product and copyright, and yet tell ALL these people to work on things that must be protected by copyright--trademark, a form of copyright--and process patents?"