Skip to content

Instantly share code, notes, and snippets.

scale @ http://scale-mjelen.rhcloud.com/ (uuid: 518b75fde0b8cd5925000034)
-------------------------------------------------------------------------
Created: 12:10 PM
Gears: 1 (defaults to small)
Git URL: ssh://518b75fde0b8cd5925000034@scale-mjelen.rhcloud.com/~/git/scale.git/
SSH: 518b75fde0b8cd5925000034@scale-mjelen.rhcloud.com
php-5.3 (PHP 5.3)
-----------------
Scaling: x1 (minimum: 1, maximum: available) on small gears
@marekjelen
marekjelen / backup.sh
Created April 11, 2013 09:47
Back up PG on OpenShift
pg_dump -U $OPENSHIFT_POSTGRESQL_DB_USERNAME -h $OPENSHIFT_POSTGRESQL_DB_HOST -p $OPENSHIFT_POSTGRESQL_DB_PORT -f pg.dump $OPENSHIFT_APP_NAME
@marekjelen
marekjelen / fedora.ks
Last active December 14, 2015 02:29
Fedora KickStart
# Install, not upgrade
install
# Install from a friendly mirror and add updates
url --url=http://ftp.fi.muni.cz/pub/linux/fedora/linux/releases/19/Fedora/x86_64/os/
repo --name=updates
# Language and keyboard setup
lang en_US.UTF-8
keyboard us
@marekjelen
marekjelen / gist:4256761
Created December 11, 2012 08:11
PHP README from OpenShift
Feel free to change or remove this file, it is informational only.
Repo layout
===========
php/ - Externally exposed php code goes here
libs/ - Additional libraries
misc/ - For not-externally exposed php code
deplist.txt - list of pears to install
.openshift/action_hooks/pre_build - Script that gets run every git push before the build
.openshift/action_hooks/build - Script that gets run every git push as part of the build process (on the CI system if available)
module Mod
def modder(param=self)
@self = param
end
def log(msg)
puts "#{@self.name} => #{msg}"
end
@marekjelen
marekjelen / gist:3731919
Created September 16, 2012 10:40
OpenShift @ Ubuntu
# Resources:
#
# * http://bencord0.wordpress.com/2012/08/11/openshift/
#
# Starting with clean install of Ubuntu for start
# Update the system
apt-get update
apt-get upgrade
#!/usr/bin/env ruby
require 'rubygems'
require 'sequel'
DB = Sequel.sqlite('signups.db')
signups = []
DB[:signups].all.each do |signup|
@marekjelen
marekjelen / gist:3256675
Created August 4, 2012 10:47
New PostgreSQL on OpenShift
POSTGRESQL_VERSION="9.1.4"
# Installing DB (one-time)
cd $OPENSHIFT_DATA_DIR
wget http://ftp.postgresql.org/pub/source/v${POSTGRESQL_VERSION}/postgresql-${POSTGRESQL_VERSION}.tar.gz
tar xf postgresql-${POSTGRESQL_VERSION}.tar.gz
rm postgresql-${POSTGRESQL_VERSION}.tar.gz
CREATE TABLE pois
(
id serial NOT NULL,
name text NOT NULL,
created_at timestamp without time zone NOT NULL,
updated_at timestamp without time zone NOT NULL,
"position" geography(Point,4326),
CONSTRAINT pois_pkey PRIMARY KEY (id ),
CONSTRAINT pois_name_key UNIQUE (name )
)
Clone Thick repo (git://github.com/marekjelen/thick.git)
Install required gems (rack, rake, rspec, sinatra)
JRuby version: jruby-1.7.0.preview1
---------------------
cd thick/example
jruby ../bin/thick -R