GithubHelp home page GithubHelp logo

printhack's Introduction

Overview

Many HP printers allow you to set their status LCD to whatever message you'd like. This has historically been used for evil ("ERROR: INTERNAL FIRE" and so on). This tool turns your printer into a useful feedback device, with small amounts of data fed to it at interval by long-running processes.

When you pass by on your way to do something more important, you can take a glance at this glowing blue LCD and know that you're seeing nearly-live data.

Example uses

Requirements

PHP5.3+ with CLI and socket support compiled in.

Example Usage: Manual message set

$ ./hardset.php -t 192.168.1.79 an example messages

And, poof! Your HP printer should now display the message you've provided.

Example Usage: Running a service

$ ./service.php -t 192.168.1.79 -s Weather

This process will keep active until killed, and update your printer with the current temperature for your area. You can skip the command-line arguments by setting defaults in the config.php file located in the base folder.

Writing a new service

namespace PrintHack;

class SystemLoad implements DataService\DataService
{
	public function getMessage($options=array())
	{
		$uptime = trim(`uptime`);
		$parts = preg_split("/load average[s]?:\s+/i", $uptime, 2);
		return $parts[1];
	}
}

// And to use it...
$console = new Console;
$service = new SystemLoad;
$console->runService($service);

Other ideas

  • Countdown to an important milestone
  • Total website hits for the day
  • A single stock price, or a collection that transitions each second
  • Open tickets
  • Current count of online Jabber users in a company
  • @hplcd twitter message displayer
  • Unread email count
  • Order count for the day
  • Average load time for your website
  • Application build status
  • Randomly chosen available domain name
  • Specific currency exchange rate

printhack's People

Stargazers

 avatar  avatar  avatar  avatar  avatar

Watchers

 avatar

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.