This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
s3 = AWS::S3.new | |
bucket = s3.buckets['my_bucket'] | |
# To duplicate an object within a bucket on S3 | |
source_key = 'temp/file.txt' | |
destination_key = 'final/file.txt' | |
options = {:acl => :public_read} # use this to set the read permissions of the new object | |
bucket.objects[destination_key].copy_from(source_key, options) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# serve original video or encoded versions if the encoding job is complete | |
# using mutiple sources inside the <video> tag | |
<% orig = upload.direct_upload_url %> | |
<% mp4 = webm = jpg = nil %> | |
<% if upload.encode_is_complete %> | |
<% orig = nil %> | |
<% mp4 = upload.base_url + '.mp4' %> | |
<% webm = upload.base_url + '.webm' %> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Create a CentOS 6.4 x64 droplet with minimal spec | |
# SSH in to new droplet | |
# Install ATRPMS Repository | |
rpm --import http://packages.atrpms.net/RPM-GPG-KEY.atrpms | |
rpm -ivh http://dl.atrpms.net/all/atrpms-repo-6-7.el6.x86_64.rpm | |
# Install FFMPEG |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Warning: Unbrewed header files were found in /usr/local/include. | |
If you didn't put them there on purpose they could cause problems when | |
building Homebrew formulae, and may need to be deleted. | |
Unexpected header files: | |
/usr/local/include/node/android-ifaddrs.h | |
/usr/local/include/node/ares.h | |
/usr/local/include/node/ares_build.h | |
/usr/local/include/node/ares_rules.h | |
/usr/local/include/node/ares_version.h |