Skip to content

Instantly share code, notes, and snippets.

herding cats

Evan Gray evanscottgray

herding cats
View GitHub Profile
evanscottgray /
Created August 6, 2017 12:29 — forked from josiahcarlson/
An example of passing a socket between processes using Python's multiprocessing library
Written September 14, 2012
Released into the public domain.
Works on Python 2.6, 2.7, and may need minor changes for 3+.
import multiprocessing
View tarsnap_usage_calc.html
<!doctype html>
<!--[if lt IE 7]> <html class="no-js ie ie6 lt-ie10 lt-ie9 lt-ie8 lt-ie7" lang="en"> <![endif]-->
<!--[if IE 7]> <html class="no-js ie ie7 lt-ie10 lt-ie9 lt-ie8" lang="en"> <![endif]-->
<!--[if IE 8]> <html class="no-js ie ie8 lt-ie10 lt-ie9" lang="en"> <![endif]-->
<!--[if IE 9]> <html class="no-js ie ie9 lt-ie10" lang="en"> <![endif]-->
<!--[if gt IE 9]><!--> <html class="no-js" lang="en"> <!--<![endif]-->
<meta charset="utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<link rel="stylesheet" type="text/css" href=""/>
View es6bind.js
class BaseComponent extends React.Component {
_bind(...methods) {
methods.forEach( (method) => this[method] = this[method].bind(this) );
class ExampleComponent extends BaseComponent {
constructor() {
this._bind('_handleClick', '_handleFoo');
View gist:c902f4a84253584adb52
class ExampleComponent extends React.Component {
constructor() {
this. _handleClick = this. _handleClick.bind(this);
render() {
return <div onClick={this._handleClick}>Hello, world.</div>;
evanscottgray /
Last active January 27, 2017 16:55
created by, zfs and fedora 22 nfs

getting nfs rocking with zfs on fedora 22

we assume that you have a zfs dataset already called media.

# start nfs service (might fail because no rpcbind
systemctl start nfs
evanscottgray / gist:1d7f6eff8457575fda11
Created June 17, 2015 21:11
created by
View gist:1d7f6eff8457575fda11
[evan|laserbeams /Users/evan]% cat test.txt
hello towne you are cool
evanscottgray / gist:efa984d3e603bec62573
Created June 17, 2015 21:10
created by
View gist:efa984d3e603bec62573
hello towne you are cool
evanscottgray / test.rb
Created June 9, 2015 20:46
redis things
View test.rb
def create(check=@check_data)
key = self.class._make_key(@id)
redis_data = check.to_json
self.class.redis.multi do |m|
m.rpush(self.class._list_key, @id)
m.set(key, redis_data)
evanscottgray / darkghe.css
Created June 2, 2015 20:07
github enterprise dark css syntax highlights
View darkghe.css
/*! Vibrant Ink */.ace_editor, .highlight {
background-color: #0F0F0F!important;
color: #FFF!important;
.pl-c {
color: #93C!important;
font-style: italic!important;
.c {
View gist:615d98f03c7ee9879f4b
"uuid": "oaweijfoaweijfoawfijafowiawjfeoij",
"status": "FUNDED | FUNDING",
"item_details": {
"url": "link to something that is amazon or zinc",
"cost": "cost of item from amazon/zinc/whatever"
"campaign_details": {
"url": "link to tilt or whatever",
"contributed": "dollar amount contributed to date",