Skip to content

Instantly share code, notes, and snippets.

@henrydjacob
henrydjacob / centos-rails3
Created November 7, 2011 09:00
Centos - Rails 3 development environment - memcached, redis, postgres, git
root - admin123
developer - admin123
rpm -Uvh http://repo.webtatic.com/yum/centos/5/latest.rpm
yum install --enablerepo=webtatic git
sudo yum install curl
sudo su -
groupadd rvm
usermod -a -G rvm root
@henrydjacob
henrydjacob / users.yml
Created November 7, 2011 08:26
devise fixtures users.yml
user1:
email: [email protected]
encrypted_password: <%= User.new.send(:password_digest, "user123") %>
confirmed_at: <%= Time.now %>
@henrydjacob
henrydjacob / gist:776011
Created January 12, 2011 10:56
Rails 3 Deployment With Capistrano
uncomment gem 'capistrano' in Gemfile
bundle install
bundle exec capify .
set :application, "test"
set :scm, :subversion
# Or: `accurev`, `bzr`, `cvs`, `darcs`, `git`, `mercurial`, `perforce`, `subversion` or `none`
set :svn_user, ENV['svn_user'] || "default_svn_user"
@henrydjacob
henrydjacob / gist:774130
Created January 11, 2011 06:44
Setup Rails in linux (ubuntu), passenger
sudo apt-get install apache2
sudo apt-get install ruby
sudo apt-get install rubygems
sudo gem install rubygems-update
sudo update_rubygems
sudo gem install passenger
if you encounter 'extconf.rb:8:in `require’: no such file to load'
then type: sudo apt-get install ruby1.8-dev
#Useful Linux Comments
find -name mongrel*
netstat
//To remove watermark on Flex Data Visualization components
(chartComID.getChildAt(chartComID.numChildren-1) as TextField).htmlText = "";
(salesChart.getChildAt(salesChart.numChildren-1) as TextField).htmlText = "";
//retrieve XML from restfulx service update the details
var xmlOpts:Object = { URL: "people/summary_by_city.xml", method: "POST",
data: {city: 'chennai'}, unmarshall: false};
Rx.http(function(result:XML):void {
cityWiseSummary = result;
for each (var city:XML in cityWiseSummary .*) {
child['city_name'] = Rx.models.showById(City, child['city_id']);
}
}).invoke(xmlOpts);