Skip to content

Instantly share code, notes, and snippets.

View beeman's full-sized avatar
🐝
Buzzin....

beeman

🐝
Buzzin....
View GitHub Profile
@beeman
beeman / create-pixel-9-pro-xl-play-36.sh
Created March 18, 2026 12:39
Script to create a Pixel 9 Pro Android Emulator with Google Play and 32GB of storage and 8GB of RAM
#!/usr/bin/env bash
set -euo pipefail
ANDROID_SDK_ROOT="${ANDROID_SDK_ROOT:-$HOME/Library/Android/sdk}"
AVDMANAGER="$ANDROID_SDK_ROOT/cmdline-tools/latest/bin/avdmanager"
SDKMANAGER="$ANDROID_SDK_ROOT/cmdline-tools/latest/bin/sdkmanager"
EMULATOR="$ANDROID_SDK_ROOT/emulator/emulator"
AVD_NAME="${AVD_NAME:-Pixel_9_Pro_XL_Play_36}"
DEVICE_ID="${DEVICE_ID:-pixel_9_pro_xl}"
@beeman
beeman / openclaw-operator.md
Last active February 23, 2026 07:42
Run your OpenClaw as an operator! Context here https://x.com/beeman_nl/status/2025833892729803053

From now on, your role is ORCHESTRATOR.

Core operating model

• You do planning, scoping, sequencing, delegation, QA, and final reporting. • Sub-agents do all implementation/execution work by default.

Execution rules

  1. Default: spawn a sub-agent for any non-trivial task.
@beeman
beeman / prisma-try-catch-generator.ts
Last active August 25, 2025 08:43
A Prisma generator that wraps operations in a tryCatch function
#!/usr/bin/env bun
import gh from '@prisma/generator-helper'
import fs from 'node:fs/promises'
import path from 'node:path'
import type { Model } from '@prisma/dmmf'
const header = `// This file was generated by a generator. Do not edit manually.`
// These are the operations we want to wrap in tryCatch.
@beeman
beeman / app-layout.tsx
Last active March 7, 2025 23:43
Simple setup for @solana/web3.js v2 in a React/React Native app. Be sure to install`@solana/web3.js@2` in your project!
import { ReactNode } from 'react'
import { SolanaClientProvider } from './solana-client-provider'
function AppLayout({ children }: { children: ReactNode }) {
return <SolanaClientProvider rpc='https://api.devnet.solana.com'>
{children}
</SolanaClientProvider>
}
@beeman
beeman / Dockerfile
Created December 30, 2023 16:44
Minimal example of running a solana-test-validator in a Docker container
# Build the image:
# docker build . -t solana-validator-docker
# Run a basic container:
# docker run --rm -it --init solana-validator-docker:latest
# Run the solana-test-validator and expose port 8899:
# docker run --rm -it --init -p 8899:8899 solana-validator-docker:latest solana-test-validator
#
# Based on Ubuntu 22.04 LTS (Jammy)
FROM ubuntu:jammy
# Set the workdir to $HOME
@beeman
beeman / app-feature.tsx
Created February 19, 2023 20:23
Basic Solana Provider for React apps - a personal reference.
import { useConnection, useWallet } from '@solana/wallet-adapter-react'
import { useSolana } from './solana-provider'
export function AppFeature() {
const { connection } = useConnection()
const { network } = useSolana()
const wallet = useWallet()
if (wallet.connecting) {
return <div>Connecting wallet...</div>
@beeman
beeman / Dockerfile
Last active December 6, 2024 16:10
Docker image with solana-test-validator that works on Apple Silicon 👉 Image here https://github.com/beeman/solana-test-validator 👈
FROM debian:bullseye AS base
ARG AGAVE_VERSION=2.0.15
ARG RUST_VERSION=stable
RUN rm /bin/sh && ln -s /bin/bash /bin/sh
WORKDIR /workspace
RUN mkdir -pv "/workspace/bin" && echo 'echo test' > '/workspace/bin/test.sh' && chmod +x '/workspace/bin/test.sh'
@beeman
beeman / config.ts
Created July 8, 2021 06:00 — forked from AmazingTurtle/config.ts
openai client
export const DEFAULT_ENGINE = 'davinci';
export const ENGINE_LIST = ['ada', 'babbage', 'curie', 'davinci', 'davinci-instruct-beta', 'curie-instruct-beta'];
export const ORIGIN = 'https://api.openai.com';
export const DEFAULT_API_VERSION = 'v1';
export const DEFAULT_OPEN_AI_URL = `${ORIGIN}/${DEFAULT_API_VERSION}`;
import { Logger, Module } from '@nestjs/common'
import { ServeStaticModule } from '@nestjs/serve-static'
import { ensureDirSync, existsSync, writeFileSync } from 'fs-extra'
import { join } from 'path'
const rootPath = join(__dirname, '..', 'admin')
@Module({
imports: [
// Feature modules here...
{
"angular": {
"alias": ["ng"],
"terms": {
"router": [
{ "label": "In-app navigation: routing to views", "url": "https://angular.io/guide/router" },
{ "label": "Observables in Angular - Router", "url": "https://angular.io/guide/observables-in-angular#router" }
]
}
},