This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
module Api exposing | |
( Data | |
, Error(..) | |
, ErrorResponse | |
, Origin | |
, delete | |
, deleteTask | |
, errorToNotification | |
, errorView | |
, get |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
module UI.VirtualList exposing (Model, init, view) | |
import Html exposing (..) | |
import Html.Attributes exposing (style) | |
import Html.Events exposing (on) | |
import Html.Keyed as Keyed | |
import Json.Decode as Decode | |
type alias Model = |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
module ID exposing (ID(..), decodeFromString, decoder, encode, encodeAsString, fromInt, toInt, toString) | |
import Json.Decode as Decode exposing (Decoder) | |
import Json.Encode as Encode exposing (Value) | |
{-| This type ensures you get a type error if you for example accidentally pass a UserId in place of a CompanyId | |
-} | |
type ID phantom | |
= ID Int |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
module TypedDict exposing (Interface, TypedDict(..), derive) | |
import Dict exposing (Dict) | |
type TypedDict comparable k a | |
= TypedDict (Dict comparable a) | |
type alias Interface comparable k a b = |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<template> | |
<div class="greeting"> | |
{{greeting}} | |
</div> | |
</template> | |
<script> | |
module.exports = { | |
data(){ | |
return { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function fixCircularRefs(object) { | |
let objectValues = [] | |
let cleanObjectJSON = JSON.stringify(object, removeCircularReferences) | |
return JSON.parse(cleanObjectJSON) | |
function removeCircularReferences (key, value) { | |
if (typeof value === 'object') { | |
if (objectValues.indexOf(value) !== -1) { | |
return 'Circular reference to object with key: ' + key | |
} else { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import '@fortawesome/fontawesome-pro-webfonts/css/fontawesome.css' | |
import '@fortawesome/fontawesome-pro-webfonts/css/fa-light.css' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function getGlobals(){ | |
const result = {...window} | |
const standard = window.open() | |
Object.keys(standard).forEach(key => delete result[key]) | |
standard.close() | |
return result | |
} | |
getGlobals() |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
set morespace | |
set multibuffer | |
#set nohelp # perhaps comment out until comfortable | |
set quickblank | |
set regexp | |
set smooth | |
set suspend | |
set tabsize 2 | |
unbind ^K main |
NewerOlder