Skip to content

Instantly share code, notes, and snippets.

Ivan Sugerman jivinivan

Block or report user

Report or block jivinivan

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
@jivinivan
jivinivan / 0_reuse_code.js
Created Apr 11, 2016
Here are some things you can do with Gists in GistBox.
View 0_reuse_code.js
// Use Gists to store code you would like to remember later on
console.log(window); // log the "window" object to the console
View keybase.md

Keybase proof

I hereby claim:

  • I am jivinivan on github.
  • I am jivinivan (https://keybase.io/jivinivan) on keybase.
  • I have a public key whose fingerprint is AD5A 358C FFBE 8432 B83E B380 7DC2 E86B 995C 5F12

To claim this, I am signing this object:

View gist:9403606

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

View prefix.scss
@mixin vendorize($property, $value) {
-webkit-#{$property}: $value;
-moz-#{$property}: $value;
-ms-#{$property}: $value;
-o-#{$property}: $value;
#{$property}: $value;
}
// Usage
You can’t perform that action at this time.