Skip to content

Instantly share code, notes, and snippets.

Tihomir Mladenov TiMladenov

View GitHub Profile
View postman_oauth_test.js
let userSecret = "your_user_secret";
let clientSecret = "your_client_secret";
let host_url = 'your_host_url';
let scope = 'your_app_scope';
let toEncode = userSecret +":"+ clientSecret;
toEncode = btoa(toEncode);
pm.environment.set("auth_token", toEncode);
pm.environment.set("host_url", host_url);
View mosquitto.conf
pid_file /var/run/mosquitto.pid
persistence true
persistence_location /var/lib/mosquitto/
log_dest file /var/log/mosquitto/mosquitto.log
include_dir /etc/mosquitto/conf.d
listener 8883 0.0.0.0
View zerynth_ssl_mqtt.py
################################################################################
# MQTT at mosquitto.org
#
# Created: 2015-10-15 21:37:25.886276
#
################################################################################
import streams
from mqtt import mqtt
from wireless import wifi
View wxpython_refresh_problem.py
import wx
import socket
import feedparser
class NewsRss(wx.Panel):
def __init__(self, parent):
super(NewsRss, self).__init__(parent = parent, id = wx.ID_ANY, pos = wx.DefaultPosition, size = wx.DefaultSize, style = wx.TAB_TRAVERSAL)
self.rss_urls = []
self.parent = parent
View adafruit_esp32_LCD_16x2_test
/*
Demonstration sketch for Adafruit i2c/SPI LCD backpack
using MCP23008 I2C expander
( http://www.ladyada.net/products/i2cspilcdbackpack/index.html )
This sketch prints "Hello World!" to the LCD
and shows the time.
The circuit:
* 5V to Arduino 5V pin
View ESP32_I2C_LCD_Test
#include <LiquidCrystal.h>
#include <Wire.h>
LiquidCrystal_I2C lcd(0x27, 2, 1, 0, 4, 5, 6, 7, 3, POSITIVE); // SET I2C Address
void setup() {
lcd.begin(16,2); // Initialinze LCD.
lcd.backlight(); // makes Backligh ON.
lcd.clear(); // Clears LCD
View ESP32_Py_MQTT_Test.py
import streams
from mqtt import mqtt
from wireless import wifi
from espressif.esp32net import esp32wifi as wifi_driver
wifi_driver.auto_init()
sleep(1000)
streams.serial()
print("Establishing WiFi Link...")
You can’t perform that action at this time.