Skip to content

Instantly share code, notes, and snippets.

Mix.install(
[
{:phoenix_playground, "~> 0.1.0"},
{:openai, "~> 0.6.1"}
],
config: [
openai: [
api_key: System.get_env("OPENAI_API_KEY"),
organization_key: System.get_env("OPENAI_ORGANIZATION_KEY")
]
@Nezteb
Nezteb / elixir-language-server-comparison.md
Last active September 9, 2025 16:14
Elixir Language Server Comparisons

Update 2

As of August 28th, 2025, Expert LSP has been released: https://github.com/elixir-lang/expert

Although still a work in progress, the plan is for the other three LS implementations to be archived. I may try to come up with a new way to track Expert's featureset, but I would probably contribute that back to Expert as documentation.

Update

As of August 15, 2024, it's been announced that the three projects bein compared here will soon merge! See the official Elixir blog post for more details: https://elixir-lang.org/blog/2024/08/15/welcome-elixir-language-server-team/

@cblavier
cblavier / transloadit.ex
Created February 21, 2023 20:49
Transloadit Elixir client
defmodule Readable.Transloadit do
use Tesla
plug Tesla.Middleware.BaseUrl, "https://api2.transloadit.com/"
plug Tesla.Middleware.JSON
@behaviour Readable.Transloadit.TransloaditAPI
@impl true
def run_assembly(assembly, file_path, source_container, target_container) do
@mcrumm
mcrumm / phx_sqlite_fly_launch.md
Last active October 9, 2025 12:37
Phoenix + SQLite Deployment tips

Deploying to Fly.io with SQLite

Deploying a Phoenix app to Fly.io is a breeze...is what everyone kept telling me. In fairness, I imagine the process would have been breezier had I just used postgres, but all the sqlite and litestream talk has been far too intriguing to ignore. "Wait", you say. "It is just a flat file. How much harder can it be?"

It is easy to make something harder than it should be. It is hard to take something complex and make it truly simple. flyctl launch does an amazing job at providing a simple interface to the utterly complex task of generating deployment resources, especially now that we are living in a containerd (erm, firecracker) world.

This gist is for anyone who, like me, thinks they know better than to read all of the documentation and therefore necessari

@fhunleth
fhunleth / ble.md
Last active July 25, 2025 14:47
Bluetooth with Nerves notes

UPDATE: THIS WAS WRITTEN BEFORE BlueHeron EXISTED

This is a braindump of my progress over the weekend to look into Bluetooth support on Nerves. While Bluetooth has a lot of specs, supporting a subset of BLE that makes it easy for Nerves devices to communicate with cell phones and back would be generally useful.

There are two options for BLE support on Nerves:

  1. Make a custom Nerves system that uses bluez
  2. Use Harald
@evadne
evadne / a-reverse-bench.exs
Last active July 24, 2025 17:08
Reversing Binaries in Elixir
defmodule Benchmarker do
def run(title, module, function, size \\ 1024, iterations \\ 100) do
times = for (_ <- 1 .. iterations) do
data = :crypto.strong_rand_bytes(size)
{duration, _value} = :timer.tc fn ->
apply(module, function, [data])
end
duration
end
@Jpoliachik
Jpoliachik / RCTAccessibilityManager+FontMultipliers.m
Last active August 28, 2018 13:20
React Native iOS Accessibility Font Scaling Workaround
//
// RCTAccessibilityManager+FontMultipliers.m
//
// This category is a workaround React Native's default Font Sizing Accessibility settings
//
// Swizzle the getter of the font size multipliers so we can limit the max size.
//
#import "RCTAccessibilityManager+FontMultipliers.h"
#import <objc/runtime.h>

FWIW: I (@rondy) am not the creator of the content shared here, which is an excerpt from Edmond Lau's book. I simply copied and pasted it from another location and saved it as a personal note, before it gained popularity on news.ycombinator.com. Unfortunately, I cannot recall the exact origin of the original source, nor was I able to find the author's name, so I am can't provide the appropriate credits.


Effective Engineer - Notes

What's an Effective Engineer?