This file contains hidden or 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 $OPENSHIFT_DATA_DIR | |
$ mkdir temp | |
$ export GEM_HOME="${OPENSHIFT_DATA_DIR}temp" | |
$ export GEM_PATH="${OPENSHIFT_DATA_DIR}temp" | |
$ gem install rmagick | |
Building native extensions. This could take a while... | |
Successfully installed rmagick-2.13.1 | |
1 gem installed | |
$ |
This file contains hidden or 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
- description: Provide a description of command you need to run and have it run | |
command: sleep 1; echo "a"; sleep 2; echo "b" | |
clear: true | |
- description: And when the program failes, you will be notified | |
command: exit 1 |
This file contains hidden or 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
require 'erb' | |
i = 5 | |
template = ERB.new('<%= i %>') | |
template.result(binding) | |
# => "5" |
This file contains hidden or 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
# ==== .openshift/action_hooks/start | |
cd ${OPENSHIFT_DATA_DIR} | |
ENV=${OPENSHIFT_DATA_DIR}env | |
PATH=$ENV/bin:$PATH | |
if [ ! -d "$ENV" ]; then | |
mkdir $ENV |
This file contains hidden or 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
<repositories> | |
<repository> | |
<id>rubygems-proxy</id> | |
<name>Rubygems Proxy</name> | |
<url>http://rubygems-proxy.torquebox.org/releases</url> | |
<layout>default</layout> | |
</repository> | |
</repositories> |
This file contains hidden or 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/env ruby | |
require 'erb' | |
result = ERB.new(File.read(File.expand_path('../nginx.template', __FILE__))).result(binding) | |
File.open(File.join(ENV['OPENSHIFT_TMP_DIR'], 'env', 'conf', 'nginx.conf'), 'w') do |file| | |
file.write(result) | |
end |
This file contains hidden or 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
[1186, 3128, 3306, 3528, 3529, 4447, 4712, 4713, 5432, 5445, 5455, 7600, 8118, 8123, 8255, 8389, 8787, 9123, 9352, 9353, 9374, 9472, 9923, 9926, 9949, 9950, 9990, 9996, 9999, 10001, 10002, 10003, 10004, 10005, 10006, 10007, 10008, 10009, 10010, 10715, 10716, 10717, 14170, 14171, 14248, 15000-35530, 60417, 63132-63164] |
This file contains hidden or 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
require 'sinatra/base' | |
class Application < Sinatra::Base | |
get '/' do | |
'Hello from Sinatra' | |
end | |
end |
This file contains hidden or 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
require 'socket' | |
s = TCPSocket.new ENV['OPENSHIFT_INTERNAL_IP'], 8080 | |
while l = s.gets | |
puts l | |
end | |
s.close |
This file contains hidden or 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
Dead ;) | |
uninitialized constant Rack::Protection | |
org/jruby/RubyModule.java:2642:in `const_missing' | |
/Users/marek/.rbenv/versions/jruby-1.6.7/lib/ruby/gems/1.8/gems/rack-protection-1.2.0/lib/rack/protection.rb:23:in `new' | |
org/jruby/RubyBasicObject.java:1730:in `instance_eval' | |
/Users/marek/.rbenv/versions/jruby-1.6.7/lib/ruby/gems/1.8/gems/rack-1.4.1/lib/rack/builder.rb:51:in `initialize' | |
/Users/marek/.rbenv/versions/jruby-1.6.7/lib/ruby/gems/1.8/gems/rack-protection-1.2.0/lib/rack/protection.rb:22:in `new' | |
/Users/marek/.rbenv/versions/jruby-1.6.7/lib/ruby/gems/1.8/gems/rack-1.4.1/lib/rack/builder.rb:82:in `use' |