The colorful magic of ccze

The colorful magic of ccze

  ccze is a wonderful tool that brings real joy to the arduous task of reading or searching thru log files. #nerdalert We’ve been using ccze for many years but recently stumbled (um, actually, rtfm’d) upon the “missing” feature, namely the ability to output the colorized results in a format that can be piped to other commands such as grep. Introducing the -A flag! For example: tail -f /var/log/syslog | ccze -A | grep login will result in grep results made pretty and readable by ccze – not revolutionary, but very handy. And pretty. ccze also colorizes  ruby, apache, dhcp and most other types of log files and data files, try it out, you’ll be happy you did!  Notes: Get ccze on OS X with homebrew: brew install ccze Install ccze on Ubuntu / Debian with: apt-get install ccze ccze -h will give you HTML output Below is a quick video showing tail -f on an active DHCP server log with and without ccze and finally using ccze with -A and...
High Altitude Balloon – Sensor Data Collection

High Altitude Balloon – Sensor Data Collection

This is the code that flew in our first successful high altitude mission collecting data from the sensors that I (ungracefully) soldered onto a home etched circuit board hooked up to an Arduino .  We used the data to build some cool interactive graphs using Google’s graph engine. You can see data graphs, photos and video from the flight at happycapsule.com // High Altitude Payload Project Arduino sensor array. // http://happycapsule.com // // Version 1.0 by Greg Lawler - first successful flight Aug 14, 2011 // Sensor details and schematics can also be found on our web site listed above. #include SD.h #include OneWire.h #include DallasTemperature.h #include Wire.h #include Chronodot.h #define ONE_WIRE_BUS 3 OneWire oneWire(ONE_WIRE_BUS); DallasTemperature sensors(&oneWire); Chronodot chronodot = Chronodot(); // OneWire addresses, need to grab them with a canned script... DeviceAddress outsideThermometer = { 0x10, 0xB7, 0x5f, 0xb5, 0x01, 0x08, 0x00, 0x4e }; DeviceAddress insideThermometer = { 0x28, 0x6E, 0x33, 0xE3, 0x02, 0x00, 0x00, 0x8A }; const int chipSelect = 4; void setup() { Serial.begin(9600); Serial.print("Initializing SD card..."); pinMode(10, OUTPUT); sensors.begin(); sensors.setResolution(outsideThermometer, 10); sensors.setResolution(insideThermometer, 10); // bmp085Calibration(); if (!SD.begin(chipSelect)) { Serial.println("Card failed, or not present"); return; } Serial.println("card initialized."); } void loop() { delay(1000); sensors.requestTemperatures(); float tempO = sensors.getTempC(outsideThermometer); float tempI = sensors.getTempC(insideThermometer); if (tempO == -127.00) { Serial.print("Error getting temperature"); } else { // Serial.print(" C: "); // Serial.println(tempC); } // build the timestamp chronodot.readTimeDate(); String timeStamp = ""; int yearZ = chronodot.timeDate.year; timeStamp += yearZ; timeStamp += "-"; int monthZ = chronodot.timeDate.month; if (monthZ < 10) timeStamp += "0"; timeStamp += monthZ; timeStamp += "-"; int dayZ = chronodot.timeDate.day; if (dayZ < 10) timeStamp +=...