Skip to content

Instantly share code, notes, and snippets.

View evanscottgray's full-sized avatar
🤠
herding cats

Evan Gray evanscottgray

🤠
herding cats
View GitHub Profile
@evanscottgray
evanscottgray / pass_socket.py
Created August 6, 2017 12:29 — forked from josiahcarlson/pass_socket.py
An example of passing a socket between processes using Python's multiprocessing library
'''pass_socket.py
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
<!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]-->
<head>
<meta charset="utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<link rel="stylesheet" type="text/css" href="https://code.jquery.com/ui/1.10.4/themes/black-tie/jquery-ui.css"/>
class BaseComponent extends React.Component {
_bind(...methods) {
methods.forEach( (method) => this[method] = this[method].bind(this) );
}
}
class ExampleComponent extends BaseComponent {
constructor() {
super();
this._bind('_handleClick', '_handleFoo');
class ExampleComponent extends React.Component {
constructor() {
super();
this. _handleClick = this. _handleClick.bind(this);
}
render() {
return <div onClick={this._handleClick}>Hello, world.</div>;
}
@evanscottgray
evanscottgray / zfsnfs.md
Last active January 27, 2017 16:55
created by https://github.com/tr3buchet/gister, 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 https://unix.stackexchange.com/questions/184338/nfs-no-longer-mounts-rpc-statd-fails-to-start)
systemctl start nfs
@evanscottgray
evanscottgray / gist:1d7f6eff8457575fda11
Created June 17, 2015 21:11
created by github.com/tr3buchet/gister
[evan|laserbeams /Users/evan]% cat test.txt
hello towne you are cool
@evanscottgray
evanscottgray / gist:efa984d3e603bec62573
Created June 17, 2015 21:10
created by github.com/tr3buchet/gister
hello towne you are cool
@evanscottgray
evanscottgray / test.rb
Created June 9, 2015 20:46
redis things
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)
end
end
@evanscottgray
evanscottgray / darkghe.css
Created June 2, 2015 20:07
github enterprise dark css syntax highlights
/*! Vibrant Ink */.ace_editor, .highlight {
background-color: #0F0F0F!important;
color: #FFF!important;
}
.pl-c {
color: #93C!important;
font-style: italic!important;
}
.c {
{
"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",