Skip to content

Instantly share code, notes, and snippets.

View mfonism's full-sized avatar

Mfon Eti-mfon mfonism

View GitHub Profile

This morning, I got into a bus with a large group of English-speaking tourists. One of them, a little girl, was singing. Everyone around her was smiling. Clapping along. Cheering her on as she moved from song to song.

I couldn't relate.

I had my noise-cancelling headphones on. And I was listening to white noise underneath it. You know, that static sound old grainy TVs make... Yeah, that's what I had playing. It helped me shut out that happy bubble that was building up in the bus. Really, I just wanted to stay inside myself and not feel anything else.

You see, yesterday was awful!

And I hadn't really processed it. So I stayed in my own bubble of white noise. Trying not to be anywhere else.

Preparing for Today's Class - Python Installation & Update (Mac OS only)

Hey everyone,

To get ready for today’s class, we all need to have the latest version of Python installed. Follow these steps carefully to ensure you’re all set. We’ll first check if you already have Python installed, and then branch out based on what we find.

Note: Whenever we say "terminal" or "your terminal" in these instructions, we’re referring to iTerm2.

1. Open Your Terminal (iTerm2)

@mfonism
mfonism / 2024.04.21--filter-like-a-real-star.md
Last active April 21, 2024 19:02
Elm Homework for Friends at Hamelin

PREV: Map it like it's hot!
NEXT:


Filter like a Real star!

Filtering is a powerful feature in functional programming that allows you to refine and manipulate datasets efficiently, ensuring that only elements meeting specific criteria are retained for further processing.

@mfonism
mfonism / 2024.04.12--map-it-like-its-hot.md
Last active April 21, 2024 15:17
Elm Homework for Friends at Hamelin

PREV: Types and Values Ninjery!
NEXT: Filter like a real star


Map it like it's hot!

This batch of exercises is designed to enhance your understanding of mapping in Elm. Mapping is a fundamental concept in functional programming that allows you to transform lists by applying a function to each element in the list. These exercises will provide you with practical scenarios to apply this concept, reinforcing your ability to manipulate and process data efficiently in Elm.

@mfonism
mfonism / 2024.02.11--types-and-values-ninjery.md
Last active April 12, 2024 18:53
Elm Homework for Friends at Hamelin
@mfonism
mfonism / 2024.01.24--conditionals-ninjery.md
Last active February 11, 2024 00:34
Elm Homework for Friends at Hamelin

PREV: Type Ninjery
NEXT: Types and Values Ninjery


Conditionals Ninjery!

A series of exercises with unique tasks for playing around with the basic Elm types we've come across so far, and getting more familiar with conditional logic.

Implementation Guidelines

@mfonism
mfonism / 2024.01.16--type-ninjery.md
Last active January 23, 2024 22:33
Elm Homework for Friends at Hamelin

NEXT: Conditionals Ninjery


🌟 Elm Type Challenge! 🌟

Hey Team,

To sharpen our understanding of Elm's type system, I've prepared some (hopefully) intriguing exercises. I encourage you to refrain from using your REPL or any other tools for evaluation. The real value lies in manually working through these problems and enhancing your intuitive grasp of Elm's types as you do so.

@mfonism
mfonism / karlverter.elm
Created November 5, 2023 15:54
Temperature converter (ELM)
module Main exposing (main)
import Browser
import Html exposing (Html, div, h1, input, label, text)
import Html.Attributes exposing (value)
import Html.Events exposing (onInput)
main : Program () Model Msg
main =
@mfonism
mfonism / Main.elm
Last active January 18, 2024 07:07
Basic skeleton of an Elm sandbox application
module Main exposing (main)
import Browser
import Html exposing (Html, text)
main : Program () Model Msg
main =
Browser.sandbox
{ init = myInit
@mfonism
mfonism / wecollections.md
Created October 12, 2023 12:28
WECOLLECTIONS by Kiwi

On those confusingly named things in net/http

http.Handle vs http.Handler vs Http.HandlerFunc

net/http gives us a function http.Handle, for attaching handlers to paths.

A handler is anything that satisfies the http.Handler interface, which is defined this way (I'm refusing to Google sh!t up, so I'm probably going to get the syntax wrong, and I crave your forgiveness for that):

interface Handler {