Skip to content

Instantly share code, notes, and snippets.

View rhodey's full-sized avatar

rhodey rhodey

View GitHub Profile
@rhodey
rhodey / support.md
Created November 15, 2026 17:52
AWS KMS Support case

AWS KMS Support case

Sent

I really want to work with AWS Nitro Sandboxes and combine them with AWS KMS but I am finding some AWS documentation that suggests that it is possible to contact AWS Support and gain access to a KMS key even if it goes against the IAM policy attached to a key. This is a very technical question so I'll try to explain a bit further: I want my applications running in Nitro Sandboxes to be allowed to create and use keys in KMS and I do not want the AWS account root user (me) to ever be able to get around this restriction. Here is an example IAM policy that allows a Nitro Enclave/Sandbox to create and use a key and it also denies that anyone may change the policy for this key afterwards:

{
  "Version": "2012-10-17",
  "Statement": [
    {
ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIPXSBygr2kr5RCcPQiB8eSMyXYfQf9zZiC7r97lG0J5O rhodey@anhonesteffort.org
/*
* Copyright (C) 2016 An Honest Effort LLC.
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
@rhodey
rhodey / muxrpc-tcp.js
Created May 16, 2018 20:30
trying to understand how to use muxrpc atop tcp.
var pull = require('pull-stream')
var toPull = require('stream-to-pull-stream')
var net = require('net')
var MRPC = require('muxrpc')
var API = { echo : 'async' }
var server = undefined
var client = undefined
function echo(str, cb) {
@rhodey
rhodey / hash-signatures.js
Created April 12, 2018 19:45
playing around with hash-based signatures
const bitwise = require('bitwise')
const bignum = require('bignum')
const crypto = require('crypto')
function hash(buf) {
var hash = crypto.createHash('sha256')
hash.update(buf)
return hash.digest()
}
@rhodey
rhodey / Heretic.scala
Created April 14, 2017 04:02
True heretics keep their own time.
package org.anhonesteffort.heretic
import scala.language.implicitConversions
object Heretic {
sealed trait Ticable {
def asTics(): Long
}
@rhodey
rhodey / gist:873ae9d527d8d2a38213
Last active April 25, 2024 16:38
RE: Flock shutting down

Those who have received the latest Flock update are hopefully now aware that the project is shutting down, with the final EOL date set for October 1st. It is my belief that Flock performed a function not fulfilled by any existing projects, I want to share with you the main reason for EOL so that future projects of the same kind may come about and find greater success.

WebDAV was the wrong choice

Many developers in the Free Software security/crypo/hacker/whatever-this-thing-is scene tend to complain (sometimes vehemently) when a new protocol is developed to replace an existing protocol. For example, 9 out of 10 people in the whatever-this-thing-is scene will tell you there is nothing wrong with XMPP or OTR and argue that you're anti-OSS to try and replace either, I was partially of this mindset when I decided to augment WebDAV for Flock instead of creating something new or using something modern. WebDAV came about in 1999 and it shows in every library and OSS server available today. The [Remote Storage](ht

@rhodey
rhodey / gist:2c320f67080c7e59d7df
Created February 20, 2015 21:40
mokey tiger haiku
var split = require('split');
var http = require('http');
function pullHaikuFromLine(line, offset) {
return line.replace(/\s{2,}/g, ' ')
.replace(/<div class="line">/g, "\n")
.replace(/<(?:.|\n)*?>/gm, ' ')
.substring(3);
}
@rhodey
rhodey / scrape-message-ids.js
Created October 21, 2014 08:15
A quick & dirty script to monitor the "ST LOUIS COPTALK" forum for deleted messages (http://members.boardhost.com/stlouiscoptalk/index.html). A list of message ids is saved to "process.argv[2].Date.now()", make this a cron job and then identify deleted messages through diffs.
var fs = require('fs');
var split = require('split');
var http = require('http');
var pages = new Array();
var messageIds = new Array();
var pageScrapeCount = 0;
var msgIdFileName = process.argv[2] + '.' + Date.now();
var msgIdFile = fs.createWriteStream(msgIdFileName);
@rhodey
rhodey / gist:ec47ce821c3b08d6f0f6
Last active August 29, 2015 14:07
mvn-pollr.sh
GROUP="org/whispersystems"
ARTIFACT="libpastelog"
VERSION="1.0.1"
EMAIL="rhodey@anhonesteffort.org"
if curl "https://repo1.maven.org/maven2/$GROUP/$ARTIFACT/" | grep "$VERSION/"; then
echo "is available! :D" | mail -s "$ARTIFACT $VERSION" $EMAIL
fi