Skip to content

Instantly share code, notes, and snippets.

@smithje
smithje / docker-compose.yml
Created October 31, 2018 17:11
Solr cloud replication failure
version: '2'
services:
zoo-1:
image: zookeeper:3.4.13
restart: always
ports:
- "2181:2181"
environment:
ZOO_MY_ID: 1
ZOO_PORT: 2181

Calculate the phase of the moon in bash and get the appropriate icon. This can be used to put a picture of the phase of the moon in your bash prompt.

I used the "Simple" lunar phase calculator from here:

http://www.ben-daglish.net/moon.shtml

It seems to work well on OSX. The call to date that I use is not portable to linux or solaris since date is one of the most infuriatingly inconsistent utilities.