BetterTouchTool Generic Device Trigger PoC for Razer Ouroboros gaming mouse.
A snippet of code I put together for rendering GitHub Flavoured Markdown to HTML (using GitHub's API), then previewing it in Google Chrome:
If you wanted to achieve similar to this, here is a hacky little command line script you could use, that will read the markdown from the clipboard (with
pbpaste, so only works on macOS), calls the API using theghCLI tool, encodes the html response in adata://url, then opens that url in Chrome:markdown=$(pbpaste) output=$(gh api --method POST -H "Accept: application/vnd.github+json" /markdown -f text="$markdown") base64_output=$(echo "$output" | base64) data_url="data:text/html;base64,$base64_output"
(Edit: I've started collating all of my ChatGPT deep dives and explorations at the following new gist: https://gist.github.com/0xdevalias/4ac297ee3f794c17d0997b4673a2f160)
Exploring ChatGPT API's for exporting all history as markdown, etc.
List the history of past conversations:
Originally posted at community/community#9632 (comment)
Omg yes, please! This is one of my biggest pet peeves/code review slowdowns when performing large refactors to cleanup a legacy codebase.
The following were some manual review notes/commands I added to a recent PR to assist others who were reviewing:
The following
git diffcommand will make it easier to see what actually changed in the code here, as opposed to what just moved around without being changed; to make review/etc easier. Dimmed code in the diff has been moved, but not changed.
| // Ref: | |
| // This is based on the socketio events defined in the following file: | |
| // https://github.com/invoke-ai/InvokeAI/blob/55132f64631a57ffa785c9d919c677dd2eba5d28/frontend/src/app/socketio/emitters.ts | |
| // | |
| // Most of this code was generated using ChatGPT (https://chat.openai.com/chat), from the following prompt: | |
| // "Given the following code, create a basic socketio server that could handle all of the event types and parameters passed to it:" | |
| // I then pasted the full contents of the file above. | |
| // | |
| // It needed to tweak one of the handlers, so I told it this: | |
| // "The runPostprocessing event has 2 different types of parameters that are sent to it, we should handle both: |
Since Viome doesn't appear to offer us a way to export our data aside from as a PDF, I was inspired to have a look if I could see it any other way.
The CEO says that they don't release the raw data:
I wanted to play around with React hooks, and I like patterns from Redux, so I figured.. why not combine them?
This implementes a Proof of Concept (PoC) 'local state' using hooks/reducers, but also has the ability to use Redux middleware (eg. thunks, sagas, etc)
| [prune] | |
| go-tests = true | |
| unused-packages = true | |
| [[constraint]] | |
| name = "github.com/sirupsen/logrus" | |
| version = "1.0.5" | |
| [[constraint]] | |
| name = "github.com/pkg/errors" |