Skip to content

Instantly share code, notes, and snippets.

View schorfES's full-sized avatar
🍫
...

Norman Rusch schorfES

🍫
...
View GitHub Profile
@Schascha
Schascha / !README.md
Last active February 15, 2024 13:13
Just a few things I like to remember
@schorfES
schorfES / WebappStandaloneDetect.js
Last active December 26, 2015 12:29
This detects if the application runs in iOS standalone mode and manually opens clicked links in webapps on homescreen to prevent switch to safari app. The code is designed to be used as backbone.geppetto command. See also: https://github.com/ModelN/backbone.geppetto#implementing-a-command
define(function(require) {
var
$ = require('jquery'),
Command = function() {}
;
/* This detects if the application runs in iOS standalone mode and
/* manually opens clicked links in webapp */
Command.prototype.execute = function() {
@cimmanon
cimmanon / flexbox.scss
Last active September 17, 2020 15:05 — forked from anonymous/Flexbox mixins
This collection of Sass mixins to cover all 3 flexbox specifications that have been implemented. More information can be found here: https://gist.github.com/cimmanon/727c9d558b374d27c5b6
@import "compass/css3/shared";
// NOTE:
// All mixins for the 2009 spec have been written assuming they'll be fed property values that
// correspond to the standard spec. Some mixins can be fed values from the 2009 spec, but don't
// rely on it. The `legacy-order` mixin will increment the value fed to it because the 2009
// `box-ordinal-group` property begins indexing at 1, while the modern `order` property begins
// indexing at 0.
// if `true`, the 2009 properties will be emitted as part of the normal mixin call
@jonathanmoore
jonathanmoore / gist:2640302
Created May 8, 2012 23:17
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