Coder Social home page Coder Social logo

danjacques / pixelproxy Goto Github PK

View Code? Open in Web Editor NEW
5.0 2.0 1.0 317 KB

PixelProxy is a single-binary PixelPusher controller with a web UI.

License: MIT License

Go 82.23% HTML 16.35% Shell 1.42%
pixelpusher led-strip-controller led-strip golang golang-application

pixelproxy's Introduction

pixelproxy

GoDoc Build Status

PixelProxy is a single-binary application with a built-in web UI that can:

  • Man-in-the-middle devices, reporting stats and state.
  • Record and replay data.
  • Visualize device state.

It is designed to run on an embedded system in support of a pixel-based installation.

PixelProxy is built on top of the github.com/danjacques/gopushpixels client library.

Unlike gopushpixels, PixelProxy has not been polished very much. My apologies for the crude code, but there is some good and useful stuff in there :)

Screenshots

Playback

Device List

Rendered View

Installation

NOTE: If pixelproxy is hosted in a private repository. You may need to configure Git (and Go) to download that repo over SSH so it can authenticate:

git config --global url."[email protected]:".insteadOf "https://bitbucket.org/"

Setup a Go environment and download:

# Setup a Go path (feel free to adjust):
export GOPATH=~/go

# Update PATH to include Go's bin directory.
export PATH=${GOPATH}/bin:${PATH}

# Download the source and dependencies (but do not install).
#
# This also initializes the submodule dependencies.
go get -u -t -d github.com/danjacques/pixelproxy/...

Running from Source

You can run PixelProxy from source with the following command:

# CD into "PixelProxy" project directory.
cd ${GOPATH}/src/github.com/danjacques/pixelproxy

# Run the "pixelproxy" application.
go run github.com/danjacques/pixelproxy/cmd/pixelproxy/main.go

Use the --help flag to list help options. An example debugging command-line might look like:

# Run the "pixelproxy" application with human-readable verbose logging.
go run ./cmd/pixelproxy/main.go \
    -vdebug --production=false --http_addr=0.0.0.0:8080

This will run the PixelProxy server on your system, bound to port 8080. It can then be accessed by visiting: http://localhost:8080 .

Deployment

Prior to deployment, you should bundle up the assets files into a binary filesystem. This can be done by running:

go generate github.com/danjacques/pixelproxy/assets

Now, produce a binary by running:

go install github.com/danjacques/pixelproxy/cmd/...

The binaries will be in ${GOPATH}/bin!

Shutdown Support

PixelProxy has the ability to allow the user to perform system actions. This is implemented by directly executing shell commands. In order to have these actions work as intended:

  • The user must have the following commands available on PATH:

    • sudo
    • shutdown
  • The user's sudoers config must allow no-password execution of the shutdown command. This can be implemented adding an /etc/sudoers configuration line:

    user_name ALL=(ALL) NOPASSWD: /sbin/shutdown
    

Resources

TODO

pixelproxy's People

Contributors

danjacques avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

Forkers

superq

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.