Skip to content

Instantly share code, notes, and snippets.

Avatar
🤠
herding cats

Evan Gray evanscottgray

🤠
herding cats
View GitHub Profile
@evanscottgray
evanscottgray / pass_socket.py
Created Aug 6, 2017 — forked from josiahcarlson/pass_socket.py
An example of passing a socket between processes using Python's multiprocessing library
View pass_socket.py
'''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
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]-->
<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"/>
View Dockerfile
# Some App that is Rails
#
# VERSION 0.0.2
# You can use this to select a ruby version, see https://hub.docker.com/_/ruby/
FROM ruby:2.2.0
MAINTAINER Evan Gray <evan@my-cool-app.net>
# Modify this to install any packages you may need for gems, like dev libraries for things.
RUN apt-get update && \
View es6bind.js
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');
View gist:c902f4a84253584adb52
class ExampleComponent extends React.Component {
constructor() {
super();
this. _handleClick = this. _handleClick.bind(this);
}
render() {
return <div onClick={this._handleClick}>Hello, world.</div>;
}
View zfsnfs.md

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 Jun 17, 2015
created by github.com/tr3buchet/gister
View gist:1d7f6eff8457575fda11
[evan|laserbeams /Users/evan]% cat test.txt
hello towne you are cool
@evanscottgray
evanscottgray / gist:efa984d3e603bec62573
Created Jun 17, 2015
created by github.com/tr3buchet/gister
View gist:efa984d3e603bec62573
hello towne you are cool
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)
end
end
@evanscottgray
evanscottgray / darkghe.css
Created Jun 2, 2015
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 {
You can’t perform that action at this time.