Skip to content

Instantly share code, notes, and snippets.

/*
* Viktor's Mobile Bottom Menu
* version: 0.1
* author: @ViktorTabori
*
* Add to your roam/css page.
*/
@media only screen and (max-width: 600px) {
.roam-topbar {
/*
* Viktor's Block CSS
* version: 0.1
* author: @ViktorTabori
*
* How to install it:
* - go to page [[roam/js]]
* - create a node with: { {[[roam/js]]}}
* - create a clode block pulled under it, and change its type from clojure to javascript
* - allow the running of the javascript on the {{[[roam/js]]}} node
@thesved
thesved / Roam Research Zenith resize fix.css
Last active December 30, 2020 06:48
Make Zenith themes work with the new resizing feature in Roam Research
/* FIXING resizable interface */
/* fix: collapsed sidebar windows by @_robertkirk */
.window-headers:only-child {
text-orientation: mixed;
writing-mode: vertical-lr;
}
/* left sidebar fix */
.roam-sidebar-container {
/*
* Viktor's Roam default date format POC
* version: 0.2
* author: @ViktorTabori
*
* How to install it:
* - go to page [[roam/js]]
* - create a node with: { {[[roam/js]]}}
* - create a clode block pulled under it, and change its type from clojure to javascript
* - allow the running of the javascript on the {{[[roam/js]]}} node
@thesved
thesved / ouraring-api.js
Created October 13, 2020 09:41
Oura API JavaScript integration
// 1. create access token https://cloud.ouraring.com/docs/authentication#create-a-personal-access-token
// 2. use API 👍
var OURA_TOKEN = '...';
var date = 'date in `YYYY-MM-DD` format';
var res = await fetch("https://api.ouraring.com/v1/sleep?start="+date+"&end="+date+"&access_token="+OURA_TOKEN);
var data = (await res.json()).sleep;
data = data.length ? data[0] : {};
@thesved
thesved / roam-slack-notification.js
Created September 21, 2020 21:02
Send notifications from Roam to Slack
// PoC by @filipematossilv and @ViktorTabori
// Token for a Slack App.
var oauthToken = "TOKEN_HERE";
// Slack app must already have been invited to the channel.
// See https://api.slack.com/methods/channels.list on how to get the ID.
var notificationChannel = "CHANNEL_HERE";
// Email must be the one used in the Slack that contains the channel.
var tagToEmail = {
"#[[!name]]": "someone@example.com",
}
@thesved
thesved / roam-mouse-menu-opener.js
Created September 17, 2020 15:44
Automatically open Roam's left menu based on mouse position
/*
* Viktor's Roam Mobile Menu Mouse Opener
* version: 0.1
* author: @ViktorTabori
*
* How to install it:
* - go to page [[roam/js]]
* - create a node with: { {[[roam/js]]}}
* - create a clode block under it, and change its type from clojure to javascript
* - allow the running of the javascript on the {{[[roam/js]]}} node
@thesved
thesved / roam-fuckitline.js
Last active November 20, 2020 02:32
#fuckitline for Roam Research, don't run out of fucks you can give, use #fuckitline for TODOs, see: https://twitter.com/ViktorTabori/status/1298717150958346241
/*
* Viktor's Roam FuckItLine POC
* version: 0.2
* author: @ViktorTabori
*
* How to install it:
* - go to page [[roam/js]]
* - create a node with: { {[[roam/js]]}}
* - create a clode block pulled under it, and change its type from clojure to javascript
* - allow the running of the javascript on the {{[[roam/js]]}} node