Skip to content

Instantly share code, notes, and snippets.

@andrewxhill
andrewxhill / index.md
Last active Jul 31, 2020
Powergate Workshop
View index.md

Introduction to Filecoin app building

This document: https://tinyurl.com/hackfs-pow

Slides from intro presentation: https://speakerdeck.com/andrewxhill/intro-to-filecoin-building-apps-with-powergate

In this workshop, we are going to introduce you to Filecoin through the use of the Powergate. While you can develop using Lotus or other Filecoin implementations directly, the Powergate is designed to provide the necessary abstractions to build Filecoin storage into your application. Some features of the Powergate include fast data retrieval with IPFS serving as a caching layer, deal management, multi-tenant wallet APIs, and more. The system comes set up to run locally in Docker or deploy to your servers.

We'll cover the Powergate CLI and the Powergate JavaScript Client in the two parts of the workshop. To prepare, we encourage you to install a few things before we get started.

View index.html
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0, shrink-to-fit=no">
<meta name="description" content="Template cloned from https://github.com/erengy/under-construction.">
<title>textile.io</title>
<style type="text/css">
html, body {
height: 100%;
View slack-pointers.md

On chatting to people

Chat is not the same as conversation. When you tag someone using the "@" or if you send them a direct message, you may be directly forcing them to change their focus to your problem. While this is good for you, it can be bad for a healthy and productive community. Here are a couple of rules to abide.

  • Only "@" tag people's names in the following cases.
    • Your comment is urgent/time-sensitive and you need the help of the "@" target.
    • Your comment has grown stale and you still need an answer that the "@" target can provide.
    • You comment is in a channel or thread where the "@" target is not present but you need them aware.
  • Abide by the "no hello" rule at all times. Provide the topic of your conversation immediately. This means, never start a DM or tag a person with the "@" symbol with a simple "hello", "good morning" or another nicety. While this is polite, it can cause a lot of inefficiency in group chat.
    • Example bad message: "Good morning @andrewxhill! Hope you are doi
View pseudo-bucket-example.ts
/**
* 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();
View Powergate-Demo.md

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.
View README.md

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 Apr 21, 2019
Update an IPFS record in Cloudflare DNS
View cloudflare-ipfs-update.sh
#!/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
View gateway_test.py
import ipfsapi
import requests
import random
import string
# Gateways
gateways = [
"rx14.co.uk",
"ipfs.deo.moe",
"hardbin.com",
View composable_threads.md
View keybase.md

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:

You can’t perform that action at this time.