curl-ing the weather

In need for quick weather forecast? Use:

curl<your city>

Excellent little web service based on wego and, a web frontend for wego.

You can also use installed wego directly by obtaining  API key from here and editing ~/.wegorc like:

"APIKey": "",
"City": "",
"Numdays": 5,
"Imperial": false,
"Lang": "en"

….and you get weather forecast for five days.


Happy hacking….

inxi weather


inxi, very versatile script to get various hardware and software data, have also interesting option -w which display local weather data:
Weather: Conditions: 36 F (2 C) - Clear Time: February 4, 8:15 PM CET

…or if you use verbose variante with -x, -xx or -xxx, the output contains more data:
inxi -wxxx
Weather: Conditions: 36 F (2 C) - Clear Wind: From the South at 2 MPH Humidity: 87%
Pressure: 30.21 in (1023 mb) Location: None None (SVN) Altitude: 280 ft
Time: February 4, 8:20 PM CET (Europe/Ljubljana) Observation Time: February 4, 8:00 PM CET

…and with option -W you can change location input:
inxi -wxxx -W vienna,austria
Weather: Conditions: 39 F (4 C) - Mostly Cloudy Wind: From the West at 13 MPH Humidity: 70%
Pressure: 30.15 in (1021 mb) Wind Chill: 32 F (0 C)
Location: Vienna (OS) Altitude: 171 ft
Time: February 4, 8:24 PM CET Observation Time: February 4, 7:50 PM CET

Happy hacking…

hstr – improved bash history completition


When working on command line most of the time, there is always a problem with long commands, for example:
find . -depth -name '* *' -execdir bash \-c 'a="{}";mv -f "$a" ${a// /.}' \;
(this command replace all spaces ‘ ‘ with dots ‘.’ recursively in directories and file names, see my post for explanation)

There is option with ctrl-r or you can use clipboard manager like anamnesis or CopyQ or some other helper. A while ago I stumbled upon hstr on ArchLinux AUR repository (it’s called hh there) and I’m using it since then. The advantages are easier and more efficient browsing with managed history (removing sensitive commands) and option to bookmark favorite commands.
When installed just configure hh with:
hh --show-configuration >> ~/.bashrc
and with the same ctrl-r keyboard shortcut.

For quick introduction you can view video tutorial on Youtube or, when installed read man hh.

Happy hacking….

goto – enhanced cd command


goto – enhanced ‘cd’ command replacement tool with fuzzy file finder and a directory bookmark saver, similar to autojump.

The usage is simple and effective:

goto -h, -help, h, help  # Prints the Usage

goto "location address"  # Takes you to the "location address"

goto s, -s "shortcut"  # Saves the Current Directory location as "shortcut"

goto l, -l  # Lists all the Bookmarks saved

goto d, -d "shortcut"  # Deletes the "shortcut" saved

goto p, -p "shortcut"   # Prints the GOTO directory for "shortcut"

goto f, -f, find, -find "term"  # Fuzzy-Finds all the file/folder matching REGEX in the working directory

Give it a try…

…and happy hacking.

The Shell Shock Vulnerability

The Shell Shock exploit or bash vulnerability is a serious bug in most versions of Bash dating back to at least 1994. It allows remote attackers to execute arbitrary code because it processes trailing strings after function definitions in the values of environment variables.
Simple check is executing command:
x="() { :; }; echo x" bash -c :
and if “x” is printed then your bash is vulnerable. Taken from commandlinefu by user malathion
More about vulnerability can be found at where are also described more checking methods and more info about that.

commandlinefu – site for command line fanatics


If you are trying to get grip in command line or you just try to make your life simpler and use commands from your favorite terminal window you should visit and I bet you will find something useful there….