Skip to content

Instantly share code, notes, and snippets.

View TypedLambda's full-sized avatar

Arne Ehrlich TypedLambda

View GitHub Profile
@TypedLambda
TypedLambda / freebsd_upgrade_11.0-11.1-abridged
Created January 31, 2018 08:16
Abridged upgrading work VM from FreeBSD 11.0-RELEASE to FreeBSD 11.1-RELEASE with Boot Environments
bil@fbsd-bil:~ %>su -
Password:
root@fbsd-bil:~ # beadm create 11.1-RELEASE
Created successfully
root@fbsd-bil:~ # beadm mount 11.1-RELEASE /mnt
Mounted successfully on '/mnt'
root@fbsd-bil:~ # freebsd-update upgrade -b /mnt -r 11.1-RELEASE
@TypedLambda
TypedLambda / tardis.sql
Last active October 1, 2023 18:28 — forked from iperdomo/tardis.sql
-- psql -U postgres -h localhost -f /path/to/tardis.sql
SET statement_timeout = 0;
SET lock_timeout = 0;
SET client_encoding = 'UTF8';
SET standard_conforming_strings = on;
SET check_function_bodies = false;
SET client_min_messages = warning;
SET row_security = off;
defmodule Acme.Repo do
use Ecto.Repo,
otp_app: :acme,
adapter: Ecto.Adapters.Postgres
def with_prefix(prefix) do
module_atom = Module.concat([Acme, Repo, WithPrefix, Macro.camelize(prefix)])
# We could not find a better way to see if this module already existed
if !Kernel.function_exported?(module_atom, :prefix, 0) do