Skip to content

Instantly share code, notes, and snippets.

🐢
Just discovered the user status feature on GitHub!

Susan Potter mbbx6spp

🐢
Just discovered the user status feature on GitHub!
Block or report user

Report or block mbbx6spp

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
@mbbx6spp
mbbx6spp / mword.md
Last active May 27, 2020
An M-word work rant of work Slack February 2020 edition.
View mword.md

Below is an excerpt from a Slack work rant from Feburary 4, 2020.

Over the last few weeks I have learned about some of the new additions to both ECMAScript 2019 and 2020 (for reasons!!!!) anyway, the following are relevant to an FP setting: flatMap flattens nested list structure then maps over the elements. Usage:

> let arr1 = ["Australia is", "on", "fire still"];
undefined
@mbbx6spp
mbbx6spp / Main.purs
Last active May 4, 2020
Fun with the state transformer with a coworker showing them functional programming constructs. Notice there are more lines of imports than there are lines of code.
View Main.purs
module Main (main) where
import Control.Applicative (pure)
import Control.Bind (bind, discard)
import Control.Monad (void)
import Control.Monad.State (StateT, get, runStateT)
import Data.Array (range)
import Data.Eq ((==))
import Data.Function (($))
import Data.Functor (map)
@mbbx6spp
mbbx6spp / Models.Swagger.purs
Last active Mar 12, 2020
Outline of describing schema with algebraic data types for basic descriptions of data, in this case a Swagger "schema". Eventually we can evolve it in class to generating YAML/JSON Swagger from this data description and possible build swagger representations from Generic Reps
View Models.Swagger.purs
module Models.Swagger where
import Data.Map (Map)
import Data.Maybe (Maybe (..))
import Data.String.Regex (Regex)
import Data.Show (class Show, show)
data SwaggerFormatString
= DateFormat
| DateTimeFormat
@mbbx6spp
mbbx6spp / CatTheory.UniversalConstructions.purs
Last active Jan 16, 2020
Having fun with universal constructions for And and Or types and the correspondance of pairs (fanout, bimap) and (either, fanin) for each.
View CatTheory.UniversalConstructions.purs
-- Module to demonstrate simple applications of the concept of universal construtions
module CatTheory.UniversalConstructions
-- * Types
( And (..)
, Or (..)
-- * Introducers
, and
, left
, right
, fanin
View animal2.sql
DROP DATABASE IF EXISTS animalsdb;
CREATE DATABASE animalsdb;
\c animalsdb;
-- We're modeling the following Haskell datatype:
--
-- data Animal = Cat Name Age | Dog Name OwnerId
--
-- We're going to factor the common 'Name' field into the animal table.
@mbbx6spp
mbbx6spp / SHORTS.org
Last active May 12, 2019
List of short movies
View SHORTS.org

My absolute favorite format of film is the short film. Here are a list of short films I loved watching:

@mbbx6spp
mbbx6spp / 00README.org
Last active Apr 26, 2019
A gist of the commands, metadata file (.desktop), and script I wrote to delegate web URLs to the correct sandboxed web browser inside of the appropriate user profile in Linux. Should work in all distros.
View 00README.org

Delegating web requests in Linux to correct browser profile

A few months ago I set this up and here is the write up on it since yesterday, while talking to a fellow Linux user, they found it intriguing.

My requirements

Any URL I click in Slack, Signal desktop app, or launch via terminal actions should launch into the correct sandboxed, user-profile web browser instance (in precedence order):

  • https://github.com/<workorg>.* should open in the work Firefox profile
@mbbx6spp
mbbx6spp / functors.hs
Last active Mar 11, 2019
Intuitions on functors.
View functors.hs
fmap :: Functor f => (a -> b) -> f a -> f b
contramap :: Contravariant f => (a <- b) -> f a -> f b
invmap :: Invariant f => (a <-> b) -> f a <-> f b -- NOT VALID syntax but to give an intuition.
bimap :: Bifunctor p => (a -> b)
-> (c -> d)
-> p a c
-> p b d
@mbbx6spp
mbbx6spp / alternative.hs
Last active Mar 2, 2019
Example demonstrating Alternative
View alternative.hs
{-# LANGUAGE NoImplicitPrelude #-}
module AlternativeExample where
import Control.Applicative
import Data.Maybe
import Data.Text hiding (empty)
import GHC.Show (Show)
type Login = Text
@mbbx6spp
mbbx6spp / README.md
Last active Feb 28, 2019
Answer to common question: how do I find the SHA256 for a fetchGitHub in Nix without getting it from the error message?
View README.md

Question

I just got asked this question: How do I find the SHA256 for a fetchGitHub in Nix expressions without faking it and getting it from the error message?

Answer

Install nix-prefetch-github:

$ nix-env -i nix-prefetch-github
You can’t perform that action at this time.