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
const messageParts = [ | |
`From: ${emailProvider.email}`, | |
`To: ${Array.isArray(data.to) ? data.to.join(', ') : data.to}`, | |
`Subject: ${encodeHeader(data.subject || '')}`, | |
`Date: ${date}`, | |
`Message-ID: ${data.messageId}`, | |
//this is what is causing the error | |
data.references?.length | |
? `References: ${data.references.join(' ')}` | |
: null, |
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
'From: ' + this.emailProvider.email, | |
'To: ' + data.to, | |
'Subject: ' + data.subject, | |
'Date: ' + date, | |
'Content-Type: multipart/alternative; boundary="boundary"', | |
'MIME-Version: 1.0', | |
'', | |
'--boundary', | |
'Content-Type: text/plain; charset=utf-8', | |
'Content-Transfer-Encoding: 7bit', |
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 async function loader({ params }: LoaderFunctionArgs) { | |
//find messages from db | |
return { | |
chatMessages, | |
}; | |
} | |
// this is for new messages | |
export async function action({ request, params }: ActionFunctionArgs) { | |
const formData = await request.formData(); |
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 async function action({ request, params }: ActionFunctionArgs) { | |
const formData = await request.formData(); | |
const message = formData.get("message"); | |
const userId = params.id; | |
const newChat = await db | |
.insert(chats) | |
.values({ | |
userId: userId as string, | |
title: `New Chat ${Date.now().toString()}`, |
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 async function loader({ request }: LoaderFunctionArgs) { | |
const emails = db query 1 (without await) | |
const folders = db query 2 (without await) | |
return defer({ | |
emails, | |
folders, | |
}); | |
} | |
let cache = { |
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
services: | |
web: | |
restart: always | |
build: . | |
ports: | |
- '3000:3000' | |
environment: | |
- NODE_ENV=production | |
- NEXT_PUBLIC_ADMIN_EMAIL=${NEXT_PUBLIC_ADMIN_EMAIL} | |
- NEXT_PUBLIC_ADMIN_PASSWORD=${NEXT_PUBLIC_ADMIN_PASSWORD} |
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
FROM oven/bun:alpine AS base | |
# Stage 1: Install dependencies | |
FROM base AS deps | |
WORKDIR /app | |
COPY package.json bun.lockb ./ | |
RUN bun install --frozen-lockfile | |
# Stage 2: Build the application | |
FROM base AS builder |
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
set -g default-terminal "screen-256color" | |
set -ga terminal-overrides ',*256color*:smcup@:rmcup@' | |
set -g mouse on | |
set-option -ga terminal-overrides "xterm-256color:Tc" | |
set -g @plugin 'tmux-plugins/tpm' | |
set -g @plugin 'tmux-plugins/tmux-resurrect' |
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
[greenclip] | |
history_file = "/home/sama/.cache/greenclip.history" | |
max_history_length = 50 | |
max_selection_size_bytes = 0 | |
trim_space_from_selection = true | |
use_primary_selection_as_input = false | |
blacklisted_applications = [] | |
enable_image_support = true | |
image_cache_directory = "/tmp/greenclip" | |
static_history = [ |
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
-- inserts a row into public.user_profiles with only id and user_id | |
create or replace function public.handle_new_user() | |
returns trigger | |
language plpgsql | |
security definer set search_path = '' | |
as $$ | |
begin | |
insert into public.user_profiles (id, user_id, username) | |
VALUES (new.id, new.id, (new.raw_user_meta_data->>'username')); | |
return new; |
NewerOlder