Skip to content

Instantly share code, notes, and snippets.

@calavera
calavera / README.md
Created February 28, 2012 18:02 — forked from fnichol/README.md
Vagrantify: Create a chef-solo enabled Vagrant virtual machine for development

Installation

gem install thor
mkdir -p ~/vagrants && cd ~/vagrants
curl -LO https://raw.github.com/gist/1528832/vagrantify
chmod 755 vagrantify

Usage

./vagrantify init webserver

class_paths = [
"./jars/commons-lang-2.1.jar",
"./jars/oscar4-all-4.1-with-dependencies.jar",
]
for class_path in class_paths
require class_path
end
require 'minitest/unit'
require 'celluloid'
module MiniTest
module Celluloid
class Runner < MiniTest::Unit
def _run_suites(suites, type)
futures = suites.map do |suite|
::Celluloid::Future.new { _run_suite suite, type }
---
http:
maxThreads: 1
@calavera
calavera / gist:1522343
Created December 27, 2011 00:30 — forked from headius/gist:1234935
OS X 'pickjdk' command with single-command selection and updated JDK location
#!/bin/bash
#
# Provides a function that allows you to choose a JDK. Just set the environment
# variable JDKS_ROOT to the directory containing multiple versions of the JDK
# and the function will prompt you to select one. JAVA_HOME and PATH will be cleaned
# up and set appropriately.
_macosx()
{
if [ $(uname -s) = Darwin ]; then
  1. Sign up in cloud.engineyard.com
  2. Write your application
  3. Push it to Github
  4. Install ey_cli with:
gem install ey_cli
  1. Run under the app directory:
ey_cli create_app
  1. Write your application
  2. Push it to Github
  3. Install ey_cli with
gem install ey_cli
  1. Run under the app directory
ey_cli create_app
$ gem push engineyard-serverside-1.4.3.gem
Pushing gem to https://rubygems.org...
<!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML 2.0//EN">
<html><head>
<title>500 Internal Server Error</title>
</head><body>
<h1>Internal Server Error</h1>
<p>The server encountered an internal error or
misconfiguration and was unable to complete
your request.</p>
  1. Grab the latest image from http://code.google.com/p/openjdk-osx-build/ and install
  2. Exec:
cd /System/Library/Frameworks/JavaVM.framework/Versions/
ln -s /Library/Java/JavaVirtualMachines/1.7.0.jdk/Contents 1.7.0
  1. Use the script bellow to change from JVMs, ie:
@calavera
calavera / gist:1172285
Created August 25, 2011 23:15
Java on Engine Yard's cloud

EXPERIMENTAL AND UNOFFICIAL, don't expect support of any type from Engine Yard on this. This is just a crazy idea that came to my mind a few weeks ago.

Application configuration

  1. Compile the java web application and create an "exploded" war file with any tool you like better, if you use maven you can run "mvn war:exploded".
  2. Create a git repository for your exploded web application and push the compiled code.
  3. Add those files to the root of your repository:
  4. Go to Engine Yard AppCloud's dashboard and press the button "Create New Application", add the git url for your repository, select "Rack" as application type and submit the form.