Skip to content

Instantly share code, notes, and snippets.

@SteveMarshall
SteveMarshall / gist:1f2d733f2cb8dda330bc
Last active August 29, 2015 14:17
Scale Summit 2015 What's Changed Since Last Year: things and non-things
Notes of Scale Summit 2015 what's changed since last year.
Things last year:
- “Big Data is a thing”; Big Data is now pointless
- “Is CouchDB dead?” npm were? Fairly sure couchdb is now dead, despite more funding
- Under still going: Mongo, Riak. Mongo's not dead? Guardian, GDS, MOJ. Mongo on the rise again? Mongo *might* be dead; we don't know.
- Websockets were "standard" but weren't really… except for certain browsers, proxies, etc.
- HTML5 video still doesn't really work
- Flash is still dying… Unless you count CVEs. Lots of flash-based ads.
- WebGL has taken hold? Still true, apparently.
["update-puppet.sh", "run-puppet.sh"].each |$file| {
file{"/usr/local/bin/${file}":
owner => "root",
group => "root",
mode => "0700",
source => "puppet:///modules/puppet/${file}"
}
}
create_resources("mail::domain", $domains)
#!/usr/bin/env ruby
require 'aws-sdk'
sts = Aws::STS::Client.new(
region: 'us-east-1',
access_key_id: "<insert access key id>",
secret_access_key: "<secret>"
)
@aaronjensen
aaronjensen / edit_data_bag.rb
Created November 21, 2012 04:39
Edit encrypted data bags for use with chef-solo and knife-solo
#!/usr/bin/env ruby
Dir.chdir File.join(__FILE__, "../..")
unless ENV['EDITOR']
puts "No EDITOR found. Try:"
puts "export EDITOR=vim"
exit 1
end
unless ARGV.count == 2
@agussman
agussman / AWS-CSA-A-Notes.md
Last active July 10, 2019 02:12
Notes from studying for the AWS Certified Solutions Architect Exam. I felt well-prepared for the exam and passed with a 94%. Please reach out with any corrections or questions.

External Resources

@gene1wood
gene1wood / samlapi_formauth.py
Created October 25, 2016 17:38
How to Implement a General Solution for Federated API/CLI Access Using SAML 2.0
#!/usr/bin/python
# Source : https://s3.amazonaws.com/awsiammedia/public/sample/SAMLAPICLIADFS/samlapi_formauth.py
# Referenced from : https://aws.amazon.com/blogs/security/how-to-implement-a-general-solution-for-federated-apicli-access-using-saml-2-0/
import sys
import boto.sts
import boto.s3
import requests
import getpass
@gene1wood
gene1wood / role_arn_to_session.py
Created December 29, 2016 17:38
Simple python function to assume an AWS IAM Role from a role ARN and return a boto3 session object
import boto3
def role_arn_to_session(**args):
"""
Usage :
session = role_arn_to_session(
RoleArn='arn:aws:iam::012345678901:role/example-role',
RoleSessionName='ExampleSessionName')
client = session.client('sqs')
"""
@jareware
jareware / s3-curl-backups.md
Last active August 29, 2021 00:56
Simple, semi-anonymous backups with S3 and curl

⇐ back to the gist-blog at jrw.fi

Simple, semi-anonymous backups with S3 and curl

Backing stuff up is a bit of a hassle, to set up and to maintain. While full-blown backup suites such as duplicity or CrashPlan will do all kinds of clever things for you (and I'd recommend either for more complex setups), sometimes you just want to put that daily database dump somewhere off-site and be done with it. This is what I've done, with an Amazon S3 bucket and curl. Hold onto your hats, there's some Bucket Policy acrobatics ahead.

There's also a tl;dr at the very end if you just want the delicious copy-pasta.

Bucket setup