Skip to content

Instantly share code, notes, and snippets.

View bmingles's full-sized avatar

Brian Ingles bmingles

View GitHub Profile
@bmingles
bmingles / dh-themes.html
Last active May 28, 2025 17:54
Deephaven Theme - Postmessage Apis
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<link
rel="icon"
type="image/png"
href="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACAAAAAgCAYAAABzenr0AAAABmJLR0QA/wD/AP+gvaeTAAAA9klEQVRYhe3WMUoDQRSH8e+tkw0bdhtj7wXSmUSIVboUVjYeIIU5hOIVBG8SUppSUBAstDSQFKkEWbOQBLPseoR5KWQt3tQf//nBNCO9y8UbihO14/dGP2n5OqFcjtv1gWYTwAHeUYAiL740bYkk2ssBgn3ivzgGMIABKgc4bVhkxbwUPnxdnGXfq+7VULNZc/mDGvAz275OTsI7X7fpDY9zDuaazV0eXFT+BAYwgAEMIOeP20wTXtdunjrhy6k3LFmko9aZZvMwaq6d1INYE0fBLgT8H04haT7frzSb8A+ewAAGMEDlAAdyqwk/OUqBqTcU0n0Av+DQNksxGrVgAAAAAElFTkSuQmCC"
/>
@bmingles
bmingles / iframe.html
Created May 5, 2025 18:06
Deephaven Theme - Iframe Tester
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>Deephaven Iframe Tester</title>
<style>
html,
body {
background-color: green;
@bmingles
bmingles / dh.sh
Created February 4, 2025 20:01
Deephaven Docker with SSL
# Run docker compose using local certs
port=444
auth="-DAuthHandlers=io.deephaven.auth.AnonymousAuthenticationHandler"
start_opts="$auth -Dhttp.port=$port -Dssl.identity.type=privatekey -Dssl.identity.certChainPath=/dev-certs/$certname.crt -Dssl.identity.privateKeyPath=/dev-certs/$certname.key"
DEEPHAVEN_PORT=$port START_OPTS=$start_opts docker compose up "$@"
@bmingles
bmingles / gh-prs.py
Last active November 22, 2024 17:17
Deephaven GH / Jira Board
# Map community web ui release versions to enterprise PRs. Useful for updating enterprise version logs.
# Inspired by https://medium.com/@deephavendatalabs/leverage-githubs-awesome-rest-api-f7d34894765b
#
# The script requires some env variables containing username + access tokens for Github + JIRA
# 1. Set env variables in your local environment
# - GH_USERNAME - Your github username
# - GH_TOKEN - In Github, create a read-only fine-grained token:
# https://github.com/settings/tokens?type=beta
# - JIRA_USERNAME - Your JIRA username (likely your illumon email address)
# - JIRA_TOKEN - In JIRA, create api access token:
@bmingles
bmingles / index.mjs
Last active October 30, 2024 14:51
KeyGen
#!/usr/bin/env node
// Experiment with generating a key pair, uploading the public key to the server,
// and authenticating with the private key.
import {
generateBase64KeyPair,
loginClientWithKeyPair,
uploadPublicKey,
} from '@deephaven-enterprise/auth-nodejs'
import { loginPrompt } from './loginPrompt.mjs'
# Seems simpler / better
https://security.stackexchange.com/a/183973
https://stackoverflow.com/a/43665244/20489
@bmingles
bmingles / git-worktree.sh
Last active September 21, 2024 03:44
Git Worktree
git clone --bare <repo_url> .bare
echo "gitdir: ./.bare" > .git
git config remote.origin.fetch "+refs/heads/*:refs/remotes/origin/*"
@bmingles
bmingles / MyComponent.tsx
Last active October 5, 2022 01:31
MobX with custom React context hook
import React from 'react'
import { observer } from 'mobx-react-lite'
const MyComponent: React.FC = () => {
const { name, age, loadAge, loadName } = useSomeService()
React.useEffect(() => {
loadAge()
void loadName()
}, [loadName])
@bmingles
bmingles / settings.json
Created September 5, 2022 18:48
vscode custom colors
{
"workbench.colorCustomizations": {
"statusBar.background": "#ce6f03",
"titleBar.activeBackground": "#ce6f03"
}
}
@bmingles
bmingles / preview.js
Last active February 17, 2022 22:24
Storybook - Custom Story Sorting
export const parameters = {
actions: { argTypesRegex: '^on[A-Z].*' },
options: {
storySort,
},
}
/** Force example stories to sort last */
function forceExampleLast(id) {
return (id.startsWith('example-') ? '' : '_') + id