Here you may find answers or direction to a wide range of topics. I don’t post regularly, but when I find something particularly vexing and the answers out there thin or useless, a post often results.

Posts

  • function spec from anonymous function type spec

    erlang  elixir 

    A possible OTP feature request: syntax for declaring a function spec using a typespec for an anonymous function.

  • No plural tables

    database  opinion 

    Some opinionated database frameworks have made a point of using pluralized names for database tables. I disagree with this opinion and will explain why.

  • First deployment at Hetzner with CDKTF

    infrastructure  cdk  hetzner 

    Having a small project to deploy at Hetzner, I decided to try using CDK for the first time outside of AWS. Hashicorp’s CDKTF rolls AWS CDK with Terraform for doing IAC with the many TF providers available.

  • Publishing Jetenv to HEX

    elixir 

    Announcing that today a new package Jetenv will be published to hex.

  • Emacs: mini-buffer input that conflicts with completion

    emacs  company-mode  completion 
    In Emacs, using input that conflicts with completion choices
  • Why HMAC

    crypto 

    Need to generate a constant hash key from an ID, or compound ID, but don't want it to be too easy for a 3rd party to brute force generate (assuming they know the ID domain and in a compound the right ordering, and other transformations)?

  • NixOS PXE install

    nixos  linux 
    A stab at installing NixOS over a network
  • Signed OpenSSH keys

    openssl  ssh 
    Background and references on signed ssh keys
  • RSA Crypto for JS and Elixir

    elixir  javascript 
    Encryption between JS and Elixir
  • nginx config for acme challenge

    nginx  acme certificates 

    To more transparently support Let's Encrypt and the acme-challenge for http, here is a config that can be used with nginx. In the case all traffic showing up as HTTP gets redirected to HTTPS, it's easiest to respond to challenges without the redirect.


  • SSH keys in Docker

    docker  ssh 

    One way that I use docker is to encapsulate all the configuration of a remote site. By using docker-compose and a container that just runs /bin/sh, running commands in a controlled environment is easy as exec. One issue I had is how to use my ssh identity. The most flexible answer is to use secrets with docker-compose.


  • docker network conflict?

    docker  routing  networking  snaps  ubuntu 

    Docker uses 172.17.0.0 as the first network and increments the second octet for each new network. If your network happens to use internal networks in the range, you'll have routing problems. Here's how to change what docker uses for numbering networks.


  • iocage networking with vlans

    freebsd  jails  iocage 
    Solving traffic routing problems with iocage and VLANs
  • git color in docker container

    git  docker 

    If you run git interactively in a docker container colors may not display if alpine and busybox is in use. This is because less is mapped into busybox and doesn't have color capabilities. The solution is to apk add less.

  • SSH and keytab case sensitivity

    kerberos  ssh 

    Getting SSH to work consistently well with Kerberos seems to run into one thing consistently: problems. It does work, but when it doesn't the messages are not helpful and only one's imagination and persistence remains. The documentation is not great in this area and searching the internet for clues results in slim pickings. Here's the latest problem:

  • An interactive approach to writing Elixir macros

    macros  elixir 

    Bitstring binary matching is hugely powerful to parsing fixed data. It does lead to considerable repetition and depending on the data, converting different fields different ways leads to more repetition, shadowing variables and so on. For my particular situation it seemed worth the time to try a macro. In the process I developed an approach that made writing the macro easier and interactive.

  • ACE for Drop Folder

    ACE  SMB  TrueNas 
    An ACL for write-only
  • SMART service fails to start on FreeNAS

    Dell Server  iDRAC  SMART  GEOM 
    Disable the virtual floppy
  • A little WebCrypto

    openssl  WebCrypto  RSA  Javascript 
    Using SubtleCrypto to encrypt in the browser
  • Absinthe: Passing unresolved fields through resolvers

    elixir  absinthe  graphql 
    Passing extra data between resolvers.
  • ExUnit: Sharing support modules

    elixir  testing  ExUnit  mix 
    Changing dependency compilation environment to run dependency tests.
  • Don't use localhost if you want Kerberos to work

    samba  kerberos  samba-tool 
    Steering clear of host naming problems with Kerberos.
  • mix configuration cycle

    elixir  mix  releases 
    Controlling import_config and cyclical import problems.
  • Postgres now() and Testing within a transaction

    ecto  elixir  testing  postgresql 
    What is now() in a transaction.
  • Corrupting a struct in Elixir

    elixir  ExUnit  struct 
    ExUnit errors involving degenerate structs
  • The Elixir Module attribute @compile

    elixir  erlang  compiler  testing  ExUnit 
    Testing private functions
  • Embedded schema for form validation and casting

    ecto  forms 
    Using embedded schemas for general validation
  • Using Flow Windows and Triggers on a Bounded Stream, Part 1

    elixir 
    Batching insertions with triggers
  • elixir macros that use module attributes

    elixir  macros 
    Attributes in Macros
  • Adding Gerrit to our development process

    gerrit  git 
    Configuring a user to use Gerrit
  • Gerrit: Converting from HTTP Auth to LDAP

    LDAP  gerrit  authentication 
    How to transition users from HTTP to LDAP authentication in Gerrit
  • haproxy and ACME certificates

    haproxy  acme certs  dehydrated 
    Setup haproxy to work with Let's Encrypt for issuing and using Acme certs
  • netstat, listeners, processes


    netstat can tell you what is doing the LISTEN
  • haproxy for redirect

    haproxy 
    Setup haproxy as domain redirect switchboard

subscribe via RSS