Skip to content

Instantly share code, notes, and snippets.

View shamansir's full-sized avatar

Ulric Wilfred shamansir

View GitHub Profile
@shamansir
shamansir / Example.purs
Created September 11, 2019 18:59
TreeAna
-- from: https://gist.github.com/kapranov-anton/86d44e4d382c2c38ffb5d59e331bc93a
module Main where
import Prelude
import Data.List (List)
import Data.List as List
import Control.Monad.Eff (Eff)
msg: MsgOne {}
uuid: '336228ee-b2e8-4c78-acf4-a8302125552b'
(MSG-ONE:336228ee-b2e8-4c78-acf4-a8302125552b)-|
msg: MsgTwo {}
uuid: 'cbfeae0b-11f1-4e58-a4f9-35bab61bdbf2'
uuid: '7965f57f-cde5-4ca5-8377-bd03b9c71784'
(MSG-TWO:7965f57f-cde5-4ca5-8377-bd03b9c71784)-(MSG-ONE:cbfeae0b-11f1-4e58-a4f9-35bab61bdbf2)-|
msg: MsgTwo {}
uuid: '256702ea-6702-4aa2-84c0-3977e1763e8'
uuid: 'fd7bdf0d-6f6b-46d2-b394-f268c4c5a473'
@shamansir
shamansir / Noise.elm
Created March 7, 2019 19:42
Noise Generation in Elm 0.19
-- Taken from: https://raw.githubusercontent.com/eskimoblood/elm-simplex-noise/master/src/Noise.elm
-- Updated to 0.19
module Noise exposing (PermutationTable, permutationTable, noise4d, noise3d, noise2d)
{-| This is a library to generate simplex noise in Elm.
The code is a port of the [simplex noise JavaScript version](https:--github.com/jwagner/simplex-noise.js) by Jonas Wagner.
## Example usage
@shamansir
shamansir / Extensions.md
Last active October 25, 2018 00:02
VS Code User Settings
  • Code Outline by Patryk Zawadzki
  • Dark++ Theme by DryWolf
  • Docker by Microsoft
  • DrRacket Syntax by Dmytro Bogatov
  • Easy icon theme by James Maguire
  • Elm by Elm
  • elm-format bt abadi199 (no more?)
  • Haskell Syntax Highlighting by Justus Adam
  • Haskell Language Server by Alan Zimmerman
  • Haskell GHCi Debug Adapter by phoityne
module ExceptT2 where
import Control.Monad.Trans.Maybe
import Data.Char (isNumber, isPunctuation)
import Control.Monad (guard)
import Control.Monad.Trans.Except
import Control.Monad.IO.Class (liftIO)
import Data.Foldable (msum)
import Data.Char (isNumber, isPunctuation)
@shamansir
shamansir / jasmine.teamcity_reporter.js
Created August 28, 2012 11:56
All you need to run Jasmine Tests with Phantom at TeamCity
/* source: https://github.com/larrymyers/jasmine-reporters */
/* The MIT License
Copyright (c) 2010 Larry Myers
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
@shamansir
shamansir / Main.purs
Created March 31, 2018 14:43 — forked from Gabriella439/Main.purs
Purescript Flare - Simon example
module Main where
import Data.Array ((..), reverse)
import Data.Int (toNumber)
import Flare (UI, radioGroup)
import Flare.Drawing (runFlareDrawing)
import Graphics.Drawing
import Graphics.Drawing.Font (font, sansSerif, bold)
import Math (cos, sin, pi)
import Prelude
@shamansir
shamansir / .gitgnore
Created February 26, 2018 07:14
Elm Webpack Project Template
node_modules
elm-stuff
@shamansir
shamansir / Main.purs
Created January 25, 2018 17:42 — forked from soupi/Main.purs
simple purescript-signal + purescript-canvas example
module Main where
import Prelude
import Data.Maybe
import Control.Monad.Eff
import Graphics.Canvas as C
import Signal as S
import Signal.DOM as S
@shamansir
shamansir / Whatever.elm
Last active December 13, 2017 13:37
Elm v0.18 ports with headless program (send value to JS once)
port module NodeRepl21 exposing (..)
import Html exposing (Html, div, text, span)
import Html
import Dict
import Platform exposing (..)
import Json.Decode
f_o_o_b_a_r_122 = (div [] [])
f_o_o_b_a_r_123 = (div [])
f_o_o_b_a_r_124 = (Html.a)