Skip to content

Instantly share code, notes, and snippets.

View schlan's full-sized avatar

Sebastian Chlan schlan

  • Dublin Ireland
View GitHub Profile
@schlan
schlan / adb-all
Last active December 5, 2016 15:44
Send adb commands to all connected devices
#!/bin/bash
if [ "$#" -lt 1 ]
then
echo "No arguments given"
exit
fi
ADB="adb"
ARGS="$@"
package com.google.gson.functional;
import com.google.gson.Gson;
import com.google.gson.GsonBuilder;
import com.google.gson.TypeAdapter;
import com.google.gson.TypeAdapterFactory;
import com.google.gson.reflect.TypeToken;
import com.google.gson.stream.JsonReader;
import com.google.gson.stream.JsonWriter;
import java.io.IOException;
@schlan
schlan / esb_smart_meter_stats.py
Last active July 19, 2024 21:56
Download Smart Meter stats from https://myaccount.esbnetworks.ie
#!/usr/bin/env python3
import requests
from bs4 import BeautifulSoup
import re
import json
from datetime import datetime, timedelta, timezone
def load_esb_data(user, password, mpnr, start_date):
s = requests.Session()