<--- -->
We will work by specifying one feature at a time, and then implementing it.
The workflow:
@doc """ | |
Renders an icon. | |
Supports three icon libraries: | |
- [Heroicons](https://heroicons.com) - prefixed with "hero-" | |
- [Lucide](https://lucide.dev) - prefixed with "lucide-" | |
- [Simple Icons](https://simpleicons.org) - prefixed with "si-" | |
You can customize the size and colors of the icons by setting | |
width, height, and background color classes. |
These three scripts can provide you a cursor style CMD+K Like experience in any terminal.
logged-shell
to be your default shell for your terminal emulator. shell = /path/to/logged-shell
in ~/.config/kitty/kitty.conf
for kitty users.$SHELL_LOG_FILE
ai-bash-command
will take a user prompt, add the shell as context, and call OpenAI (with the ai
command) to get the bash command that satisfies the prompt.wtype
for wayland users.let timeout = null; | |
let requestCount = 0; | |
let queue = []; | |
function schedule(limit) { | |
if (!timeout) { | |
timeout = setTimeout(() => throttleQueue(limit), 1000) | |
} | |
} |
When I took "Fundamentals of Computer Science" in college, my professor was very adamant about the distinction between data and information and about how data doesn't have any inherent meaning. At the time, it seemed a bit silly to me how much emphasis he put on such a seemingly insignificant difference.
In retrospect, I think he was exactly right about this and I wish more programmers took it to heart.
Data is something you can store in a computer, such as, let's say, the byte 0b01000001
.
defmodule AlchemistWeb.Endpoint do | |
use Phoenix.Endpoint, otp_app: :alchemist | |
def call(conn, opts) do | |
conn | |
|> AlchemistWeb.ReplayPlug.call(AlchemistWeb.ReplayPlug.init(nil)) | |
|> case do | |
%{halted: true} = conn -> conn | |
conn -> super(conn, opts) | |
end |
config :wps, WPSWeb.Endpoint, | |
live_reload: [ | |
notify: [ | |
live_view: [ | |
~r"lib/wps_web/core_components.ex$", | |
~r"lib/wps_web/(live|components)/.*(ex|heex)$" | |
] | |
], | |
patterns: [ | |
~r"priv/static/(?!uploads/).*(js|css|png|jpeg|jpg|gif|svg)$", |
<!-- livebook:{"persist_outputs":true} --> | |
# Distribute | |
## Section | |
A small toy to show how you might, given a stream, do a "fan out", processing different elements in separate streams. Powered by simple primitives like `Stream.resource` and `spawn_link`. | |
```elixir | |
defmodule Distribute do |
<.flash_group flash={@flash} /> | |
<main> | |
<%= @inner_content %> | |
</main> | |
<%!-- We're doing teleport because navigation is rendered in root layout which is not updated --%> | |
<%!-- Notice "hidden" class, it's important because we're not really teleporting content, but duplicating it --%> | |
<div :if={@current_user} id="onboarding-render" phx-hook="teleport" data-teleport-target="onboarding" class="hidden"> | |
<MyApp.Onboarding.onboarding current_user={@current_user} /> |