Skip to content

Instantly share code, notes, and snippets.

View sathishmanohar's full-sized avatar

Sathish Manohar sathishmanohar

View GitHub Profile
@sathishmanohar
sathishmanohar / _vimrc
Created November 19, 2010 06:45
Gvim Configuration File
set nocompatible
source $VIMRUNTIME/vimrc_example.vim
source $VIMRUNTIME/mswin.vim
behave mswin
filetype plugin on
filetype indent on
" Sathish: Following lines set line numbers in all files
set number
@sathishmanohar
sathishmanohar / Eric Meyer CSS Reset Improved.css
Created February 12, 2011 10:37
Made a few Manual Changes to Eric Meyer Reset
/* http://meyerweb.com/eric/tools/css/reset/
v2.0 | 20110126
License: none (public domain)
*/
html, body, div, span, applet, object, iframe,
h1, h2, h3, h4, h5, h6, p, blockquote, pre,
a, abbr, acronym, address, big, cite, code,
del, dfn, em, img, ins, kbd, q, s, samp,
small, strike, strong, sub, sup, tt, var,
@sathishmanohar
sathishmanohar / gist:825672
Created February 14, 2011 09:49
How to Install LAMP on Ubuntu
sudo apt-get install apache2
Restart apache server > > sudo /etc/init.d/apache2 restart
sudo apt-get install php5 libapache2-mod-php5
Restart apache server > > sudo /etc/init.d/apache2 restart
sudo apt-get install mysql-server libapache2-mod-auth-mysql php5-mysql
@sathishmanohar
sathishmanohar / gist:1209649
Created September 11, 2011 14:23
Basic User Commands Linux
adduser <username> #Adds User with username given. Enter Password when Prompted. Other Details are Optional
usermod -g <groupname> <username> #Adds Existing <username> to **<groupname>** and removes all other memberships of <username>
usermod -G <groupname> <username> #Adds Existing <username> to **Secondary** Group sales and keeps his existing memberships
usermod -G group1,group2 <username> #Add user to group2, but keep his existing membership of group1 when manually entered
userdel <username> #deletes user account with <username>
@sathishmanohar
sathishmanohar / gist:1211102
Created September 12, 2011 11:59
Install Passenger
gem install passenger #Install Passenger Gem First
sudo passenger-install-apache2-module #walks you through the installation of apache2 module
paste the apache config lines into /etc/apache2/httpd.conf #these lines are shown during apache2 module installation
paste virtual host line inside apache conf #these lines are also shown during apache2 module installation
# If theres error encountered during apache restart add "ServerName localhost" (without quotes) outside of virtual host tag
@sathishmanohar
sathishmanohar / recover_grub_2.sh
Created May 21, 2012 17:15
Recovering GRUB 2 Boot Loader - Steps and Instructions
# This is text format of the instructions shown in the below Youtube video
# http://www.youtube.com/watch?v=ajs9rO5upZA
# First get a ubuntu Live CD or USB Stick and boot from it
# Check all the Hard disk and Partitions using following command
sudo fdisk -l # Now take a note of the partition, on which linux is installed which may be like: /dev/sda1
# 3. Mount the partition where you need to install GRUB 2 (Hard disk partition)
# Now the file system appears in nautaulis and command line is not file system of Hard disk
@sathishmanohar
sathishmanohar / gist:2818108
Created May 28, 2012 09:20
Set Default Shell Editors to VIM
# Check Present editors
echo $GIT_EDITOR $VISUAL $EDITOR
# Now set all editors to VIM
export GIT_EDITOR=vim
export EDITOR=vim
export VISUAL=vim
@sathishmanohar
sathishmanohar / deploy.rb
Created August 3, 2012 20:24
capistrano basic deploy file, tested with amazon ec2
# cd into_project
# Add Following Contents to the Gemfile
# gem 'capistrano'
# gem 'rvm-capistrano'
# run capify .
# Use the generated config/deploy.rb and populate/customize it with below content
require 'bundler/capistrano'
require 'rvm/capistrano'
@sathishmanohar
sathishmanohar / rails_app_advanced_setup
Created October 13, 2012 13:44
Advanced Setup for New Rails App - Shamelessly copied from Michael Hartl
# Create Rails app and skip-bundle and Test Framework creation and specifiy database
rails new app_name -T -d mysql --skip-bundle
# Copy appropriate Gemfile
# Add necessary Gems to Gemfile then run `bundle install`
bundle install
# Then init Guard
bundle exec guard init rspec
@sathishmanohar
sathishmanohar / Gemfile.rb
Created October 13, 2012 14:02
Gemfile Skeleton for My Projects
source 'https://rubygems.org'
gem 'rails', '3.2.8'
gem 'bootstrap-sass', '2.0.4'
gem 'bcrypt-ruby', '3.0.1'
gem 'faker', '1.0.1'
gem 'will_paginate', '3.0.3'
gem 'bootstrap-will_paginate', '0.0.6'
gem 'jquery-rails', '2.0.2'