Skip to content

Instantly share code, notes, and snippets.

View tomazursic's full-sized avatar

Tomaz Ursic tomazursic

View GitHub Profile
@tomazursic
tomazursic / InfluxDB_cheatsheet.md
Last active June 25, 2024 16:02
InfluxDB cheatsheet

InfluxDB Cheatsheet

Connect to InfluxDB using the commandline:

$ influx

Create a database foo:

CREATE DATABASE foo
@tomazursic
tomazursic / logger.py
Last active June 3, 2022 01:32
Python boilerplate
"""
This helper provides logging setup.
The call `logger.info("hello")` prints log messages in this format:
Usage:
from logger import setup_logger
logger = setup_logger()
@tomazursic
tomazursic / install_rtl_433_macOSX.md
Last active October 11, 2020 14:37
rtl_433 macOSX

Install rtl_433 on macOSX Sierra 10.12.5

Install Xcode from AppStore

After installing Xcode you’ll want to open up a terminal and ensure you have accepted the developer license:

$ sudo xcodebuild -license

Install the Apple Command Line Tools

@tomazursic
tomazursic / arange_by_P.bat
Last active December 24, 2022 21:31
Arange icons on windows desktop into falus
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.IO;
using System.Text;
using System.Windows.Forms;
using System.Diagnostics;
using System.Runtime.InteropServices;

Raspbeerry Pi USB gadget

  1. Fresh sd card with Raspbian

  2. Enable ssh

Add empty file "ssh" to /boot partition on SD card

Add to config.txt

@tomazursic
tomazursic / upgrade_stretch_to_buster.sh
Last active July 15, 2019 02:25
Upgrade Jessie to Stretch
#!/bin/bash
sudo apt-get update && \
sudo apt-get upgrade && \
sudo apt-get dist-upgrade && \
dpkg -C && \
apt-mark showhold && \
sudo rpi-update && \
sudo sed -i 's/stretch/buster/g' /etc/apt/sources.list && \
sudo sed -i 's/stretch/buster/g' /etc/apt/sources.list.d/raspi.list && \

Pycom building a firmware image

Requirements

  • Pycom MicroPython source code
  • Xtensa gcc compiler
  • Espressif IoT Development Framework

Debian/Ubuntu

@tomazursic
tomazursic / vim-build.sh
Last active August 14, 2018 23:18
vim-build
# liblua5.1-dev luajit libluajit-5.1
sudo apt-get install liblua5.1-0-dev \
libluajit-5.1-dev \
libluajit-5.1-2 \
libluajit-5.1-common
sudo apt-get install python-dev ruby-dev libperl-dev libncurses5-dev libatk1.0-dev libx11-dev libxpm-dev libxt-dev
#Optional: so vim can be uninstalled again via `dpkg -r vim`
sudo apt-get install checkinstall
@tomazursic
tomazursic / micropython.rst
Last active August 28, 2018 11:11
Notes for building micropython

MicroPython

Build

Install dependences

# source : https://pypi.org/pypi?%3Aaction=list_classifiers
Development Status :: 1 - Planning
Development Status :: 2 - Pre-Alpha
Development Status :: 3 - Alpha
Development Status :: 4 - Beta
Development Status :: 5 - Production/Stable
Development Status :: 6 - Mature
Development Status :: 7 - Inactive
Environment :: Console