Skip to content

Instantly share code, notes, and snippets.

View tombarys's full-sized avatar

Tomáš Baránek tombarys

View GitHub Profile
@tombarys
tombarys / block-teleport.clj
Last active March 11, 2024 17:56
Roam Plugin – Teleport task to Tomorrow :) – V2.2
;; Warning: this plugin adds a "→ Move to tomorrow" item on both mobile and desktop Roam apps
;; to the context plugin menu and to command pallete (Mac: Cmd-P / Windows: Ctrl-P, then search for "Move" or "tomorrow" etc.).
;; To activate Roam context menu on mobile, you need to install Victor Tabori's Long-tap script first:
;; https://gist.github.com/thesved/48cab2307cf0598fcc5cd37643d36cb4
;; Installation:
;; 1) copy this block as children block `clojure` code block under parent containing {{[[roam/cljs]]}} anywhere
;; in [[roam/cljs]] page
;; 2) confirm "Yes, I know what I am doing"
;; 3) restart Roam
@tombarys
tombarys / erase_roam_block.clj
Last active August 6, 2022 18:46
Erase Roam block (including children) V1.2
;; Warning: this plugin adds a "X Erase this block" item on both mobile and desktop Roam apps, but to activate Roam context menu on mobile, you need to install Victor Tabori's Long-tap script: https://gist.github.com/thesved/48cab2307cf0598fcc5cd37643d36cb4
;; 1) copy this block as children block `clojure` code block under parent containing {{[[roam/cljs]]}} anywhere on [[roam/cljs]] page
;; 2) confirm "Yes, I know what I am doing"
;; 3) restart Roam
;; 4) right-click on any block context menu (on a bullet)
;; 5) choose "X Erase this block" and confirm (attention: erases block including it's children; but do not worry: Cmd/Ctrl-Z works well)
(ns my-custom-roam-97
@tombarys
tombarys / namespace-roam.css
Created May 29, 2022 17:41
Roam namespace styling CSS
span[data-link-title*="Video/"] span.rm-page-ref {
color: #795548;
font-weight: bold;
}
span[data-link-title*="Video/"]::before {
content: "📺"
}
@tombarys
tombarys / better-search.clj
Last active February 27, 2024 09:48
Better-search for Roam (V 2.11 improved + sorting)
(ns better-search-V2.1
(:require [reagent.core :as r]
[roam.datascript :as rd]
[roam.util :refer [parse]]))
(defn query-list [s-type search]
"creates a list of pages"
(sort (case s-type
:starts (rd/q '[:find ?fulltitle
:in $ ?search