Every post of the series on one page. Use the printer button in the menu bar, or your browser's Print command, and pick "Save as PDF" to keep a copy. Back to the series.
I began to explore the terrain for a Word plugin for the company I’m working at.
Although there is a common format for the manifest file, Outlook and Word add-ins seem to require separate files. I haven’t seen any add-in in AppSource that serves as both a Word and an Excel add-in.
Microsoft provides a tool called Script Lab that allows you to run arbitrary scripts and test APIs directly within Office.
For authentication, it is recommended to open a browser window to your web app using the Dialog API.
It is usually not possible to use iframes to obtain authentication tokens from the task pane or sidebar itself. See this answer for more details.
It is possible to add elements to the right-click menu in Word for add-in commands.
I want to use channels for Xvc pipelines. A thread will be created for each
step and will receive dependency state changes via channels.
Note that there may be thousands of dependencies (e.g., files for a step), and
creating these channels beforehand is not feasible.
The Crossbeam library has
Select
which allows waiting for an arbitrary number of channels. Now, I need to figure out
how to structure the threads and update their states. A minor task! 😆
We’re using Graphite at work. Today, I configured a tmux
shortcut to open a new pane and run gt create, which creates a new branch and
commits all staged Git files.
I noticed it’s not possible to unmap the F1 key in Neovim using
vim.api.nvim_del_keymap if it’s not already registered. Instead, you can
simply override it with something like:
Using ENV.fetch("MY_ENV_VAR", default_value) is preferred over ENV["MY_ENV_VAR"] for specifying default values. While it is similar to ENV["MY_ENV_VAR"] || default_value, fetch is more explicit and idiomatic in Ruby.
I type a command, like ls, on a line and hit <F2>. That line is copied, executed, and the output is read into the buffer just below it.
I use it for all sorts of tasks, from listing open PRs with gh to fetching website text with w3m. It has significantly improved my workflow, allowing me to use the shell effectively within textual notebooks.
I believe in the value of reducing friction when taking notes. Today, I added a function to my Neovim configuration to create a timestamped file and open it for editing.
function CreateTimestampedFile()
local zkdir = os.getenv("HOME") .. "/github.com/iesahin/garden/zk/"
local timestamp = os.date("%Y%m%d%H%M%S")
local filename = zkdir .. "/" .. timestamp .. ".md"
vim.cmd("edit " .. filename)
end
vim.api.nvim_set_keymap("n", "<leader>F", ":lua CreateTimestampedFile()<CR>", { noremap = true, silent = true })
Now, I can just hit <leader>F (which is <Space>F in my setup) and immediately start adding a note to my zettelkasten.
I decided I needed a random colorscheme selector for those moments when you want to change things up but don’t want to make a specific choice. LazyVim already has <leader>uC for selecting a colorscheme, but it can be too mentally taxing as it requires you to manually select one. This script simply switches to a random one.
RandomColorScheme returns the name of a random colorscheme after searching through all available paths. SetRandomColorScheme sets the colorscheme to that choice. The keybinding is mapped to <leader>uR.
function RandomColorScheme()
local color_schemes = vim.fn.globpath(vim.o.rtp, "colors/*.vim", false, true)
for i, fullpath in ipairs(color_schemes) do
color_schemes[i] = fullpath:match(".*/(.*).vim$")
end
-- Generate a random index
local index = math.random(#color_schemes)
local random_color_scheme = color_schemes[index]
vim.notify("Random Color Scheme: " .. random_color_scheme)
-- Select a random color scheme
return random_color_scheme
end
function SetRandomColorScheme()
vim.cmd("colorscheme " .. RandomColorScheme())
end
vim.api.nvim_set_keymap("n", "<leader>uR", ":lua SetRandomColorScheme()<CR>", { noremap = true, silent = true })
I needed a Markdown server to preview my Zettelkasten notes on mobile. I tried installing Lanyon, but its installation instructions are outdated, and the project hasn’t been updated in seven years.
I also looked at rustmark, but configuring it simply to list Markdown files felt like too much effort.
Ultimately, I decided to use dufs and view the files as plain text. It supports basic file operations and WebDAV, which is more than sufficient for my needs.
Reusing good software is easy; it is what allows you to build good things quickly;
Software is limited not by the amount of resources put into building it, but by how complex it can get before it breaks down; and
The main value in software is not the code produced, but the knowledge accumulated by the people who produced it.
These points lead me to view software development as more of a social profession than a purely technical one. Good software is a reflection of healthy interactions within an organization. When communication is difficult, it becomes much harder to accumulate knowledge about organizational needs, manage complexity, and effectively reuse software components.
I notice LLMs tend to err on the side of complexity. I don’t know if this is due to their training to spit as many tokens as possible, but using regular expressions when a simple single replace may suffice is a good sign that they may be adding more complexity than necessary.
I’ve noticed that LLMs often lean toward overly complex solutions. I’m not sure if this is due to being trained to generate as many tokens as possible, but using regular expressions where a simple string replacement would suffice is often a sign of unnecessary complexity.
I notice LLMs tend to err on the side of complexity. I don’t know if this is due to their training to spit out as many tokens as possible, but using regular expressions when a simple string replacement may suffice is a good sign that they may be adding more complexity than necessary.
I notice LLMs tend to err on the side of complexity. I don’t know if this is due to their training to spit out as many tokens as possible, but using regular expressions when a simple string replacement may suffice is a good sign that they may be adding more complexity than necessary.
I notice LLMs tend to err on the side of complexity. I don’t know if this is due to their training to spit out as many tokens as possible, but using regular expressions when a simple string replacement may suffice is a good sign that they may be adding more complexity than necessary.
I notice LLMs tend to err on the side of complexity. I don’t know if this is due to their training to spit out as many tokens as possible, but using regular expressions when a simple string replacement may suffice is a good sign that they may be adding more complexity than necessary.