Skip to content

Instantly share code, notes, and snippets.

Craig Wright crw

View GitHub Profile
@crw
crw / webpack-notifier.py
Created Oct 13, 2016
Hacked MacOS Notifications from Webpack. Run: webpack -w -d | webpack-notifier.py
View webpack-notifier.py
#!/usr/bin/env python
# Requires:
# pip install pync
# brew install terminal-notifier
import sys
from pync import Notifier
# Reading from pipe in Python, from:
@crw
crw / Todo.jsx
Last active May 21, 2016
Replacing the input checkbox with an emoji.
View Todo.jsx
var React = require('react');
var Todo = React.createClass({
render: function () {
var {id, text, completed} = this.props;
return (
<div onClick={() => { this.props.onToggle(id); }}>
<p>{(completed ? '😄' : '😑')}</p>
View gist:f30664c48edee57b700d
### Keybase proof
I hereby claim:
* I am crw on github.
* I am crw (https://keybase.io/crw) on keybase.
* I have a public key whose fingerprint is BEF8 E3F7 DF60 CB02 CC20 2479 BC0B 5AE8 7687 A64A
To claim this, I am signing this object:
@crw
crw / gist:5329229
Created Apr 7, 2013
Failing python-textile unit tests.
View gist:5329229
(env)crw@monkey:~/dev/python-textile master % $ nosetests
nose.plugins.cover: ERROR: Coverage not available: unable to import coverage module
...................S.........................................................................................F.FF.F..................S....
======================================================================
FAIL: textile.tests.TestKnownValues.testKnownValuesXHTML(u"p=. O\xf9 est l'\xe9cole, l'\xe9glise s'il vous pla\xeet?", u'\t<p style="text-align:center;">O\xf9 est l&#8217;\xe9cole, l&#8217;\xe9glise s&#8217;il vous pla\xeet?</p>', 'xhtml')
----------------------------------------------------------------------
Traceback (most recent call last):
File "/Library/Frameworks/Python.framework/Versions/7.3/lib/python2.7/site-packages/nose/case.py", line 197, in runTest
self.test(*self.arg)
File "/Users/crw/dev/python-textile/textile/tests/__init__.py", line 277, in check_textile
You can’t perform that action at this time.