Skip to content

Instantly share code, notes, and snippets.

Remove Apple MDM

Note: Apple will store Wifi passwords on the T2 chip. SSD cleaning won't make it forget the password. You have to turn the network off, or change the password on the router.

Different Paths

Start from Path 1. If you get any messages about the MDM on the first usage, start all over from the Path 2.

Path 1

  • Get into recovery mode (Cmd + r) during start up.
ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIOI/iiwdpZwcxO0U1i/01kpjMWX7dUj/6KA9OJ5BczYT f.schuindtcs@gmail.com
load_module /usr/lib/nginx/modules/ngx_stream_module.so;
worker_processes auto;
error_log /home/broadcaster/log/error.log warn;
pid /home/broadcaster/run/nginx.pid;
events {
worker_connections 768;
}
FROM ubuntu:20.10
ARG NGINX_GIT=https://github.com/nginx/nginx.git
ARG NGINX_RTMP_GIT=https://github.com/arut/nginx-rtmp-module.git
ARG NGINX_RELEASE=release-1.19.6
ARG DEBIAN_FRONTEND=noninteractive
RUN apt -y update && \
apt install -y apt-utils && \
apt install -y --no-install-recommends build-essential make \
@fschuindt
fschuindt / collatz.ex
Created July 21, 2018 03:20
The Collatz conjecture.
defmodule Collatz do
def of(1), do: 1
def of(n) do
IO.puts n
do_of(n, rem(n, 2))
end
defp do_of(n, 0) do

Concurrent calculation of Fibonacci in Elixir up to the 1200th position (faster than you can see)

It uses a known formla to evaluate a position instead of calculating it in a sequencial and/or recursive approach.
Formula

It's amazing how fast it is:
Demonstration

TRUE = λx. λy. x
FALSE = λx. λy. y
NOT = λb. b FALSE TRUE
AND = λb1. λb2. b1 b2 FALSE
OR = λb1. λb2. b1 TRUE b2
XOR = λb1. λb2. b1 (b2 FALSE TRUE) b2

Keybase proof

I hereby claim:

  • I am fschuindt on github.
  • I am fschuindt (https://keybase.io/fschuindt) on keybase.
  • I have a public key whose fingerprint is 0A5E 2BE6 6AD9 0D73 B963 6503 7350 1743 8F37 9CD5

To claim this, I am signing this object:

local return_code="%(?..%{$fg[red]%}%? ↵%{$reset_color%})"
if [[ $UID -eq 0 ]]; then
local user_host='%{$terminfo[bold]$fg[red]%}%n@%m%{$reset_color%}'
local user_symbol='#'
else
local user_host='%{$terminfo[bold]$fg[grey]%}%n@%m%{$reset_color%}'
local user_symbol='$'
fi
# Challenge 1: Given a list of integers, create a module that maps that list
# into different processes. Deliver to those processes the element and a
# function to be performed with it. This function can be anything, for
# instance: "Returns square of the number". Finally each process shoud send
# a message to the spawning process with the result.
defmodule Spawner do
@moduledoc """
Maps a list into processes performing a given function. Each one sends a
message to the spawning process, this one uses the IO module to print it out.