path:/home/dallen/[]
path:/etc/my.cnf[]
key:Enter[]
| package com.cadrlife; | |
| import org.eclipse.jetty.server.Server; | |
| import org.eclipse.jetty.webapp.WebAppContext; | |
| public class EmbeddedJetty9Server { | |
| // compile 'org.eclipse.jetty:jetty-server:9.0.0.v20130308' | |
| // compile 'org.eclipse.jetty:jetty-webapp:9.0.0.v20130308' | |
| public static void main(String[] args) throws Exception { | |
| Server server = new Server(8080); |
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.
| // http://paulirish.com/2011/requestanimationframe-for-smart-animating/ | |
| // http://my.opera.com/emoller/blog/2011/12/20/requestanimationframe-for-smart-er-animating | |
| // requestAnimationFrame polyfill by Erik Möller. fixes from Paul Irish and Tino Zijdel | |
| // MIT license | |
| (function() { | |
| var lastTime = 0; | |
| var vendors = ['ms', 'moz', 'webkit', 'o']; |
| // This method gives you an easier way of calling super | |
| // when you're using Backbone in plain javascript. | |
| // It lets you avoid writing the constructor's name multiple | |
| // times. You still have to specify the name of the method. | |
| // | |
| // So instead of having to write: | |
| // | |
| // User = Backbone.Model.extend({ | |
| // save: function(attrs) { | |
| // this.beforeSave(attrs); |