Skip to content

Instantly share code, notes, and snippets.

goliatone / modal_controller.js
Created June 27, 2024 21:09 — forked from ordinz/modal_controller.js
Extend Modal from "tailwindcss-stimulus-components"
import {Modal} from "tailwindcss-stimulus-components"
export default class extends Modal {
this.element[this.identifier] = this
this.toggleClass = 'hidden'
goliatone /
Last active July 4, 2024 00:01 — forked from BrianLeishman/payload.json
Serverless HTML to PDF with AWS Lambda + Chrome

AWS Lambda Image/PDF Capture


To deploy Puppeteer in AWS Lambda we need to use a slim version of chromium, and layers.

Get the supported versions from this list.

npm install puppeteer-core@$PUPPETEER_VERSION
goliatone / exclude.sql
Created June 15, 2023 20:14 — forked from fphilipe/exclude.sql
PostgreSQL EXCLUDE constraint
CREATE TABLE room_reservations (
room_id integer,
reserved_at timestamptz,
reserved_until timestamptz,
canceled boolean DEFAULT false,
room_id WITH =, tstzrange(reserved_at, reserved_until) WITH &&
) WHERE (not canceled)
goliatone /
Created February 12, 2023 23:34 — forked from zsviczian/
Daily note taking scripts

<%* /*

const view = app.workspace.activeLeaf.view;
const editor = view.editor;
const curLineNum = editor.getCursor().line;
const curLineText = editor.getLine(curLineNum);
const title = tp.file.title;
const today = title.match(/\d{4}\-\d{2}\-\d{2} .+/) //are we on the DNP?
goliatone /
Created February 12, 2023 22:34 — forked from beet/
Obsidian Templater script to convert the current line to a Tasks plugin task


due today
not done
done today
goliatone /
Created February 12, 2023 11:25 — forked from lenalebt/
"Rollover Daily Todos" for Obsidian Templater

Rollover Daily Todos for Obsidian, but with the Templater Plugin

Rollver daily todos is a really nice extension for that takes TODOs from yesterdays daily notes and rolls them over to today's notes. It has support for Obsidians built-in templates, but does - to my understanding - not really work well with the Templater Plugin. At least, I was unable to get it to work :-). Also, I wished it had some way to tell me that TODOs have been rolled over a few times already. Doing it this way is my way of working around these limitations.

I took some of the code of that "rollover daily todos" plugin and made it into a templater user script.

goliatone /
Created February 12, 2023 10:45 — forked from panahi/
Obsidian Templates Collection

<%* var fileDate = moment(tp.file.title); // moment dates are mutable let prevDay = moment(fileDate).subtract(1, 'd').format('YYYY-MM-DD'); let nextDay = moment(fileDate).add(1, 'd').format('YYYY-MM-DD'); let prevDayWeek = moment(fileDate).subtract(1, 'd').format('gggg-[W]ww'); let nextDayWeek = moment(fileDate).add(1, 'd').format('gggg-[W]ww'); let yearLink = fileDate.format('YYYY'); let quarterLink = fileDate.format('YYYY [Q]Q'); let monthLink = fileDate.format('YYYY-MM');

goliatone / dailyNoteTemplate.txt
Created February 12, 2023 10:02 — forked from bennewton999/dailyNoteTemplate.txt
My current Daily Note Template in Obsidian utilizing Templater and DataView Plugins
creation date: <% tp.file.creation_date() %>
tags: DailyNote <% tp.file.title.split('-')[0] %>
modification date: <%+ tp.file.last_modified_date("dddd Do MMMM YYYY HH:mm:ss") %> // This doesn't currently work in front matter, hoping that gets fixed.
# <% tp.file.title %>
<< [[<%"YYYY-MM-DD", -1, tp.file.title, "YYYY-MM-DD") %>]] | [[<%"YYYY-MM-DD", 1, tp.file.title, "YYYY-MM-DD") %>]]>>
goliatone / query_builder.go
Created October 16, 2022 18:48 — forked from paragtokopedia/query_builder.go
Query Builder
package query_builder
import (
type DynamicQueryBuilder string
goliatone / base64_to_uuid.sql
Created March 29, 2022 21:52
[Snowflake base64 to UUID] #sql #snowflake Snowflake function to encode a base64 encoded UUID as a string formatted UUID
RETURNS varchar
LANGUAGE javascript
try {
var stmt = snowflake.createStatement({