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
| const functions = require('firebase-functions'); | |
| const path = require('path'); | |
| const glob = require('glob'); | |
| const ENDPOINT_FOLDER = './endpoints'; | |
| const DO_NOT_DEPLOY = /^(admin|a|debug|d)$/; | |
| const IGNORE = /^(ignore|i)$/; | |
| const BREAK_ON_ERROR = true; | |
| const is = { |
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 shows an example of how to generate a SSH RSA Private/Public key pair and save it locally | |
| package main | |
| import ( | |
| "crypto/rand" | |
| "crypto/rsa" | |
| "crypto/x509" | |
| "encoding/pem" | |
| "golang.org/x/crypto/ssh" |
| # perform a fresh install of Ubuntu 17.10 | |
| # upgrade the kernel to v4.13.10 | |
| mkdir ~/kernel-v4.13.10 | |
| cd ~/kernel-v4.13.10 | |
| wget http://kernel.ubuntu.com/~kernel-ppa/mainline/v4.13.10/linux-headers-4.13.10-041310_4.13.10-041310.201710270531_all.deb | |
| wget http://kernel.ubuntu.com/~kernel-ppa/mainline/v4.13.10/linux-headers-4.13.10-041310-generic_4.13.10-041310.201710270531_amd64.deb | |
| wget http://kernel.ubuntu.com/~kernel-ppa/mainline/v4.13.10/linux-image-4.13.10-041310-generic_4.13.10-041310.201710270531_amd64.deb | |
| sudo dpkg -i *.deb |
| package main | |
| import ( | |
| "crypto/aes" | |
| "crypto/cipher" | |
| "crypto/rand" | |
| "crypto/sha256" | |
| "encoding/hex" | |
| "fmt" | |
| "strings" |
| function createWallet(){ | |
| let privateKey = createPrivateKey(); | |
| let publicKey = getPublicKey(privateKey); | |
| let address = createAddress(publicKey); | |
| return ({ | |
| private: privateKey.toString('hex'), | |
| public: publicKey.toString('hex'), | |
| address: address | |
| }); | |
| } |
| var crypto = require('crypto'); | |
| function createAddress(publicKey){ | |
| let sha256 = crypto.createHash("sha256"); | |
| sha256.update(publicKey); | |
| return sha256.digest('hex'); | |
| } |
| var eccrypto = require('eccrypto'); | |
| // Uncompressed (65-byte) public key | |
| // that corresponds to the given private key | |
| function getPublicKey(privateKey){ | |
| return eccrypto.getPublic(privateKey); | |
| } |
| #!/usr/bin/env python | |
| # -*- coding: utf-8 -*- | |
| import hashlib as hasher | |
| import datetime as date | |
| class Block: | |
| def __init__(self, index, timestamp, data, previous_hash): | |
| self.index = index | |
| self.timestamp = timestamp |
| from flask import Flask | |
| from flask import request | |
| import json | |
| import requests | |
| import hashlib as hasher | |
| import datetime as date | |
| node = Flask(__name__) | |
| # Define what a Snakecoin block is | |
| class Block: |