Skip to content

Instantly share code, notes, and snippets.


Seth Livingston sethlivingston

  • Murphy, TX
View GitHub Profile
sethlivingston / Template.elm
Last active Mar 29, 2020
Elm template for a Browser.element app
View Template.elm
module TemplateModule exposing (main)
import Browser
import Html exposing (..)
import Html.Attributes exposing (..)
import Html.Events exposing (..)
sethlivingston / Elm Template for Page with Multiple Views
Created Jun 24, 2018
Elm Template for Page with Multiple Views
View Elm Template for Page with Multiple Views
# Definitely will be needed
View .vimrc
set nocompatible
" Load plugins
call plug#begin('~/vimfiles/plugged')
Plug 'ctrlpvim/ctrlp.vim'
Plug 'rakr/vim-one'
Plug 'pangloss/vim-javascript'
Plug 'tomtom/tcomment_vim'

NAT (Network Address Translation): Translates between public IP address, such as the one being used by a cable modem at home, to IP addresses on the internal network. Hides internal devices; without it, internal devices would each need their own public IP address.

DHCP (Dynamic Host Configuration Protocol): Provides devices with IP addresses and TCP/IP configuration information like the address of the DNS server and the address of the router that provides a path to the internet. The router address is known as the default gateway.

LAN (Local Area Network): A group of computers in the same geographic location.

Mbps, Gbps (megabit, gigabits per second): Bits transferred per second. Wired LANs today are 100 Mbps or 1,000 Mbps (1 Gbps). Bits, lowercase b, are for network speeds. Bytes, uppercase B, are for RAM capacity (4 GB) and other measurements.

AD DS (Active Directory Domain Services): Hosts user and computer objects in one place instead of having each workstation store them as the


A box (or discriminated union) is just a context in which to apply functions.

.map(f) is really not about traversal, but rather applying a function or transformation within a context (of a box).

.fold(f, ...) is similar to map, except the return value is unboxed.

  • Formally, folding is the application of a combining function to reduce a structure or collection to a single value.
  • For boxes like Either, fold usually takes multiple functions, one to apply to each type of the union.

.chain(f) is similar to .map(f), but it should be used when f returns a box instead of a raw value. That way, the result of the function will be a box(a) instead of a box(box(a)).

View tab.elm
module Components.Tab exposing (Model, Msg, init, view, update)
import Html exposing (Html, div, text, i)
import Html.Attributes exposing (class)
import Html.Events exposing (onClick)
type alias Model =
{ icon : String
View cards-p1-2.txt
Reason # type face = | Jack | Queen | King | Ace;
type face = Jack | Queen | King | Ace
Reason # let f1 = Queen;
let f1 : face = Queen
Reason # let f2 = Ace;
let f2 : face = Ace
Reason # f1 > f2;
type suit =
| Diamonds | Clubs | Hearts | Spades;
type rank =
| Two | Three | Four | Five | Six | Seven | Eight | Nine | Ten;
type face =
| Jack | Queen | King | Ace;
sethlivingston / react-redux-component.jsx
Last active Jan 29, 2016
Samples from an actual React/Redux application
View react-redux-component.jsx
import classNames from 'classnames';
import React from 'react';
const NavTab = ({ selected, icon, onClick, children }) => {
let tabClasses = classNames({
'nav-tab': true,
'selected': selected
let iconClasses = `fa fa-${icon} fa-lg fa-fw`;
View nav-panel-button.jsx
var classnames = require('classnames');
var {Link, History} = require('react-router');
var React = require('react');
var NavPanelButton = React.createClass({
mixins: [History],
click: function (e) {
You can’t perform that action at this time.