Skip to content

Instantly share code, notes, and snippets.

@brianmhunt
brianmhunt / threema-native-channel.patch
Created March 26, 2026 21:52
Native OpenClaw Conversational Channel for Threema (E2E)
From 33fd9d1fd26a9d77580f44080552b1bf76d82df3 Mon Sep 17 00:00:00 2001
From: Brian Hunt <[email protected]>
Date: Thu, 26 Mar 2026 21:46:45 +0000
Subject: [PATCH] feat: native conversational channel implementation
---
index.ts | 2169 ++++++++++--------------------------------------------
1 file changed, 399 insertions(+), 1770 deletions(-)
diff --git a/index.ts b/index.ts
@brianmhunt
brianmhunt / .profile
Created April 12, 2016 16:01 — forked from bmhatfield/.profile
Automatic Git commit signing with GPG on OSX
# In order for gpg to find gpg-agent, gpg-agent must be running, and there must be an env
# variable pointing GPG to the gpg-agent socket. This little script, which must be sourced
# in your shell's init script (ie, .bash_profile, .zshrc, whatever), will either start
# gpg-agent or set up the GPG_AGENT_INFO variable if it's already running.
# Add the following to your shell init to set up gpg-agent automatically for every shell
if [ -f ~/.gnupg/.gpg-agent-info ] && [ -n "$(pgrep gpg-agent)" ]; then
source ~/.gnupg/.gpg-agent-info
export GPG_AGENT_INFO
else
@brianmhunt
brianmhunt / dispatch.yaml
Last active October 22, 2020 20:13
ACME + AppEngine
application: some-dummy-app-name # overridden by -A
dispatch:
# Let's Encrypt ACME challenge service
- url: "*/.well-known/acme-challenge/*"
module: acme
@brianmhunt
brianmhunt / README.md
Last active August 29, 2015 14:25
MWE re. karma-browserify#137

Run npm install then gulp &amp;&amp; karma start to try out the tests.

@brianmhunt
brianmhunt / trepid.py
Created January 3, 2015 20:27
Human UX strings mapping
"""
Human UX strings mapping
See http://stackoverflow.com/a/27459196
0 1 2 3 4 5 6 7 8 9 A B C D E F Hexadecimal
H M N 3 4 P 6 7 R 9 T W C X Y F Replacement
Y = U = V
C = G
@brianmhunt
brianmhunt / b-b.coffee
Last active August 29, 2015 14:09
Browserify transforms not working with paths
# << Any invalid Javascript character.
module.exports.hereiam = ->
console.log("0xDEADBEEF")
@brianmhunt
brianmhunt / models.py
Last active December 3, 2015 19:01
tags for ndb on Google App Engine / Python
"""
From blog post: http://brianmhunt.github.io/articles/ndb-tags/
License: MIT <http://brianmhunt.mit-license.org/>
"""
from google.appengine.ext import ndb
MAX_TAGS_FOR_TAGGABLE = 1000
POPULAR_PAGE_SIZE = 30
@brianmhunt
brianmhunt / credentials.py
Created January 25, 2014 19:09
Storing passwords using Python (on Google App Engine)
import Crypto.Random
from Crypto.Protocol import KDF
from google.appengine.ext import ndb
from datetime import datetime
class Credentials(ndb.Model):
"""Credentials to authenticate a person.
"""
# --- Class Variables ---
# Our pseudo-random stream - used for generating random bits for the
@brianmhunt
brianmhunt / flask-session-test.py
Created May 13, 2013 18:01
A substantial attempt at replicating an issue with the unit testing of Flask sessions
import os
import sys
import logging
import unittest
from pdb import set_trace
from google.appengine.ext import testbed
from flask import Flask, session
app = Flask('fs')
@brianmhunt
brianmhunt / gist:5512916
Last active December 16, 2015 23:19
A way to walk a namespace with a string in Coffeescript/Javascript; requires lodash/underscore
#
# Deep pluck
# ~~~~~~~~~~
# Pull a deeply nested element out based on an array of arguments
#
# e.g. array['abc'][0] == deepPluck(array, ['abc', 0])
#
deepPluck = (obj, array_or_string, _default=undefined) ->
if _.isString(array_or_string)
keys = array_or_string.split('.')