Skip to content

Instantly share code, notes, and snippets.

View guillaumeguerin's full-sized avatar
🎯
Focusing

Guillaume Guerin guillaumeguerin

🎯
Focusing
  • Bordeaux, France
View GitHub Profile
// Use with : node worldweather.js > weather_europe_`date '+%Y_%m_%d_%H_%M'`.csv
'use strict';
const puppeteer = require('puppeteer');
const fs = require('fs');
const https = require('https');
(async() => {
const browser = await puppeteer.launch({
headless: true
@guillaumeguerin
guillaumeguerin / World Weather
Created August 9, 2018 13:47
Weather Scraper
//Example url : https://www.timeanddate.com/weather/?continent=europe
var cityName = "";
var weather = "";
var temperature = "";
var rows = document.getElementsByTagName("tbody")[0].getElementsByTagName("tr");
for(i=0; i<rows.length; i++) {
cityName = rows[i].children[0].innerText.replace(" *","");
weather = rows[i].children[2].children[0].getAttribute("alt");
@guillaumeguerin
guillaumeguerin / main.go
Created June 21, 2017 11:58 — forked from mschoebel/main.go
Snippet: login/logout (Golang)
package main
import (
"fmt"
"github.com/gorilla/mux"
"github.com/gorilla/securecookie"
"net/http"
)
// cookie handling
Verifying that +guillaumeguerin is my blockchain ID. https://onename.com/guillaumeguerin