Skip to content

Instantly share code, notes, and snippets.

View dannenberg's full-sized avatar

Matt Dannenberg dannenberg

  • robots
  • New York
View GitHub Profile
@dannenberg
dannenberg / test_gist.py
Created June 27, 2017 17:10
one time i tried to see what gists supported commentwise
x = range(0,5)
# no way there are bugs here!
for lol in x:
print x
echo "buckets logging to a folder other than <theirname>/:"
for bucket in $(aws s3 ls | awk '{print $3}')
do
bucket_status=$(aws s3api get-bucket-logging --bucket $bucket | grep -v "$bucket/")
if [[ $bucket_status != "" ]]; then
echo "\t$bucket"
fi
done
echo "buckets logging to a bucket other than s3.bucket.access.logs:"
for bucket in $(aws s3 ls | awk '{print $3}')
do
bucket_status=$(aws s3api get-bucket-versioning --bucket $bucket)
if [[ $bucket_status != "Enabled" ]]; then
echo $bucket
fi
done
@dannenberg
dannenberg / 2.6.txt
Last active December 21, 2015 23:39 — forked from tychoish/2.6.txt
.. code-block:: javascript
db.runCommand( { aggregate: "records",
pipeline: [ { $project: { costsOneDollar:
{ $eq: [ "$price", { $literal: "$1.00" } ] } }
} ] } )