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
| var rad = require('random-access-directory') | |
| var store = rad(procss.env.HOME + '/.dat/') | |
| // create a first store | |
| store = store('hypercore.txt') | |
| store.get(0, ...) | |
| // create another store, based on the first one | |
| // this way modules can pass the store instance |
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
| index(feed, { | |
| start: 0, | |
| end: Infinity, | |
| key: feed.key | |
| }, function onentry (entry, cb) { | |
| cb() | |
| }, function ondone () { | |
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 http = require('http') | |
| http.createServer((req, res) => { | |
| res.write('<!DOCTYPE html><html><head><title>electron-stream</title><script>') | |
| res.write('console.log("hi");\n') | |
| setTimeout(() => { | |
| res.write('console.log("you");\n') | |
| res.end('</script></head></html>') | |
| }, 3000) | |
| }).listen(8000, () => console.log('8000')) |
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
| { name: 'sillytest', | |
| time: | |
| { modified: '2016-08-12T20:24:05.671Z', | |
| created: '2016-04-04T16:39:05.573Z', | |
| '1.0.0': '2016-04-04T16:39:05.573Z', | |
| '1.0.1': '2016-04-04T16:42:05.213Z', | |
| '1.0.2': '2016-04-04T16:42:24.049Z', | |
| '1.0.3': '2016-04-04T16:42:52.291Z', | |
| '0.0.1': '2016-08-12T20:19:52.345Z', | |
| '0.0.2': '2016-08-12T20:20:08.997Z', |
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 yo = require('yo-yo') | |
| module.exports = entries => yo` | |
| <ul> | |
| ${entries.map(entry => yo` | |
| <li>${entry.name}</li> | |
| `)} | |
| </ul>` |
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
| <key>CFBundleURLTypes</key> | |
| <array> | |
| <dict> | |
| <key>CFBundleURLName</key> | |
| <string>Dat Link</string> | |
| <key>CFBundleURLSchemes</key> | |
| <array> | |
| <string>dat</string> | |
| </array> | |
| </dict> |
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
| <?xml version="1.0" encoding="UTF-8"?> | |
| <!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd"> | |
| <plist version="1.0"> | |
| <dict> | |
| <key>CFBundleDocumentTypes</key> | |
| <array> | |
| <dict> | |
| <key>CFBundleTypeName</key> | |
| <string>All Files</string> | |
| <key>LSHandlerRank</key> |
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
| var fill = require('fill-colorcoded-bar'); | |
| var Bar = require('colorcoded-bar'); | |
| var raf = require('raf'); | |
| var data = []; | |
| for (var i = 0; i < 1000; i++) data[i] = Math.random(); | |
| (function(){ | |
| var el = document.createElement('canvas'); | |
| document.body.appendChild(el); |
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
| var Bar = require('colorcoded-bar'); | |
| var insertCSS = require('insert-css'); | |
| // Vertical bar | |
| (function(){ | |
| var bar = new Bar(); | |
| for (var i = 0; i < 100; i++) { | |
| bar.set(i, 'rgba(1, 1, 1, ' + i / 100 + ')'); | |
| } |