Mix.install( | |
[ | |
{:phoenix_playground, "~> 0.1.0"}, | |
{:openai, "~> 0.6.1"}, | |
{:makeup, "~> 1.1.2"}, | |
{:makeup_elixir, "~> 0.14"} | |
], | |
config: [ | |
openai: [ | |
api_key: System.get_env("OPENAI_API_KEY"), |
#!/bin/bash | |
# Usage: | |
# ./resize_and_convert.sh ~/Desktop/folder-with-images | |
# Check if the correct number of arguments is provided | |
if [ "$#" -ne 1 ]; then | |
echo "Usage: $0 source_path" | |
exit 1 | |
fi |
config :phoenix, :json_library, ErlJson |
#!/usr/bin/env bash | |
# Abort sign off on any error | |
set -e | |
# Start the benchmark timer | |
SECONDS=0 | |
# Repository introspection | |
OWNER=$(gh repo view --json owner --jq .owner.login) |
I guess that the [fediverse][fediverse] will be as decentralised as email: a bit, but not that much. Most people will be dependent on a few major hubs, some groups might have their own hubs (e.g. company email servers), personal instances will be pretty rare. This is in contrast to personal blogging, where every Bob can easily host their own (and they often do). I mean that's already implied by the name: fediverse is [a federated universe, not a distributed one][fed-v-dis].
Why does this matter? Well I like not being dependent on one entity, but I would like it much more if I was dependent on no entities at all. In other words, I like to publish my own personal blog and get all the goodies of a social network, without being dependent on other micro-blogging / social content platforms.
So in this writing, I'm going to:
- ❓ Contemplate on why the fediverse gets federated not distributed (spoilers: its push vs pull)
- 🧠 Ideate on how could we get a distri
// This is a basic diff mechanism, it is not going to work for characters that take up more than | |
// one byte. It is also not going to normalise text. | |
// these are things that *should happen* in the future, but for now they are going to be ignored. | |
// returns the insert position & the text to insert as well as the delete position & the text to delete | |
// one of the problems with this kind of diff is that you can't tell in some cases where the insert | |
// actually occurred. | |
// for this you will need to take into account the cursor start & end. | |
export const diff = (a, b) => { | |
if (a === b) { |
defmodule ParseU8 do | |
@moduledoc """ | |
https://lemire.me/blog/2023/11/28/parsing-8-bit-integers-quickly/ | |
""" | |
# Orb lets you write WebAssembly with friendly Elixir syntax: https://github.com/RoyalIcing/Orb | |
use Orb | |
Memory.pages(1) | |
wasm_mode(U32) |
import { Suspense } from "react"; | |
import CurrentTimeClient from "./CurrentTimeClient"; | |
export default function CurrentTime() { | |
const locale = "en-GB"; | |
const dateConfig = { | |
hour: "numeric", | |
minute: "numeric", | |
second: "numeric", |