Cole Smith
January 22, 2022
This document will walk you through installing Arch Linux ARM on the DevTerm A06. At the time of writing, only Armbian is supported on the DevTerm.
Cole Smith
January 22, 2022
This document will walk you through installing Arch Linux ARM on the DevTerm A06. At the time of writing, only Armbian is supported on the DevTerm.
const Hooks = { ViewportResizeHooks} | |
const connectLiveSocket = () => { | |
const csrfToken = document.querySelector("meta[name='csrf-token']").getAttribute('content') | |
const liveSocket = new LiveSocket('/my_app/live', Socket, { | |
params: { | |
_csrf_token: csrfToken, | |
viewport: { | |
width: window.innerWidth, | |
height: window.innerHeight |
-module(code_lock). | |
-behaviour(gen_statem). | |
-define(NAME, code_lock). | |
-export([down/1,up/1,code_length/0]). % API | |
-export([start_link/1,stop/0]). % Server | |
-export([init/1,callback_mode/0,terminate/3]). % Behaviour | |
-export([locked/3,open/3]). % States |
----------------------------- | |
-- Domain.hs | |
type SessionId = Text | |
type UserId = Text | |
type User = Text | |
class (Monad m) => UserRepo m where | |
getUserById :: UserId -> m User |
package main | |
import ( | |
"fmt" | |
"log" | |
"net" | |
// "os" | |
// "path" | |
"os" |
# Assuming you're a regular user that has doas allowances for vmctl | |
mkdir -p ~/vmm | |
cd ~/vmm | |
# Grab the the one of the virt iso's of Alpine Linux | |
curl https://nl.alpinelinux.org/alpine/v3.6/releases/x86_64/alpine-virt-3.6.0-x86_64.iso -o alpine-virt-3.6.0-x86_64.iso | |
# Make a new virtual disk image, change the size as needed | |
vmctl create alpine-virt.img -s 6G |
- Get OpenBSD from http://www.openbsd.org/ ;) | |
- Find an Ubuntu cloud image on https://cloud-images.ubuntu.com/ | |
- Get https://github.com/reyk/meta-data and configure it for cloud-init | |
- Run the VM ... | |
Script started on Thu Mar 30 01:53:50 2017 | |
# qemu-img convert ubuntu-16.10-server-cloudimg-amd64.img ubuntu-16.10-server-cloudimg-amd64.raw | |
# vmctl start ubuntu -d ubuntu-16.10-server-cloudimg-amd64.raw -n nat -c | |
Connected to /dev/ttyp6 (speed 9600) | |
Changing serial settings was 0/0 now 3/0 |
This is the process of setting up erlang, rebar3, and cowboy for a Hello World, starting with a clean Debian 8 install.
Update apt and install deps:
root@046edcaea45a:~# apt-get update
root@046edcaea45a:~# apt-get install erlang erlang-dev gcc
root@046edcaea45a:~# wget https://s3.amazonaws.com/rebar3/rebar3
root@046edcaea45a:~# mkdir ~/bin/
root@046edcaea45a:~# mv rebar3 ~/bin/
root@046edcaea45a:~# chmod +x ~/bin/rebar3
(defn week-number | |
"Week number according to the ISO-8601 standard, weeks starting on | |
Monday. The first week of the year is the week that contains that | |
year's first Thursday (='First 4-day week'). The highest week number | |
in a year is either 52 or 53." | |
[ts] | |
(let [year (.getFullYear ts) | |
month (.getMonth ts) | |
date (.getDate ts) | |
day (.getDay ts) |