% Contents of listings-setup.tex \usepackage{xcolor} \usepackage{fontspec} \lstset { basicstyle=\ttfamily, numbers=left, keywordstyle=\color[rgb]{0.13,0.29,0.53}\bfseries, stringstyle=\color[rgb]{0.31,0.60,0.02}, commentstyle=\color[rgb]{0.56,0.35,0.01}\itshape, numberstyle=\footnotesize, stepnumber=1, numbersep=5pt, backgroundcolor=\color[RGB]{248,248,248}, showspaces=false, showstringspaces=false, showtabs=false, tabsize=2, captionpos=b, breaklines=true, breakatwhitespace=true, breakautoindent=true, escapeinside={\%*}{*)}, linewidth=\textwidth, basewidth=0.5em, }

Forecasting with a command

Amolith

2018-12-14T21:41:00-04:00

% Contents of listings-setup.tex \usepackage{xcolor} \usepackage{fontspec} \lstset { basicstyle=\ttfamily, numbers=left, keywordstyle=\color[rgb]{0.13,0.29,0.53}\bfseries, stringstyle=\color[rgb]{0.31,0.60,0.02}, commentstyle=\color[rgb]{0.56,0.35,0.01}\itshape, numberstyle=\footnotesize, stepnumber=1, numbersep=5pt, backgroundcolor=\color[RGB]{248,248,248}, showspaces=false, showstringspaces=false, showtabs=false, tabsize=2, captionpos=b, breaklines=true, breakatwhitespace=true, breakautoindent=true, escapeinside={\%*}{*)}, linewidth=\textwidth, basewidth=0.5em, }

Forecasting with a command

We all love the CLI (and if we don’t, we should) so wouldn’t it be great if there was a tool to see your weather forecast with a single command? Ceda EI at webionite.com has written a tool that uses the Dark Sky API to give you the forecast for a day or week, at your location, and in Celsius or Fahrenheit.

Celsius

Weather for one week - $ curl sky.webionite.com/location

Weather for today - $ curl sky.webionite.com/location/t

Fahrenheit

Weather for one week - $ curl sky.webionite.com/f/location

Weather for today - $ curl sky.webionite.com/f/location/t

A great way to make this faster and simpler is to put an alias in your shell’s rc file. For bash, you can do that with:

echo "alias weather='curl sky.webionite.com/f/location'" >> ~/.bashrc

If you ever forget how to use the tool, just run curl sky.webionite.com and you’ll be given instructions.