Skip to content

Instantly share code, notes, and snippets.

View zerbfra's full-sized avatar

Francesco Zerbinati zerbfra

View GitHub Profile
@zerbfra
zerbfra / I2C_LCD_driver.py
Created January 9, 2020 21:38
Get data from Tesla powerwall and display it on a I2C LCD
# -*- coding: utf-8 -*-
# Original code found at:
# https://gist.github.com/DenisFromHR/cc863375a6e19dce359d
"""
Compiled, mashed and generally mutilated 2014-2015 by Denis Pleic
Made available under GNU GENERAL PUBLIC LICENSE
# Modified Python I2C library for Raspberry Pi
# as found on http://www.recantha.co.uk/blog/?p=4849
@zerbfra
zerbfra / index.js
Last active February 22, 2023 22:54
node-postgres connection and query with async/await
const pg = require('pg')
// create a config to configure both pooling behavior
// and client options
// note: all config is optional and the environment variables
// will be read if the config is not present
var config = {
user: '', // env var: PGUSER
database: '', // env var: PGDATABASE
password: '', // env var: PGPASSWORD
@zerbfra
zerbfra / docker-compose.yml
Created May 1, 2017 16:05
Wordpress + PhpMyAdmin + External volume
wordpress:
image: wordpress
links:
- wordpress_db:mysql
ports:
- 8080:80
volumes:
- ./html:/var/www/html
wordpress_db:
image: mariadb