Skip to content

Instantly share code, notes, and snippets.

View kannans's full-sized avatar
💻
☝️

Kannan S kannans

💻
☝️
View GitHub Profile
@kannans
kannans / Packages for RubyonRails installation
Last active August 29, 2015 14:04
how to Install Ruby on Rails on a new Ubuntu system with all important packages
Installation steps for running Ruby On Rails.
Step 1:
Download install ubuntu system from ubuntu site.
Step 2:
Open terminal install the following requirements
SSH:
@kannans
kannans / sublime-text-3 from repository
Created July 27, 2014 05:30
HOW TO INSTALL SUBLIME TEXT 3/2 ON UBUNTU
Sublime text 3:
sudo add-apt-repository ppa:webupd8team/sublime-text-3
sudo apt-get update
sudo apt-get install sublime-text-installer
Sublime text 2:
sudo add-apt-repository ppa:webupd8team/sublime-text-2
sudo apt-get update
sudo apt-get install sublime-text
@kannans
kannans / Basic Alias Commands In Git
Last active October 8, 2015 06:02
how to create git alias shortcuts
If you dont have git just install:
sudo apt-get install git
Copy the following configuration past it in your terminal:
git config --global alias.st status
git config --global alias.ci commit
git config --global alias.br branch
git config --global alias.co checkout
git config --global alias.sta stash
@kannans
kannans / Export to Excel in Rails
Created July 29, 2014 05:24
Simple excel export in Ruby On Rails
Steps as follows
----------------
Add to gem file:
gem 'to_xls', '~> 1.0.0'
Create a renderer for xls:
config/initializers/xls_renderer.rb:
paste the following send data code:
@kannans
kannans / nginx.conf
Created August 11, 2014 10:44 — forked from eyeced/nginx.conf
upstream unicorn {
server unix:/tmp/unicorn.store.sock fail_timeout=0;
}
server {
listen 80 default deferred;
# To enable ssl on your server for checkout and admin functionality
# add this line
listen 443 ssl;
@kannans
kannans / Heroku database backup and restore in local
Last active August 29, 2015 14:05
Heroku DB backup and restore to local
Step 1: Add pg addons to heroku apps.
heroku addons:add pgbackups
Step 2: Capture db data as dump
heroku pgbackups:capture --expire
Step 3: download the dump
@kannans
kannans / EmberCli installation packages
Last active August 29, 2015 14:06
Install EmberCli on Ubuntu
Before install ember-cli need some package to install.
NPM - Node Package Manager
sudo apt-get purge nodejs npm
sudo apt-get install -y python-software-properties python g++ make software-properties-common
sudo add-apt-repository ppa:chris-lea/node.js
sudo apt-get update
sudo apt-get install nodejs
@kannans
kannans / embercli-foundationcss
Last active August 29, 2015 14:06
Install foudnation in your ember client application
In your app directory
npm install ember-cli-foundation-sass --save-dev
ember g foundation-sass
//In Brokfile.js add this
var app = new EmberApp({
'foundation-sass': {
'modernizr': true, //includes modernizer
@kannans
kannans / gist:e50d2c4ada5a53498bc4
Created October 30, 2014 05:47
Install selunium and capybara-webkit on ubuntu.
sudo apt-get install xvfb
sudo apt-get install x11-xkb-utils
sudo apt-get install xfonts-100dpi xfonts-75dpi xfonts-scalable xfonts-cyrillic
@kannans
kannans / Install Ruby On Rails In MAC OS X
Last active August 29, 2015 14:08
Install Ruby On Rails In MAC OS X
Make sure Xcode installed in your MAC
$ xcode-select -p
Configure Git
$ git config -l --global
fatal: unable to read config file '/Users/.../.gitconfig': No such file or directory
$ git config --global user.name "Your Real Name"
$ git config --global user.email [email protected]
$ git config -l --global