Skip to content

Instantly share code, notes, and snippets.

Notes on IAM (Identity and Access Management) and Zero-Trust Architecture

Overall ideas

@arcilli
arcilli / macOS Internals.md
Created May 5, 2023 10:44 — forked from kconner/macOS Internals.md
macOS Internals

macOS Internals

Understand your Mac and iPhone more deeply by tracing the evolution of Mac OS X from prelease to Swift. John Siracusa delivers the details.

Starting Points

How to use this gist

You've got two main options:

// Logiops (Linux driver) configuration for Logitech MX Master 3.
// Includes gestures, smartshift, DPI.
// Tested on logid v0.2.3 - GNOME 3.38.4 on Zorin OS 16 Pro
// What's working:
// 1. Window snapping using Gesture button (Thumb)
// 2. Forward Back Buttons
// 3. Top button (Ratchet-Free wheel)
// What's not working:
// 1. Thumb scroll (H-scroll)
// 2. Scroll button
@arcilli
arcilli / preprocessor_fun.h
Created December 7, 2022 13:18 — forked from aras-p/preprocessor_fun.h
Things to commit just before leaving your job
// Just before switching jobs:
// Add one of these.
// Preferably into the same commit where you do a large merge.
//
// This started as a tweet with a joke of "C++ pro-tip: #define private public",
// and then it quickly escalated into more and more evil suggestions.
// I've tried to capture interesting suggestions here.
//
// Contributors: @r2d2rigo, @joeldevahl, @msinilo, @_Humus_,
// @YuriyODonnell, @rygorous, @cmuratori, @mike_acton, @grumpygiant,
@arcilli
arcilli / Not a nightmare.md
Created September 4, 2022 14:25 — forked from jackcviers/Not a nightmare.md
Scala isn't a maintenance nightmare

So the hacker news post said my comment was too long. Warning, long, opinionated post:

Scala dev for 10+ years here. Spark is weird. Databricks has a style guide that deliberately chooses not to use scala features that the rest of the community uses, and doesn't follow the same best practices around library and scala major version usage that the rest of the community uses [1]. It's no surprise that the project has trouble interoperating with libraries outside of the spark ecosystem, and is therefore a maintenance problem.

Spark's style and compatibility problems

Scala isn't a maintenance nightmare, but it does attract a lot of newcomers who dive in, don't stick within one of its many ecosystems, get confused, and generally leave a mess, and that is a direct result of the fact that scala is a multi-paradigm, relatively expressive language to the one(s) it is competing with and pulling developers from, and that those developers, for the large part, don't really want to change and think that Scala is just a

@arcilli
arcilli / latency.txt
Created June 13, 2022 17:47 — forked from jboner/latency.txt
Latency Numbers Every Programmer Should Know
Latency Comparison Numbers (~2012)
----------------------------------
L1 cache reference 0.5 ns
Branch mispredict 5 ns
L2 cache reference 7 ns 14x L1 cache
Mutex lock/unlock 25 ns
Main memory reference 100 ns 20x L2 cache, 200x L1 cache
Compress 1K bytes with Zippy 3,000 ns 3 us
Send 1K bytes over 1 Gbps network 10,000 ns 10 us
Read 4K randomly from SSD* 150,000 ns 150 us ~1GB/sec SSD
@arcilli
arcilli / JsonLens.scala
Created June 8, 2022 07:48 — forked from kirked/JsonLens.scala
A lens wrapper over spray-json
import scala.reflect.ClassTag
import scala.util.{Either, Left, Right}
import spray.json._
object JsonLens {
class Json(val value: Option[JsValue]) {
def /(name: String): Json = Json(value.flatMap(_.asJsObject.fields.get(name)))
def -(name: String): Json = Json(value.map(obj => JsObject(obj.asJsObject.fields - name)))
def apply(index: Int): Json = {
@arcilli
arcilli / bashscript.sh
Created May 15, 2022 08:16 — forked from JohnLaTwC/bashscript.sh
Bash script: 077d51016727216dd6216a3722353be274288d411a6295a5d804d251dacd88fc
#!/bin/bash
SHELL=/bin/sh
PATH=/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin
#This is the Old-ReBuild Lady job copy
#
#Goal:
# The goal of this campaign is as follows;
# - To keep the internet safe.
# - To keep them hackers from causing real damage to organisations.
# - We know you feel We are a potential threat, well We ain't.