Skip to content

Instantly share code, notes, and snippets.

Abdul Shajin abdul-shajin

Block or report user

Report or block abdul-shajin

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 gist:d949022cb6b2bdaedffa56daabc6a6a2
Building native extensions. This could take a while...
Successfully installed capybara-webkit-1.15.1
Parsing documentation for capybara-webkit-1.15.1
Installing ri documentation for capybara-webkit-1.15.1
Done installing documentation for capybara-webkit after 0 seconds
1 gem installed
shajin@Abduls-MacBook-Pro manufacturer (BUGS-7095) $ bundle install
Fetching source index from
Fetching source index from
Fetching gem metadata from
View with-place_id.json
[{"long_name"=>"Bhiwadi", "short_name"=>"Bhiwadi", "types"=>["locality", "political"]},
{"long_name"=>"Alwar", "short_name"=>"Alwar", "types"=>["administrative_area_level_2", "political"]},
{"long_name"=>"Rajasthan", "short_name"=>"RJ", "types"=>["administrative_area_level_1", "political"]},
{"long_name"=>"India", "short_name"=>"IN", "types"=>["country", "political"]}],
"adr_address"=>"<span class=\"locality\">Bhiwadi</span>, <span class=\"region\">Rajasthan</span>, <span class=\"country-name\">India</span>",
"formatted_address"=>"Bhiwadi, Rajasthan, India",
"geometry"=>{"location"=>{"lat"=>28.2088218, "lng"=>76.84459989999999}, "viewport"=>{"northeast"=>{"lat"=>28.2216102, "lng"=>76.8750393}, "southwest"=>{"lat"=>28.1857546, "lng"=>76.8047977}}},
View text_search_gmap.json
[{"formatted_address"=>"Rajasthan, India",
"geometry"=>{"location"=>{"lat"=>28.2088218, "lng"=>76.84459989999999}, "viewport"=>{"northeast"=>{"lat"=>28.2216102, "lng"=>76.8750393}, "southwest"=>{"lat"=>28.1857546, "lng"=>76.8047977}}},
"html_attributions"=>["<a href=\"\">Davinder kumar</a>"],
View capybara cheat sheet
=Clicking links and buttons=
click_link('Link Text')
click('Link Text') # Click either a link or a button
click('Button Value')
abdul-shajin / params.txt
Last active Dec 18, 2015
Rank Links according to number of parameters
View params.txt
Upvote number
Comments recieved for a link
Share count
user rank
Follower count of category (eg: gaming)
Visiter - Upvote ratio (later)
View gist:5662086
1.upto(n).each do |num|
if num % 3 == 0
puts 'Hip'
elsif num % 5 == 0
puts 'Hop'
elsif (num % 3 == 0) && ( num % 5 == 0)
puts 'Whazaa'
View gist:5520052
<a href=''>Here</a>
View spree_help
Hi cmar,
I've stuck with an empty cart bug while developing a spree based application.seems like the reason behind the bug is a method which written by you.The details are here -> . Can you have a look and reply the intension for the method?? I am not able to track.
Thanks in advance
Abdul Shajin
View gist:5255275

Sublime Text 2 – Useful Shortcuts (PC)

Loosely ordered with the commands I use most towards the top. Sublime also offer full documentation.


Ctrl+C copy current line (if no selection)
Ctrl+X cut current line (if no selection)
Ctrl+⇧+K delete line
Ctrl+↩ insert line after
abdul-shajin / jqueeery
Created Jan 28, 2012
View jqueeery
$(".stream-cell").click(function(e) {
I want to check e is coming from <a> tag or <div>
If e is from anchor tag, I want to call some ajax requests, or else, I want to call the existing lines.
You can’t perform that action at this time.