Skip to content

Instantly share code, notes, and snippets.

Atul Khanduri AtulKsol

Block or report user

Report or block AtulKsol

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
AtulKsol /
Created Oct 17, 2019
ElasticSearch Commands for Mac

Install using Homebrew:

brew tap elastic/tap # Tap elastic 
brew search elasticsearch # Will show available versions
brew install elasticsearch@2.4 # install specific version

Start ElasticSearch Server

brew services start elasticsearch@5.6

AtulKsol /
Last active Oct 17, 2019
Postgres on OSX with homebrew not running

Postgres on OSX with homebrew not running [tested in mac]

Fix for following issue:

$ psql
psql: could not connect to server: No such file or directory
	Is the server running locally and accepting
	connections on Unix domain socket "/tmp/.s.PGSQL.5432"?
AtulKsol / memory_monitor.rb
Created Jun 25, 2018
Log Memory usage for each request
View memory_monitor.rb
module MemoryMonitor
def log_memory_usage
AtulKsol /
Last active Nov 3, 2017
Commands to backup & restore database
  1. pg_dump is a nifty utility designed to output a series of SQL statements that describes the schema and data of your database. You can control what goes into your backup by using additional flags.
    Backup: pg_dump -h localhost -p 5432 -U postgres -d mydb > backup.sql

    Restore: psql -h localhost -p 5432 -U postgres -d mydb < backup.sql

    -h is for host.
    -p is for port.
    -U is for username.
    -d is for database.

AtulKsol /
Created Jul 7, 2017
Docker Sync commands
AtulKsol /
Created Jun 5, 2017 — forked from jexchan/
Multiple SSH keys for different github accounts

Multiple SSH Keys settings for different github account

create different public key

create different ssh key according the article Mac Set-Up Git

$ ssh-keygen -t rsa -C ""
AtulKsol / sublime-setting.json
Created Jan 18, 2017
Sublime user settings
View sublime-setting.json
"font_size": 9,
"tab_size": 2,
"translate_tabs_to_spaces": true,
"word_wrap": true,
AtulKsol / Dockerfile
Created Dec 27, 2016 — forked from renatosousafilho/Dockerfile
Deploy com Mina, Docker e Docker Compose
View Dockerfile
FROM rails:4.2.3
MAINTAINER Renato Filho <>
ENV HOME /home/app
ENV RAILS_ENV development
RUN useradd -m -s /bin/bash app
RUN gem install -N bundler
AtulKsol /
Created Dec 25, 2016 — forked from maxim/
How to use rails load paths, app, and lib directories.

In Rails 3

NOTE: This post now lives (and kept up to date) on my blog:

If you add a dir directly under app/

Do nothing. All files in this dir are eager loaded in production and lazy loaded in development by default.

If you add a dir under app/something/

You can’t perform that action at this time.