Skip to content

Instantly share code, notes, and snippets.

View salujaharkirat's full-sized avatar

Harkirat Saluja salujaharkirat

View GitHub Profile
@salujaharkirat
salujaharkirat / gist:e58fccd585b191e99b75858b447139f0
Created April 27, 2016 19:21 — forked from Atem18/gist:4696071
Tutorial to seting up a django website in production.

Set up Django, Nginx and Gunicorn in a Virtualenv controled by Supervisor

Steps with explanations to set up a server using:

  • Virtualenv
  • Virtualenvwrapper
  • Django
  • Gunicorn
@salujaharkirat
salujaharkirat / gist:e4b7f75bad16980428cf6d8c4457a07a
Created April 14, 2016 06:46 — forked from jonathanmoore/gist:2640302
Get the share counts from various APIs

Share Counts

I have always struggled with getting all the various share buttons from Facebook, Twitter, Google Plus, Pinterest, etc to align correctly and to not look like a tacky explosion of buttons. Seeing a number of sites rolling their own share buttons with counts, for example The Next Web I decided to look into the various APIs on how to simply return the share count.

If you want to roll up all of these into a single jQuery plugin check out Sharrre

Many of these API calls and methods are undocumented, so anticipate that they will change in the future. Also, if you are planning on rolling these out across a site I would recommend creating a simple endpoint that periodically caches results from all of the APIs so that you are not overloading the services will requests.

Twitter