Skip to content

Instantly share code, notes, and snippets.

View justgage's full-sized avatar

Gage Peterson justgage

View GitHub Profile
@justgage
justgage / myShell.cpp
Created May 17, 2016 06:36
A simple Linux shell
/***********************************************************************
* Program:
* Lab UnixShell
* Brother Jones, CS 345
* Author:
* Gage Peterson
* Summary:
* This is a tiny unix shell made for my operating systems class
************************************************************************/
@justgage
justgage / TakeingForGranted.md
Created October 18, 2016 04:32
Summary of "O How Great the Plan of Our God! By President Dieter F. Uchtdorf"

Do We Take Spiritual Truths for Granted?

From this talk by President Dieter F. Uchtdorf

Life-changing truths are before our eyes and at our fingertips, but sometimes we sleepwalk on the path of discipleship ... We tread a path covered with diamonds, but we can scarcely distinguish them from ordinary pebbles.

In what ways do we take spiritual things for granted?

  • Scriptures (don't read them as much as we should considering what they are)
  • Prayers (forget who we're talking to, too much a rush)
@justgage
justgage / ResultValue.rb
Created January 16, 2017 20:25
A simple result monad in ruby
# This class helps to captue possible errors as a value. While you could capture these conditions as
# `nil` it's easy to forget to check for it everywhere.
#
# ResultValue helps with this by making the only way to get at the value is with #case_of.
class ResultValue
# This will rescue any exceptions and return it as an "errored" ResultValue
# if there was none it will return it as an "ok" ResultValue with the value
# wrapped inside
def self.capture_result
@justgage
justgage / HowToElm.md
Last active January 17, 2020 23:49
How To Elm

How to Elm

This is a basic guide on how to learn Elm rather than actually teach you. I'm going to mostly link to resources that I feel are valuable and try to "teach you how to fish".

The main purpose is to accelerate your learning and save you a lot of googling and weeding through bad explinations.

Essential links

@justgage
justgage / stuff-we-miss-out.md
Created May 12, 2017 18:44
React stuff we miss out on

15.5.4 (April 11, 2017)

React Addons

Critical Bugfix: Update the version of prop-types to fix critical bug. (@gaearon in 545c87f) Fix react-addons-create-fragment package to include loose-envify transform for Browserify users. (@mridgway in #9642) React Test Renderer

Fix compatibility with Enzyme by exposing batchedUpdates on shallow renderer. (@gaearon in #9382)

<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width">
<meta name="description" content="">
<meta name="author" content="">
<title>Manage Locations | Podium</title>
<link rel="icon" href="/favicon.ico">
<link rel="stylesheet" href="/css/app.css">
@justgage
justgage / El.jsx
Created November 11, 2018 14:50
A way to add classnames easier
import React from "react";
import classNames from "classnames";
export const Div = props => {
const { children } = props;
console.log(props);
return <div className={classNames(props)}>{children}</div>;
};
### Keybase proof
I hereby claim:
* I am justgage on github.
* I am justgage (https://keybase.io/justgage) on keybase.
* I have a public key ASAONOhDZTZ7R3cr8hN7MSqdX_R6hvPTP1YXScwUNJR28Qo
To claim this, I am signing this object:
@justgage
justgage / Pom.re
Created March 26, 2019 18:17 — forked from mrmurphy/Pom.re
type pomWithError('data, 'err) = Js.Promise.t(Result.t('data, 'err));
type pom('data) = pomWithError('data, unit);
module JsPromise = {
let make = () => {
let resolver = ref(ignore);
let p =
Js.Promise.make((~resolve, ~reject as _) =>
resolver := (a => resolve(. a))
);