Does this matter?
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
let myCid = await ipfs.dag.put({name: "Mikeal Rogers"}) | |
let projectsCid = await ipfs.dag.put( | |
{ title: "A new post!", | |
content: "Opinions about things!" | |
author: {'/': myCid.toBaseEncodedString()} | |
} | |
) |
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
module.exports = { | |
configureWebpack: config => { | |
if (process.env.NODE_ENV === 'production') { | |
config.output.publicPath = `${process.cwd()}/dist/` | |
} | |
} | |
} |
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
{ "scripts": | |
{ "dev": "NODE_ENV=DEV vue-cli-service serve & sleep 5 && NODE_ENV=DEV electron app.js" } | |
} |
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
const electron = require('electron') | |
const app = electron.app | |
const BrowserWindow = electron.BrowserWindow | |
let url | |
if (process.env.NODE_ENV === 'DEV') { | |
url = 'http://localhost:8080/' | |
} else { | |
url = `file://${process.cwd()}/dist/index.html` | |
} |
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
npm install -g @vue/cli | |
vue create my-project | |
cd my-project | |
npm install electron |
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
const electron = require('electron') | |
const app = electron.app | |
const BrowserWindow = electron.BrowserWindow | |
let url | |
if (process.env.NODE_ENV === 'DEV') { | |
url = 'http://localhost:8080/' | |
} else { | |
url = `file://${process.cwd()}/dist/index.html` | |
} |
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
const r2 = require('r2') | |
let doJsonThing = async (path, propname) => { | |
let res = await r2(`http://api.com${path}`).json | |
return res[propname] | |
} |
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
// Byte Storage as Content Addressable Storage | |
class ByteStorage { | |
async set (key, value) async { | |
// Send to temporary storage w/ random UUID | |
let tmpfile = randomFile() | |
let p1 = send(value, tmpfile) | |
// Also stream the value to a hasher | |
let p2 = send(value, /* streaming hashing function */ ) | |
let values = await Promise.all(p1, p2) |
| Ingredient | Measure | Baker's Percentage | | Sifted White Flour (Red Fife) | 500g | 100% | | Water | | 70% | | Active Levain | 100g | 20% | | Salt | 11g | | |