Skip to content

Instantly share code, notes, and snippets.

$/usr/local/lib/node_modules/noflo:> noflo ./examples/helloworld/hello.fbp
/usr/local/lib/node_modules/noflo/lib/ComponentLoader.js:140
throw new Error("Component " + name + " not available with base " +
^
Error: Component Output not available with base /usr/local/lib/node_modules/noflo
at ComponentLoader.load (/usr/local/lib/node_modules/noflo/lib/ComponentLoader.js:140:17)
at Network.load (/usr/local/lib/node_modules/noflo/lib/Network.js:93:26)
at Network.addNode (/usr/local/lib/node_modules/noflo/lib/Network.js:114:19)
at /usr/local/lib/node_modules/noflo/lib/Network.js:199:39
From c85dac7bcc1ceec84751d3b1927428ece90cd52f Mon Sep 17 00:00:00 2001
From: Stefan Sauer <ensonic@users.sf.net>
Date: Fri, 12 Sep 2014 14:42:23 +0200
Subject: [PATCH] info: avoid global variable
Use user_data to pass the log_file handle to the logger-function.
RFC: when calling gst_debug_add_log_function(NULL, user_data, cleanup)
we will implicity use gst_debug_log_default() again, but now can't
ensure user_data.
#!/usr/bin/env node
program = require 'commander'
http = require 'http'
noflo = require 'noflo'
runtime = require 'noflo-runtime-websocket'
querystring = require 'querystring'
program
.option('--host <hostname>', 'Hostname or IP for the runtime.', '127.0.0.1')
.option('--port <port>', 'Port for the runtime', parseInt, '3569')
@ensonic
ensonic / gist:5a4d727cbc6f5fc36655
Last active August 29, 2015 14:20
commander pitfalls, try coffee ./test.coffee --flag1 false
#!/usr/bin/env node
program = require 'commander'
program
.option('--flag1 [true/false]', 'Flag1 (default = false)', false)
.option('--flag2 [true/false]', 'Flag2 (default = false)', ((val) -> (val is "true")), false)
.parse process.argv
# value is a string if given
diff --git a/src/noflo-nodejs.coffee b/src/noflo-nodejs.coffee
index 923da82..7fe4019 100644
--- a/src/noflo-nodejs.coffee
+++ b/src/noflo-nodejs.coffee
@@ -60,7 +60,6 @@ require 'coffee-cache' if program.cache
stored = lib.getStored program
baseDir = process.env.PROJECT_HOME or process.cwd()
-interval = 10 * 60 * 1000
if !stored.id
// Generated by CoffeeScript 1.9.1
(function() {
var program;
program = require('commander')
.option('--flag1 [true/false]', 'Flag1 (default = false)', false)
.option('--flag2 [true/false]', 'Flag2 (default = false)', (function(val) {
return val === "true";
}), false)
.parse(process.argv);
# log backtraces + gsource ids to debug those pesky
# 'Source ID <num> was not found when attempting to remove it
# see: https://git.gnome.org/browse/glib/tree/glib/gmain.c#n1158
python
class MyFinishBreakpoint (gdb.FinishBreakpoint):
def stop (self):
gdb.execute("bt");
print "signal: %s" % self.return_value
return False # don't want to stop
#!/bin/sh
#
# bricklaunch.sh <program>
# - open a new vt and switch to it
# - give 'user' ownership of the vt
# - run the given programm on the new vt as 'user'
#
# TODO:
# - tell caller which tty was activated
#
#include "SparkIntervalTimer/SparkIntervalTimer.h"
// connect a 8Ohm speaker with a 220Ohm resistor to pin DAC and GND
const int audio = DAC1;
// internal LED to signal activity
const int led = D7;
// button to trigger playback
const int btn = D0;
['ColorSensor',
'DcMotor',
'Device',
'GyroSensor',
'I2cSensor',
'InfraredSensor',
'LargeMotor',
'Led',
'Led_all_off',
'Led_amber_on',