Skip to content

Instantly share code, notes, and snippets.

@bedwards
bedwards / Cargo.toml
Created December 30, 2023 21:21
dioxus-desktop Cmd-Q quit
[dependencies]
active-win-pos-rs = "0.8.3"
dioxus = "0.4.3"
dioxus-desktop = "0.4.3"
dioxus-html = { version = "0.4.3", features = ["serialize", "native-bind"] }
wry = { version = "0.28.0", default-features = false, features = ["protocol", "file-drop"] }
import dotenv from "dotenv";
import {Configuration, OpenAIApi} from "openai";
dotenv.config();
const prompt = process.argv.slice(2).join(" ");
const configuration = new Configuration({
organization: process.env.OPENAI_ORG_ID,
apiKey: process.env.OPENAI_API_KEY,
@bedwards
bedwards / README.md
Created November 3, 2021 13:03
CMU pronouncing dictionary in Typescript

cmudict-0.7b.txt

$ npm install
$ npx ts-node cmudict.ts hello world
hh-ah0-l-ow1 w-er1-l-d
@bedwards
bedwards / run-solidity-contract.sh
Last active April 13, 2018 20:44
Run a solidity contract
#!/bin/bash
# A short, straightforward bash script to run a solidity contract.
#
# Prerequisites (Mac with homebrew)
#
# * brew tap ethereum/ethereum
# * brew install ethereum
# * brew install solidity
#
{
"metadata": {
"language": "Julia",
"name": ""
},
"nbformat": 3,
"nbformat_minor": 0,
"worksheets": [
{
"cells": [