Skip to content

Instantly share code, notes, and snippets.

View hnprashanth's full-sized avatar
🏃‍♂️
Obsessed!!

Prashanth HN hnprashanth

🏃‍♂️
Obsessed!!
View GitHub Profile
@hnprashanth
hnprashanth / eslint-atom-config
Created April 27, 2018 12:37
React eslint setup for Atom
Run following commands in project directory:
npm i eslint-config-last eslint-plugin-react --save-dev
npm i eslint babel-eslint prettier eslint-plugin-prettier eslint-config-prettier --save-dev
And then create .eslintrc.js with following:
module.exports = {
extends: ['last', 'prettier/react', 'plugin:react/recommended'],
@hnprashanth
hnprashanth / flipscrape.rb
Created February 10, 2012 06:17
Simple Flipkart scraper
require 'rubygems'
require 'nokogiri'
require 'open-uri'
#Flipkart search URL to scrape
url = "http://www.flipkart.com/search-mobiles?query=galaxy&from=all"
doc = Nokogiri::HTML(open(url))
puts doc.at_css("title").text
doc.css(".fk-inf-scroll-item").each do |item|