Skip to content

Instantly share code, notes, and snippets.

const sleep = ms => { return new Promise(resolve => setTimeout(resolve, ms)) }
const injectButton = async () => {
// Similiarly, we also need to wait for the page to load in...
await sleep(1000);
console.log("hey");
const {url} = await fetch("https://bhchiang--get-url-get.modal.run/").then(r => r.json());
const URL = `${url}/get_prompt`;
@divienginesupport
divienginesupport / align-the-last-element-of-the-grid-at-horizontal-center.css
Last active June 20, 2022 14:20
align the last element of the grid at horizontal center
/* THIS FIRST RULE IS TO CHANGE THE BEHAVIOUR OF THE GRID */
.grid-posts.loop-grid {
display: flex;
flex-wrap: wrap;
justify-content: center;
}
/* THIS SECOND RULE SETS THE SIZE OF EACH ELEMENT PER ROW. PLEASE ADD ONLY THE RIGHT ONE YOU NEED */
@azlen
azlen / bulletpaths.js
Last active August 16, 2024 03:55
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 */
Copy this to roam/js page, including the "{{[[roam/js]]}}" node:
- {{[[roam/js]]}}
- ```javascript
/*
* Roam template PoC by @ViktorTabori
* 0.1alpha
*
* How to install it:
* - go to `roam/js` page`