./bin/users.sh add -u jsmith -p changeme
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
library realdb.io; | |
import "dart:async"; | |
import "dart:io"; | |
import "dart:typed_data"; | |
abstract class ByteStream { | |
Future<int> read(); | |
Future<int> getPosition(); |
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
library realdb.io; | |
import "dart:async"; | |
import "dart:io"; | |
import "dart:typed_data"; | |
abstract class ByteStream { | |
Future<int> read(); | |
Future<int> getPosition(); |
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
Future<String> _createRowHash(String tableName, packed, {time, String salt}) async { | |
if (time == null) { | |
time = new DateTime.now().millisecondsSinceEpoch; | |
} | |
if (time is String) { | |
time = DateTime.parse(time).millisecondsSinceEpoch; | |
} | |
if (time is DateTime) { |
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 "package:gpio/gpio.dart"; | |
import "package:raspberry_pi/raspberry_pi.dart"; | |
import "package:os/os.dart"; | |
main() { | |
PiMemoryMappedGPIO gpio = new PiMemoryMappedGPIO(); | |
var lines = []; | |
for (var i = 0; i < 40; i += 2) { | |
var mode1 = gpio.getMode(i); |
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
Catch-22: | |
A catch that is added to a statement that invalidates the original statement. | |
Example: | |
Statement: A crazy person may leave war if they ask to. | |
Catch: A person who wants to leave war is not crazy. | |
This example shows that asking to leave war means you are not crazy, and thus you cannot leave war. |
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
@Location("/people") | |
@Many(Person, by: "username") | |
class People { | |
@Child(create: Person, description: "Add a Person") | |
Action addPerson; | |
} | |
@Profile("person") | |
@Editable() | |
class Person { |
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
{ | |
"people": { // This node does not have a value, but it's children can be a value, action, or plain node. | |
"$name": "People", // All nodes can have configs and attributes | |
"addPerson": { // This is can action which defines how to add a person. | |
"$name": "Add Person", // Defines a display name for this action. | |
"$invokable": "write", // Marks this as an action that requires write permission. This can also be 'read'. | |
}, | |
"kaendfinger": { // Defines a child node. | |
"$name": "Kenneth Endfinger", // Display Name (In this case, the person's name) [Optional] | |
"age": { // Defines a value node. |
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
#!/bin/sh | |
### BEGIN INIT INFO | |
# Provides: DGBox | |
# Required-Start: $remote_fs $syslog | |
# Required-Stop: $remote_fs $syslog | |
# Default-Start: 2 3 4 5 | |
# Default-Stop: 0 1 6 | |
# Short-Description: DGBox Service | |
# Description: DGBox Service | |
### END INIT INFO |