Skip to content

Instantly share code, notes, and snippets.

View SerafimPoch's full-sized avatar

Serafim Pochapinskyi SerafimPoch

View GitHub Profile
@SerafimPoch
SerafimPoch / Buttons.js
Created February 13, 2018 20:54
Weather
export const Faren = c => Math.round(c * (9 / 5) - 459.67);
export const Celc = k => Math.round(k - 273.15);
@SerafimPoch
SerafimPoch / Geo.js
Created February 12, 2018 13:01
Weather-app
const buildRequestUrl = (lat, lon) => {
const key = "b8a59b301233a16e12819fc3b17ebc57";
let url =
"https://api.openweathermap.org/data/2.5/forecast?" +
"lat=" +
lat +
"&lon=" +
lon +
"&APPID=" +
key;
const key = "b8a59b301233a16e12819fc3b17ebc57";
const showPosition = position => {
updateByGeo(position.coords.latitude, position.coords.longitude);
};
export const updateByGeo = (lat, lon) => {
let url =
"https://api.openweathermap.org/data/2.5/forecast?" +
"lat=" +