homogenization of hours and minutes with awk


~$ awk -F ' ' '{if($3=="hours") {print $2*60, "min" } else {print $2,$3}}' /tmp/sample.data
120 min
20 min
0
20 min
120 min
25 min
5 min
10 min
25 min
45 min
10 min
95 min
80 min
20 min
0
20 min

sample file

data  2 hours
data  20 min
data  0
data  20 min
data  2 hours
data  25 min
data  5 min
data  10 min
data  25 min
data  45 min
data  10 min
data  95 min
data  80 min
data  20 min
data  0
data  20 min

Posted in bash, Debian, linux | Tagged , , | Leave a comment

calculating average with awk


awk -F ' ' '{rows++; sum+=$6} END {print sum/rows}' /tmp/jdoe.tsv


cat /tmp/jdoe.tsv
123123 321321 313211 3123132 31321 12 123123 12312
665465 979798 645641 6446540 99871 12 099808 54875

Posted in bash, Debian, linux | Tagged , | Leave a comment

backlight Lenovo T430 – debian – 3.16-2-amd64

Backlight keys are no longer working since last upgrade.

ugly workaround:

root@fvaras:/home/fvaras# cat /sys/class/backlight/intel_backlight/brightness 
4437
root@fvaras:/home/fvaras# echo 2000 > /sys/class/backlight/intel_backlight/brightness 

Posted in Debian, linux | Tagged , , , | Leave a comment

Jupiter and friends – Astrophotography

jupiter

Jupiter

Posted in astrophotography, photo | Tagged , , | Leave a comment

Milky way and star trails, chilean night skies

This gallery contains 3 photos.

this is just a draft of my work

More Galleries | Leave a comment

flowblade, mirage and other python-gtk2 applications crashing in debian

version
-------
flowblade    = 1:0.12.0-dmo1
mirage       = 0.9.5.1-3
python-gtk2  = 2.24.0-4 
debian       = jessie/sid 

how to reproduce
----------------
launch on the CLI
mirage or flowblade

you will get:
-------------
"""Attempt to unlock mutex that was not locked
Aborted"""


ugly fix:
---------

search:
"gtk.gdk.threads_init"
(example vim /usr/lib/python2.7/dist-packages/mirage.py, line 74)

replace by:
gtk.gdk.threads_init()
gtk.gdk.threads_enter()


source:
-------

https://bugs.mageia.org/show_bug.cgi?id=13776

Posted in bash, Debian | Tagged , | Leave a comment

Orion belt & the moon

This gallery contains 4 photos.

this is just a draft of my work

More Galleries | Leave a comment

clevo/LDLC w310cz laptop touchpad linux cli

If the touchpad goes mad, use synclient to fix it.

TODO:
put examples

source

Posted in Debian, linux, tech | Tagged , , , | Leave a comment

timelapse clouds

Posted in photo | Tagged , , , | Leave a comment

force promiscuous mode #linux #ifconfig

to force a network interface in promiscuous mode:


ifconfig eth0 promisc

to leave promiscuous mode:


ifconfig eth0 -promisc

Posted in linux | Tagged , , | Leave a comment