alias docker-build='function \_docker_deploy() { \
image_name=$(basename "$PWD"); \
short_hash=$(git rev-parse --short HEAD); \
full_tag="registry.digitalocean.com/shootingsupplies/${image_name}:${short_hash}"; \
docker compose build --no-cache; \
docker tag "${image_name}" "$full_tag"; \
docker push "$full_tag"; \
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
| Clean start-to-finish guide: | |
| 1. Install uv | |
| bashcurl -LsSf https://astral.sh/uv/install.sh | sh | |
| Verify: | |
| bashwhich uvx | |
| # Should return /Users/darryl/.local/bin/uvx | |
| 2. Create directories | |
| bashmkdir -p ~/.open-webui/logs |
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
| export default function lightspeedImageLoader({ | |
| src, | |
| width, | |
| quality, | |
| baseImageURL = "https://res.cloudinary.com/lightspeed-retail/image/upload", | |
| extension = "webp", | |
| crop = "limit", | |
| }) { | |
| // Remove any existing transformation and get publicID | |
| const publicIdMatch = src.match(/\/?([a-zA-Z0-9]+)\.(?:webp|jpg|png)$/); |
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
| User-agent: * | |
| # Next.JS Crawl Budget Performance Updates | |
| # Block files ending in .json, _buildManifest.js, _middlewareManifest.js, _ssgManifest.js, and any other JS files | |
| Disallow: /*.json$ | |
| Disallow: /*_buildManifest.js$ | |
| Disallow: /*_middlewareManifest.js$ | |
| Disallow: /*_ssgManifest.js$ | |
| Disallow: /*.js$ | |
| Disallow: /api/ | |
| Disallow: /_next/ |
import { PrismaClient } from '@prisma/client'
const prismaClientSingleton = () => { return new PrismaClient() }
declare const globalThis: { prismaGlobal: ReturnType; } & typeof global;
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
| # Generat Openssl key and cert. | |
| openssl req -x509 -newkey rsa:4096 -nodes -keyout key.pem -out cert.pem -days 365 |
docker history --human --format "{{.CreatedBy}}: {{.Size}}" docker-image
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
| // Create a form synamically | |
| var form = document.createElement("form"); | |
| form.setAttribute("method", "post"); | |
| form.setAttribute("action", "submit.php"); | |
| // Create an input element for Full Name | |
| var FN = document.createElement("input"); | |
| FN.setAttribute("type", "text"); | |
| FN.setAttribute("name", "FullName"); | |
| FN.setAttribute("placeholder", "Full Name"); |
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
| "traefik.enable=true" | |
| "traefik.docker.network=proxy" | |
| "traefik.http.routers.app-secure.entrypoints=websecure" | |
| "traefik.http.routers.app-secure.rule=Host(`domain.name`)" |
NewerOlder