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
// Modified from @mutsuda's https://medium.com/@mutsuda/create-an-ios-widget-showing-google-spreadsheets-data-856767a9447e | |
// and @levelsio's https://gist.github.com/levelsio/a1ca0dd434b77ef26f6a7c403beff4d0 | |
// HOW TO | |
// 1) Make a new Metabase Question | |
// 2) Make the result an unique number and choose Visualization > Number | |
// 3) Write your metabase domain, your email and password below | |
const domain = "https://metabase.endpoint.com" | |
const username = "[email protected]" | |
const password = "p@ssw0rd" |
// Variables used by Scriptable. | |
// These must be at the very top of the file. Do not edit. | |
// icon-color: blue; icon-glyph: link; | |
/** | |
* GENERATE BEAR BACKLINKS | |
* | |
* This script will find and add backlinks in Bear. | |
* | |
* !!Please backup your notes before running!! https://bear.app/faq/Backup%20&%20Restore/ |
# Ruby CircleCI 2.0 configuration file | |
# | |
# Check https://circleci.com/docs/2.0/language-ruby/ for more details | |
# | |
defaults: &defaults | |
working_directory: ~/repo | |
docker: | |
- image: circleci/ruby:2.4.1-node-browsers | |
environment: |
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
version: 2 | |
jobs: | |
build: | |
docker: | |
- image: ruby:2.3.3-alpine | |
working_directory: /home/circleci/masutaka.net | |
steps: | |
- setup_remote_docker: | |
# https://circleci.com/docs/2.0/docker-layer-caching/ | |
reusable: true |
We need to generate a unique SSH key for our second GitHub account.
ssh-keygen -t rsa -C "your-email-address"
Be careful that you don't over-write your existing key for your personal account. Instead, when prompted, save the file as id_rsa_COMPANY
. In my case, I've saved the file to ~/.ssh/id_rsa_work
.
#Ruby version 2.1.1 | |
require 'csv' | |
require 'json' | |
def json_to_csv(json_file, csv_file) | |
json_array = JSON.parse(File.open(json_file).read) | |
headers = collect_keys(json_array.first) | |
CSV.open(csv_file, "w", :write_headers=> true, :headers => headers) do |csv| | |
json_array.each { |item| csv << collect_values(item) } |
'use strict'; | |
/* | |
Ways to improve site speed for theme: | |
=========================================== | |
- Store fonts.css in localStorage, don't make request if it's there | |
- Create a custom FontAwesome lib, lazyload | |
*/ |
Puts on glasses: | |
(•_•) | |
( •_•)>⌐■-■ | |
(⌐■_■) | |
Takes off glasses ("mother of god..."): | |
(⌐■_■) | |
( •_•)>⌐■-■ |
# Run from jekyll dir | |
Dir['/path/to/toto/articles/*.txt'].sort.each do |path| | |
file = File.basename(path) | |
new_file = "_posts/#{file.sub(/\.txt\z/, '.md')}" | |
text = File.read(path) | |
headers, md = text.split("\n\n", 2) | |
raise "No title" unless headers =~ /^title: (.+)$/ | |
title = $1 | |
File.write(new_file, "---\n layout: post\n title: #{title}\n---\n\n#{md}") | |
end |