Skip to content

Instantly share code, notes, and snippets.

View RyanCCollins's full-sized avatar

Ryan Collins RyanCCollins

View GitHub Profile
@RyanCCollins
RyanCCollins / condaenv.txt
Created December 24, 2018 12:36 — forked from pratos/condaenv.txt
To package a conda environment (Requirement.txt and virtual environment)
# For Windows users# Note: <> denotes changes to be made
#Create a conda environment
conda create --name <environment-name> python=<version:2.7/3.5>
#To create a requirements.txt file:
conda list #Gives you list of packages used for the environment
conda list -e > requirements.txt #Save all the info about packages to your folder
/* @flow */
type Maybe<T,U> = (pattern: {
some(x: T): U;
none(): U;
}) => U;
function map<A,B,C>(maybe: Maybe<A,C>, f: (a: A) => B): Maybe<B,C> {
return function(pattern) {
return maybe({
@RyanCCollins
RyanCCollins / ex1-prototype-style.js
Created September 30, 2016 03:47 — forked from getify/ex1-prototype-style.js
OLOO (objects linked to other objects) pattern explored (with comparison to the prototype style of the same code)
function Foo(who) {
this.me = who;
}
Foo.prototype.identify = function() {
return "I am " + this.me;
};
function Bar(who) {
Foo.call(this,"Bar:" + who);

Privacy Policy

Last revised on [DATE]

The Gist

[COMPANY] will collect certain non-personally identify information about you as you use our sites. We may use this data to better understand our users. We can also publish this data, but the data will be about a large group of users, not individuals.

We will also ask you to provide personal information, but you'll always be able to opt out. If you give us personal information, we won't do anything evil with it.

import React from "react";
import { render } from "react-dom";
const ParentComponent = React.createClass({
getDefaultProps: function() {
console.log("ParentComponent - getDefaultProps");
},
getInitialState: function() {
console.log("ParentComponent - getInitialState");
return { text: "" };
@font-face {
font-family: "Proxima Nova";
src: url(data:font/opentype;base64,d09GRgABAAAAAEywABIAAAAAg3QAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABEWU5BAAAGbAAAALgAAAGJNI0oHkZGVE0AAAGUAAAAHAAAABxdnq2WR0RFRgAAByQAAAA4AAAAQgSqBTxHUE9TAAAHXAAABCIAABH0zI0AF09TLzIAAAXUAAAAVwAAAGCAz3p9Y21hcAAASvgAAAG2AAAC5lCJVL9jdnQgAAABsAAAAB4AAAAeCkcLCmZwZ20AAAHQAAABsgAAAmUjtC+nZ2FzcAAAA4QAAAAIAAAACAAAABBnbHlmAAALgAAAO4sAAF8I3FzIU2hlYWQAAAOMAAAANQAAADb9TDtqaGhlYQAABiwAAAAgAAAAJA9PBsBobXR4AABHDAAAAh8AAANsqw8hfGxvY2EAAEksAAABuAAAAbhtqYQ8bWF4cAAABkwAAAAgAAAAIAIDAhpuYW1lAAADxAAAAawAAANRLIw+gnBvc3QAAErkAAAAEwAAACD/DQAocHJlcAAABXAAAABjAAAAdNUcAaMAAAABAAAAAMmJbzEAAAAAyRrF1wAAAADK+niN/pAAAAPGBTYBYADCANABNgE+AWgBmQDkAZIBkAFYAAB42l1Ru05bQRDdDQ+TBBJjg+RoU8xmQhrvhYYCJBBXF8XIdmM5QtqNXORiXMAHUCBRg/ZrBmgoKdKmQcgFUj6BT0BiZk2iKM3Ozuycc+bMknKk6l1a73nqnARSuNOg2abfDql2FuCedH21kZF28EDzzYxeuW7ff8VgM5pyRw2gvOct5SGjaSdQi/bU/za/guE+/2Qeg0FLM01PrZOQHkJgvhm3MPie0ay7/KQvWB0uBgNDimkq7vJzKuV/S3Outgibaxm9dnAmIj+ZBmhqpY1A0186pHo+jmIJctkw1gYTU9afZCL4ZjJd1VQtM751cJfszDt
@RyanCCollins
RyanCCollins / iterm2-solarized.md
Created January 16, 2016 04:12 — forked from kevin-smets/iterm2-solarized.md
iTerm2 + oh my zsh + solarized + Meslo powerline font (OSX)

Solarized

@RyanCCollins
RyanCCollins / category_plugin.rb
Created October 21, 2015 19:38 — forked from somic/category_plugin.rb
How I organize posts in Jekyll (code snippets for blog post - see comments)
module Jekyll
Page.class_eval {
def clone
Page.new(@site, @base, @dir, @name)
end
}