Skip to content

Instantly share code, notes, and snippets.

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:

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

@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
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
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 \
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;
}
ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIOI/iiwdpZwcxO0U1i/01kpjMWX7dUj/6KA9OJ5BczYT f.schuindtcs@gmail.com

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.
@fschuindt
fschuindt / elixir_notes.md
Last active December 15, 2023 22:32
My personal study notes on Elixir. It's basically a resume of http://elixir-lang.org/getting-started/ (Almost everything is copied). Still working on it!