Skip to content

Instantly share code, notes, and snippets.

View mattboldt's full-sized avatar

Matt Boldt mattboldt

View GitHub Profile
tell application "UA Mixer Engine"
if it is running then
quit
else
launch
end if
end tell
@mattboldt
mattboldt / s3-updater.rb
Last active July 5, 2019 13:20
Update S3 object metadata of an entire bucket using the AWS Ruby SDK
require 'aws-sdk'
require 'active_support'
require 'active_support/core_ext'
# http://docs.aws.amazon.com/sdkforruby/api/Aws/S3/Object.html#copy_to-instance_method
COPY_TO_OPTIONS = [:multipart_copy, :content_length, :copy_source_client, :copy_source_region, :acl, :cache_control, :content_disposition, :content_encoding, :content_language, :content_type, :copy_source_if_match, :copy_source_if_modified_since, :copy_source_if_none_match, :copy_source_if_unmodified_since, :expires, :grant_full_control, :grant_read, :grant_read_acp, :grant_write_acp, :metadata, :metadata_directive, :tagging_directive, :server_side_encryption, :storage_class, :website_redirect_location, :sse_customer_algorithm, :sse_customer_key, :sse_customer_key_md5, :ssekms_key_id, :copy_source_sse_customer_algorithm, :copy_source_sse_customer_key, :copy_source_sse_customer_key_md5, :request_payer, :tagging, :use_accelerate_endpoint]
Aws.config.update({
region: 'us-east-1',
credentials: Aws::Credentials.new(AWS_ACCESS_KEY, AWS_SECRET_KEY)
@jed
jed / LICENSE.txt
Created May 20, 2011 13:27 — forked from 140bytes/LICENSE.txt
generate random UUIDs
DO WHAT THE FUCK YOU WANT TO PUBLIC LICENSE
Version 2, December 2004
Copyright (C) 2011 Jed Schmidt <http://jed.is>
Everyone is permitted to copy and distribute verbatim or modified
copies of this license document, and changing it is allowed as long
as the name is changed.
DO WHAT THE FUCK YOU WANT TO PUBLIC LICENSE