Giter Club home page Giter Club logo

spark's Introduction

spark

sparklines for your shell

See? Here's a graph of your productivity gains after using spark: ▁▂▃▅▇

install

spark is a shell script, so drop it somewhere and make sure it's added to your $PATH. It's helpful if you have a super-neat collection of dotfiles, like mine.

If you're on OS X, spark is also on Homebrew:

brew install spark

usage

Just run spark and pass it a list of numbers (comma-delimited, spaces, whatever you'd like). It's designed to be used in conjunction with other scripts that can output in that format.

spark 0 30 55 80 33 150
▁▂▃▅▂▇

Invoke help with spark -h.

cooler usage

There's a lot of stuff you can do.

Number of commits to the github/github Git repository, by author:

› git shortlog -s |
      cut -f1 |
      spark
  ▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▃▁▁▁▁▁▁▁▁▂▁▁▅▁▂▁▁▁▂▁▁▁▁▁▁▁▁▂▁▁▁▁▁▁▁▁▁▁▁▁▁▁

Magnitude of earthquakes over 1.0 in the last 24 hours:

› curl http://earthquake.usgs.gov/earthquakes/catalogs/eqs1day-M1.txt --silent | 
  sed '1d' |
  cut -d, -f9 |
  spark
  ▅▆▂▃▂▂▂▅▂▂▅▇▂▂▂▃▆▆▆▅▃▂▂▂▁▂▂▆▁▃▂▂▂▂▃▂▆▂▂▂▁▂▂▃▂▂▃▂▂▃▂▂▁▂▂▅▂▂▆▆▅▃▆

Code visualization. The number of characters of spark itself, by line, ignoring empty lines:

› awk '{ print length($0) }' spark |
  grep -Ev 0 |
  spark
  ▁▁▁▁▅▁▇▁▁▅▁▁▁▁▁▂▂▁▃▃▁▁▃▁▃▁▂▁▁▂▂▅▂▃▂▃▃▁▆▃▃▃▁▇▁▁▂▂▂▇▅▁▂▂▁▇▁▃▁▇▁▂▁▇▁▁▆▂▁▇▁▂▁▁▂▅▁▂▁▆▇▇▂▁▂▁▁▁▂▂▁▅▁▂▁▁▃▁▃▁▁▁▃▂▂▂▁▁▅▂▁▁▁▁▂▂▁▁▁▂▂

Since it's just a shell script, you could pop it in your prompt, too:

ruby-1.8.7-p334 in spark/ on master with history: ▂▅▇▂
›

wicked cool usage

Sounds like a wiki is a great place to collect all of your wicked cool usage for spark.

▇▁ ⟦⟧ ▇▁

This is a @holman joint.

spark's People

Contributors

holman avatar joshmoore avatar gwern avatar peff avatar markusfisch avatar benburkert avatar heyc avatar etanol avatar jeffabrahamson avatar judofyr avatar nrr avatar zsprackett avatar akatrevorjay avatar

Watchers

lemonhall avatar James Cloos avatar  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.