Skip to content

Instantly share code, notes, and snippets.

View Grayda's full-sized avatar
🕹️

David Gray Grayda

🕹️
View GitHub Profile
@Grayda
Grayda / error codes
Last active August 29, 2015 14:21
Error codes from recovery.sh
Extracted from https://github.com/ninjasphere/sphere-factory-reset/blob/cba5514d118bd9bf8df8825acd2e380a9deea8e1/ninjapack/root/opt/ninjablocks/factory-reset/bin/recovery.sh using these Regexs:
^((?!progress).)*$
^((?!ERR).)*$
progress "0040" "Writing partition table..."
progress "0043" "Partition table write was successful."
progress "0042" "Partition table update failed - $?."
progress "0044" "Probing '$drive' partition table..."
progress "0047" "Partition table probe of '$drive' completed successfully."
@Grayda
Grayda / main.go
Created May 13, 2015 04:09
main.go for Ninja Sphere driver
package main
import (
"fmt"
"os"
"os/signal"
)
func main() {
@Grayda
Grayda / index.js
Created December 4, 2014 04:32
Orvibo AllOne node.js basic example
// Save this file as index.js and put allone.js in the same folder
var OrviboAllOne = require("./allone.js"); // Tell node.js we need to use this file. Store the file in the variable OrviboAllOne
var o = new OrviboAllOne(); // Now we make a new copy of that file and store it in the variable called "o"
// This code is only executed when allone.js reports that it's ready. Think of this slab of code as an event
o.on("ready", function() {
o.discover(); // When we're ready, tell our OrviboAllOne file to start looking or any AllOnes that it can find
});