Archive

Archive for January, 2016

weather information

January 23, 2016 Leave a comment

Problem
You need a free weather API.

Solution
Use http://openweathermap.org. See the API description here.

Example:

http://api.openweathermap.org/data/2.5/weather?q=budapest&appid=44db6a862fba0b067b1930da0d769e98&units=metric

Sample output:

{
	"coord": {
		"lon": 19.04,
		"lat": 47.5
	},
	"weather": [
		{
			"id": 600,
			"main": "Snow",
			"description": "light snow",
			"icon": "13n"
		},
		{
			"id": 701,
			"main": "Mist",
			"description": "mist",
			"icon": "50n"
		}
	],
	"base": "cmc stations",
	"main": {
		"temp": -4,
		"pressure": 1034,
		"humidity": 85,
		"temp_min": -4,
		"temp_max": -4
	},
	"wind": {
		"speed": 2.1,
		"deg": 100
	},
	"clouds": {
		"all": 90
	},
	"dt": 1453579200,
	"sys": {
		"type": 1,
		"id": 5724,
		"message": 0.0092,
		"country": "HU",
		"sunrise": 1453530015,
		"sunset": 1453563103
	},
	"id": 3054643,
	"name": "Budapest",
	"cod": 200
}

As can be seen, the temperature in this city is -4 Celsius.

Categories: api Tags: ,

[manjaro] install an older version of a package (downgrade)

January 5, 2016 Leave a comment

Problem
There is a problem with the newest version of a package and you want to go back to the previous version. How to do that?

Note: currently (January 2016) there is a problem with the newest truecrypt package (truecrypt 7.1a-3), you cannot mount any volume, so it is suggested to install version 7.1a-2.

Solution
Visit the official archive site at https://archive.archlinux.org/ , enter packages/, and download the package with the desired version. The extension of a package is .tar.xz .

How to install it from the file system:

sudo pacman -U package.tar.xz

However, if you update all your packages with “yaourt -Syua“, this older package will be upgraded. To prevent that, edit the file “/etc/pacman.conf” and put the name of the package in an ignore list. My ignore list looks like this:

IgnorePkg   = vuze truecrypt
Categories: manjaro Tags: , ,