Skip to content

Instantly share code, notes, and snippets.

@maxspero
maxspero / wordle_variants.md
Last active June 12, 2024 13:02
Comprehensive list of Wordle variants

Original

  • Wordle - Guess a five-letter word in six guesses. Each guess must be real words.

Clones

Multiplayer

@JimmyLv
JimmyLv / {{[[roam-css]]}}-enabled-log-pages.css
Last active June 14, 2022 07:55
Show Image Cover behind Page Title for RoamResearch, just like Notion. https://twitter.com/Jimmy_JingLv/status/1469658825167114240?s=20
.roam-body .roam-app .roam-main .roam-article {
padding-top: 0;
}
.roam-article [style="width: 100%;"], .rm-sidebar-outline [style="width: 100%;"], .roam-log-page .rm-title-display {
background-image: url(https://unsplash.it/1600/900?random);
background-size: cover;
height: 30vh;
margin-bottom: 10px;
position: relative;
@Stvad
Stvad / f.json
Last active August 15, 2021 23:20
comment queries on daily pages
[{"create-time":1629041510869,"title":"comment queries on daily pages",":create/user":{":user/uid":"6bJAKBYrpIcPZBpFEpexUwW3x5r1"},"children":[{"string":"isa::[[iroam/notebook]]","create-time":1629041512459,":block/refs":[{":block/uid":"pt_Ivza0F"},{":block/uid":"FxnP85ywT"}],"refs":[{"uid":"pt_Ivza0F"},{"uid":"FxnP85ywT"}],":create/user":{":user/uid":"6bJAKBYrpIcPZBpFEpexUwW3x5r1"},"uid":"hw_U21Vfv","edit-time":1629041523012,":edit/user":{":user/uid":"6bJAKBYrpIcPZBpFEpexUwW3x5r1"}},{"string":"```javascript\nfunction addDays(original, days) {\n let date = new Date(original.valueOf());\n date.setDate(date.getDate() + days);\n return date;\n}\n\nfunction getDatesBetween(startDate, stopDate) {\n var dateArray = new Array();\n var currentDate = startDate;\n while (currentDate <= stopDate) {\n dateArray.push(new Date (currentDate));\n currentDate = addDays(currentDate, 1);\n }\n return dateArray;\n}\n\nfunction getPagesToProcess() {\n const now = new Date()\n const startDat
@usayamadx
usayamadx / ExportKindle.js
Last active June 30, 2024 21:48 — forked from jkubecki/ExportKindle.js
Amazon Kindle Export
// init
let xhr = new XMLHttpRequest()
let domain = 'https://read.amazon.com/'
let items = []
let csvData = ""
// function
function getItemsList(paginationToken = null) {
let url = domain + 'kindle-library/search?query=&libraryType=BOOKS' + ( paginationToken ? '&paginationToken=' + paginationToken : '' ) + '&sortType=recency&querySize=50'
xhr.open('GET', url, false)
@houshuang
houshuang / gist:93a320a5b3d447d13613735be2d68bec
Last active June 26, 2021 08:15
Roam JS for putting a page/block on your left sidebar
// MIT Licensed
// Author: jwilson8767
/**
* Waits for an element satisfying selector to exist, then resolves promise with the element.
* Useful for resolving race conditions.
*
* @param selector
* @returns {Promise}
*/
@dbieber
dbieber / roam-blocks.js
Last active October 3, 2021 11:59
JavaScript Functions for Inserting Blocks in Roam. Documentation at https://davidbieber.com/snippets/2021-02-12-javascript-functions-for-inserting-blocks-in-roam/
function sleep(ms) {
return new Promise(resolve => setTimeout(resolve, ms));
}
function getPage(page) {
// returns the uid of a specific page in your graph.
// _page_: the title of the page.
let results = window.roamAlphaAPI.q(`
[:find ?uid
:in $ ?title
@azlen
azlen / bulletpaths.js
Last active April 15, 2024 14:06
All Paths Lead to Roam
/*
* credit to Dhrumil Shah (@wandcrafting) and Robert Haisfield (@RobertHaisfield)
* for the original concept which was part of their RoamGames submission
* and can be found at: https://www.figma.com/file/5shwLdUCHxSaPNEO7pazbe/
*
*/
/* ======= OPTIONS ======== */
/* note: if you change these, reload the page to see the effect */
@import url("https://rawcdn.githack.com/jchen1/roam-util/d81f004d4bbf7ec51b562b2170752c82d5adb1f0/roam.css");
@import url('https://fonts.googleapis.com/css2?family=Merriweather:ital,wght@0,400;0,700;1,400;1,700&family=Playfair+Display:ital,wght@0,400;0,700;1,400;1,700&family=Source+Code+Pro&display=swap');
:root {
--header-font: "Playfair Display", serif;
--body-font: "Merriweather", serif;
--monospace-font: "Source Code Pro", monospace;
--header-color: #f0e8db;
--header-text-color: #111;
@tobek
tobek / README.md
Last active April 3, 2024 15:55
Roam bookmarklet for rich link embeds, read later, and bookmark management

Setup:

  1. Create a browser bookmark (e.g. in bookmarks bar) where the URL is the text in bookmarklet below (open this "raw" link so it's not truncated). Yes it's huge, that's fine. You can name the bookmark "Roam Link" or whatever you like.
    • Alternately, go to this page for easier drag-and-drop bookmarklet setup (GitHub doesn't allow javascript links in gists, sorry)
  2. Go to or create a Roam page called roam/css, and create a CSS code block (``` for code block, then change the language selector dropdown to CSS) and paste the CSS below.

Usage:

  1. On the page you want to create a link embed of, hit the bookmarklet (optional: highlight some text first and it'll be included as a quote)
  2. Go to Roam and paste