Skip to content

Instantly share code, notes, and snippets.

View solutelabs-savan's full-sized avatar

Savan Raval solutelabs-savan

  • India
View GitHub Profile
@solutelabs-savan
solutelabs-savan / devise.rb
Last active September 5, 2019 11:20
Create Sign In / Sign Out API using Devise
# Find this line config.navigational_formats = ['*/*', :html] in devise.rb file and replace it with this line inorder to accept JSON request and give JSON response.
config.navigational_formats = ["*/*", :html, :json]
@solutelabs-savan
solutelabs-savan / README.rb
Last active May 11, 2016 09:15
Work with 2R combinations - Rails & Redis
Install Redis on ubuntu first
1) Add PPA
$ sudo add-apt-repository ppa:chris-lea/redis-server
Press ENTER to accept the repository.
2) Run the following command to update our packages:
$ sudo apt-get update
3) Install the Redis server:
$ sudo apt-get install redis-server
4) Check that Redis is up and running:
$ redis-benchmark -q -n 1000 -c 10 -P 5