Skip to content

Instantly share code, notes, and snippets.

View plainprogrammer's full-sized avatar

James Thompson plainprogrammer

View GitHub Profile
@plainprogrammer
plainprogrammer / S3 bulk rename script
Created July 3, 2012 18:13
This is a quick script for doing a mass copy or rename of all files in an Amazon S3 bucket.
# This is a quick script for doing a mass rename of all files in an Amazon S3 bucket.
# In this case, the rename operation was to unescape all filenames which had been
# previously escaped in error.
#############################
# Configuration:
bucketname = "YOUR_S3_BUCKET_NAME"
access_key = 'YOUR_ACCESS_KEY_ID'
secret_key = 'YOUR_SECRET_ACCESS_KEY'
audio = Audio.first
configuration = RefNetAdmin::Application.config.zencoder
id = audio.id
bucket = configuration['bucket']
base_path = configuration['base_path']
options = {
input: audio.file.url(:original),
outputs: [
---
:verbose: true
gem: --no-ri --no-rdoc
:update_sources: true
:sources:
- http://gems.rubyforge.org
:backtrace: false
:bulk_threshold: 1000
:benchmark: false
@plainprogrammer
plainprogrammer / Capfile
Created October 11, 2011 21:41
A Capfile for Node.js deployment
load 'deploy' if respond_to?(:namespace) # cap2 differentiator
##################################
# Edit these
set :application, "app_name"
set :node_file, "server.js"
set :host, "app.example.com"
set :repository, "git://github.com/example/example.git"
set :branch, "master"
set :deploy_to, "/var/apps/#{application}"
@plainprogrammer
plainprogrammer / nginx.conf
Created June 17, 2011 20:36
Orabrush Unicorn Application Server Configs
worker_processes 5;
events {
worker_connections 1024;
}
http {
include mime.types;
default_type application/octet-stream;