Skip to content

Instantly share code, notes, and snippets.

Deleting Branch in remote and reflect the same in local

git update-ref -d refs/notes/origin/commits

Removing the initial commit from git

git update-ref -d HEAD

Adding sublime as git config editor

git config --global core.editor "subl -n -w"

@rajbharath
rajbharath / rails_gems.md
Last active November 1, 2015 18:05
Rails Gems I cam across
http://weblogs.asp.net/dwahlin/creating-a-typescript-workflow-with-gulp
@rajbharath
rajbharath / psql_commands.md
Last active August 29, 2015 14:26
PSQL Commands

list of databases in a Postgresql:

  • \l

list of all the tables in a Postgresql database:

  • \d

turn on timing, and checking how much time a query takes to execute:

  • \timing

list of available functions:

@rajbharath
rajbharath / rails_openssl
Created July 2, 2015 07:09
Rails Openssl issue
step1:
uninstall rvm
step2:
delete .rvm folder
step3:
brew reinstall openssl
step4:
@rajbharath
rajbharath / Resume_Problem
Created June 30, 2015 05:44
Resume Difficulties
1. Yrs of experience should be obvious
@rajbharath
rajbharath / Postman UUID
Created June 26, 2015 13:11
How to create UUID in postman rest client
{{$guid}}
the above variable will generate UUID in Postman Rest Client
Sample request is below
========================
{
"user":{
"id":"{{$guid}}"
}
@rajbharath
rajbharath / sidekiq with redis in heroku
Last active August 29, 2015 14:22
Redis heroku config
heroku config:set REDIS_PROVIDER=REDISTOGO_URL
Sidekiq will automatically use it.
Also create a config/initializers/redis.rb and put the below content
if ENV["REDISCLOUD_URL"]
$redis = Redis.new(:url => ENV["REDISCLOUD_URL"])
end
@rajbharath
rajbharath / psaux
Created May 30, 2015 12:17
ps shell command
ps aux | grep sublime | awk '{ print $2 }'