This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# 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 "$@" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# 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: |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/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' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Seems simpler / better | |
https://security.stackexchange.com/a/183973 | |
https://stackoverflow.com/a/43665244/20489 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
git clone --bare <repo_url> .bare | |
echo "gitdir: ./.bare" > .git | |
git config remote.origin.fetch "+refs/heads/*:refs/remotes/origin/*" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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]) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"workbench.colorCustomizations": { | |
"statusBar.background": "#ce6f03", | |
"titleBar.activeBackground": "#ce6f03" | |
} | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
export const parameters = { | |
actions: { argTypesRegex: '^on[A-Z].*' }, | |
options: { | |
storySort, | |
}, | |
} | |
/** Force example stories to sort last */ | |
function forceExampleLast(id) { | |
return (id.startsWith('example-') ? '' : '_') + id |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import React from 'react' | |
import { observer } from 'mobx-react-lite' | |
const MyComponent: React.FC = () => { | |
// I would typically get this from context API with custom hook instead of local useMemo | |
// e.g. const { name, age, loadAge, loadName } = useSomeService() | |
const { age, name, loadAge, loadName } = React.useMemo(() => new SomeService(), []) | |
React.useEffect(() => { | |
loadAge() |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Configuration -> General Settings -> Startup Command | |
pm2 serve /home/site/wwwroot/ --no-daemon --spa |
NewerOlder