inxi weather

archlinux-logo-dark-200dpi.b42bd35d5916

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…

Advertisements

hstr – improved bash history completition

hh>

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

archlinux-logo-dark-200dpi.b42bd35d5916

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

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

pyhn – issue #31 repair

pyhn

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

Download:
python
…or…
github
…see also:
pyhn

Happy hacking….

tfman – a different file manager

tfman tfman_vim

There are a plead different file managers out there, with or without GUI, with variable amount of panels, keyboard or mouse driven and so on, but this one is a little bit different. It is still in an early stage of development so it is not yet 100% ready, but it is already show potential to be useful terminal driven file manager.

It is named tfman  – “text file manager” and it performs file operations through textual representation of file system which is in the form of plain text, editable with any text editor and may contain multiple operations of every kind. Tfman can be used from command-line or from within Vim as multi-window file manager.

A quick start guide is here, tutorial here and manual page here.

For now it is only available as package at Arch AUR, for other Linux flavours you must compile and install tfman manually.

Happy hacking….

pyhn – console Hacker News client

pyhn

pyhn – is a simple and easy to use, but very effective console client for Hacker News, written in Python and supports Python.2x and Python.3x installation.
It does not support auto refresh function, so refreshing must be done manually, but other than that, it got everything for effective usage. By default configuration file is located in $HOME/.pyhn/config and can be easy adapted:
[keybindings]
open_story_link = S,enter
show_story_link = s
open_comments_link = C
show_comments_link = c
open_user_link = U
show_user_link = u
up = j
down = k
page_up = ctrl d
page_down = ctrl u
first_story = g
last_story = G
refresh = r
reload_config = R

[settings]
cache = /home/socketubs/.pyhn/cache
cache_age = 5
browser_cmd = __default__ #or browser_cmd = links __url__

[colors]
body = default||standout
focus = black|light green|underline
footer = black|light gray
footer-error = dark red,bold|light gray
header = dark gray,bold|white|
title = dark red,bold|light gray
help = black,bold|light gray

…there is no classic manual help file present, but keyboard shortcuts help can be invoked with “h” or “?” key and that is, because of pyhn simplicity all you need.

Additional links:
authors site
pyhn on python.org

Happy reading and hacking….