ESPN's hidden API endpoints
Latest News: http://site.api.espn.com/apis/site/v2/sports/football/college-football/news
Latest Scores: http://site.api.espn.com/apis/site/v2/sports/football/college-football/scoreboard
Latest News: http://site.api.espn.com/apis/site/v2/sports/football/college-football/news
Latest Scores: http://site.api.espn.com/apis/site/v2/sports/football/college-football/scoreboard
#Steps to install latest Laravel, LEMP on AWS Ubuntu 16.4 version. This tutorial is the improvised verision of this tutorial on Digitalocean based on my experience.
Run the following commands in sequence.
sudo apt-get install -y language-pack-en-base
sudo LC_ALL=en_US.UTF-8 add-apt-repository ppa:ondrej/php
sudo apt-get update
sudo apt-get install zip unzip
/** | |
* Gaussian blur filter for fabricjs | |
* Example: | |
* obj.filters.push(new fabric.Image.filters.GaussianBlur(6)); | |
* obj.applyFilters(canvas.renderAll.bind(canvas)); | |
* | |
* Adapted from <a href="http://www.quasimondo.com/BoxBlurForCanvas">http://www.quasimondo.com/BoxBlurForCanvas</a> | |
*/ | |
(function() { |
{% comment %} | |
To add a companion product to the cart automatically if a primary product is in cart: | |
1. Create a new link list under your Navigation tab. | |
2. In that link list, make the first link point to companion product. | |
3. Copy your link list handle where indicated at line 9 | |
4. Set the minimum cart total required for the bonus product on line 10 | |
{% endcomment %} | |
{% assign linklist = linklists['put-your-link-list-handle-here'] %} | |
{% assign min_total = 100 %} |
<?php | |
// Find normal links, wrap with anchor tags and add href to link | |
$tweet = preg_replace('/(https?:\/\/[^\s"<>]+)/','<a href="$1">$1</a>',$tweet); | |
// Find usernames, wrap with anchor and add href to their profile | |
$tweet = preg_replace('/(^|[\n\s])@([^\s"\t\n\r<:]*)/is', '$1<a href="http://twitter.com/$2">@$2</a>', $tweet); | |
// Find hashtags, wrap with anchor and add href to twitter search for that tag | |
$tweet = preg_replace('/(^|[\n\s])#([^\s"\t\n\r<:]*)/is', '$1<a href="http://twitter.com/search?q=%23$2">#$2</a>', $tweet); |
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.