Skip to content

Instantly share code, notes, and snippets.

@duffn
duffn / s3_public_bucket_policy.json
Last active September 8, 2018 03:11
S3 Public Bucket Policy
{
"Version": "2012-10-17",
"Statement": [{
"Sid": "PublicReadGetObject",
"Effect": "Allow",
"Principal": "*",
"Action": ["s3:GetObject"],
"Resource": ["arn:aws:s3:::example.com/*"]
}]
}
@duffn
duffn / keybase.md
Created September 1, 2018 11:57
Keybase

Keybase proof

I hereby claim:

  • I am duffn on github.
  • I am duffn (https://keybase.io/duffn) on keybase.
  • I have a public key whose fingerprint is 8F29 B3DB 69FE 0961 A8E4 4AC5 3459 9F4A AC3B 4C9E

To claim this, I am signing this object:

@duffn
duffn / greleaser_basic.sh
Created August 19, 2018 15:04
greleaser_basic.sh
greleaser -p 10003 -v 10001 -g my-github-project
@duffn
duffn / delete_snapshots.py
Created March 28, 2018 18:11 — forked from kjoconnor/delete_snapshots.py
boto script to delete snapshots matching a filter and older than X days
import sys
from boto.ec2 import connect_to_region
from datetime import datetime, timedelta
try:
days = int(sys.argv[1])
except IndexError:
days = 7
@duffn
duffn / ansible-container-0.9.1rc0-meta-build-failure.txt
Created April 18, 2017 22:13
ansible-container-0.9.1rc0-meta-build-failure
2017-04-18T22:12:05.563144 2017-04-18T22:12:05.563144 Docker™ daemon integration engine loaded. Build starting. [container.core] caller_file='/_ansible/container/core.py' caller_func='conductorcmd_build' caller_line=606 project='ansible-container3'
2017-04-18T22:12:05.566569 Building service... [container.core] caller_file='/_ansible/container/core.py' caller_func='conductorcmd_build' caller_line=613 project='ansible-container3' service=u'web'
2017-04-18T22:12:05.574340 Base fingerprint hash = 932035f3f542f64b2f72f561b35fb3563e0221257293d5a7e1d92c246dbc9bfc [container.core] caller_file='/_ansible/container/core.py' caller_func='conductorcmd_build' caller_line=618 hash='932035f3f542f64b2f72f561b35fb3563e0221257293d5a7e1d92c246dbc9bfc' service=u'web'
Traceback (most recent call last):
File "/usr/local/bin/conductor", line 11, in <module>
load_entry_point('ansible-container', 'console_scripts', 'conductor')()
File "/_ansible/container/__init__.py", line 19, in __wrapped__
return fn(*args,
@duffn
duffn / ansible-container-0.9.1rc0-failed_build.txt
Created April 18, 2017 22:02
ansible-container-0.9.1rc0-failed_build
PLAYBOOK: playbook.yml *********************************************************
1 plays in /tmp/tmpXO0aY_/playbook.yml
PLAY [web] *********************************************************************
TASK [Gathering Facts] *********************************************************
Using module_utils file /usr/local/lib/python2.7/dist-packages/ansible/module_utils/basic.py
Using module_utils file /usr/local/lib/python2.7/dist-packages/ansible/module_utils/facts.py
Using module_utils file /usr/local/lib/python2.7/dist-packages/ansible/module_utils/_text.py
Using module_utils file /usr/local/lib/python2.7/dist-packages/ansible/module_utils/pycompat24.py
@duffn
duffn / ansible-container_0.9.0.0_ubuntu_build_failure.txt
Created April 18, 2017 16:48
ansible-container_0.9.0.0_ubuntu_build_failure
Running setup.py bdist_wheel for pycrypto: started
Running setup.py bdist_wheel for pycrypto: finished with status 'error'
Complete output from command /usr/bin/python -u -c "import setuptools, tokenize;__file__='/tmp/pip-build-xZ8k8T/pycrypto/setup.py';f=getattr(tokenize, 'open', open)(__file__);code=f.read().replace('\r\n', '\n');f.close();exec(compile(code, __file__, 'exec'))" bdist_wheel -d /tmp/tmp40C57tpip-wheel- --python-tag cp27:
running bdist_wheel
running build
running build_py
creating build
creating build/lib.linux-x86_64-2.7
creating build/lib.linux-x86_64-2.7/Crypto
copying lib/Crypto/__init__.py -> build/lib.linux-x86_64-2.7/Crypto
@duffn
duffn / basic-querying.test.js
Created September 24, 2016 14:40
loopback-mongodb-connector-ilike
// Copyright IBM Corp. 2013,2016. All Rights Reserved.
// Node module: loopback-datasource-juggler
// This file is licensed under the MIT License.
// License text available at https://opensource.org/licenses/MIT
// This test written in mocha+should.js
'use strict';
var should = require('./init.js');
var async = require('async');
@duffn
duffn / README.md
Created January 7, 2016 17:14 — forked from hilios/README.md
ngPageTitle - AngularJS page title service

$pageTitle

Allows to control the page title from the AngularJS route system, controllers or any other component through an injectable service.

ngPageTitle - Page title service (run tests)

To get started add the module to your app and configure the page title provider:

var Keen = require('keen-js');
module.exports = function (myModel) {
myModel.afterRemote('*', function (ctx, affectedModelInstance, next) {
// Listen to the finish event of the response to wait
// for the response to be available
ctx.res.on('finish', function () {
var client = new Keen({
projectId: 'keenprojectid',
writeKey: 'keenwritekey'