Skip to content

Instantly share code, notes, and snippets.

### Keybase proof
I hereby claim:
* I am pavana21 on github.
* I am pavanateja21 (https://keybase.io/pavanateja21) on keybase.
* I have a public key ASBoMk8R9JKdGY3W8ItwCmipE2AdbmNaKHjVpVj_31fu4Ao
To claim this, I am signing this object:
@pavana21
pavana21 / gist:b1b5d505568fe9a4d77d
Created October 16, 2014 11:37
All Programming Links
1. All Technologies material: "https://github.com/vhf/free-programming-books/blob/master/free-programming-books.md#ruby-on-rails"
2. Javascript material: "http://superherojs.com/"
You may not like all rules presented here, but they work very well for
me and have helped producing high quality code. Everyone is free to
code however they want, write and follow their own style guides, but
when you contribute to my code, please follow these rules:
== Formatting:
* Use ASCII (or UTF-8, if you have to).
Account.customers.each do |account|
social_profile = account.social_profile
puts "Am in Comments"
if social_profile && social_profile.facebook.present?
facebook = social_profile.facebook
page_id = facebook.page_id
if facebook.social_feeds && facebook.social_feeds.length > 0
puts "Am in News Feed - Comments/Likes"
facebook.social_feeds.each do |feed |
begin
class FacebookPageFeedsJob
@queue = :page_feeds
class << self
def perform
puts "Am in perform"
Account.customers.each do |account|
social_profile = account.social_profile
puts "Am in Facebook"
if social_profile && social_profile.facebook.present?
@pavana21
pavana21 / Performance testing
Created June 15, 2012 16:58
Benchmark the project
require 'rest_client'
require 'benchmark'
@res = RestClient.post( "http://localhost:3000/users/sign_in", { "user[email]"=> 'admin@brandscope.com.au', "user[password]"=> '123456' })
cookies = @res.cookies.dup
urls = ["http://localhost:3000", "http://localhost:3000/orders/index_admin", "http://localhost:3000/orders/4f6b115c6d733102540000b4", "http://localhost:3000/orders/4f597fc4de074f1b45000525", "http://localhost:3000/products", "http://localhost:3000/products?release_id=4f32a231de074f4c55000001", "http://localhost:3000/products?release_id=4f683e246d733112ee000001", "http://localhost:3000/releases", "http://localhost:3000/brands/4f2262cdde074f7480000001", "http://localhost:3000/releases/4f683e246d733112ee000001/range_overview", "http://localhost:3000/releases/4f683e246d733112ee000001/products?product_category_id=4f683e406d733112f5000006", "http://localhost:3000/products/4f683e406d733112f5000008", "http://localhost:3000/products/4f683e596d733112f500000c", "http://localhost:3000/registration_profiles/retailers