Skip to content

Instantly share code, notes, and snippets.

Seth Livingston sethlivingston

  • Murphy, TX
Block or report user

Report or block sethlivingston

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
@sethlivingston
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
NoRedInk/elm-decode-pipeline
elm-lang/core
elm-lang/dom
elm-lang/html
elm-lang/http
elm-lang/navigation
evancz/url-parser
lukewestby/elm-http-builder
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'
View MicrosoftWindowsNetworkingEssentials.md

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

View ProfessorFrisbyIntroducesComposableFunctionalJavaScript.md

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)
-- MODEL
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;
View cards-p1-1.re
type suit =
| Diamonds | Clubs | Hearts | Spades;
type rank =
| Two | Three | Four | Five | Six | Seven | Eight | Nine | Ten;
type face =
| Jack | Queen | King | Ace;
@sethlivingston
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) {
e.preventDefault();
View gist:e3d568c401811cf95b92
Workflow.run = function (actions) {
var files = [];
var promise = Promise.resolve(files);
actions.forEach(function(action) {
promise = promise.then(function (outFiles) {
// Need to return a promise here to keep the chain going
return new Action(action, outFiles);
});
});
promise = promise.catch(function (error) {
You can’t perform that action at this time.