Listing AWS IAM Permission Names by System

April 18th, 2017 AWS, googlefood, Shell Scripting

A tiny shell script for listing the AWS IAM permission for a particular system, like “ec2” or “s3”.

Does not handle every possible case, as some URL paths are inconsistent. YMMV.


lap ~> iam-permissions ec2 | head -5

Script below…

Read the rest of this entry »

Datomic: Relationships and refs within a transaction

April 12th, 2017 Clojure

Not being able to figure this out is what killed all my previous attempts to use Datomic.

You want to transact two Entities that have a relationship between them. You’ve tried all the different variations that Google shows you, but they all give you :db.error/not-an-entity

What you want is the TWO ARGUMENT version of #db/id

Here, Verna gets a Temporary ID of -1 in this transaction. We can then reference that same Temporary ID later under :mother

This of course assumes that you have a Schema that defines :mother as a Datomic Reference, such as:

Also note that #db/id is simply a Tagged Element (similar to a reader macro), not an inline function or symbol reference or anything else.

Notes on Component (Part 1)

April 11th, 2017 Clojure, googlefood

Stuart Sierra’s Component library for Clojure took awhile for me to really understand. Hence these notes.

Read the rest of this entry »

Luminus directories: src/clj, src/cljs, src/cljc

January 28th, 2017 Clojure, googlefood

When you use the lein plugin luminus to create a web application based on the Luminus Web Stack, it creates three directories under src: clj, cljs, and cljc.

What are these for?
Read the rest of this entry »

Googlefood: chef-spec tries to connect to localhost fauxhai.local

November 16th, 2016 googlefood

There’s lots of different things that can cause this error. The one that I was hitting was rather unintuitive.

Read the rest of this entry »