Show Posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.


Topics - hakerdefo

Pages: 1 [2] 3 4
16
Conky / conky - Gmail new email information (perl version 1)
« on: November 19, 2016, 07:34:55 PM »
After fiddling with snakes (read Python) & gem hunting (read Ruby), finally I have found the pearl of wisdom to wash away the conky blues  :D

First install these script dependencies,

Code: [Select]
sudo apt-get install perl
sudo apt-get install libxml-simple-perl
sudo apt-get install libwww-perl

Next copy-paste following code in your text-editor,

Code: [Select]
#!/usr/bin/perl
use strict;
use XML::Simple;
use LWP::Simple;
my $u = $ARGV[0];
my $p = $ARGV[1];
my $xmldata = get("https://$u:$p\@mail.google.com/mail/feed/atom");
my $xml = new XML::Simple;
my $data = $xml->XMLin($xmldata);
my @arr = reverse sort keys %{$data->{'entry'}};
if (@arr != 0 ) {
print "[$u] :: New mails ". @arr ."\n";
my $n = 3;
$n = @arr if @arr < 3;
for(my $i = 0; $i < $n; $i++) {
    my $title = substr $data->{'entry'}->{$arr[$i]}->{'title'}, 0, 45;
    my $frm = substr $data->{'entry'}->{$arr[$i]}->{'author'}->{'name'}, 0, 30;
    my $dt = substr  $data->{'entry'}->{$arr[$i]}->{'modified'}, 0, 10;
    print "\n";
    print "From: $frm, Date: $dt\n";
    print "$title\n";
}
    print "\n";
} else {
    print "No new mail..\n";
}
exit 0;


Now by default this script will show the last three (3) unread mails. If you want to change this number, edit the following line in the script (line number 13),

Code: [Select]
my $n = 3;

Save the script with the name 'check-gmail.pl' somewhere in your $PATH and give it execute permissions,

Code: [Select]
chmod 755 /path/to/check-gmail.pl

Next open your .conkyrc in text-editor and add following line to call 'check-gmail.pl' via conky,

Code: [Select]
execi 600 perl /path/to/check-gmail.pl "your_gmail_username" "your_gmail_password"

Of-course you will need to replace "your_gmail_username" and "your_gmail_password" above with your Google username and password.

Tested-Okay & Satisfaction-Guaranteed 8)

In a bit of a hurry at the moment so no scrot as a proof-of-the-pudding  :D

Cheers!!!

17
VSIDO News & Announcements / Possible directory structure change in Debian
« on: November 17, 2016, 07:21:50 AM »
Most likely from Debian Stretch release onwards /bin, /sbin and /lib* will be symlinked to their counterpart in /usr.

More info here,

https://lists.debian.org/debian-devel/2016/09/msg00269.html

Cheers!!!

18
Feedback & Suggestions / VSIDO installer
« on: September 27, 2016, 06:07:18 AM »
Perhaps now is the time to invest some energy into incorporating a new installer. Possible candidates,

https://calamares.io/

https://github.com/linuxmint/live-installer

Cheers!!!

19
Scripts / PMPM - Making Password Management Easy & Secure
« on: June 26, 2016, 08:21:50 PM »
How many online accounts do you have? Chances are very high that you have more than 10 online accounts. According to one survey average Briton has 26 online accounts. Now it becomes next to impossible to create and remember strong passwords for all those accounts. Most users use weak passwords because they are easy to remember, And many people use one password for many different online accounts. Security guys can preach all they want but ease of use and less to remember the better mentality wins all time and every time, A cold fact!
Here I propose a radically different solution to the password management problem.
You will have to remember only one password. Can you remember one difficult password? Most people will be able to do it. We will call it "Master Password". This one "Master Password" will let you manage all those different online accounts! One "Master Password" will let you use super secure passwords, all very different from eachother, for your online accounts no matter how many accounts you have! Wanna try?
Here you go, Just download the attached script "pmpm_cli", Save it somewhere in your $PATH, chmod 755 it, And you are ready to go!
Wait a second, How to use this "PMPM" thing I hear you say!
In short you remember one secure "Master Password", run "pmpm_cli" script, enter "Master Password", online account name (vsido.org, gmail.com, sourceforge.net, github.com etc. etc.), your user name for that particular account, password length and voila! you get your super secure password copied to your clipboard. Once you are done using (read pasting) the password, the script will remove it from the clipbord. Nothing is stored anywhere. There are no databases, nothing. All you need when using another computer and/or another distribution is this script. No need to save-copy-carry anything. Just run this script whenever you need your password for one of your accounts. You can use it on any computer running gnu-linux. Just one 10 KB script and one password for managing-securing as many online accounts as you want! Need more help-info? Worry not just run the script "pmpm_cli" and use the inbuilt "Help" function for more info and usage examples. And in any case I'm always here in VSIDO forums so you can ask any question-query here and you will get any help you need.
Cheers!!!

