Skip to content

Instantly share code, notes, and snippets.

View vishalzambre's full-sized avatar
🏠
Working Remotely

Vishal Zambre vishalzambre

🏠
Working Remotely
View GitHub Profile
begin
require 'bundler/inline'
rescue LoadError => e
$stderr.puts 'Bundler version 1.10 or later is required. Please update your Bundler'
raise e
end
gemfile(true) do
source 'https://rubygems.org'
# Activate the gem you are reporting the issue against.
@vishalzambre
vishalzambre / sublime-settings
Created June 15, 2015 07:08
sublime user setting
{
"color_scheme": "Packages/Color Scheme - Default/Monokai.tmTheme",
"draw_white_space": "all",
"enable_tab_scrolling": false,
"font_size": 18,
"ignored_packages":
[
"Vintage"
],
"margin": 2,
@vishalzambre
vishalzambre / pre_push
Created May 29, 2015 11:29
Git: Prevent pushing to master
# For any repository you want to protect, you need to create a new file called pre-push in the .git/hooks directory.
# Also check that the pre-push file is executable (run chmod +x .git/hooks/pre-push on the command line) and try again :)
# Add following code snippets to $YOUR_REPO/.git/hooks/pre-push file
# Then run chmod +x $YOUR_REPO/.git/hooks/pre-push
#!/bin/bash
PROTECTED_BRANCH='master'
@vishalzambre
vishalzambre / curl.sh
Last active October 2, 2021 02:30
Using devise gem sign_in & sign_out API's with sessions
#login
curl -v -H "Accept: application/json" -H "Content-type: application/json" -X POST -d ' {"user":{"email":"<email>","password":"<passwd>"}}' http://localhost:3000/api/v1/sign_in.json
#logout
curl -v -H "Accept: application/json" -H "Content-type: application/json" -X DELETE http://localhost:3000/api/v1/sign_out.json?auth_token=<token>