Skip to content

Instantly share code, notes, and snippets.

View 0xdevalias's full-sized avatar
👀
Open to opportunities

Glenn 'devalias' Grant 0xdevalias

👀
Open to opportunities
View GitHub Profile
@0xdevalias
0xdevalias / poc-btt-generic-device-trigger-razer-ouroboros-mouse.md
Last active September 16, 2025 06:34
BetterTouchTool Generic Device Trigger PoC for Razer Ouroboros gaming mouse

BetterTouchTool Generic Device Trigger PoC for Razer Ouroboros gaming mouse

BetterTouchTool Generic Device Trigger PoC for Razer Ouroboros gaming mouse.

Table of Contents

@0xdevalias
0xdevalias / render-gfm-as-html-and-preview.md
Created January 26, 2023 00:05
A snippet of code I put together for rendering GitHub Flavoured Markdown to HTML (using GitHub's API), then previewing it in Google Chrome

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 the gh CLI tool, encodes the html response in a data:// 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"
@0xdevalias
0xdevalias / chatgpt-api-export.md
Last active October 30, 2026 05:08
Exploring ChatGPT API's for exporting all history as markdown, etc.
@0xdevalias
0xdevalias / git-diff-color-moved-hacks.md
Created January 17, 2023 02:42
Some tips/tricks/hacks for working with git diff --color-moved to simplify refactor code reviews

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 diff command 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.

@0xdevalias
0xdevalias / lastpass-cli-tricks.md
Last active April 17, 2026 20:05
Tricks to export data in useful formats using the Lastpass CLI (and a few notes/references on Bitwarden)
@0xdevalias
0xdevalias / gmail-css-selectors-etc.md
Last active August 26, 2025 05:31
CSS Selectors for Gmail Things
@0xdevalias
0xdevalias / 1-poc-socketio-invokeai-automatic1111.js
Last active December 10, 2022 04:27
PoC socketio server to stub the InvokeAI API, and later rewrite it to talk to the automatic1111 API
// 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:
@0xdevalias
0xdevalias / unofficial-viome-api-endpoints-data-export-backup.md
Last active August 13, 2024 02:26
(unofficial) Guide to Viome API Endpoints, Data Export and Backup

(unofficial) Guide to Viome API Endpoints, Data Export and Backup

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:

@0xdevalias
0xdevalias / README.md
Last active March 10, 2019 05:48
Implementing Redux style reducers/actions/middleware with React Hooks

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)

@0xdevalias
0xdevalias / Gopkg.toml
Created July 17, 2018 01:48
Golang application state pattern boilerplate/reference code
[prune]
go-tests = true
unused-packages = true
[[constraint]]
name = "github.com/sirupsen/logrus"
version = "1.0.5"
[[constraint]]
name = "github.com/pkg/errors"