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….


kodi – network ports


If you use XBMC or now Kodi, those are the ports that should be open for full network access:
tcp 8080 – web interface, can be changed,
udp 1900 – dlna,
other ports:
tcp: 1084, 1308, 1131,
tcp (ipv6): 9090 (optional if you use ipv6 connections),
udp: 9777, 12374.
Those are ports that I opened and can be seen with console command:
netstat -ntulp
If you use iptables those are commands:

iptables -A TCP -p tcp --match multiport --dports 1084,1131,1308,8080 -m comment --comment "kodi" -j ACCEPT
iptables -A UDP -p udp --match multiport --dports 1900,9777,12374 -m comment --comment "kodi" -j ACCEPT
iptables-save > /etc/iptables/iptables.rules
systemctl reload iptables

…as root.
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.

world in ASCII code


asciiworld – that’s how world is represented in ASCII code. Interesting project which come equiped with some interesting tools: geoIP, day/night, satelite tracking, different world projections.

If you are on ArchLinux instalation is simple, just use AUR repository, for others compiling is the option, just read README files and Makefile for dependencies.

Anything else…, oh yes, the words of author vain aka.Peter Hofman: “Having a little bit of fun.”

Happy hacking….

cool-retro-term – cathode tube screen is back

fun-retro-terminal cool-retro-term-1

Lets face it, it is not meant to be default working terminal and can’s replace it, but it is fun, big tima fun and more like a game typing commands into old school screen. Cool-retro-term is written in the C++, use Qt GUI toolkit with qmltermwidget, a QML port of the qtermwidget class from the Konsole terminal emulator, was tested on various Linux distributions and can be found in their repositories.

9 predefined profiles are available via menu bar or context menu and you can make your own profile, changing default screen, font, effects and performance settings settings.

Give it a try, it’s fun…

…and happy hacking…

pyhn – issue #31 repair


New version is out, dealing with issue #31:
$ pyhn
Traceback (most recent call last):
File "/usr/local/bin/pyhn", line 8, in
File "/usr/local/lib/python2.7/dist-packages/pyhn/", line 85, in main
File "/usr/local/lib/python2.7/dist-packages/pyhn/", line 124, in build_interface
File "/usr/local/lib/python2.7/dist-packages/pyhn/", line 44, in refresh
stories = self.api.getTopStories(extra_page=self.extra_page)
File "/usr/local/lib/python2.7/dist-packages/pyhn/", line 307, in getTopStories
stories += self.getStories(source_latest)
File "/usr/local/lib/python2.7/dist-packages/pyhn/", line 240, in getStories
storyNumber = self.getStoryNumber(story)
File "/usr/local/lib/python2.7/dist-packages/pyhn/", line 101, in getStoryNumber
return int(source[numberStart:numberEnd])
ValueError: invalid literal for int() with base 10: '1'

…see also:

Happy hacking….