Skip to content

Instantly share code, notes, and snippets.

terryjray terryjray

Block or report user

Report or block terryjray

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
@terryjray
terryjray / proxy apache for jboss
Last active Mar 13, 2017
Configuring mod_proxy on apache for JBoss on CentOS 6.4
View proxy apache for jboss
# add or un-comment these mods in the /etc/httpd/conf/httpd.conf
ProxyRequests Off
ProxyPreserveHost On
<Proxy *>
Order deny,allow
Allow from all
</Proxy>
@terryjray
terryjray / gist:3296171
Created Aug 8, 2012
Enabling hstore for new postgresql 9.1 and rails 3 install on ubuntu 12.04
View gist:3296171
RAILS_ENV=production rake db:setup
# produces the error below.....hmmm.....it's a no-worky
psql:/yourprojectpath/yourproject/db/structure.sql:29: ERROR: could not open extension control file "/usr/share/postgresql/9.1/extension/hstore.control": No such file or directory
# hstore postgresql extension needs to be installed, so....
sudo apt-get install postgresql-contrib
# now your extension should be available to enable so log in with psql
psql -d yourproject_production -U yourdbuser -W
@terryjray
terryjray / product.rb
Created Jul 17, 2012
Postgres Full Text Search with hstore in Rails 3
View product.rb
class Product < ActiveRecord::Base
# our hstore column, make sure gem 'activerecord-postgres-hstore' is in your Gemfile
# and you've run: rails g hstore:setup
serialize :data, ActiveRecord::Coders::Hstore
# name is a string col
attr_accessible :data, :name
def self.search(query)
You can’t perform that action at this time.