Skip to content

Instantly share code, notes, and snippets.

View jampez77's full-sized avatar
🏠
Currently obsessed with bringing my life into Home Assistant

Jamie Nandhra-Pezone jampez77

🏠
Currently obsessed with bringing my life into Home Assistant
View GitHub Profile
@Terrance
Terrance / DataUsage.py
Last active June 7, 2021 05:29
Methods for parsing free mobile data usage on Three UK and FreedomPop UK. No guarantees that these will work with paid data plans.
from collections import namedtuple
from datetime import datetime, date, timedelta
import re
import requests
from bs4 import BeautifulSoup
Row = namedtuple("Row", ["number", "network", "total", "left", "reset"])
@alairock
alairock / GeoCaching API
Last active December 19, 2015 11:09
GeoCaching via CakePHP. Shows how to use connect via Oauth, get the token, and use the token to process a post request.
<?php
//Place the following line above the class:
//App::import('Vendor', 'OAuth/OAuthClient');
//OAuth component found here: http://code.42dh.com/oauth/
public function index() {
$data = array(
'AccessToken' => $this->Session->read('access_token'),
'Usernames' => array('alairock'),