Skip to content

Instantly share code, notes, and snippets.

@jcode
jcode / gist:5c7df5f8a5c2512a7a8b
Last active August 29, 2015 14:05
Ubuntu 14.04 - Ruby 2.1.2
apt-get update
apt-get dist-upgrade -y
apt-get install git-core curl zlib1g-dev build-essential libssl-dev libreadline-dev libyaml-dev libsqlite3-dev sqlite3 libxml2-dev libxslt1-dev libcurl4-openssl-dev python-software-properties -y
cd
wget http://ftp.ruby-lang.org/pub/ruby/2.1/ruby-2.1.2.tar.gz
tar -xzvf ruby-2.1.2.tar.gz
cd ruby-2.1.2/
./configure
@jcode
jcode / gist:6061735
Created July 23, 2013 11:41
Torquebox 3.0.0.beta1 error
Booting AS7 from configuration /home/tonio/.rvm/gems/jruby-1.7.4@example/gems/torquebox-server-3.0.0.beta1-java/jboss/standalone/configuration/standalone.xml
/home/tonio/.rvm/gems/jruby-1.7.4@example/gems/torquebox-server-3.0.0.beta1-java/jboss/bin/standalone.sh -Djruby.home=/home/tonio/.rvm/rubies/jruby-1.7.4 --server-config=standalone.xml -Dhttp.port=3000
JAVA_OPTS already set in environment; overriding default settings with values: -Xms64m -Xmx512m -XX:MaxPermSize=256m -Djava.net.preferIPv4Stack=true -Djboss.modules.system.pkgs=org.jboss.byteman -Djava.awt.headless=true
=========================================================================
JBoss Bootstrap Environment
JBOSS_HOME: /home/tonio/.rvm/gems/jruby-1.7.4@example/gems/torquebox-server-3.0.0.beta1-java/jboss
JAVA: java
@jcode
jcode / gist:4137015
Created November 23, 2012 19:47
Liquid Example #1
45: <img src="/assets/admin/theme_mentor.png" />
46: </div>
47: <div id="current-theme-desc">
48: <p><%= sanitize(@site.current_theme.description) %></p>
49: <span class="meta-info"><%= raw t('admin.customization.themes.last_modificated') %>
50: : <%= time_ago_in_words(@themeship.updated_at) %></span>
51: <%= link_to t('admin.customization.themes.gallery'), main_app.list_customization_themes_path() %>
@jcode
jcode / gist:3869055
Created October 10, 2012 22:54
Apache2 Reverse Proxy
a2enmod proxy
a2enmod proxy_http
...in the virtualhost add this lines...
ProxyPreserveHost On
ProxyRequests off
ProxyPass / http://192.168.1.193/
ProxyPassReverse / http://192.168.1.193/
## Base system
apt-get update
apt-get install zlib1g-dev build-essential -y
apt-get install git-core -y
apt-get install libv8-dev -y
apt-get install apt-get install libreadline5-dev libncurses5-dev -y
apt-get install build-essential libxslt1-dev libxml2-dev imagemagick libmagickcore-dev libmysqlclient-dev -y
apt-get install libcurl4-openssl-dev libssl-dev libopenssl-ruby libapr1-dev libaprutil1-dev -y
@jcode
jcode / Debian-Ubuntu Ruby 1.9.3-p194 download compilation with dependencies
Created June 12, 2012 14:21
Debian-Ubuntu Ruby 1.9.3-p194 download & compilation with dependencies
## Base system
apt-get update
apt-get install zlib1g-dev -y
apt-get install mysql-client -y
apt-get install libv8-dev -y
apt-get install build-essential -y
apt-get install libxslt1-dev -y
apt-get install libxml2-dev -y
apt-get install imagemagick -y
@jcode
jcode / Ruby 1.9.3p0 with Psych
Created February 19, 2012 11:07
Ruby 1.9.3p0 with Psych install
wget http://pyyaml.org/download/libyaml/yaml-0.1.4.tar.gz
tar xzvf yaml-0.1.4.tar.gz
cd yaml-0.1.4
./configure --prefix=/usr/local
make
make install
wget http://ftp.ruby-lang.org/pub/ruby/1.9/ruby-1.9.3-p0.tar.gz
tar xzvf ruby-1.9.3-p0.tar.gz
cd ruby-1.9.3-p0
@jcode
jcode / Capistrano
Created January 27, 2012 22:14
Capistrano
set :application, "myapp"
set :deploy_via, :remote_cache
set :deploy_to, "/var/rails/#{application}"
set :keep_releases, 2
set :branch, "master"
set :use_sudo, false
role :app, "mydomain.com"
role :db, "mydomain.com", :primary => true
@jcode
jcode / Apache2 VirtualHost
Created January 27, 2012 22:12
Apache2 VirtualHost
# override /etc/init.d/apache2/sites_enabled/000-default
NameVirtualHost *
# For each virtual host
<VirtualHost *>
ServerName mydomain.com
ServerAlias x.mydomain.com y.mydomain.com *.otherdomain.net
set :application, "deliverit"
set :repository, "https://jcode.svn.beanstalkapp.com/homero/branches/deliverit/"
set :deploy_via, :remote_cache
set :use_sudo, false
set :user, "root"
set :deploy_to, "/var/rails/#{application}"
set :scm, :subversion
set :keep_releases, 2