Navigation Menu

Skip to content

Instantly share code, notes, and snippets.

View lucasctd's full-sized avatar
👟
Living my life =)

Lucas Reis lucasctd

👟
Living my life =)
View GitHub Profile
@Atinux
Atinux / sse.ts
Last active April 22, 2024 20:39
SSE endpoint example with Nuxt 3
// ~/server/api/sse.ts
export default defineEventHandler(async (event) => {
if (!process.dev) return { disabled: true }
// Enable SSE endpoint
setHeader(event, 'cache-control', 'no-cache')
setHeader(event, 'connection', 'keep-alive')
setHeader(event, 'content-type', 'text/event-stream')
setResponseStatus(event, 200)
@Meldiron
Meldiron / backup.sh
Last active April 18, 2024 16:24
Backup and Restore Appwrite, the lazy way 🐌
# Make sure to stop Appwrite before this backup,
# and make sure you have enough space on the machine.
# After backing up, make sure there is a file in 'backups/backup-___.tar.gz'.
# Also please check size of this file, it should be at least 5kb, even for small instances.
docker run --rm \
-v appwrite_appwrite-mariadb:/backup/appwrite-mariadb \
-v appwrite_appwrite-redis:/backup/appwrite-redis \
-v appwrite_appwrite-cache:/backup/appwrite-cache \
@croblesm
croblesm / Dockerfile
Last active December 7, 2021 18:14
msql-tools custom image using Alpine
# SQL Server Command Line Tools - custom image
# From Alpine 3.11 (~5 MBs)
FROM alpine:3.11
LABEL maintainer="@dbamastery"
# Installing system utilities
RUN apk add --no-cache curl gnupg
# Adding custom MS repository for mssql-tools and msodbcsql
RUN curl -O https://download.microsoft.com/download/e/4/e/e4e67866-dffd-428c-aac7-8d28ddafb39b/msodbcsql17_17.5.2.1-1_amd64.apk