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
curl -O http://python-distribute.org/distribute_setup.py | |
/usr/bin/python2.6 distribute_setup.py |
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
cd /tmp | |
# fix pip | |
curl -O https://raw.github.com/pypa/pip/master/contrib/get-pip.py | |
sudo python /tmp/get-pip.py | |
# Fix setuptools | |
# Download the appropriate .egg from here: http://pypi.python.org/pypi/setuptools | |
curl -O http://pypi.python.org/packages/2.7/s/setuptools/setuptools-0.6c11-py2.7.egg#md5=fe1f997bc722265116870bc7919059ea | |
sudo python /tmp/setuptools-0.6c11-py2.7.egg |
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
108-166-96-237.static.cloud-ips.com [Mon, 26 Mar 2012 17:53:32 +0000] ERROR: Running exception handlers | |
108-166-96-237.static.cloud-ips.com [Mon, 26 Mar 2012 17:53:32 +0000] FATAL: Saving node information to /var/chef/cache/failed-run-data.json | |
108-166-96-237.static.cloud-ips.com [Mon, 26 Mar 2012 17:53:32 +0000] ERROR: Exception handlers complete | |
108-166-96-237.static.cloud-ips.com [Mon, 26 Mar 2012 17:53:32 +0000] FATAL: Stacktrace dumped to /var/chef/cache/chef-stacktrace.out | |
108-166-96-237.static.cloud-ips.com [Mon, 26 Mar 2012 17:53:32 +0000] FATAL: RuntimeError: Could not locate the chef-client bin in any known path. Please set the proper path by overriding node['chef_client']['bin'] in a role. |
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
108-166-96-237.static.cloud-ips.com GET http://rubygems.org/latest_specs.4.8.gz | |
108-166-96-237.static.cloud-ips.com 302 Moved Temporarily | |
108-166-96-237.static.cloud-ips.com GET http://production.s3.rubygems.org/latest_specs.4.8.gz | |
108-166-96-237.static.cloud-ips.com 200 OK | |
108-166-96-237.static.cloud-ips.com GET http://rubygems.org/quick/Marshal.4.8/ohai-0.6.12.gemspec.rz | |
108-166-96-237.static.cloud-ips.com 302 Moved Temporarily | |
108-166-96-237.static.cloud-ips.com GET http://production.cf.rubygems.org/quick/Marshal.4.8/ohai-0.6.12.gemspec.rz | |
108-166-96-237.static.cloud-ips.com 200 OK | |
108-166-96-237.static.cloud-ips.com GET http://rubygems.org/quick/Marshal.4.8/systemu-2.5.0.gemspec.rz | |
108-166-96-237.static.cloud-ips.com 302 Moved Temporarily |
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
cat /var/chef/cache/chef-stacktrace.out | |
Generated at Mon Mar 26 17:53:32 +0000 2012 | |
RuntimeError: Could not locate the chef-client bin in any known path. Please set the proper path by overriding node['chef_client']['bin'] in a role. | |
/var/chef/cache/cookbooks/chef-client/recipes/service.rb:38:in `from_file' | |
/opt/ruby-enterprise/lib/ruby/gems/1.8/gems/chef-0.10.8/bin/../lib/chef/cookbook_version.rb:578:in `load_recipe' | |
/opt/ruby-enterprise/lib/ruby/gems/1.8/gems/chef-0.10.8/bin/../lib/chef/mixin/language_include_recipe.rb:40:in `include_recipe' | |
/opt/ruby-enterprise/lib/ruby/gems/1.8/gems/chef-0.10.8/bin/../lib/chef/mixin/language_include_recipe.rb:27:in `each' | |
/opt/ruby-enterprise/lib/ruby/gems/1.8/gems/chef-0.10.8/bin/../lib/chef/mixin/language_include_recipe.rb:27:in `include_recipe' | |
/var/chef/cache/cookbooks/chef-client/recipes/default.rb:20:in `from_file' | |
/opt/ruby-enterprise/lib/ruby/gems/1.8/gems/chef-0.10.8/bin/../lib/chef/cookbook_version.rb:578:in `load_recipe' |
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
Python 2.6.1 (r261:67515, Jun 24 2010, 21:47:49) | |
[GCC 4.2.1 (Apple Inc. build 5646)] on darwin | |
Type "help", "copyright", "credits" or "license" for more information. | |
>>> a = {1:1} | |
>>> b = {2:2} | |
>>> dict(a, **b) | |
{1: 1, 2: 2} |
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
# the initializer | |
CarrierWave.configure do |config| | |
config.storage = :file | |
config.root = Rails.root.join('public') | |
config.cache_dir = Rails.root.join('tmp/uploads') | |
config.enable_processing = false | |
end | |
# the uploader |
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
# /Users/didip/.rvm/rubies/ree-1.8.7-2010.02/lib/ruby/1.8/fileutils.rb:1263:in `initialize' | |
# /Users/didip/.rvm/rubies/ree-1.8.7-2010.02/lib/ruby/1.8/fileutils.rb:1263:in `open' | |
# /Users/didip/.rvm/rubies/ree-1.8.7-2010.02/lib/ruby/1.8/fileutils.rb:1263:in `copy_file' | |
# /Users/didip/.rvm/rubies/ree-1.8.7-2010.02/lib/ruby/1.8/fileutils.rb:1262:in `open' | |
# /Users/didip/.rvm/rubies/ree-1.8.7-2010.02/lib/ruby/1.8/fileutils.rb:1262:in `copy_file' | |
# /Users/didip/.rvm/rubies/ree-1.8.7-2010.02/lib/ruby/1.8/fileutils.rb:463:in `copy_file' | |
# /Users/didip/.rvm/rubies/ree-1.8.7-2010.02/lib/ruby/1.8/fileutils.rb:383:in `cp' | |
# /Users/didip/.rvm/rubies/ree-1.8.7-2010.02/lib/ruby/1.8/fileutils.rb:1396:in `fu_each_src_dest' | |
# /Users/didip/.rvm/rubies/ree-1.8.7-2010.02/lib/ruby/1.8/fileutils.rb:1412:in `fu_each_src_dest0' | |
# /Users/didip/.rvm/rubies/ree-1.8.7-2010.02/lib/ruby/1.8/fileutils.rb:1394:in `fu_each_src_dest' |
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
#!/bin/bash | |
# | |
# Usage: ./supervisor-rolling-restart [supervised-process-name] | |
# | |
PROGRAM=$1 | |
# Time in seconds. | |
TIME_BETWEEN_RUNNING_CHECKS=0.5 | |
TIME_BETWEEN_RESTARTS=1 |
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
#!/usr/bin/env python | |
from __future__ import with_statement | |
import os, os.path, sys | |
import simplejson as json | |
import urllib2 | |
from distutils.version import StrictVersion | |
def pad_spaces(str_, length=18): | |
return str_ + ' ' * (length - len(str_)) |