20
I've Got a Life / What is your favourite sport?
« on: June 10, 2016, 09:55:30 AM »
I like to watch many sports. Football (Soccer), Field Hockey, Tennis, Rugby, F1, Motogp, and many others but Cricket is my favourite because it's the only sport that I can play decently.
So what is your favourite sport?

21
General Support / GTK killed ROXTerm
« on: June 05, 2016, 05:48:53 AM »

22
Scripts / pmxkcd - Desktop XKCD webcomic viewer & downloader for Linux
« on: March 24, 2016, 07:38:39 PM »
Like XKCD webcomic? If yes, then you can view-download current and random XKCD comics right from your desktop. More info on my GitHub repo here,

pmxkcd - Desktop XKCD webcomic viewer & downloader for Linux

Cheers!!!

23
Scripts / vsncftp - yet another FTP uploader
« on: March 09, 2016, 10:48:58 PM »
Here is another bash script to upload to FTP. This time it's a bit different than the previous one I posted here. This version uploads all the contents of a directory to FTP server. No fancy GUI this time. No input prompts. Just a wee dependency. Don't worry the script will cry if the dependency is not met with  :P

Before using the script you will have to add values to the following variables,

Code: [Select]
HOST_1='ftp-test.vsido.co.us'


Make sure  HOST_1  doesn't look like this,

Code: [Select]
HOST_1='ftp://ftp-test.vsido.co.us'

The backbone behind this script doesn't like the usage of  ftp://ftp


Code: [Select]
USER_1='your_ftp_user_name'

Code: [Select]
PASSWD='your_ftp_password'

Code: [Select]
LOCALPATH1='/path/to/directory/with/upload/files/*'

