Skip to content

Instantly share code, notes, and snippets.

@nfreader
nfreader / toner-status.sh
Created August 21, 2012 20:32
Gets status of toner cartridges in an HP LaserJet 2600n
#!/bin/bash
PRINTER = 192.168.1.65;
curl http://192.168.1.65/SSI/supply_status_info.htm | sed -e :a -e 's/<[^>]*>//g;/</N;//ba' > /tmp/printer;
BLACK=`grep -A 1 "Black Print Cartridge" /tmp/printer | grep %`
echo Black: $BLACK;
YELLOW=`grep -A 1 "Yellow Print Cartridge" /tmp/printer | grep %`
@iamcarrico
iamcarrico / gist:9744777
Created March 24, 2014 17:17
A proper goddamn comment
/**
* Short description.
*
* A longer, multi-line description.
*
* @param string $name
* A description of your variable
* @param int $count (default: 0)
*
* @return boolean
@nfreader
nfreader / movies.md
Last active September 2, 2017 23:33
A list of movies that I think are really good and definitely worth watching. Additions welcome :)
  • Haywire
  • Serenity
  • Moon
  • Source Code
  • Vantage Point
  • Redeye
  • Non-Stop
  • Run Lola Run
  • The International
  • The Other Guys