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
| aws logs describe-log-streams --log-group-name="/aws/lambda/ghmetrics-staging-get-filter" --query 'logStreams[*].l│·········· | |
| ogStreamName' --output table | awk '{print $2}' | grep -v ^$ | while read x; do aws logs delete-log-stream --log-stream-name="$x" --log-group-name="/a│·········· | |
| ws/lambda/ghmetrics-staging-get-filter"; done |
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) |