Mind the trailing  /*  DON'T REMOVE  /*


Code: [Select]
LOCALPATH2='/path/to/directory/with/upload/files'

MAKE SURE TO REMOVE   /*  WE DON'T NEED  /*  HERE. THE PATH SHOULD BE THE SAME MINUS TRAILING  /*


Code: [Select]
RDIR="/ftp/directory/to/upload/files/to"

Here add the FTP directory to which you wish to upload files. i.e.  /incoming   /ISO  /upload  etc.. etc..


Save the file somewhere in your $PATH. chmod 755 it. Run it. By default it will remain silent. Won't show any progress-transfer information. On completion, successful or erroneous, it will show detailed log file(s).

Cheers!!!

24
Scripts / vsftup - VSIDO FTP Uploader
« on: March 06, 2016, 10:44:13 PM »
Been unable to visit VSIDO forums for a while  :(
Came across this post today,

http://vsido.org/index.php?topic=1148.msg12225

So here is an attempt to solve that problem,

vsftup - VSIDO FTP Uploader

Nothing fancy! Uploads a file to an ftp server. No extra dependencies outside standard VSIDO install  8)
Make sure you give the full path to the directory on the FTP server when prompted.
i.e. To upload to 'ISO' directory on 'ftp://ftp-vsido.net' enter,
ftp://ftp-vsido.net/ISO/
when prompted.

If you don't use username and/or password (really???) for your ftp server you can leave them empty when prompted.

Download the attached script, chmod 755 it and give your feedback!

Cheers!!!

25
How To's / How to clean duplicate $PATH entries
« on: January 09, 2016, 09:02:31 PM »
Open terminal and type,
Code: [Select]
echo $PATH

Do you see any duplicate path entries? If no, Great! If yes, Worry not! Fix is simple!
Open  '.bashrc' file in your favorite text-editor and just add following lines at the bottom,

Code: [Select]
PATH="$(echo $PATH | perl -e 'print join(":", grep { not $seen{$_}++ } split(/:/, scalar <>))')"
export PATH

Save the file. Do Logout-Login and voila! No more duplicate path entries!
Cheers!!!

26
How To's / How to search internet more effectively & privately
« on: January 04, 2016, 07:32:59 PM »
Subject line is a bit of a cheating  ;) This one is not exactly a 'How To'; Rather it is a small list of some interesting and privacy respecting search engines. No DuckDuckGo cause we all know it  8)

startpage

unbubble

Qwant

Dribper

Deeperweb

searx

startpage and unbubble allow you to save your settings in a URL. You then just need to save or bookmark that URL.

Cheers!!!

27
I've Got a Life / RIP Ian Murdock
« on: December 30, 2015, 09:16:59 PM »
A shocker! Ian is dead! The founder of Debian project is no longer with us! Yesterday I read a series of tweets from Ian threatning suicide and complaining about police brutality. Back then I thought Ian's twitter account was compromised and didn't make much of it. Sadly a while back Docker's Ben Golub posted this sad news,

http://blog.docker.com/2015/12/ian-murdock/

And the following confirmed the sad news,

https://bits.debian.org/2015/12/mourning-ian-murdock.html

RIP Ian! Thoughts and prayers are with his near & dear ones!

28
I've Got a Life / America and the love for guns
« on: October 02, 2015, 05:09:06 AM »
Never understood why America (Americans) love the guns so much? The disasters keep happening again and again?
"Yes, and how many deaths will it take 'til he knows
That too many people have died?"
Many in the forums are americans and I would love to get their views on this topic.
https://en.wikipedia.org/wiki/Umpqua_Community_College_shooting

29
Scripts / PMRP - Poor Man's Radio Player
« on: August 06, 2015, 06:36:49 PM »
I was confused whether to post this as update to 'RADIO VSIDO - VSIDO's very own Internet radio player' or to start a new thread? But after some consideration I decided to start it as a new topic.
* So here it is. PMRP - Poor Man's Radio Player. Probably the best bash based Internet radio player in the world.
* Over 250 hand-picked radio stations spanning across different genres and subjects. Whatever you feel like listening to, you'll find it in PMRP.
* Better menus for easier navigation-selection of radio stations.
* Currently playing track information (If available).
Installing PMRP is easy. PMRP uses mpg123 as the back-end so first install it,

Code: [Select]
sudo apt-get install mpg123

I've attached pmrp here so download it first.

Download PMRP

And save it somewhere in your $PATH with the name 'pmrp' and 'chmod 755' it.
That's it! Open terminal, run 'pmrp', and enjoy from over 250 radio stations.
As usual view-review-comments are welcome.
Cheers!!!


30

(07 May 2017) Update  Begins:

Removed the dependencies on Perl and cURL.
Cleaned-up the script a bit.

Don't forget to read the set-up instructions posted down below if you are a new user  ;)

Here is updated pmwf script

Code: [Select]
#!/usr/bin/env bash
###################
local_latitude=
local_longitude=
local_unit=
api_key=
local_rm=$(which rm)
printf "\033c"
wget --user-agent="Mozilla/5.0 Gecko/20100101" --quiet --timeout=30 "http://api.openweathermap.org/data/2.5/weather?lat=$local_latitude&lon=$local_longitude&units=$local_unit&mode=json&APPID=$api_key" --output-document "/tmp/current.json"
wget --user-agent="Mozilla/5.0 Gecko/20100101" --quiet --timeout=30 "http://api.openweathermap.org/data/2.5/forecast/daily?lat=$local_latitude&lon=$local_longitude&cnt=4&units=$local_unit&mode=json&APPID=$api_key" --output-document "/tmp/forecast.json"
printf "\033c"
if [[ ! -f "/tmp/current.json" ]]; then
    echo ""
    echo -e "Can not connect to openweathermap.org!"
    echo -e "Please check your internet connection!"
    echo ""
    exit 1
else
    place=$(jq -r '.city.name' "/tmp/forecast.json")
    nation=$(jq -r '.city.country' "/tmp/forecast.json")
    time2=$(jq -r '.list[1].dt' "/tmp/forecast.json")
    time3=$(jq -r '.list[2].dt' "/tmp/forecast.json")
    time4=$(jq -r '.list[3].dt' "/tmp/forecast.json")
    time22=$(date -d @"$time2" +'%A, %d %B %Y')
    time33=$(date -d @"$time3" +'%A, %d %B %Y')
    time44=$(date -d @"$time4" +'%A, %d %B %Y')
    tempcurrent=$(jq -r '.main.temp' "/tmp/current.json")
    min2=$(jq -r '.list[1].temp.min' "/tmp/forecast.json")
    min3=$(jq -r '.list[2].temp.min' "/tmp/forecast.json")
    min4=$(jq -r '.list[3].temp.min' "/tmp/forecast.json")
    max2=$(jq -r '.list[1].temp.max' "/tmp/forecast.json")
    max3=$(jq -r '.list[2].temp.max' "/tmp/forecast.json")
    max4=$(jq -r '.list[3].temp.max' "/tmp/forecast.json")
    pressurecurrent=$(jq -r '.main.pressure' "/tmp/current.json")
    pressure2=$(jq -r '.list[1].pressure' "/tmp/forecast.json")
    pressure3=$(jq -r '.list[2].pressure' "/tmp/forecast.json")
    pressure4=$(jq -r '.list[3].pressure' "/tmp/forecast.json")
    humidcurrent=$(jq -r '.main.humidity' "/tmp/current.json")
    humid2=$(jq -r '.list[1].humidity' "/tmp/forecast.json")
    humid3=$(jq -r '.list[2].humidity' "/tmp/forecast.json")
    humid4=$(jq -r '.list[3].humidity' "/tmp/forecast.json")
    windcurrent=$(jq -r '.wind.speed' "/tmp/current.json")
    wind2=$(jq -r '.list[1].speed' "/tmp/forecast.json")
    wind3=$(jq -r '.list[2].speed' "/tmp/forecast.json")
    wind4=$(jq -r '.list[3].speed' "/tmp/forecast.json")
    direcurrent=$(jq -r '.wind.deg' "/tmp/current.json")
    dire2=$(jq -r '.list[1].deg' "/tmp/forecast.json")
    dire3=$(jq -r '.list[2].deg' "/tmp/forecast.json")
    dire4=$(jq -r '.list[3].deg' "/tmp/forecast.json")
    condicurrent=$(jq -r '.weather[].description' "/tmp/current.json")
    condi2=$(jq -r '.list[1].weather[].description' "/tmp/forecast.json")
    condi3=$(jq -r '.list[2].weather[].description' "/tmp/forecast.json")
    condi4=$(jq -r '.list[3].weather[].description' "/tmp/forecast.json")
    if [[ "$local_unit" == imperial ]]; then
windcurrent1="$windcurrent"
wind22="$wind2"
wind33="$wind3"
wind44="$wind4"
symb=$(echo -e "\u2109")
symb2="mph"
    else
windcurrent1=$(awk "BEGIN {print $windcurrent * 3.6}")
wind22=$(awk "BEGIN {print $wind2 * 3.6}")
wind33=$(awk "BEGIN {print $wind3 * 3.6}")
wind44=$(awk "BEGIN {print $wind4 * 3.6}")
symb=$(echo -e "\u2103")
symb2="kph"
    fi
    printf "\033c"
    echo -e '\e[01m'""
    echo -e "Location - $place, $nation:"
    echo ""
    echo -e "Current weather conditions:"
    echo -e '\e[0m'""
    echo -e "Temperature - $tempcurrent $symb"
    echo -e "Atmospheric Pressure - $pressurecurrent hPa"
    echo -e "Humidity - $humidcurrent %"
    echo -e "Wind speed - $windcurrent1 $symb2"
    echo -e "Wind direction - $direcurrent°"
    echo -e "Weather condition - $condicurrent"
    echo -e '\e[01m'""
    echo -e "Forecast for $time22:"
    echo -e '\e[0m'""
    echo -e "Minimum Temperature - $min2 $symb"
    echo -e "Maximum Temperature - $max2 $symb"
    echo -e "Atmospheric Pressure - $pressure2 hPa"
    echo -e "Humidity - $humid2 %"
    echo -e "Wind speed - $wind22 $symb2"
    echo -e "Wind direction - $dire2°"
    echo -e "Weather condition - $condi2"
    echo -e '\e[01m'""
    echo -e "Forecast for $time33:"
    echo -e '\e[0m'""
    echo -e "Minimum Temperature - $min3 $symb"
    echo -e "Maximum Temperature - $max3 $symb"
    echo -e "Atmospheric Pressure - $pressure3 hPa"
    echo -e "Humidity - $humid3 %"
    echo -e "Wind speed - $wind33 $symb2"
    echo -e "Wind direction - $dire3°"
    echo -e "Weather condition - $condi3"
    echo -e '\e[01m'""
    echo -e "Forecast for $time44:"
    echo -e '\e[0m'""
    echo -e "Minimum Temperature - $min4 $symb"
    echo -e "Maximum Temperature - $max4 $symb"
    echo -e "Atmospheric Pressure - $pressure4 hPa"
    echo -e "Humidity - $humid4 %"
    echo -e "Wind speed - $wind44 $symb2"
    echo -e "Wind direction - $dire4°"
    echo -e "Weather condition - $condi4"
    echo -e ""
    "$local_rm" -f "/tmp/forecast.json"
    "$local_rm" -f "/tmp/current.json"
fi
exit 0
###################


Cheers!!!


(07 May 2017) Update Ends:




(19 November 2015) Update  Begins:

Starting from 9 October 2015 OpenweatherMap API requires a valid APPID for access. So you'll need to register at openWeatherMap and get your API key. It's simple and free plan is good enough for most cases. I've updated the script and instructions to reflect these changes. you can get the latest version of pmwf and read updated install instructions on GitHub page here,

pmwf on GitHub

I want to thank PackRat and ozitraveller for bringing this to attention. You guys rock  8)

(19 November 2015) Update Ends:


As per suggestion by VastOne I've modified the original script to display current weather conditions and a 3 days weather forecast.

Code: [Select]
#!/bin/bash

clear

latit=
longi=
uneet=

curl -s --connect-timeout 30 -o /tmp/current.json "http://api.openweathermap.org/data/2.5/weather?lat=$latit&lon=$longi&units=$uneet&mode=json"
curl -s --connect-timeout 30 -o /tmp/forecast.json "http://api.openweathermap.org/data/2.5/forecast/daily?lat=$latit&lon=$longi&cnt=4&units=$uneet&mode=json"

if [ ! -f /tmp/forecast.json ]; then
echo ""
echo -e "Unable to connect to openweathermap.org!"
echo -e "Check your internet connection!"
echo ""

exit 1

else
place=$(cat /tmp/forecast.json | jq -r '.city.name')
nation=$(cat /tmp/forecast.json | jq -r '.city.country')
time2=$(cat /tmp/forecast.json | jq -r '.list[1].dt')
time3=$(cat /tmp/forecast.json | jq -r '.list[2].dt')
time4=$(cat /tmp/forecast.json | jq -r '.list[3].dt')
time22=$(date -d @"$time2" +'%A, %d %B %Y')
time33=$(date -d @"$time3" +'%A, %d %B %Y')
time44=$(date -d @"$time4" +'%A, %d %B %Y')
tempcurrent=$(cat /tmp/current.json | jq -r '.main.temp')
min2=$(cat /tmp/forecast.json | jq -r '.list[1].temp.min')
min3=$(cat /tmp/forecast.json | jq -r '.list[2].temp.min')
min4=$(cat /tmp/forecast.json | jq -r '.list[3].temp.min')
max2=$(cat /tmp/forecast.json | jq -r '.list[1].temp.max')
max3=$(cat /tmp/forecast.json | jq -r '.list[2].temp.max')
max4=$(cat /tmp/forecast.json | jq -r '.list[3].temp.max')
pressurecurrent=$(cat /tmp/current.json | jq -r '.main.pressure')
pressure2=$(cat /tmp/forecast.json | jq -r '.list[1].pressure')
pressure3=$(cat /tmp/forecast.json | jq -r '.list[2].pressure')
pressure4=$(cat /tmp/forecast.json | jq -r '.list[3].pressure')
humidcurrent=$(cat /tmp/current.json | jq -r '.main.humidity')
humid2=$(cat /tmp/forecast.json | jq -r '.list[1].humidity')
humid3=$(cat /tmp/forecast.json | jq -r '.list[2].humidity')
humid4=$(cat /tmp/forecast.json | jq -r '.list[3].humidity')
windcurrent=$(cat /tmp/current.json | jq -r '.wind.speed')
wind2=$(cat /tmp/forecast.json | jq -r '.list[1].speed')
wind3=$(cat /tmp/forecast.json | jq -r '.list[2].speed')
wind4=$(cat /tmp/forecast.json | jq -r '.list[3].speed')
direcurrent=$(cat /tmp/current.json | jq -r '.wind.deg')
dire2=$(cat /tmp/forecast.json | jq -r '.list[1].deg')
dire3=$(cat /tmp/forecast.json | jq -r '.list[2].deg')
dire4=$(cat /tmp/forecast.json | jq -r '.list[3].deg')
condicurrent=$(cat /tmp/current.json | jq -r '.weather[].description')
condi2=$(cat /tmp/forecast.json | jq -r '.list[1].weather[].description')
condi3=$(cat /tmp/forecast.json | jq -r '.list[2].weather[].description')
condi4=$(cat /tmp/forecast.json | jq -r '.list[3].weather[].description')

if [ "$uneet" == imperial ]
then
windcurrent1="$windcurrent"
wind22="$wind2"
wind33="$wind3"
wind44="$wind4"
symb=°F
symb2=mph
else
windcurrent1=$(perl -le 'print $ARGV[0] * 3.6' "$windcurrent")
wind22=$(perl -le 'print $ARGV[0] * 3.6' "$wind2")
wind33=$(perl -le 'print $ARGV[0] * 3.6' "$wind3")
wind44=$(perl -le 'print $ARGV[0] * 3.6' "$wind4")
symb=°C
symb2=kph
fi

echo ""
echo -e "Location - $place, $nation:"
echo ""
echo -e "Current weather conditions:"
echo ""
echo -e "Temperature - $tempcurrent $symb"
echo -e "Atmospheric Pressure - $pressurecurrent hPa"
echo -e "Humidity - $humidcurrent %"
echo -e "Wind speed - $windcurrent1 $symb2"
echo -e "Wind direction - $direcurrent°"
echo -e "Weather condition - $condicurrent"
echo ""
echo ""
echo -e "Forecast for $time22:"
echo ""
echo -e "Minimum Temperature - $min2 $symb"
echo -e "Maximum Temperature - $max2 $symb"
echo -e "Atmospheric Pressure - $pressure2 hPa"
echo -e "Humidity - $humid2 %"
echo -e "Wind speed - $wind22 $symb2"
echo -e "Wind direction - $dire2°"
echo -e "Weather condition - $condi2"
echo ""
echo ""
echo -e "Forecast for $time33:"
echo ""
echo -e "Minimum Temperature - $min3 $symb"
echo -e "Maximum Temperature - $max3 $symb"
echo -e "Atmospheric Pressure - $pressure3 hPa"
echo -e "Humidity - $humid3 %"
echo -e "Wind speed - $wind33 $symb2"
echo -e "Wind direction - $dire3°"
echo -e "Weather condition - $condi3"
echo ""
echo ""
echo -e "Forecast for $time44:"
echo ""
echo -e "Minimum Temperature - $min4 $symb"
echo -e "Maximum Temperature - $max4 $symb"
echo -e "Atmospheric Pressure - $pressure4 hPa"
echo -e "Humidity - $humid4 %"
echo -e "Wind speed - $wind44 $symb2"
echo -e "Wind direction - $dire4°"
echo -e "Weather condition - $condi4"
echo ""

rm /tmp/forecast.json
rm /tmp/current.json

fi

exit 0


For this script to work you'll need to install one little tool first. Don't worry, it's easy. Just do this in your terminal,

Code: [Select]
sudo apt-get install jq

Next go to following website and search for the latitude-longitude of your place,

Tageo WorldWide Index

Open the script in your favorite text editor. Right at the beginning of the file you will find three empty variables 'latit', 'longi', and 'uneet'. You need to assign latitude of your location to the variable 'latit', longitude of your location to the variable 'longi' and your preferred units system to the variable 'uneet'. There are two main units systems in use. metric and imperial. Which one should you use? If you prefer to measure temperature in Celsius (Centigrade) & distance in Kilometres (km), use metric. And if you prefer to measure temperature in Fahrenheit & distance in Miles (mi), use imperial.

For example for a VSIDO user in London, UK it would look like this,

Code: [Select]
latit=51.500
longi=-0.117
uneet=metric

And for someone in New York, US it would look like,

Code: [Select]
latit=40.714
longi=-74.006
uneet=imperial

Save the script after making the necessary changes with the name 'pmwf' somewhere in your $PATH and 'chmod 755' it.
Whenever you wish to see some weather info for your place simply open terminal, type pmwf, hit Enter and you'll have current weather conditions with a 3 day weather forecast right in terminal.

Cheers!!!

Pages: 1 [2] 3 4