Skip to content

Instantly share code, notes, and snippets.

View andrewxhill's full-sized avatar

Andrew W. Hill andrewxhill

View GitHub Profile
/**
* Buckets
*
* You can now create Buckets for your User.
* Bucket contain raw files and documents.
*/
const buckets = new Buckets(db.context);
const roots = await buckets.list();

Powergate Show & Tell

Objective:

Create drop-in Filecoin API Management tools for systems and apps.

Key components:

  • Reputation Indices: A collection of data collected from the network for miner selection. Includes miner activity duration, slashing events, and deals.

Setup a new game of cmd-line tag!

Create a new game

sh new-game.sh

sh new-game.sh "Game 1"
@andrewxhill
andrewxhill / cloudflare-ipfs-update.sh
Created April 21, 2019 18:42
Update an IPFS record in Cloudflare DNS
#!/bin/bash
set -e # abort on any error
HASH=${1?param missing - hash.}
echo "Hi $PAGES_CLOUDFLARE_EMAIL"
if [[ -z "${PAGES_CLOUDFLARE_API_KEY}" ]]; then
echo "See setup instructions to set PAGES_CLOUDFLARE_API_KEY"
exit 1
fi
import ipfsapi
import requests
import random
import string
# Gateways
gateways = [
"rx14.co.uk",
"ipfs.deo.moe",
"hardbin.com",

Keybase proof

I hereby claim:

  • I am andrewxhill on github.
  • I am andrewxhill (https://keybase.io/andrewxhill) on keybase.
  • I have a public key ASCQCpQbOhKgXK6xK9-Xo-2vx_oQgf9v6vW7q6S_ry6FFgo

To claim this, I am signing this object:

SetSDK.register(context: beforeCommute) { event as
// Send new information or an opportunity that will be valuable
let content = UNMutableNotificationContent()
content.title = "Weather Alert!"
// ...
}
let beforeCommute = SetSDK.Context(
notificationTiming: .upon,
eventAction: .exit,
eventState: .place(type: .home),
timeOfDay: .morning
)
class RideFinderViewController: UIViewController, CLLocationManagerDelegate {
let locationManager = CLLocationManager()
override func viewDidLoad() {
super.viewDidLoad()
locationManager.delegate = self
locationManager.desiredAccuracy = kCLLocationAccuracyNearestTenMeters
locationManager.startUpdatingLocation()