Skip to content

Instantly share code, notes, and snippets.

View emory's full-sized avatar
💭
threat modeling AI in a lab

Emory L. emory

💭
threat modeling AI in a lab
View GitHub Profile
@kudoh
kudoh / google-search.ts
Created October 9, 2024 09:22
OpenAI Realtime API with Function calling
import { customsearch } from '@googleapis/customsearch';
const API_KEY = process.env.CSE_API_KEY ?? '';
const ENGINE_ID = process.env.CSE_ENGINE_ID ?? '';
export async function webSearch({ query }: { query: string }) {
console.log('Web Search:', query);
const api = customsearch({
auth: API_KEY,
version: 'v1'
@usrbinkat
usrbinkat / README.md
Last active April 21, 2025 00:32
Ollama + Open-Webui + Nvidia/CUDA + Docker + docker-compose

image

UPDATE: This is tested and working on both Linux and Windows 11 used for LlaMa & DeepSeek

Here's a sample README.md file written by Llama3.2 using this docker-compose.yaml file that explains the purpose and usage of the Docker Compose configuration:

ollama-portal

A multi-container Docker application for serving OLLAMA API.

@hstagner
hstagner / apple-notes-shortcuts.md
Last active April 12, 2025 12:42
Apple Notes Shortcuts
@emory
emory / Ueshiba in the Morning
Last active May 17, 2024 21:05
asked AI about morning rituals of O'Sensei
After creating Aikido, Morihei Ueshiba (often referred to as O-Sensei, or 'Great Teacher') was known for his stringent and disciplined daily routine, which heavily emphasized both physical and spiritual practices. His morning routine, although not detailed to the minute, typically included:
1. **Misogi** - A Shinto purification ritual that sometimes involved standing under a cold waterfall or engaging in deep breathing exercises. This was meant to purify the body and spirit.
2. **Prayer and Meditation** - Ueshiba dedicated time every morning to prayer and meditation, focusing on harmonizing his spirit with the universe, which was a core philosophy in Aikido.
3. **Aikido Training** - He practiced Aikido rigorously every morning. His training was not just a physical exercise but also a form of moving meditation and a way to further understand and develop the principles of Aikido.
4. **Farming and Gardening** - Ueshiba also spent time working on his farm. He believed in the value of hard, physical work and s
@Artefact2
Artefact2 / README.md
Last active April 29, 2025 20:04
GGUF quantizations overview

Which GGUF is right for me? (Opinionated)

Good question! I am collecting human data on how quantization affects outputs. See here for more information: ggml-org/llama.cpp#5962

In the meantime, use the largest that fully fits in your GPU. If you can comfortably fit Q4_K_S, try using a model with more parameters.

llama.cpp feature matrix

See the wiki upstream: https://github.com/ggerganov/llama.cpp/wiki/Feature-matrix

@jart
jart / rename-pictures.sh
Created December 12, 2023 15:24
Shell script for renaming all images in a folder
#!/bin/sh
# rename-pictures.sh
# Author: Justine Tunney <[email protected]>
# License: Apache 2.0
#
# This shell script can be used to ensure all the images in a folder
# have good descriptive filenames that are written in English. It's
# based on the Mistral 7b and LLaVA v1.5 models.
#
# For example, the following command:
@aanari
aanari / wezterm.lua
Created August 11, 2023 16:01
WezTerm Config for WSL 2
local wezterm = require("wezterm")
local function font_with_fallback(name, params)
local names = { name, "Apple Color Emoji", "azuki_font" }
return wezterm.font_with_fallback(names, params)
end
local font_name = "PragmataProMonoLiga Nerd Font"
return {
@emory
emory / disable_discimage.reg
Created April 9, 2023 20:44 — forked from wdormann/disable_discimage.reg
Disable Windows Explorer file associations for Disc Image Mount (ISO, IMG, VHD, VHDX)
Windows Registry Editor Version 5.00
[-HKEY_CLASSES_ROOT\.iso]
[-HKEY_CLASSES_ROOT\Windows.IsoFile\shell\mount\command]
[-HKEY_CLASSES_ROOT\.img]
[-HKEY_CLASSES_ROOT\.vhdx]
@daemonhorn
daemonhorn / freebsd_yubikey_authentication.md
Last active April 2, 2025 19:08
Setting up yubikey/solo2 for piv, fido, and gpg on FreeBSD (Firefox, Chromium, PAM, SSH, and GnuPG)

Overview

How to configure FreeBSD and applicable applications to work with Yubikey for authentication. This serves as my work-in-progress documentation of the configuration knobs needed to make this work properly.

  • FreeBSD ssh with piv smartcard slot on Yubikey (pkcs11 via libykcs11.so)
  • FreeBSD ssh with fido support on Yubikey
  • FreeBSD Firefox/Chromium with fido + webauthn support on Yubikey
  • FreeBSD local console and gdm authentication using pam on Yubikey
  • FreeBSD official YubiKey tools

Latest Tested FreeBSD versions

  • FreeBSD 13.2 Testing (Aug 2023)
  • FreeBSD stable/13 Testing (Aug 2023) with OpenSSH_9.3p2
@jinschoi
jinschoi / histogram_sub.py
Created June 2, 2022 23:23
Plot a histogram of Flipper raw .sub files
import re
import sys
import pandas as pd
import matplotlib.pyplot as plt
filename = sys.argv[1]
segs = []
with open(filename, 'r') as f:
for line in f: