🏴☠️
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:latest AS base | |
WORKDIR /usr/src/app | |
# install dependencies into a temporary directory to cache them and speed up future builds | |
FROM base AS install | |
RUN mkdir -p /temp/dev | |
COPY . /temp/dev/ | |
RUN cd /temp/dev && bun install --frozen-lockfile --filter ./services/agent-executor |
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 pgvector/pgvector:pg16 | |
# install prerequisites | |
## rust | |
RUN apt-get update | |
RUN apt-get install -y build-essential curl git jq make gcc pkg-config clang postgresql-server-dev-16 libssl-dev | |
RUN apt-get update | |
# Get Rust | |
RUN curl https://sh.rustup.rs -sSf | bash -s -- -y |
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
{%- if messages[0]["role"] == "system" %} | |
{%- set system_message = messages[0]["content"] %} | |
{%- set messages = messages[1:] %} | |
{%- else %} | |
{%- set system_message = "" %} | |
{%- endif %} | |
{%- if not tools is defined %} | |
{%- set tools = none %} | |
{%- endif %} | |
{%- if not date_string is defined %} |
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
import { useCallback, useEffect, useRef, useState } from "react"; | |
interface UseBroadcastChannelOptions { | |
name: string; | |
onMessage?: (event: MessageEvent) => void; | |
onMessageError?: (event: MessageEvent) => void; | |
} | |
interface UseBroadcastChannelReturn<D, P> { | |
isSupported: boolean; |
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 a builder for all your dependencies including Typescript compilation | |
FROM node:18.17.1 as builder | |
WORKDIR /opt/app | |
# Install dependencies | |
COPY package*.json . | |
RUN npm install | |
# receive secrets using the --build-arg command e.g. from github actions secrets |
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 node:18 | |
WORKDIR /opt/app | |
COPY package*.json ./ | |
RUN npm install | |
# use --build-arg=example_api_key=1234 to set the API_KEY env var. repeat as necessary | |
# in your github action or other CI/CD, set the arguments from your secrets store. | |
ARG example_api_key |
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
$action=New-ScheduledTaskAction -Execute 'powershell.exe' -Argument '-windowstyle hidden -ep bypass C:\path\to\script.ps1'; | |
$trigger=New-ScheduledTaskTrigger -Once -At 'MM/DD/YYYY HH:MM:SS PM'; | |
Register-ScheduledTask -Action $action -Trigger $trigger -TaskName 'Launch' -User 'DOMAIN\username' |
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
$sqlitedll = ".\System.Data.SQLite.dll" | |
if (!(Test-Path -Path $sqlitedll)) | |
{ | |
Write-Host "Grab your copy of System.Data.SQLite.dll. " -ForegroundColor Yellow | |
Write-Host "Most likely from https://system.data.sqlite.org/downloads/1.0.113.0/sqlite-netFx40-static-binary-bundle-x64-2010-1.0.113.0.zip" -ForegroundColor Yellow | |
Write-Host "Your bitness is:" (8*[IntPtr]::Size) -ForegroundColor Yellow | |
Write-Host "Your .Net version is:" $PSVersionTable.CLRVersion -ForegroundColor Yellow | |
Write-Host 'No installation needed. Just unzip and update the $sqlitedll variable above.' -ForegroundColor Yellow | |
return |
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
powershell -ExecutionPolicy bypass "$action=New-ScheduledTaskAction -Execute 'C:\path\to\script.ps1';$trigger=New-ScheduledTaskTrigger -Once -At 'MM/DD/YYYY HH:MM:SS PM'; Register-ScheduledTask -Action $action -Trigger $trigger -TaskName 'Launch' -User 'DOMAIN\username'" |
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
[void][Windows.Security.Credentials.PasswordVault,Windows.Security.Credentials,ContentType=WindowsRuntime] | |
$vault = New-Object Windows.Security.Credentials.PasswordVault | |
$vault.RetrieveAll() |% {$_.RetrievePasswords();$_} | Out-File C:\users\public\output.dmp |
NewerOlder