Skip to content

Instantly share code, notes, and snippets.

View nmcb's full-sized avatar

nmc.borst nmcb

View GitHub Profile
@nmcb
nmcb / DoubleMultiplicationNotAssociative.md
Created April 23, 2024 20:23
double multiplication is not associative
$ amm
Loading...
Welcome to the Ammonite Repl 3.0.0-M1 (Scala 2.13.13 Java 17.0.10)

@ import org.scalacheck.Prop.forAll 
import org.scalacheck.Prop.forAll

@ val multiplicationIsAssociative = forAll { (a: Double, b: Double, c: Double) =>
 (a * b) * c == a * (b * c)
@nmcb
nmcb / security-exercise.md
Last active March 17, 2024 14:56
Security Exercise

Security Exercise

Your infrastructure has been hacked. The virtual cluster nodes present in your 2 datacenters running your application and storage containers are breached with malicious malware that randomly deletes files on the nodes. Fortunately the malware is only present in 1 of the datacenters. The fear is that the malware spreads itself between nodes across the cluster and more importantly via the master nodes across the datacenters. You recall that in order to maintain cluster stability across the datacenters you've configured each of the 2 datacenter to contains 3 master nodes to coordinate the communication between the worker nodes within a datacenter, and that each master node in a datacenter communicates with a mirror master node in the other datacenter via a virtual route. You could identify the 3 virtual routes between the master nodes across the datacenters from a virtual route report and disable them, thus prohibiting the malware to spread into the second datacenter. Unfortuna

taken from here - thx sig <3

4/16/23 19th century technoutopianism

origin of utopian literature in english

  • 1516 - sir thomas moore’s utopia
    • framed narrative cribbed from atlantis, which was not well known at the time, and repainted to fit the english fascination with the mysteries of new world cultures
    • split into two parts, first a commentary on the ills of society, the second a commentary on its solutions
  • neither commentary is particularly serious at first glance, much of it is direct parody of contemporary politics

Parenting isn’t what it used to be BY HEATHER HEYING

Opvoeden is niet wat het is geweest DOOR HEATHER HEYING

It is 2am, and the baby is screaming and crying in the other room. Alone in his crib, he is inconsolable. There have been months of nights like this. The new parents have the best intentions, but they are at their wits’ end. Yanked out of a sleep only recently obtained, the baby’s father pulls himself from bed, thaws and warms some of the mother’s milk, and offers it to his son. The baby takes it eagerly, and is satisfied — but also now very much awake. If left, he will cry.

**Het is twee uur 's ochtends, en de baby huilt en schreeuwt in de andere kamer. Alleen in z'n krib, hij is ontroostbaar. Er waren reeds maanden van nachten zoals deze. De nieuwe ouders hebben de beste intenties, maar zijn ten einde raad. Ontworsteld uit de slaap die hij pas onlangs bekwam verlaat de vader het bed, ontdooit en verwarm wat moedermelk, en geeft het z'n zoon. De baby neemt het gaarne aan, is weer voldaan — maa

  1. 🟡 development environment commitment
  2. 🔴 platform commitment
  3. 🟡 team member commitment
  4. 🔴 library commitment
  5. 🔴 external communications
  6. 🟡 internal communications
  7. 🟡 stakeholder management
  8. 🔴 end customer management
  9. 🔴 financial cashflow and burn rate management
  10. 🔴 financial software asset reporting
@nmcb
nmcb / aaron_swartz_guerilla_open_access_manifesto.md
Last active January 17, 2022 11:54 — forked from usmanity/Aaron Swartz: Guerilla Open Access Manifesto
aaron_swartz_guerilla_open_access_manifesto.md

Information is power. But like all power, there are those who want to keep it for themselves. The world’s entire scientific and cultural heritage, published over centuries in books and journals, is increasingly being digitized and locked up by a handful of private corporations. Want to read the papers featuring the most famous results of the sciences? You’ll need to send enormous amounts to publishers like Reed Elsevier.

There are those struggling to change this. The Open Access Movement has fought valiantly to ensure that scientists do not sign their copyrights away but instead ensure their work is published on the Internet, under terms that allow anyone to access it. But even under the best scenarios, their work will only apply to things published in the future. Everything up until now will have been lost.

That is too high a price to pay. Forcing academics to pay money to read the work of their colleagues? Scanning entire libraries but only allowing the folks at Google to read them? Providing scientific a

trait Isomorphism[A, B] {
def fw: A => B
def bw: B => A
}
object Isomorphism {
implicit def anyIso[A](a: A) = new {
def as[B](implicit ev: Isomorphism[A, B]) = ev fw a
}

newtype and circe

implicit def coercibleDecoder[N, P](implicit ev: Coercible[Decoder[P],Decoder[N]]
                                   ,    decoder: Decoder[P]
): Decoder[N] = ev(decoder)
object Playground extends App {
import squants._
import squants.energy._
def parse(s: String, i: Int): Option[Quantity[_]] =
Seq(Energy, EnergyDensity, Power)
.foldLeft(Option.empty[Quantity[_]]) {
case (None, dimension) => dimension.parseTuple((i,s)).toOption
case (quantity@Some(_), _) => quantity
@nmcb
nmcb / falsehoods-programming-time-list.md
Created June 28, 2020 11:01 — forked from timvisee/falsehoods-programming-time-list.md
Falsehoods programmers believe about time, in a single list

Falsehoods programmers believe about time

This is a compiled list of falsehoods programmers tend to believe about working with time.

Don't re-invent a date time library yourself. If you think you understand everything about time, you're probably doing it wrong.

Falsehoods

  • There are always 24 hours in a day.
  • February is always 28 days long.
  • Any 24-hour period will always begin and end in the same day (or week, or month).