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
#!/bin/bash -l | |
# Recursively greps files for pattern match | |
search() { | |
usage='Usage: search PATTERN [directory]' | |
search_dir='.' | |
# Return usage if 0 or more than 2 args are passed |
#!/bin/bash | |
# Example usage: sizes path/to/somewhere/ | |
sizes () | |
{ | |
ls -lrt -d -1 ${PWD}/${1}* | xargs du -sh | |
} |
# Add folder and filename to tab title | |
atom.workspace.observeTextEditors (editor) -> | |
if editor.getTitle() isnt "untitled" | |
sp = editor.getPath().split('/') | |
title = sp.slice(sp.length-2).join('/') | |
editor.getTitle = -> title | |
editor.getLongTitle = -> title | |
editor.emitter.emit "did-change-title", editor.getTitle() | |
atom.workspace.onDidOpen (event) -> |
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
#!/usr/bin/env bash | |
# To fix the " gpg: WARNING: unsafe permissions on homedir '/home/path/to/user/.gnupg' " error | |
# Make sure that the .gnupg directory and its contents is accessibile by your user. | |
chown -R $(whoami) ~/.gnupg/ | |
# Also correct the permissions and access rights on the directory | |
chmod 600 ~/.gnupg/* | |
chmod 700 ~/.gnupg |
import { Action } from 'redux'; | |
import { AsyncAction, AsyncFulfilledAction } from './redux-thunk-promise'; | |
import { ApiResult } from 'api/...'; | |
export const FETCH = '.../FETCH'; | |
export const FETCH_PENDING = '.../FETCH_PENDING'; | |
export const FETCH_FULFILLED = '.../FETCH_FULFILLED'; | |
export const FETCH_REJECTED = '.../FETCH_REJECTED'; | |
export type FetchAction = AsyncAction<typeof FETCH, ApiResult>; |
#!/bin/bash | |
# Activate a version of Node that is read from a text file via NVM | |
function use_node_version() | |
{ | |
local TEXT_FILE_NAME="$1" | |
local CURRENT_VERSION=$([ -n "$HAS_NVM" ] && nvm current) | |
local PROJECT_VERSION=$([ -n "$HAS_NVM" ] && nvm version $(cat "$TEXT_FILE_NAME")) | |
# If the project file version is different than the current version |
any
: magic, ill-behaved type that acts like a combination of never
(the proper [bottom type]) and unknown
(the proper [top type])
never
is assignable to any
, and any
is assignable to anything at all.any & AnyTypeExpression = any
, any | AnyTypeExpression = any
unknown
: proper, well-behaved [top type]
unknown
. unknown
is only assignable to itself (unknown
) and any
.unknown & AnyTypeExpression = AnyTypeExpression
, unknown | AnyTypeExpression = unknown
any
whenever possible. Anywhere in well-typed code you're tempted to use any
, you probably want unknown
.commands: | |
halt_if_cache_exists: | |
description: Halt a build if a cache already exists, without downloading the entire cache. Match only exact key. Pair with mark_cache_existence. | |
parameters: | |
category: | |
description: friendly name of the sort of cache (e.g. bundle, src) | |
type: string | |
key: | |
description: hash key where underlying data would be stored |
version: 2 | |
jobs: | |
plan: | |
docker: | |
- image: hashicorp/terraform:latest | |
working_directory: /code | |
steps: | |
- checkout | |
- run: | |
name: Init |