Block:
import { Block } from "payload";
import { IdentifierField } from "@/fields/Identifer";
export const ProductsBlock: Block = {
slug: 'products-block',| import { imageSizes } from '@ainsleydev/payload-helper/dist/collections/Media'; | |
| import env from '@ainsleydev/payload-helper/dist/util/env'; | |
| import { lexicalHTML } from '@payloadcms/richtext-lexical'; | |
| import * as mime from 'mime-types'; | |
| import { findBySource } from '@/collections/Media/endpoints/find-by-source'; | |
| import type { CollectionConfig, PayloadRequest } from 'payload'; | |
| export const Media: CollectionConfig = { |
| import { lexicalHTML } from '@payloadcms/richtext-lexical'; | |
| import { CollectionConfig, PayloadRequest } from 'payload'; | |
| import { mergeCentres } from '@/collections/Centres/endpoints/mergeCentres'; | |
| import { renameCentreField } from '@/collections/Centres/endpoints/rename'; | |
| import { actions } from '@/collections/Centres/fields/actions'; | |
| import { agencies } from '@/collections/Centres/fields/agencies'; | |
| import { capabilitiesGrouped } from '@/collections/Centres/fields/capabilities'; | |
| import { contact } from '@/collections/Centres/fields/contact'; | |
| import { diveDestinations } from '@/collections/Centres/fields/diveDestinations'; |
| resource "digitalocean_database_cluster" "postgres" { | |
| name = "db" | |
| engine = "pg" | |
| version = "17" | |
| size = "db-s-1vcpu-1gb" | |
| region = "lon1" | |
| node_count = 1 | |
| } | |
| resource "digitalocean_database_user" "postgres_app_user" { |
Block:
import { Block } from "payload";
import { IdentifierField } from "@/fields/Identifer";
export const ProductsBlock: Block = {
slug: 'products-block',| const sharp = require('sharp'); | |
| const fs = require('fs'); | |
| const path = require('path'); | |
| const imageSizes = [ | |
| // Original Size (for WebP & Avif) | |
| { | |
| name: 'original_webp', | |
| width: undefined, |
| import { lexicalEditor } from '@payloadcms/richtext-lexical'; | |
| import * as mime from 'mime-types'; | |
| import type { CollectionConfig, Field, PayloadRequest } from 'payload'; | |
| export const Media = (additionalFields?: Field[]): CollectionConfig => { | |
| return { | |
| slug: 'media', | |
| access: { | |
| read: () => true, | |
| }, |
| <?php | |
| /** | |
| * Helpers | |
| * | |
| * A class for WordPress custom utility functions. | |
| * | |
| * @author Ainsley Clark | |
| * @class Helpers | |
| * @category Class |
| // DefaultCost is the cost that will actually be set if a | |
| // cost below MinCost is passed into | |
| // GenerateFromPassword. | |
| var DefaultCost = bcrypt.DefaultCost | |
| // HashPassword gets the password in byte format and | |
| // generates a hashed password with the default cost | |
| // of 10. | |
| // Returns errors.INTERNAL if the bcrypt failed to generate from password. | |
| func HashPassword(password string) (string, error) { |
| const ( | |
| // DatabaseName is the database table name for Pages. | |
| DatabaseName = "tasks" | |
| // Collection is the collection in which scrapes | |
| // and meta of a URL is stored. | |
| Collection = "scrapes" | |
| ) | |
| type ScrapeStore struct { | |
| *mg.Database |
| #!/bin/bash | |
| # Install brew | |
| if ! hash brew | |
| then | |
| /usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)" | |
| brew update | |
| else | |
| printf "\e[93m%s\e[m\n" "You already have brew installed." | |
| fi |