Skip to content

Instantly share code, notes, and snippets.

View slimslenderslacks's full-sized avatar
🏠
Working from home

Jim Clark slimslenderslacks

🏠
Working from home
View GitHub Profile
@slimslenderslacks
slimslenderslacks / Dockerfile
Last active January 10, 2025 23:41
Dockerfile for a Typescript MCP Server using npm and an outDir named dist
FROM node:22.12-alpine as builder
COPY . /app
WORKDIR /app
RUN --mount=type=cache,target=/root/.npm npm install
RUN --mount=type=cache,target=/root/.npm-production npm ci --ignore-scripts --omit-dev
@slimslenderslacks
slimslenderslacks / Dockerfile
Created January 10, 2025 06:32
Dockerfile for a standard uv-based python project with a pyproject.toml and uv.lock in the root directory
# Use a Python image with uv pre-installed
FROM ghcr.io/astral-sh/uv:python3.12-bookworm-slim AS uv
# Install the project into `/app`
WORKDIR /app
# Enable bytecode compilation
ENV UV_COMPILE_BYTECODE=1
# Copy from the cache instead of linking since it's a mounted volume
{
description = "Dockerfile parser";
inputs = {
nixpkgs.url = "github:NixOS/nixpkgs/release-22.11";
flake-utils.url = "github:numtide/flake-utils";
};
outputs = { self, nixpkgs, flake-utils }:
(deftest)
@slimslenderslacks
slimslenderslacks / config.edn
Created June 20, 2020 21:54
clj-kondo config.edn
{:linters {:unresolved-symbol {:exclude [childproc.exec childproc.execFile]}}}
{
:indents {atomist.api/dispatch [[:inner 0]]}
}
(defapi app
  :swagger {
    :ui "/api-docs"
    :spec "/swagger.json"
    :data {:info {:title "Sample API"
                  :description "Compojure Api example"}
           :tags [{:name "api", :description "some weird pizza api"}]}}
  (context* 
 "/table" []