Skip to content

Instantly share code, notes, and snippets.

@timothyham
timothyham / ipv6guide.md
Last active July 19, 2024 01:14
A Short IPv6 Guide for Home IPv4 Admins

A Short IPv6 Guide for Home IPv4 Admins

This guide is for homelab admins who understand IPv4s well but find setting up IPv6 hard or annoying because things work differently. In some ways, managing an IPv6 network can be simpler than IPv4, one just needs to learn some new concepts and discard some old ones.

Let’s begin.

First of all, there are some concepts that one must unlearn from ipv4:

Concept 1

@LukaJCB
LukaJCB / Rank-N-Bifunctors.md
Created September 8, 2019 19:11
Bifunctor extensions

Uniting the bifunctor and monofunctor hierarchies

With the rise of so-called bifunctor IO types, such as ZIO, questions have naturally arisen of how one could leverage the cats-effect type classes to make use of this new power. So far suggestions have mostly focused on duplicating the existing hierarchy into two distinct branches, one parameterized over F[_] and another parameterized over F[_, _]. To me this is not a great situation, as now library maintainers would have to write code for both of these hierarchies or choose one and leave the other one in the dust.

Instead we should find a way to unite the two shapes under a single hierarchy. This is a draft on how to enable this unification using polymorphic function types in Dotty.

@lizthegrey
lizthegrey / attributes.rb
Last active February 24, 2024 14:11
Hardening SSH with 2fa
default['sshd']['sshd_config']['AuthenticationMethods'] = 'publickey,keyboard-interactive:pam'
default['sshd']['sshd_config']['ChallengeResponseAuthentication'] = 'yes'
default['sshd']['sshd_config']['PasswordAuthentication'] = 'no'
@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

In a terminal start a server.

$ python -m SimpleHTTPServer 8000

In another terminal set up the cgroups freezer.

@jdegoes
jdegoes / fpmax.scala
Created July 13, 2018 03:18
FP to the Max — Code Examples
package fpmax
import scala.util.Try
import scala.io.StdIn.readLine
object App0 {
def main: Unit = {
println("What is your name?")
val name = readLine()
@chexxor
chexxor / TEA_Wrong_For_Web.md
Last active March 21, 2024 19:55
The Elm Architecture is the wrong abstraction for the web

The Elm Architecture is the wrong abstraction for the web

In this article, I'd like to explain why I think The Elm Architecture is fine for small components, but quite harmful for websites based on pages.

Definition and Pros/Cons

First, let's clarify what I mean by "The Elm Architecture".

The Elm Architecture's webpage describes it pretty well.

@bobrik
bobrik / README.md
Last active May 7, 2024 12:19
CFS hiccups
@mrubin
mrubin / FrontEndServingController.scala
Last active April 16, 2018 06:56 — forked from themillhousegroup/FrontEndServingController.scala
Play controller for serving a React App out of /public - including front-end routes
package controllers
import java.io.File
import javax.inject.Inject
import play.api.Logger
import play.Environment
import play.api.mvc.{Action, AnyContent}
import play.mvc.Controller