| defmodule Mix.Tasks.PrintCode do | |
| @shortdoc "Prints decompiled Erlang source for a module" | |
| @moduledoc """ | |
| Pretty-prints the *Erlang-equivalent* source code of an *Elixir* | |
| module. This is useful for understanding how particular Elixir | |
| features (e.g. macros, protocols) operate under the covers. | |
| *Erlang modules are not yet supported.* |
| ### KERNEL TUNING ### | |
| # Increase size of file handles and inode cache | |
| fs.file-max = 2097152 | |
| # Do less swapping | |
| vm.swappiness = 10 | |
| vm.dirty_ratio = 60 | |
| vm.dirty_background_ratio = 2 |
| #!/usr/bin/escript | |
| %%% | |
| %%% Output NIF functions and since when they are supported | |
| %%% | |
| %%% Usage: | |
| %%% | |
| %%% Run `funcs.escript` without any arguments to output all NIF functions. | |
| %%% To filter NIFs by a specific version of OTP, use `funcs.escript <version>`, | |
| %%% where matching versions must have the same prefix as the one supplied on | |
| %%% the command line. |
Guide: Run FreeBSD 13.1-RELEASE for ARM64 in QEMU on Apple Silicon Mac (MacBook Pro M1, etc) with HVF acceleration (Hypervisor.framework)
This guide was adapted from https://gist.github.com/niw/e4313b9c14e968764a52375da41b4278#running-ubuntu-server-for-arm64
- Install Xcode from App Store or install Command Line Tools on your Mac running on Apple Silicon.
| iex(1)> Foo.Correspondence.validate_number("234-555-6789") | |
| {:ok, "Verizon Wireless", "mobile"} |
Deploying a Phoenix app to Fly.io is a breeze...is what everyone kept telling me. In fairness, I imagine the process would have been breezier had I just used postgres, but all the sqlite and litestream talk has been far too intriguing to ignore. "Wait", you say. "It is just a flat file. How much harder can it be?"
It is easy to make something harder than it should be. It is hard to take something complex and make it truly simple. flyctl launch does an amazing job at providing a simple interface to the utterly complex task of generating deployment resources, especially now that we are living in a containerd (erm, firecracker) world.
This gist is for anyone who, like me, thinks they know better than to read all of the documentation and therefore necessari
| #!/bin/bash | |
| set -e | |
| CURRENT_NAME="WatchParty" | |
| CURRENT_OTP="watch-party" | |
| NEW_NAME="Chat" | |
| NEW_OTP="chat" |
