TIL: Bulk rename files in Finder(Mac)

Select multiple files, right-click files and select “Rename”. Then you get a Find and Replace pop-up.

Bulk rename files in Finder

TIL: Stop the cursor from blinking in Obsidian

Put the following css in a file, I called mine noblink.css

.cm-cursorLayer {animation: none !important;}

Put the file in your Obsidian snippet directory. On a Mac it is here: ~/Library/Mobile Documents/iCloud~md~obsidian/Documents/Obsidian/.obsidian/snippets In the app (on the Mac) go to “Preferences > Appearance”, scroll to “CSS snippets” at the bottom to activate the snippet.

screenshot of obsidian css settings

I found this tip here: https://forum.obsidian.md/t/allow-stopping-the-cursor-from-blinking/39819/6


TIL: Helix editor: auto import in golang

You may need to build Helix from source.

Install goimports:

go install golang.org/x/tools/cmd/goimports@latest

Add this to languages.toml in your config directory.

[[language]]
name = "go"
formatter = { command = "goimports" }

TIL: Count number of products of current type in Shopify liquid templates

On the product page of a Shopify store I want to insert a link to a page showing all products of this type, but only if there are more than one product of this type.

{% assign number_of_type = collections.all.products | where: "type", product.type | size %}
{% if number_of_type > 1 %}
  {% comment %} Insert comment {% endcomment %}
  {{ product.type | link_to_type }}
{% endif %}