Skip to content

Instantly share code, notes, and snippets.

View gist:7584707

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

@atherdon
atherdon / cookbook.sql
Created August 31, 2016 18:41 — forked from greghelton/cookbook.sql
MySQL Database for Cookbook, Recipes, Ingredients
View cookbook.sql
-- start the server: $ mysqld --console
-- login: $ mysql -u root --password=wxyz
-- run the script: mysql> source /Users/javapro/dev/src/sql/Cookbook.sql
-- the script:
drop database if exists Cookbook;
create database Cookbook;
connect Cookbook;
View gist:52c0b4f813d959a3f18075769abad524
Structure from https://github.com/brillout/awesome-react-components#ui-components
https://github.com/yuanyan/boron +++
https://github.com/marcio/react-skylight -
http://louisbarranqueiro.github.io/reapop/ ++
https://github.com/xeodou/react-crouton +++
https://github.com/negomi/react-burger-menu +++
https://github.com/KyleAMathews/react-headroom+
View gist:0ddd78c0d90f95a41d3171d72d8c6095
Supported Nutrition Attributes (ATTR_NAME):
"Nutrition value to pass to the API" "Description" "Implied Units"
K Potassium, K gram
NA Sodium, Na gram
CHOLE Cholesterol gram
FATRN Fatty acids, total trans gram
FASAT Fatty acids, total saturated gram
CHOCDF Carbohydrate, by difference gram
@atherdon
atherdon / index.html
Created December 7, 2018 09:13
Sortable list with React-DnD
View index.html
<div id="root" class="container mt-5"></div>
@atherdon
atherdon / gist:c5cdf8b304e3be546a8007fbde0ecd56
Created April 23, 2018 07:18
Groceristar Health labels data
View gist:c5cdf8b304e3be546a8007fbde0ecd56
Diet and Health Labels
Type Web Label API Parameter Definition
"Diet" "Balanced" "balanced" "Protein/Fat/Carb values in 15/35/50 ratio"
"Diet" "High-Fiber" "high-fiber" "More than 5g fiber per serving"
"Diet" "High-Protein" "high-protein" "More than 50% of total calories from proteins"
"Diet" "Low-Carb" "low-carb" "Less than 20% of total calories from carbs"
"Diet" "Low-Fat" "low-fat" "Less than 15% of total calories from fat"
"Diet" "Low-Sodium" "low-sodium" "Less than 140mg Na per serving"
"Health" "Alcohol" "alcohol-free" "No alcohol used or contained in the recipe"
View gist:0503fcb04a4ba5bb98dcad9ad137d1de
- https://github.com/atherdon/dash-back/issues/105
- https://github.com/atherdon/dashb/issues/204
### upload forms
- https://github.com/atherdon/dash-upload-forms/issues/18