This file contains 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
<script> | |
import {datastore} from './data.js'; | |
const ENTER_KEY = 13; | |
const ESCAPE_KEY = 27; | |
let currentFilter = 'all'; | |
let items = []; | |
let editing = null; | |
datastore.subscribe(db => { |
This file contains 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 {writable} from 'svelte/store'; | |
import Automerge from 'automerge'; | |
if (typeof trikeQuit !== 'undefined' || trikeQuit !== null) { | |
document.addEventListener('keypress', e => { | |
if (e.metaKey && e.key === 'q') { | |
trikeQuit(); | |
} | |
}); | |
} |
This file contains 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
package main | |
import ( | |
"database/sql" | |
"embed" | |
"log" | |
"github.com/manifold/tractor/toolkit/engine" | |
"github.com/mattn/go-sqlite3" | |
) |
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains 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'); | |
const { exec } = require("child_process"); | |
const util = require('util'); | |
// const primary = '64 character key here' | |
const adder = (url) => { | |
exec(`node bin.js add ${url}`) | |
} |
This file contains 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
input.onButtonPressed(Button.A, function () { | |
radio.sendValue("ready", control.deviceSerialNumber()) | |
markReadyDevice(control.deviceSerialNumber()) | |
}) | |
input.onButtonPressed(Button.B, function () { | |
radio.sendValue("ensure", control.deviceSerialNumber()) | |
basic.showNumber(devices.length) | |
}) | |
radio.onReceivedString(function (receivedString) { | |
if (receivedString == "restart") { |
This file contains 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 fs = require('fs'); | |
var Twitter = require('twitter'); | |
const dest = 'faves'; | |
var client = new Twitter({ | |
consumer_key: '', | |
consumer_secret: '', | |
access_token_key: '', | |
access_token_secret: '', | |
}); |
This file contains 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
Pin(2, Pin.OUT).value(0) # value(1) | |
turns on and off the built in blue LED on the esp8266 nodemcu amica |
This file contains 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
# This file is executed on every boot (including wake-boot from deepsleep) | |
#import esp | |
# esp.osdebug(None) | |
import web | |
import bunny | |
import uos | |
import machine | |
# uos.dupterm(None, 1) # disable REPL on UART(0) | |
import gc | |
import webrepl |
This file contains 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 boardId = 'FIXME' | |
const { Repo } = require('hypermerge') | |
const Hyperswarm = require('hyperswarm') | |
const uuid = require('uuid/v4') | |
function myRepos(dbName) { | |
return new Repo({ memory: true }) | |
} |