This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # Recommended Celery Django settings for reliability: | |
| # (use `app.config_from_object('django.conf:settings', namespace='CELERY')` | |
| # in proj/celery.py module) | |
| from decouple import config # use python-decouple: https://github.com/HBNetwork/python-decouple | |
| # Prefer RabbitMQ over Redis for Broker, | |
| # mainly because RabbitMQ doesn't need visibility timeout. See: | |
| # https://blog.daftcode.pl/working-with-asynchronous-celery-tasks-lessons-learned-32bb7495586b | |
| # https://engineering.instawork.com/celery-eta-tasks-demystified-424b836e4e94 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| -- This function is designed to duplicate all live INSERTS/UPDATES/DELETES from one table (referred to as "source_table_name" | |
| -- to a second partitioned table (referred to as "destination_table_name"). The function should be set to trigger after insert/ | |
| -- update/delete on the source table. | |
| -- This function is designed to be leveraged for partitioned table migration through this method: | |
| -- 1) Create an empty partitioned copy of the "source_table_name". Alter primary key as necessary, as partitioned Postgres | |
| -- tables do not support unique/primary keys not included in the partition key. | |
| -- 2) Create the following function, and attach it as a trigger to "source_table_name". At this point, incoming new DML is | |
| -- being copied successfully to the partitioned table, so only historical data will need to be backfilled. | |
| -- 3) Target rows in "source_table_name" with an updated_at value BEFORE the trigger was attached, and backfill them into |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| // 3D Dom viewer, copy-paste this into your console to visualise the DOM as a stack of solid blocks. | |
| // You can also minify and save it as a bookmarklet (https://www.freecodecamp.org/news/what-are-bookmarklets/) | |
| (() => { | |
| const SHOW_SIDES = false; // color sides of DOM nodes? | |
| const COLOR_SURFACE = true; // color tops of DOM nodes? | |
| const COLOR_RANDOM = false; // randomise color? | |
| const COLOR_HUE = 190; // hue in HSL (https://hslpicker.com) | |
| const MAX_ROTATION = 180; // set to 360 to rotate all the way round | |
| const THICKNESS = 20; // thickness of layers | |
| const DISTANCE = 10000; // ¯\\_(ツ)_/¯ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| "use client"; | |
| /* eslint-disable @next/next/no-img-element */ | |
| import Link from "next/link"; | |
| import { useState, useEffect } from 'react'; | |
| import { | |
| AppBskyFeedDefs, | |
| AppBskyFeedPost, | |
| type AppBskyFeedGetPostThread, | |
| } from "@atproto/api"; |
OlderNewer