Skip to content

Instantly share code, notes, and snippets.

@RaimoNiskanen
RaimoNiskanen / code_lock.erl
Last active January 1, 2023 19:03
gen_statem Code Lock Example in Erlang for SF CodeBeam 2018
-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
@cblavier
cblavier / app.js
Created January 9, 2021 10:55
Responsive Phoenix LiveView
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
@css459
css459 / arch-linux-devterm-a06.md
Created January 22, 2022 21:23
Installing Arch Linux on ClockworkPi DevTerm A06 (WIP)

Installing Arch Linux on ClockworkPi DevTerm A06

Cole Smith

January 22, 2022

Introduction

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.