Skip to content

Instantly share code, notes, and snippets.

@biazzotto
biazzotto / esp32_ttgo_t5_213.yaml
Created October 9, 2022 22:01 — forked from TheGroundZero/esp32_ttgo_t5_213.yaml
TTGO T5 v2.3.1 2.13" display in ESPHome
# Board
# https://s.click.aliexpress.com/e/_9IDl91
# ESPHome docs:
# - https://esphome.io/components/display/waveshare_epaper.html
# - https://esphome.io/components/spi.html#spi
# - https://esphome.io/components/display/index.html#formatted-text
substitutions:
esphome_name: esp32_ttgo_t5
@biazzotto
biazzotto / text2pdf.py
Created April 6, 2021 18:58 — forked from OrkoHunter/text2pdf.py
text to pdf creater
#! /usr/bin/env python
# -*- coding: utf-8 -*-
import argparse
import reportlab.lib.pagesizes
from reportlab.pdfgen.canvas import Canvas
from reportlab.lib import units
from reportlab.lib.styles import ParagraphStyle
from reportlab.platypus import Paragraph, SimpleDocTemplate, BaseDocTemplate, XPreformatted
from reportlab.lib.colors import red, black, navy, white, green
@biazzotto
biazzotto / README.md
Created June 16, 2020 20:41 — forked from electron0zero/README.md
TP-Link AC600 Archer T2U Nano - Ubuntu 18.04 - Info and drivers
import ntptime
import network
import time
import machine
import utime
import gc
import urequests
import lvgl as lv
import lvesp32
import ILI9341 as ili
@biazzotto
biazzotto / fatorial_lambda.py
Last active May 17, 2020 16:18
Formas de função fatorial em lamba
fatorial = lambda x: (x<=1 and 1) or fatorial(x-1)*x
fatorial = lambda x: 1 if x<=1 else fatorial(x-1)*x
fatorial = lambda x: int(x<=1) or fatorial(x-1)*x
fatorial = lambda x: fatorial(x-1)*x if x>1 else 1
@biazzotto
biazzotto / corporate-linux-desktop-howto.md
Created March 25, 2020 17:36 — forked from jtyr/corporate-linux-desktop-howto.md
How to run Linux desktop in a corporate environment

How to run Linux desktop in a corporate environment

DISCLAIMER

Some of the practices described in this HOWTO are considered to be illegal as they often break internal corporate policies. Anything you do, you do at your own risk.

@biazzotto
biazzotto / install-pulse.sh
Created March 19, 2020 11:25 — forked from tafarij/install-pulse.sh
Install Pulse Secure on Ubuntu 16.04
# https://vt4help.service-now.com/kb_view_customer.do?sysparm_article=KB0010740#linux
wget https://secure.nis.vt.edu/resources/downloads/pulse-8.2R5.i386.deb
sudo dpkg –i pulse-8.2R5.i386.deb
/usr/local/pulse/PulseClient.sh install_dependency_packages
@biazzotto
biazzotto / pad_string.py
Last active June 3, 2020 15:38
Função que retorna strings alinhadas dentro de uma string com um tamanho determinado (80 caracteres por padrão), usando um caractere de preenchimento (espaço em branco por padrão). Caso nenhuma string seja fornecida, retorna uma string preenchida com o tamanho e o caractere de preenchimento fornecidos.
def pad_string(*args, lenght=80, char=chr(32)):
if len(char) == 0 or not isinstance(char, str):
char = chr(32)
else:
char = char[0]
if str(lenght).isdigit():
lenght = int(lenght) or 80
else:
lenght = 80
@biazzotto
biazzotto / JabberDemoBot.py
Created January 16, 2020 12:43 — forked from darrenparkinson/JabberDemoBot.py
Jabber BOT Demo using Python
#!/usr/bin/env python
# -*- coding: utf-8 -*-
import sys
import logging
import getpass
from optparse import OptionParser
import time
import sleekxmpp
Working commands 55PUS7181
http://192.168.3.51:1925/system
{"menulanguage":"Dutch","name":"55PUS7181\/12","country":"Netherlands","serialnumber_encrypted":"F6905Z+vyquNhZoXegQ1DzZXCqMIcjJpkzy3LsiPac=\n","softwareversion_encrypted":"1YWR42sjQ6xdjuyIXWZbyPnoRswLoRswLmKtAhR9GRsBx1qY=\n","model_encrypted":"jGNvXDerdJoWjOpwh\/n0gw2MgM7oRswLoRswLKC73wfMgra3S62c4=\n","deviceid_encrypted":"7mv3ZEtMH8oRswL0RoRswLISTn38FN8HAqfmSF95qoaiRsuukSraQ=\n","nettvversion":"6.0.2","epgsource":"one","api_version":{"Major":6,"Minor":2,"Patch":0},"featuring":{"jsonfeatures":{"editfavorites":["TVChannels","SatChannels"],"recordings":["List","Schedule","Manage"],"ambilight":["LoungeLight","Hue","Ambilight"],"menuitems":["Setup_Menu"],"textentry":["context_based","initial_string_available","editor_info_available"],"applications":["TV_Apps","TV_Games","TV_Settings"],"pointer":["not_available"],"inputkey":["key"],"activities":["intent"],"channels":["preset_string"],"mappings":["server_mapping"]},"systemfeatures":{"tvtype":"consumer","