This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <!doctype html> | |
| <html> | |
| <head> | |
| <meta charset="utf8"> | |
| <title>IPNS Profile App</title> | |
| <link rel="stylesheet" href="./style.css"> | |
| <link rel="stylesheet" href="https://use.fontawesome.com/releases/v5.2.0/css/solid.css" integrity="sha384-wnAC7ln+XN0UKdcPvJvtqIH3jOjs9pnKnq9qX68ImXvOGz2JuFoEiCjT8jyZQX2z" | |
| crossorigin="anonymous"> | |
| <link rel="stylesheet" href="https://use.fontawesome.com/releases/v5.2.0/css/brands.css" integrity="sha384-nT8r1Kzllf71iZl81CdFzObMsaLOhqBU1JD2+XoAALbdtWaXDOlWOZTR4v1ktjPE" | |
| crossorigin="anonymous"> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| // defaultProfile is a simple user-profile JSON data model | |
| const defaultProfile = { | |
| name: { | |
| first: 'first', | |
| last: 'last', | |
| other: [] | |
| }, | |
| bio: 'you should write something interesting here...', | |
| pic: { | |
| url: 'https://i.stack.imgur.com/l60Hf.png' |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| /* eslint no-undef: "error" */ | |
| /* eslint-env browser */ | |
| import 'babel-polyfill' | |
| import getIpfs from './ipfs-promise' | |
| import qs from 'query-string' | |
| // setup is our async initializer function | |
| const setup = async () => { | |
| try { | |
| // Get a reference to the running, or new, IPFS peer/node |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| /* eslint no-undef: "error" */ | |
| /* eslint-env browser */ | |
| import 'babel-polyfill' | |
| import qs from 'query-string' | |
| import ko from 'knockout' | |
| import 'knockout-mapping' | |
| import getIpfs from './ipfs-promise' | |
| import { defaultProfile } from './default-profile' | |
| import $ from 'jQuery' |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <body> | |
| <div id="loader" data-bind="visible: state.loading"></div> | |
| <div id="main" data-bind="visible: !state.loading()"> | |
| <div id="image" data-bind="style: { 'backgroundImage': `url(${pic.url()})` }"></div> | |
| <div id="profile"> | |
| <h1 id="name"> | |
| <span id="first" data-bind="text: name.first"></span> | |
| <span id="last" data-bind="text: name.last"></span> | |
| </h1> | |
| <div id="work" > |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| html, body { | |
| margin: 0; | |
| height:100%; | |
| position: relative; | |
| font-family: Tahoma, Helvetica, Verdana, sans-serif; | |
| } | |
| h1 { | |
| margin-top: 0px; | |
| text-transform: uppercase; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <!doctype html> | |
| <html> | |
| <head> | |
| <meta charset="utf8"> | |
| <title>IPNS Profile App</title> | |
| <link rel="stylesheet" href="./style.css"> | |
| <link rel="stylesheet" href="https://use.fontawesome.com/releases/v5.2.0/css/solid.css" integrity="sha384-wnAC7ln+XN0UKdcPvJvtqIH3jOjs9pnKnq9qX68ImXvOGz2JuFoEiCjT8jyZQX2z" | |
| crossorigin="anonymous"> | |
| <link rel="stylesheet" href="https://use.fontawesome.com/releases/v5.2.0/css/brands.css" integrity="sha384-nT8r1Kzllf71iZl81CdFzObMsaLOhqBU1JD2+XoAALbdtWaXDOlWOZTR4v1ktjPE" | |
| crossorigin="anonymous"> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/usr/bin/env node | |
| 'use strict' | |
| import IPFS from 'ipfs' | |
| const getIpfs = (opts) => { | |
| opts = opts || {} | |
| return new Promise(function (resolve, reject) { | |
| var ipfs = new IPFS(opts) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import re | |
| import subprocess | |
| cmds = subprocess.check_output(["textile", "commands"]).decode("utf-8").split("\n")[:-1] | |
| seen = set() | |
| for cmd in cmds: | |
| line = cmd.split(" ") + ["--help",] | |
| if line: | |
| if line[1] not in seen: | |
| seen.add(line[1]) | |
| header = "# `{}`\n\n".format(line[1]) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import os | |
| import click | |
| from subprocess import check_output | |
| import zipfile | |
| try: | |
| from tempfile import TemporaryDirectory | |
| except: | |
| from backports.tempfile import TemporaryDirectory | |
| from glob import glob | |
| import json |