Skip to content

Instantly share code, notes, and snippets.

View dtkav's full-sized avatar
👨‍🚀

Daniel Grossmann-Kavanagh dtkav

👨‍🚀
  • system3.md
  • Berkeley, CA
View GitHub Profile
patchWebviewer(): void {
// eslint-disable-next-line
const plugin = this;
try {
if (this.webviewerPatched) {
return;
}
const webviewer = (this.app as any).internalPlugins?.plugins?.webviewer;
if (!webviewer?.instance) {
this.warn("Webviewer plugin not found or not initialized");
// ... (previous imports and constants remain the same) ...
pub struct Server {
docs: Arc<DashMap<String, DocWithSyncKv>>,
doc_worker_tracker: TaskTracker,
store: Option<Arc<Box<dyn Store>>>,
checkpoint_freq: Duration,
authenticator: Option<Authenticator>,
url_prefix: Option<Url>,
cancellation_token: CancellationToken,
@dtkav
dtkav / 2024-01-09.md
Created January 10, 2024 06:24
Shell Summary

Summary

  • ArchiveBox Project
    • Edited configuration and deployment scripts
      • Makefile
      • .dockerignore
    • Managed virtual machines
      • Attempted to run a machine with fly machine run (failed with status 1)
      • Viewed and listed machine leases
      • Stopped and destroyed machines using make commands and fly commands
  • Copied environment variables
@dtkav
dtkav / obsidian-import.sh
Created January 10, 2024 06:08
Import and summarize shell activity into Obsidian
#!/usr/bin/env bash
#
# Import a summary of my daily shell history to Obsidian.
#
export PROMPT="summarize what I worked on today at a very high level in markdown using nested bullet points. For each directory group / project include which files were edited. Ignore commands that don't materially change anything (e.g. navigation, git)."
export AFTER=$(date +"%Y-%m-%dT00:00:00%z")
# Check if at least one argument is provided
@dtkav
dtkav / openapi.yaml
Created September 4, 2020 02:15
required and nullable repro
openapi: 3.0.1
info:
title: test API
version: 2.0.0
license:
name: Apache 2.0
url: 'http://www.apache.org/licenses/LICENSE-2.0.html'
servers:
- url: '/api/v1/'
paths:
@dtkav
dtkav / test.yaml
Created September 3, 2020 23:45
comma cat
openapi: 3.0.1
info:
title: test API
version: 2.0.0
license:
name: Apache 2.0
url: 'http://www.apache.org/licenses/LICENSE-2.0.html'
servers:
- url: '/api/v1/'
paths:
@dtkav
dtkav / openapi.json
Created August 12, 2020 01:59
enum bug repro
{
"openapi": "3.0.2",
"info": {
"title": "My Test API",
"description": "An API for testing openapi-python-client",
"version": "0.1.0"
},
"paths": {
"/tests/": {
"get": {
{
"openapi": "3.0.1",
"info": {
"title": "Benchling API",
"version": "2.0.0",
"license": {
"name": "Apache 2.0",
"url": "http://www.apache.org/licenses/LICENSE-2.0.html"
}
},
@dtkav
dtkav / tracemalloc_python.sh
Created April 14, 2020 01:30
build tracemalloc compatible python 2.7
#!/bin/bash
set -euxo pipefail
umask 022
PYTHON_VERSION="2.7.10"
PYTHON_SRC_URL="https://www.python.org/ftp/python/${PYTHON_VERSION}/Python-${PYTHON_VERSION}.tgz"
PYTHON_SRC_SHA256="eda8ce6eec03e74991abb5384170e7c65fcd7522e409b8e83d7e6372add0f12a"
OPENSSL_VERSION="1.0.2h"
@dtkav
dtkav / configuration.nix
Last active July 22, 2019 05:36 — forked from fikovnik/configuration.nix
NixOS on DELL XPS 13 9360
# Edit this configuration file to define what should be installed on
# your system. Help is available in the configuration.nix(5) man page
# and in the NixOS manual (accessible by running ‘nixos-help’).
{ config, pkgs, ... }:
{
imports =
[ # Include the results of the hardware scan.
./hardware-configuration.nix