An #ollama cheatsheet...
Also, I saw a hero trailer on netflix that had obviously been AI dubbed... sounded totally demented.
An #ollama cheatsheet...
Also, I saw a hero trailer on netflix that had obviously been AI dubbed... sounded totally demented.
#til I mixed up #ecto queue_target for queue_interval
#til how to turn capslock off when I magically get it stuck under #windows:
Ctrl + ALT then Ctrl + k
I am occasionally mired in using an Ubuntu guest with a Windows host. I swap back and forth quickly, and something about the way I type yields a state where capslock is just... stuck... worth mentioning that I remap capslock to ctrl anywhere that I can, so when I get into this state, I can't simply hit capslock.
#til a sweet lil' hack to disable #neovim plugins and features that might make things sluggish... this has definitely not happened to me 100 times before.
local bigfile = vim.api.nvim_create_augroup('bigfile', { clear = true })
vim.g.bigfile_size = 1024 * 1024 * 1.5
vim.filetype.add({
pattern = {
[".*"] = {
function(path, buf)
return vim.bo[buf].filetype ~= "bigfile" and path and vim.fn.getfsize(path) > vim.g.bigfile_size and "bigfile"
or nil
end,
},
},
})
vim.api.nvim_create_autocmd({ "FileType" }, {
group = bigfile,
pattern = "bigfile",
callback = function(ev)
vim.b.minianimate_disable = true
vim.schedule(function()
vim.bo[ev.buf].syntax = vim.filetype.match({ buf = ev.buf }) or ""
end)
end,
})
vim.api.nvim_create_autocommand #-- vim.api.nvim_create_autocmd({event}, {opts})
vim.api.nvim_create_autocmd(
-- the event
"BufWritePost",
-- the effect
{
pattern = "*.js",
command = "silent! !prettier --write %",
}
)
vim.api.nvim_create_augroup #local myGroup = vim.api.nvim_create_augroup("MyAutoGroup", { clear = true })
vim.api.nvim_create_autocmd(
"BufWritePost",
{
-- the group
group = myGroup,
pattern = "*.js",
command = "silent! !prettier --write %",
}
)
Had to tear down my long-lived guest VM today. After bumping to Ubuntu 24 LTS, the disk inexplicably grew to 390gb...
queue_interval #Found a helpful thread
for tuning how phoenix will talk to the db, in my case supabase.
queue_interval: 500 is pretty long, but seems to help with the machine resume
thing...
beep beep: Control (⌃) + Command (⌘) + Space
I've been deleting most of the default tailwind classes attached to the core
components that Phoenix generates. Think I'll start my next #phoenix project
with --no-tailwind.
Using vim-test with #vim, #til how to
scroll the :terminal. Just hit <C-o>. Scroll a bit. Then i to get back
into insert mode.
On Neovim the "basic" and "neovim" strategies will run test commands using Neovim's terminal, and leave you in insert mode, so that you can just press "Enter" to close the terminal session and go back to editing. If you want to scroll through the test command output, you'll have to first switch to normal mode. The built-in mapping for exiting terminal insert mode is CTRL-\ CTRL-n, which is difficult to press, so I recommend mapping it to CTRL-o:
Instead of doing a series of
Enum.find across an #elixir
list, pipe the contents of the find straight
into Enum.into to produce a
%{} that's easier to pluck values out of.
list = [
{
"img",
[
{"alt", "a shadow"},
{"src", "..."},
{"width", "792"},
{"height", "528"}
],
[]
}
]
with {"img", attrs, _} <- Enum.find(list, fn {tag, _, _} -> tag == "img" end),
%{"alt" => alt, "src" => src} <- Enum.into(attrs, %{}) do
""
end
Kicking out some toy apps, and fiddling with a #phoenix app deployed to fly.io
— they have an alpha integration back to supabase, nice. I don't want to
manage #postgres. BUT when my fly machines are suspended, I'll frequently hit
an #ecto issue whereby the database times out, and the user is presented with a
disappointing "internal server error" screen. Refresh the page, everything is
fine...
The internet is a series of tubes. The tubes are clogged when my fly machines
are stopped. Guess I'll set fly.toml to always have one machine up. #til
[http_service]
...
min_machines_running = 1
pending... fly.io may have a more bespoke approach for managed postgres soon. Surely there's a way to have these cold-boot machines more quickly connect to supabase.
Option + Shift + Hyphen = lol
hamhock/hipbone hambone/legbone
#til how to use @11ty/eleventy-img on this very blog. It'll slurp media from
elsewhere. Also, flickr makes it damn-near impossible to find the static links
to your pictures these days. More internet bitrot.
{% image "http://killtheliterate.com/zines/the-grackles-seething/img/helicopter.jpg", "a shadow" %}

Probably obvious to a lot of people, but given Israel's invasion of Lebanon, and Iran's "preparation" to launch ballistic missiles ostensibly to somewhere within Israel, I wondered "when is a missile not ballistic?". #til the answer is when it's a cruise missile. Ballistic missiles are delivered along (ahem) gravity's rainbow, and cruise missiles are unpiloted kamikaze jets.
One of the things I've heard about, and chose to ignore. Encountered a
#devcontainer (.devcontainer) file after cloning a file, so #til what it actually
is. Seems like a pragma for operating an IDE within the context of a container,
so that one doesn't have to install all the stuff, e.g. black or prettier
or node.
A post elsewhere sent me on a journey learning about pellagra, salmon cakes and therefore #til what soup beans are.

Kicking things off. #til about a few #11ty and #nunjucks incantations. A few observations as well:
esm,
type-checking, that sort of thing.This all seems a bit odious. However, I'm probably not the target audience for a tool like 11ty (eleventy?). It seems like it has the same core "I'm a big loop" as CMSs I've used before.
To get the following to print, I've had to wrap the fenced block with a nunjucks
raw tag.
{#
nunjucks will render some very strange stuff if you don't do variable
assignments properly.
#}
{# this #}
{% set hashtags = post.data.hashtagMap | getHashtags %}
{# not this #}
{% set hashtags %}{{post.data.hashtagMap | getHashtags}}{% endset %}