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
#! /bin/bash | |
BCC=~/git/bs/bsn-cloud-configuration | |
set -e | |
usage() | |
{ | |
cat <<EOF | |
Usage: $0 [options] |
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 express = require('express'); | |
const multer = require('multer'); | |
const app = express(); | |
const storage = multer.diskStorage({ | |
destination: './uploads/', | |
filename: function(req, file, cb) { | |
cb(null, file.originalname); | |
} |
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 express = require('express'); | |
var app = express(); | |
var bsSocketMessage = new BSDatagramSocket(); | |
var intervl = undefined; | |
var udpPort = 5003; | |
var heartBeatFreqMs = 4000; | |
function main() { | |
// For testing: |
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
'''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''' | |
' Shows how to get network interface information using an http endpoint. | |
' This is especially useful from javascript. | |
' The http endpoint is http://localhost:8080/get-network-info. | |
' As written, this gets the wired (ethernet) interface info. You can | |
' get the wifi interface info by passing a 1 instead of 0 to | |
' GetNicInfo on line 66: | |
' m.mVar.GetNicInfo(1, retAA.info) | |
Sub Main() | |
'''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''' |
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
'This script will bootstrap a BrightSign and is suitable for use with DHCP option | |
'43. It's job is to download an application/presentation zip file, and/or a | |
'firmware update. | |
' | |
'The application zip file is a standard zip file that can contain any combination | |
'of files that can run on a BrightSign. The only requirement is that it contains | |
' an autorun.brs to bootstrap the application. | |
' | |
'There are several tokens that need to be filled in for this script to work. It | |
'is designed to download two files at once, usually the application zip and a |
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
' Example of registry entries to save and retrieve: | |
'{ | |
' "mystring": "foo", | |
' "myinteger": 1, | |
' "myboolean": true | |
'} | |
' Example of retrieving values using curl on MacOs: | |
' curl http://172.16.1.96:8081/registry-settings?keys=mystring,myinteger | |
' | |
' Example of saving values with curl on MacOs: |
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
Sub Main() | |
nc = CreateObject("roNetworkConfiguration", 0) | |
if type(nc) <> "roNetworkConfiguration" then | |
nc = CreateObject("roNetworkConfiguration", 1) | |
endif | |
if type(nc) = "roNetworkConfiguration" then | |
dwsAA = CreateObject("roAssociativeArray") | |
dwsAA["port"] = "80" | |
' Turn off authentication: |
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
Sub Main(args) | |
url$ = "file:///index.html" | |
if args <> invalid and args.Count() > 0 then | |
url$ = args[0] | |
end if | |
print "url = ";url$ | |
DoCanonicalInit() |
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
#!/bin/bash | |
# Usage: send2bs <brightsign player ip address> <file to send> admin:<serial>. | |
# The last argument is the credentials, which can be omitted if you turn off authentication on the initial page | |
# of the diagnostic web server (DWS) by clicking "change password" > Remove Password. | |
remote=$1 | |
filename=$2 | |
if [ -z ${3} ]; then creds=""; else creds="--digest -u $3"; fi | |
cmd="curl -X POST --data-binary \"@${filename}\" ${creds} --header \"Allow-Overwrite: true\" --header \"Content-Type: application/octet-stream\" \"http://${remote}/upload.xml?rp=sd&r=sd&t=${filename}\" | grep -q '<result>SUCCESS</result>'" | |
if eval $cmd; then | |
echo Sent |
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
'''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''' | |
' Delay is in ms. Message will be displayed for this length of time. | |
' Specify 0 to return immediately, and rely on the parent message loop. | |
' Specify -1 for infinite display with a local message loop. | |
Sub Notify(message As String, delay As Integer) | |
'''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''' | |
print message | |
gaa = GetGlobalAA() | |
If gaa.tw = invalid Then | |
videoMode = CreateObject("roVideoMode") |