AniJS: Small Javascript animation library

AniJS logo

http://anijs.github.io/


From the AniJS website:

  • Include the AniJS library.
    <script src="anijs-min.js"></script>
    
  • Optionaly you can include some CSS animation definitions.
    <head>
        <!-- Animate.css library -->
        <link rel="stylesheet" href="http://anijs.github.io/lib/animationcss/animate.css">
    </head>
    
  • Start playing by adding data-anijs tag to any HTML element.
    <body>
        <header data-anijs="if: click, do: flipInY animated">
            header
        </header>
        <nav data-anijs="if: scroll, on: window, do: swing animated, to: footer">
            nav
        </nav>
        <div id="main" data-anijs="if: mouseover, on: body, do: swing animated">
            if: load, on: window, do: swing animated
        </div>
        <footer>
            footer
        </footer>
        <script src="anijs-min.js"></script>
    </body>
    

Also check out AniJS Studio. A Chrome Extention for prototyping AniJS animations on any page.

Spark: Shell script for converting any list of numbers into a sparkline (a small chart with no axes or coordinates)

Sparklines logo

http://zachholman.com/spark/


Example 1:

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

Example 2:

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

stamp: Ruby library for formatting dates and times based on human-friendly examples

https://github.com/jeremyw/stamp


See the Github page for a full list of features.

Dates

date = Date.new(2011, 6, 9)
date.stamp("March 1, 1999")         #=> "June 9, 2011"
date.stamp("Jan 1, 1999")           #=> "Jun 9, 2011"
date.stamp("Jan 01")                #=> "Jun 09"
date.stamp("Sunday, May 1, 2000")   #=> "Thursday, June 9, 2011"
date.stamp("Sun Aug 5")             #=> "Thu Jun 9"
date.stamp("12/31/99")              #=> "06/09/11"
date.stamp("DOB: 12/31/2000")       #=> "DOB: 06/09/2011"

Ordinal Days

date.stamp("November 5th")          #=> "June 9th"
date.stamp("1st of Jan")            #=> "9th of Jun"

Times

time = Time.utc(2011, 6, 9, 20, 52, 30)
time.stamp("3:00 AM")               #=> "8:52 PM"
time.stamp("01:00:00 AM")           #=> "08:52:30 PM"
time.stamp("23:59")                 #=> "20:52"
time.stamp("23:59:59")              #=> "20:52:30"
time.stamp("Jan 1 at 01:00 AM")     #=> "Jun 9 at 08:52 PM"
time.stamp("23:59 UTC")             #=> "20:52 PST"

Slide Deck Link: The Architecture of the Morrison’s OrderPad

Screenshot of slide from slide deck

http://martinfowler.com/articles/orderPad/


This is a slide deck (itself a neat little web application) detailing the architecture of a large scale web application and the design decisions made along the way.

From the slide deck

Morrisons OrderPad is a tablet web-application that helps staff in supermarkets place orders for new stock as they walk around the store. The resulting application makes a good expositional architecture for a tablet web application backed by a lightweight java server application. We highlight the separation of application control and DOM interaction on the client, using small, focused frameworks on the server, the broad-stack testing environment, and the use of a pilot project to understand what features were needed.

Jinja: Python template engine

Jinja logo

http://jinja.pocoo.org/


{% extends "layout.html" %}
{% block body %}
  <ul>
  {% for user in users %}
    <li><a href="{{ user.url }}">{{ user.username }}</a></li>
  {% endfor %}
  </ul>
{% endblock %}

Features (from Jinja website)

  • Sandboxed execution mode. Every aspect of the template execution is monitored and explicitly whitelisted or blacklisted, whatever is preferred. This makes it possible to execute untrusted templates.
  • powerful automatic HTML escaping system for cross site scripting prevention.
  • Template inheritance makes it possible to use the same or a similar layout for all templates.
  • High performance with just in time compilation to Python bytecode. Jinja2 will translate your template sources on first load into Python bytecode for best runtime performance.
  • Optional ahead-of-time compilation
  • Easy to debug with a debug system that integrates template compile and runtime errors into the standard Python traceback system.
  • Configurable syntax. For instance you can reconfigure Jinja2 to better fit output formats such as LaTeX or JavaScript.
  • Template designer helpers. Jinja2 ships with a wide range of useful little helpers that help solving common tasks in templates such as breaking up sequences of items into multiple columns and more.

Link: Command-line tools can be 235x faster than your Hadoop cluster

Bash symbol

http://aadrake.com/command-line-tools-can-be-235x-faster-than-your-hadoop-cluster.html


What I find funny is how he goes from this intermediate step:

cat *.pgn | grep "Result" | sort | uniq -c

To this intermediate step in one shot.

cat *.pgn | grep "Result" | awk '{ split($0, a, "-"); res = substr(a[1], length(a[1]), 1); \
if (res == 1) white++; if (res == 0) black++; if (res == 2) draw++;} \
END { print white+black+draw, white, black, draw }'

This is what I refer to as “knowing your business”.