Skip to content

Instantly share code, notes, and snippets.

View jem's full-sized avatar

Jacob Mattingley jem

View GitHub Profile
#
# Lunar/Moon phases ruby class
#
# Code is based upon Bradley E. Schaefer''s moon phase algorithm.
# Ruby version based on JavaScript Phase Calculator by Stephen R. Schmitt
class Moon
attr_reader :epoch, :phase, :days, :icon, :dist, :ll
# Return the current (or input a date) moon.
# Moon.new
@jem
jem / gist:1083800
Created July 15, 2011 00:27
multi-threaded shell scripting
ls | xargs -P2 -I% echo "This file is [%]"
# -I replstr