Skip to content

Instantly share code, notes, and snippets.

View mbbx6spp's full-sized avatar
:shipit:
emacsclient -nw README.md

Susan Potter mbbx6spp

:shipit:
emacsclient -nw README.md
View GitHub Profile
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 08:09
List of short movies

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 July 20, 2025 04:49
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.

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 March 11, 2019 16:52
Intuitions on functors.
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 March 2, 2019 13:17
Example demonstrating Alternative
{-# 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 February 28, 2019 22:17
Answer to common question: how do I find the SHA256 for a fetchGitHub in Nix without getting it from the error message?

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
@mbbx6spp
mbbx6spp / FunctorExercises.hs
Last active February 4, 2019 20:45
Exercises to show how to abstract over Functors in our data types via type constructor.
{-# LANGUAGE DeriveFunctor #-}
{-# LANGUAGE KindSignatures #-}
{-# LANGUAGE NoImplicitPrelude #-}
{-# LANGUAGE RankNTypes #-}
import Control.Monad (mapM_)
import Data.Function (($))
import Data.Functor (Functor (..))
import Data.List ((++))
import GHC.Num (Integer, (+))

Decisions/directions for web development projects

Goals for future websites or web applications builts in the next year include:

  • Accessibility: content on the web application should be accessible to people of different abilities using screenreaders by default
  • Footprint: assets and markup of web application should be as minimal as possible without forgoing any of these other goals
  • Mobile-first: design layouts and content dissemination should be optimized for mobile-first
  • Usable: most common tablet and desktop size renderings should work well
  • Performance: ensure each page load has first meaningful paint within 0.4s and ensure page fully interactive by 0.8s (without network latency)
@mbbx6spp
mbbx6spp / openpgp.txt
Created December 26, 2018 15:58
OpenKeychain Linked Identity
This Gist confirms the Linked Identity in my OpenPGP key, and links it to this GitHub account.
Token for proof:
[Verifying my OpenPGP key: openpgp4fpr:8e42c6f5300b802a2df2e7375ea6752798ade611]
@mbbx6spp
mbbx6spp / category-theory-study-materials.org
Last active July 23, 2023 23:48
List of books/lecture series/courses/conference talks and practices used to learn about category theory, functional programming, and dependent types by a software developer in industry who has limited time to do this stuff with some suggestions on how to consume the material.

Category Theory and Functional Programming Study Materials

Acronyms/Terms

  • CT: Category Theory
  • FP: Functional Programming (typically meaning more pure functional programming)
  • TFP: Total Functional Programming
  • TDD: Type Driven Development (e.g. via Idris or Agda)
  • TT: Type Theory
  • PLT: Programming Language Theory