Skip to content

Instantly share code, notes, and snippets.

Sathish Manohar sathishmanohar

Block or report user

Report or block sathishmanohar

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
View Login to Mysql 5.7 + in command line and reset paassword
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
@sathishmanohar
sathishmanohar / find_domain
Last active Sep 26, 2018
Find .com Domain availability from terminal
View find_domain
#!/bin/bash
while [ "$name" != "exit" ]
do
# Get the Domain Name from User
echo "What domain name do you want?: [Enter]"
read name
# Check if the input is not empty or just spaces
if [[ -z "${name// }" ]]; then
View keybase.md

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:

View page.html.erb
---
sitemap_noindex: true
sitemap_priority: 0.8
---
@sathishmanohar
sathishmanohar / gist:87be77758fdc76c13950
Created Oct 16, 2015
Deploying Rails on Ubuntu 14.04 Gorails tutorial
View gist:87be77758fdc76c13950
* 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
View gist:a2ae1a8349649aaa40e3
Verifying that +sathish is my openname (Bitcoin username). https://onename.com/sathish
@sathishmanohar
sathishmanohar / deploy.rb
Created Jun 12, 2013
Capistrano Deploy Tasks
View deploy.rb
# 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 / install_passenger_nginx_digital_ocean.sh
Last active Jul 20, 2017
Steps to setup and install passenger nginx and rails on digital ocean
View install_passenger_nginx_digital_ocean.sh
# Login as root
ssh root@domain
# Create deploy user
adduser <username> #Adds User with username given. Enter Password when Prompted. Other Details are Optional
# Add user to sudo group
usermod -g <groupname> <username>
# Add .ssh/authorized_keys for deploy user
@sathishmanohar
sathishmanohar / .gitconfig
Last active Dec 16, 2015
General git aliases and some git-flow specific aliases
View .gitconfig
[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 Apr 19, 2013
Instructions to reset lost mysql root password on Ubuntu
View reset_mysql_password.sh
#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
You can’t perform that action at this time.