Skip to content

Instantly share code, notes, and snippets.

View Mearman's full-sized avatar
🍞

Joseph Mearman Mearman

🍞
View GitHub Profile
import { Schema, base, code } from "@google-labs/breadboard";
import { core } from "@google-labs/core-kit";
import { templates } from "@google-labs/template-kit";
import { countryCodes } from "../../utils/countryCodes";
const getCurrentYear = code((): { year: number } => {
return {
year: new Date().getFullYear(),
};
});
@Mearman
Mearman / keybase.md
Last active March 14, 2024 13:02
keybase.md

Keybase proof

I hereby claim:

  • I am mearman on github.
  • I am mearman (https://keybase.io/mearman) on keybase.
  • I have a public key ASCrulF_DwBV5piz13C3bNIvxS-qXyAeErQdo0J4TY6YZwo

To claim this, I am signing this object:

@Mearman
Mearman / breadboard.schems.json
Last active January 30, 2024 13:49
breadboard.schema.json
{
"$schema": "https://json-schema.org/draft/2020-12/schema",
"$id": "https://raw.githubusercontent.com/breadboard-ai/breadboard/main/packages/breadboard/breadboard.schema.json",
"title": "Breadboard",
"description": "An executable program graph",
"$defs": {
"identifier": {
"type": "string",
"pattern": "^[a-zA-Z_][a-zA-Z0-9_-]*$"
}
@Mearman
Mearman / 404.html
Created January 15, 2024 14:17
SPA Ascend
<!DOCTYPE html>
<html>
<head>
<title>Page Loading...</title>
<script>
function fetchAndReplaceContent(basePath, additionalSegments) {
if (additionalSegments.length === 0) {
document.body.innerHTML = '<h1>Page not found.</h1>';
@Mearman
Mearman / readme-mde.md
Created December 18, 2023 12:55 — forked from ThePredators/readme-mde.md
Setup Mobile Development Environment

⭐ Setup Mobile Development Environment

⚠️ The following configuration has been tested on Intel, M1 & M2 Ships ⚠️

Pre-requisit :

If you have any issues with macOS, or need anything related to it check this documentation

Install Xcode Command Line tools :

@Mearman
Mearman / chrome_platform_status_openapi.json
Last active November 29, 2023 11:25
Chrome Platform Status API
{
"openapi": "3.1.0",
"info": {
"title": "Chrome Platform Status",
"version": "0.0.0",
"description": "https://chromestatus.com/",
"contact": {}
},
"servers": [
{
import claude from "@anthropic-ai/tokenizer/claude.json";
import { Tiktoken, TiktokenBPE } from "js-tiktoken";
export function countTokens(text: string): number {
const tokenizer = getTokenizer();
const encoded = tokenizer.encode(text.normalize("NFKC"));
return encoded.length;
}
@Mearman
Mearman / openalex_bibtext.js
Created October 24, 2023 02:10
OpenAlex BibTeX Bookmarklet
javascript: (function () {
function fetchBibTeX(url) {
fetch(url)
.then((response) => response.json())
.then((data) => {
const authors = data.authorships
.map((author) => author.raw_author_name)
.join(" and ");
const title = data.title;
const journal = data.primary_location.source.display_name;
@Mearman
Mearman / .latexmkrc.one.pl
Last active July 22, 2023 20:09
.latexmkrc
$recorder = 1;
$pdf_mode = 1;
$bibtex_use = 2;
$pdflatex = "pdflatex --shell-escape %O %S";
$pdf_previewer = "start open -a preview %O %S";
add_cus_dep('glo', 'gls', 0, 'run_makeglossaries');
add_cus_dep('acn', 'acr', 0, 'run_makeglossaries');
sub run_makeglossaries {