local_req = Path.expand("~/dev/req")
Mix.install([
{:req, path: local_req}
])
; This macro allows you to use a fixed machine location for a tool change and probe. It works by | |
; probing twice, once to capture the position of the tool you're changing away from, and again to | |
; set the adjusted WCS offset of the tool you're changing to. | |
; Using the macro in practice: | |
; 1) Insert an M6 tool change command in your program, which will pause cncjs and allow you to | |
; execute this macro. | |
; 2) The router retracts to a safe height and moves to a pre-defined location for tool changes and | |
; probing, then pauses. | |
; 3) Turn off your router, set up your probe, and continue. This will probe to capture the position |
Mix.install([ | |
{:cubdb, "~> 2.0"} | |
]) | |
{:ok, _} = CubDB.start_link(data_dir: "./cubdb", name: DB) | |
defmodule CubQuery do | |
@moduledoc """ | |
Key and query utilities for CubDB | |
""" |
Mix.install([ | |
{:finch, path: "./finch"}, | |
{:benchee, "~> 1.1.0"}, | |
{:bandit, "~> 1.0.0-pre.5"}, | |
{:plug, "~> 1.14.2"} | |
]) | |
defmodule PlugServer do | |
import Plug.Conn |
# Usage: open some_file.html | |
# Open a file in browser | |
function open () { | |
explorer.exe $(wslpath -w $(realpath $1)) | |
return 0 | |
} |
The default eth0
network interface on WSL2 has an MTU of 1280, which isn't sufficient for large packets sent over the Wireguard protocol.
You can confirm the issue by running ip a
and seeing that the MTU of the eth0
interface is 1280.
To fix this, you need to set the MTU of the eth0
interface to 1500. This has to be done every time WSL starts.
Edit /etc/wsl.conf
to include:
[boot]
Update 12/18/22: "Part 2" notes/changes added at the bottom.
Based on this post by Peter Ullrich, adapted to use the experimental Janus authorization library.
I've been working on an experimental authorization library over the last few days, and so was pleasantly surprised when Peter posted about building a Role and Permission System. I jumped at the opportunity to see how Janus could "slot in" to the architecture that he presented.
defmodule MediaPlayer.AutoplayNext do | |
@moduledoc """ | |
Helper statechart used to check whether the song is ending and communicate back to | |
the parent. | |
""" | |
use Protean | |
alias Protean.Action | |
alias LiveBeats.MediaLibrary |