A snippet of for-each syntatic sugar for Java loops:
for (final Person person : each (ALICE, BOB, CAT)) person.say("Hello!");
And elsewhere:
public static <T> T[] each(final T... array) { return array; }
A snippet of for-each syntatic sugar for Java loops:
for (final Person person : each (ALICE, BOB, CAT)) person.say("Hello!");
And elsewhere:
public static <T> T[] each(final T... array) { return array; }
Where are the Java code beautifiers? My criteria:
Not very many criteria! And yet … very little turned up that did not violate one requirement or the other. I came up with exactly one match: Jacobe, personal edition.
Andrew Phillips posts A general-purpose utility to retrieve Java generic type values which fits in nicely with Gafter's Gadget and TypeLiteral
from Guice.
Two miracle utilities: rlwrap
and screen
.
rlwrap
Ever wish you had nice command-line editing like BASH but the tool you are using is hopeless? rlwrap
is the tool for the job: it is a readline wrapper for any program that reads from stdin
. A classic use case is wrapping sqlplus
.
screen
Say you have an on-again, off-again shell session you come back to throughout the day. You could keep a shell window open all day. But what if you change machines, say from a laptop to a desktop and back again? screen
is the tool for the job: it is a full-screen window manager for terminal sessions. Disconnect from the current session, keep screen
running in the background, and reconnect later at your convience. Nothing is lost.