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
This is a compiled list of falsehoods programmers tend to believe about working with time.
Don't re-invent a date time library yourself. If you think you understand everything about time, you're probably doing it wrong.
| #!/usr/bin/env bash | |
| # fetch_nike_puls_all_activities.bash | |
| # A simple bash script to fetch all activities and metrics from NikePlus. | |
| # See `nike_plus_api.md` for the API details. | |
| readonly bearer_token="$1" | |
| if [[ -z "$bearer_token" ]]; then | |
| echo "Usage: $0 bearer_token" | |
| exit |
| 1980 | |
| 1998 | |
| 2000 | |
| 2003 | |
| 2004 | |
| 2005 | |
| 2006 | |
| 2007 | |
| 2008 | |
| 2009 |
#Get started with DTrace on linux ####(with CentOS7/SL7/RHEL7)
$ cd /etc/yum.repos.d
$ wget http://public-yum.oracle.com/public-yum-ol7.repo
$ rpm --import http://public-yum.oracle.com/RPM-GPG-KEY-oracle-ol7
| # To print a str variable. | |
| x/s ((PyStringObject*)str_var)->ob_sval | |
| define ppstr | |
| printf "%s\n", ((PyStringObject*)$arg0)->ob_sval | |
| end | |
| define ppr | |
| printf "%s\n", ((PyStringObject*)PyObject_Repr($arg0))->ob_sval | |
| end |
| import sys,os | |
| import curses | |
| def draw_menu(stdscr): | |
| k = 0 | |
| cursor_x = 0 | |
| cursor_y = 0 | |
| # Clear and refresh the screen for a blank canvas | |
| stdscr.clear() |
| # aecho.py | |
| from socket import * | |
| import asyncio | |
| loop = asyncio.get_event_loop() | |
| async def echo_server(address): | |
| sock = socket(AF_INET, SOCK_STREAM) | |
| sock.setsockopt(SOL_SOCKET, SO_REUSEADDR, 1) |
| #!/usr/bin/env python3 | |
| # Copyright 2014 Brett Slatkin, Pearson Education Inc. | |
| # | |
| # Licensed under the Apache License, Version 2.0 (the "License"); | |
| # you may not use this file except in compliance with the License. | |
| # You may obtain a copy of the License at | |
| # | |
| # http://www.apache.org/licenses/LICENSE-2.0 | |
| # |
Sometimes you want to have a subdirectory on the master branch be the root directory of a repository’s gh-pages branch. This is useful for things like sites developed with Yeoman, or if you have a Jekyll site contained in the master branch alongside the rest of your code.
For the sake of this example, let’s pretend the subfolder containing your site is named dist.
Remove the dist directory from the project’s .gitignore file (it’s ignored by default by Yeoman).