Skip to content

Instantly share code, notes, and snippets.

View saikiranmothe's full-sized avatar

Sai Kiran Mothe saikiranmothe

  • Qwinix Technologies
  • Denver
View GitHub Profile
@saikiranmothe
saikiranmothe / postgresql_instalation_ubuntu
Created August 29, 2013 19:21
POSTGRESQL INSTALLATION ON UBUNTU
PostgreSQL
# Install the database packages
sudo apt-get install -y postgresql-9.1 libpq-dev
# Login to PostgreSQL
sudo -u postgres psql -d template1
# Create a user for GitLab. (change $password to a real password)
template1=# CREATE USER git WITH PASSWORD '$password';
@saikiranmothe
saikiranmothe / .gitignore.txt
Created August 16, 2013 12:51
gitignore.txt
#----------------------------------------------------------------------------
# Ignore these files when commiting to a git repository.
#
# See http://help.github.com/ignore-files/ for more about ignoring files.
#
#----------------------------------------------------------------------------
# bundler state
/.bundle
/vendor/bundle/
@saikiranmothe
saikiranmothe / spree_application_template.rb
Created August 16, 2013 05:51
Spree Installation -- Spree Application Template
require 'rbconfig'
require 'open-uri'
gsub_file 'Gemfile', "gem 'jquery-rails'", "gem 'jquery-rails', '~> 2.2.1'"
gsub_file 'Gemfile', "# gem 'therubyracer', :platforms => :ruby", "gem 'therubyracer', :platforms => :ruby"
if File.read("#{destination_root}/Gemfile") !~ /assets.+coffee-rails/m
gem "coffee-rails", :group => :assets
end
@saikiranmothe
saikiranmothe / will_paginate_ajaxify.md
Created August 14, 2013 13:51
Pagination with Ajax in Rails Application
Develop pagination with ajax in Rails Application.

Gem Used for pagination


Add gem in Gemfile

@saikiranmothe
saikiranmothe / blog_template.rb
Last active December 21, 2015 01:38
blog_temaplte - rails application template
run "rm public/index.html"
add_source "https://rubygems.org"
require 'rbconfig'
require 'open-uri'
require 'net/http'
gsub_file 'Gemfile', "gem 'jquery-rails'", "gem 'jquery-rails', '~> 2.0'"
gem 'devise'
gem 'activeadmin'
@saikiranmothe
saikiranmothe / rails4_spree_template.rb
Last active August 29, 2015 14:07
rails4_spree_template.rb
require 'rbconfig'
require 'open-uri'
#creating some sample files
create_file '.ruby-version'
create_file '.rbenv-gemsets'
create_file 'app/assets/images/logo/spree_50.png'
#insert ruby version to .ruby-version/rbenv version file
insert_into_file ".ruby-version" ,:after => "" do
https://github.com/martyychang/heroku-connect-demo
- 3 min video reviewing data passing through Heroku Connect to Force.com: https://www.youtube.com/watch?v=yjLsOaYuc_o
https://devcenter.heroku.com/articles/herokuconnect#using-heroku-connect-and-the-demo-rails-app
Heroku Connect is currently in limited availability. Please contact your Heroku sales representative for information on access and purchase or tell us about your project and we’ll be in touch.
https://github.com/heavysixer/Tableau-Trusted-Interface-Example
@saikiranmothe
saikiranmothe / reset_mysql_password
Created July 11, 2014 04:38
reset_mysql_password
sudo dpkg-reconfigure mysql-server-5.1
ssh -i /path/to/private-key ubuntu@<ec2-public-dns-address>
ssh -i /path/to/private-key username@serverip