Logseq query exclude templates
Assuming you’ve put your templates on a page named “templates”, use this as part of your :where
:
... [?b :block/page ?bp] [?bp :block/name ?pn] [(not= ?pn "templates")] ...
Assuming you’ve put your templates on a page named “templates”, use this as part of your :where
:
... [?b :block/page ?bp] [?bp :block/name ?pn] [(not= ?pn "templates")] ...
There are plenty of examples of how to query all references to a page, but I found no examples how to do such a thing for blocks.
This is a method that I found that works, but there may be better ways:
#+BEGIN_QUERY { :title [:b "Links to block" ] :query [:find (pull ?b [*]) :where [?b :block/refs [:block/uuid #uuid "659ac433-b189-49b7-8601-d04338d2dd5e"]]] } #+END_QUERY
Replace the UUID with the UUID of your block (easily found when copying the reference to the block).
This post addresses how to keep two directories in sync on a single Linux machine using Syncthing (avoiding things like rsync, unison, etc.). This is particularly useful if you have two logseq graphs on your system and you want to share a directory underneath your pages
directory between both.
sudo useradd -m USERNAME_helper
sudo mount --bind -oX-mount.idmap=b:1000:1001:1 /home/USERNAME/shared_logseq /home/USERNAME_helper/shared_logseq
/etc/fstab
:
/home/USERNAME/shared_logseq /home/USERNAME_helper/shared_logseq none defaults,user,bind,X-mount.idmap=b:1000:1001:1 0 0
b
flag creates both user and group mappingsudo mount /home/USERNAME_helper/shared_logseq
sudo systemctl enable --now syncthing@USERNAME_helper
sudo systemctl status syncthing@USERNAME_helper
After printing and measuring a flow calibration cube, my results were the following.
Git has the useful function git log --first-parent
that will show your branch without the commits introduced by merge commits. Sometimes I want the opposite (i.e., understand which commits were added by a merge), and there I find the following command useful: git log ^HEAD^ HEAD
. This command will print the commits that are not (an ancestor of) the commit on your branch before the merge commit. Effectively, it will only show the commits brought in by the merge commit.
A more succinct but less readable version is git log ^@^ @
.