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
Logging in with command line
============================
When password is not set with the below method. always use `sudo mysql -u root -p` for the login prompt.
Unless password is not set, login won't work without sudo
Reset password instructions here
================================
https://stackoverflow.com/questions/16556497/how-to-reset-or-change-the-mysql-root-password/51023379#51023379

Keybase proof

I hereby claim:

  • I am sathishmanohar on github.
  • I am sathishmanohar (https://keybase.io/sathishmanohar) on keybase.
  • I have a public key ASDyeiQJfafKUm0UVOSxj7wqs05bajJvkScji1DLfC5FTQo

To claim this, I am signing this object:

@sathishmanohar
sathishmanohar / page.html.erb
Created January 20, 2016 13:31
Middleman sitemap.xml generator developed from https://gist.github.com/lukebowerman/3287848
---
sitemap_noindex: true
sitemap_priority: 0.8
---
@sathishmanohar
sathishmanohar / deploy.rb
Created June 12, 2013 14:34
Capistrano Deploy Tasks
# Step 1: Add capistrano to Gemfile, then run `capify .`
# Step 2: create /public/assets directory locally
# Step 3: upload database.yml file to app_path/shared/config/database.yml on server
require 'bundler/capistrano'
require 'rvm/capistrano'
#server login details
set :application, "domain.com"
set :user, 'user'
@sathishmanohar
sathishmanohar / .gitconfig
Last active December 16, 2015 11:18
General git aliases and some git-flow specific aliases
[user]
name = Sathish Manohar
email = design.sathish@gmail.com
[core]
editor = vim
[merge]
tool = vimdiff
[color]
ui = auto
[alias]
@sathishmanohar
sathishmanohar / reset_mysql_password.sh
Created April 19, 2013 11:07
Instructions to reset lost mysql root password on Ubuntu
#Stop Mysql
sudo /etc/init.d/mysql stop
#Start Mysql in safe mode, but skip user privileges table
sudo mysqld_safe --skip-grant-tables &
#Login to mysql
mysql -u root
#Select mysql db
@sathishmanohar
sathishmanohar / gist:87be77758fdc76c13950
Created October 16, 2015 22:16
Deploying Rails on Ubuntu 14.04 Gorails tutorial
* setup nameservers with domain provider
* create droplet in digital ocean
* create new deploy user
sudo adduser deploy (adding user deploy, enter password when prompted)
adduser deploy sudo (adding user to sudo group)
su deploy (switch to deploy user)
* logout
* add ssh key to deploy user
ssh-copy-id deploy@domain.com
@sathishmanohar
sathishmanohar / setup_devise.erb
Created November 17, 2012 10:12
Instructions to setup devise
# Add devise to Gemfile
gem 'devise'
# Run bundle
bundle install
# Run devise install
rails generate devise:install
# Make sure alert code in application.html.erb
@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'