Skip to content

Instantly share code, notes, and snippets.

View rundis's full-sized avatar

Magnus Rundberget rundis

View GitHub Profile
package no.routehandling.utils
import arrow.core.Either
import arrow.core.flatMap
import arrow.core.raise.either
import arrow.core.raise.ensureNotNull
import io.ktor.http.*
import io.ktor.server.application.*
import io.ktor.server.request.*
import io.ktor.server.response.*
@rundis
rundis / elm-light-features.md
Last active March 8, 2017 00:32
elm-light (Elm Light Table plugin) - Feature overview

Features

  • Jump to definition
    • Uses Knowledge about all top level functions/values, type aliases and ADTs.(including 3rd party) Needs file and location info
  • Show doc and type annotations
    • Uses: Same as jump to + raw doc strings (and type info where applicable)
  • Context sensitive autocompletions
    • Uses: Same as jump to + all modules + what they expose + details about params / destructured params and aliases
    • Wants: Details about function bodies symbols (let blocks, pattern matches etc etc)
  • Find symbol
@rundis
rundis / View.elm
Created January 21, 2017 11:39
elm - height of element in click handler
import DOM -- From debois/elm-dom
view state config =
div [ class "main" ]
[ div [ class "nav"]
[ button
[ myClickHandler state config] -- When clicking on the button I want to get the height of element with class "displayBlock"
[ text "MyButton" ]
div
@rundis
rundis / Sample.elm
Created April 30, 2016 11:31
Reversing a string using a stack
module Sample where
import Stack exposing (..)
import String
import Html exposing (..)
reverseString : String -> String
reverseString str =
String.split "" str
|> Stack.fromList
@rundis
rundis / Sample gist
Created April 14, 2016 08:49
Howto gist...
case action of
SomeAction ->
({model | field = model.field +1}, Effects.none)
-- etc
@rundis
rundis / Freehand.elm
Created March 28, 2016 22:36
Elm svg freehand
module Freehand where
import String
import List
import Svg
import Svg.Attributes exposing (..)
import Html exposing (Html)
import Html.Events exposing (onClick)
import Effects exposing (Effects)
import StartApp
@rundis
rundis / Posts.elm
Created March 8, 2016 19:57
elmdecoding
module Posts (..) where
import Comment exposing (..)
import Effects exposing (Effects, Never)
import Html exposing (..)
import Html.Events exposing (..)
import Http
import Json.Decode as Decode exposing (Decoder, (:=))
import List exposing (..)
import Post exposing (..)
@rundis
rundis / gist:0472fc0537b3d81bb6e5
Last active January 22, 2016 00:41
Light Table version 0.8.1
Hi All !
In an effort to try and release more frequently we are happy to to announce version 0.8.1 just over a month after the 0.8.0 milestone release.
Gabriel and Kenny has done a monumental effort in cleaning up the issues list. We're down to under a 100 ! Many of which are obsolete and some are closed
because we haven't heard back from the OP. Plugin specific issues have been moved to the issue tracker in their respective github repo.
It's worth keeping in mind when filing issues in the future, that if you know (or have a fair hunch) that an issue is related to a particular
Light Table plugin, please consider filing the issue in the issue tracker for that projects repo.
But of course it's not just issue pruning that has been going on. There has been several bugfixes and feature enhancements happening as well. We've also received a few pull requests that have been accepted or partially accepted as well. Big thanks to our contributors !
@rundis
rundis / user.behaviors
Created December 29, 2015 22:26
Reload Namespace in Light Table
; add this to hook up your custom behavior
[:editor.clojure :lt.plugins.user/reload-ns]
@rundis
rundis / gist:15e0fffafcfc0c756c09
Created June 30, 2015 08:27
fixed-data-table meets boostrap dropdown button for css showdown
<div class="public_fixedDataTable_main"> <!-- positioned relative -->
<div class="fixedDataTable_rowsContainer"> <!-- positioned relative -->
<div style="position:absolute;transform:translate3d(0px,50px,0);backface-visibility:hidden;">
<div style="width:600px;height:50px;z-index:0;transform:translate3d(0px,0px,0);backface-visibility:hidden;" class="fixedDataTableRow_rowWrapper"> <!-- positioned absolute -->
<div class="public_fixedDataTableRow_main public_fixedDataTable_bodyRow" style="width:600px;height:50px;"> <!-- positioned absolute -->
<div class="fixedDataTableRow_body"> <!-- positioned absolute -->
<div style="height:50px;" class="fixedDataTableCellGroup_cellGroupWrapper">
<div class="fixedDataTableCellGroup_cellGroup" style="height:50px;position:absolute;width:0;z-index:2;transform:translate3d(0px,0px,0);backface-visibility:hidden;">
</div>
</div>