Skip to content

Instantly share code, notes, and snippets.

View toastal's full-sized avatar
🚪
Offer alt mirror so I can delete my account w/ MS GitHub finally

toastal

🚪
Offer alt mirror so I can delete my account w/ MS GitHub finally
View GitHub Profile
-- TODO: nil check the hell out of this
local https = require "ssl.https"
local ltn12 = require "ltn12"
local lub = require "lub"
local xml = require "xml"
local cookie = require "cookie"
function url_encode(str)
module OnFail exposing (onFail)
onFail : (a -> Maybe b) -> (a -> b) -> a -> b
onFail f g x =
case f x of
Just y ->
y
Nothing ->
@toastal
toastal / cards.elm
Last active December 31, 2016 10:16
Elm Card Stuff
import Html exposing (text)
import List.Extra as List
{-
List.andThen : (a -> List b) -> List a -> List b
List.andThen =
List.concatMap
List.lift2 : (a -> b -> c) -> List a -> List b -> List c
List.lift2 f la lb =
@toastal
toastal / Mask.purs
Created June 7, 2017 21:33
Mask PureScript CSS WIP
module CSS.Mask
(
-- * Generic mask property.
class Mask
, mask
-- * The mask-image
, maskImage
, maskImages
, url
@toastal
toastal / keybase.md
Created November 20, 2017 14:03
keybase.md

Keybase proof

I hereby claim:

  • I am toastal on github.
  • I am toastal (https://keybase.io/toastal) on keybase.
  • I have a public key whose fingerprint is DF24 172E 081B 6666 1712 C5B8 A1CA FFE4 DB10 9A47

To claim this, I am signing this object:

# set -U fish_user_paths $fish_user_paths /sbin /usr/sbin /usr/local/sbin ~/bin ~/.node/bin ~/.local/bin
set -U fish_key_bindings fish_vi_key_bindings
set -x TERM xterm-256color
set -x VISUAL nvim
set -x EDITOR nvim
set -x NVIM_TUI_ENABLE_TRUE_COLOR 1
set -x GITHUB_AUTH_TOKEN 2f26b867e07c04b22f6b6e95c78288b86d6fe636
set -x GDK_DPI_SCALE 1.25
# fish git prompt
Verifying my Blockstack ID is secured with the
address 1DZCCU1Cy5qkck8tKAMCWyU4CYPd36uBMu
https://explorer.blockstack.org/address/1DZCCU1Cy5qkck8tKAMCWyU4CYPd36uBMu

Row Things

In JavaScript objects (and sometimes strings *shudder at Redux Actions*) are the structure of choice for many tasks. They can hold functions, arrays, other objects, etc. They can be a part of a factory and the can be mutated to do just about anything. Despites its versatility, it doesn't do much in the ways of providing rest-assuredness. You might be able to freeze it, but you can't even do basic equality:

{little: "kitten"} == {little: "kitten"}
//=> false
@toastal
toastal / .xmobarrc.hs
Last active March 21, 2019 08:50
xmonad confs
-- vim: noai ts=2 sw=2
-- vim: filetype=haskell
Config
{ font = "xft:Terminus:size=16:regular:antialias=false"
, additionalFonts =
[ "xft:TerminessTTF Nerd Font:size=18:medium:antialias=true"
, "xft:Fixedsys Excelsior:size=22:regular:antialias=false"
]
, border = NoBorder
@toastal
toastal / RAF.purs
Created April 22, 2019 03:20 — forked from garyb/RAF.purs
requestAnimationFrame looping subscription in Halogen 5
module RAF where
import Prelude
import Data.Foldable (traverse_)
import Data.Maybe (Maybe(..))
import Effect.Aff.Class (class MonadAff)
import Effect.Ref as Ref
import Halogen as H
import Halogen.HTML as HH